Changeset 1071 in ExiteCMS for trunk/forum/options.php


Ignore:
Timestamp:
11/06/07 17:12:56 (5 years ago)
Author:
root
Message:

Replaced all includes of locales file by a call to locale_load()
Replaced all locale file references in templates by the locale name
Updated the theme functions to call locale_load() for template locales

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/forum/options.php

    r834 r1071  
    2020 
    2121// load the locale for this forum module 
    22 include PATH_LOCALE.LOCALESET."forum/options.php"; 
     22locale_load("forum.options"); 
    2323 
    2424// validate parameters 
     
    6969    } 
    7070    // define the body panel variables 
    71     $template_panels[] = array('type' => 'body', 'name' => 'forum.options.renew', 'title' => $locale['458'], 'template' => 'forum.options.tpl', 'locale' => PATH_LOCALE.LOCALESET."forum/options.php"); 
     71    $template_panels[] = array('type' => 'body', 'name' => 'forum.options.renew', 'title' => $locale['458'], 'template' => 'forum.options.tpl', 'locale' => "forum.options"); 
    7272    $template_variables['forum.options.renew'] = $variables; 
    7373} 
     
    109109    } 
    110110    // define the body panel variables 
    111     $template_panels[] = array('type' => 'body', 'name' => 'forum.options.delete', 'title' => $locale['400'], 'template' => 'forum.options.tpl', 'locale' => PATH_LOCALE.LOCALESET."forum/options.php"); 
     111    $template_panels[] = array('type' => 'body', 'name' => 'forum.options.delete', 'title' => $locale['400'], 'template' => 'forum.options.tpl', 'locale' => "forum.options"); 
    112112    $template_variables['forum.options.delete'] = $variables; 
    113113} 
     
    117117    $result = dbquery("UPDATE ".$db_prefix."threads SET thread_locked='1' WHERE thread_id='$thread_id'"); 
    118118    // define the body panel variables 
    119     $template_panels[] = array('type' => 'body', 'name' => 'forum.options.lock', 'title' => $locale['410'], 'template' => 'forum.options.tpl', 'locale' => PATH_LOCALE.LOCALESET."forum/options.php"); 
     119    $template_panels[] = array('type' => 'body', 'name' => 'forum.options.lock', 'title' => $locale['410'], 'template' => 'forum.options.tpl', 'locale' => "forum.options"); 
    120120    $template_variables['forum.options.lock'] = $variables; 
    121121} 
     
    125125    $result = dbquery("UPDATE ".$db_prefix."threads SET thread_locked='0' WHERE thread_id='$thread_id'"); 
    126126    // define the body panel variables 
    127     $template_panels[] = array('type' => 'body', 'name' => 'forum.options.unlock', 'title' => $locale['420'], 'template' => 'forum.options.tpl', 'locale' => PATH_LOCALE.LOCALESET."forum/options.php"); 
     127    $template_panels[] = array('type' => 'body', 'name' => 'forum.options.unlock', 'title' => $locale['420'], 'template' => 'forum.options.tpl', 'locale' => "forum.options"); 
    128128    $template_variables['forum.options.unlock'] = $variables; 
    129129} 
     
    133133    $result = dbquery("UPDATE ".$db_prefix."threads SET thread_sticky='1' WHERE thread_id='$thread_id'"); 
    134134    // define the body panel variables 
    135     $template_panels[] = array('type' => 'body', 'name' => 'forum.options.sticky', 'title' => $locale['430'], 'template' => 'forum.options.tpl', 'locale' => PATH_LOCALE.LOCALESET."forum/options.php"); 
     135    $template_panels[] = array('type' => 'body', 'name' => 'forum.options.sticky', 'title' => $locale['430'], 'template' => 'forum.options.tpl', 'locale' => "forum.options"); 
    136136    $template_variables['forum.options.sticky'] = $variables; 
    137137} 
     
    141141    $result = dbquery("UPDATE ".$db_prefix."threads SET thread_sticky='0' WHERE thread_id='$thread_id'"); 
    142142    // define the body panel variables 
    143     $template_panels[] = array('type' => 'body', 'name' => 'forum.options.sticky', 'title' => $locale['440'], 'template' => 'forum.options.tpl', 'locale' => PATH_LOCALE.LOCALESET."forum/options.php"); 
     143    $template_panels[] = array('type' => 'body', 'name' => 'forum.options.sticky', 'title' => $locale['440'], 'template' => 'forum.options.tpl', 'locale' => "forum.options"); 
    144144    $template_variables['forum.options.sticky'] = $variables; 
    145145} 
     
    233233 
    234234    // define the body panel variables 
    235     $template_panels[] = array('type' => 'body', 'name' => 'forum.options.move', 'title' => $locale['450'], 'template' => 'forum.options.tpl', 'locale' => PATH_LOCALE.LOCALESET."forum/options.php"); 
     235    $template_panels[] = array('type' => 'body', 'name' => 'forum.options.move', 'title' => $locale['450'], 'template' => 'forum.options.tpl', 'locale' => "forum.options"); 
    236236    $template_variables['forum.options.move'] = $variables; 
    237237} 
     
    261261    } 
    262262    // define the body panel variables 
    263     $template_panels[] = array('type' => 'body', 'name' => 'forum.options.merge', 'title' => $locale['455'], 'template' => 'forum.options.tpl', 'locale' => PATH_LOCALE.LOCALESET."forum/options.php"); 
     263    $template_panels[] = array('type' => 'body', 'name' => 'forum.options.merge', 'title' => $locale['455'], 'template' => 'forum.options.tpl', 'locale' => "forum.options"); 
    264264    $template_variables['forum.options.merge'] = $variables; 
    265265} 
Note: See TracChangeset for help on using the changeset viewer.