Changeset 1351

Show
Ignore:
Timestamp:
12/04/07 13:15:38 (1 year ago)
Author:
rho
Message:

cleanup unused function

Signed-off: Rolando Espinoza La fuente <rho@prosoftpeople.com>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/lib/templates.php

    r1348 r1351  
    3131 } 
    3232  
    33 function default_template () { 
    34  
    35     global $CFG; 
    36     global $template; 
    37     global $template_definition; 
    38     $sitename = $CFG->sitename; 
    39  
    40     $run_result = ''; 
    41  
    42     $template_definition[] = array( 
    43                                     'id' => 'css', 
    44                                     'name' => __gettext("Stylesheet"), 
    45                                     'description' => __gettext("The Cascading Style Sheet for the template."), 
    46                                     'glossary' => array(), 
    47                                     'display'  => 1, 
    48                                     ); 
    49  
    50     $template['css'] = file_get_contents($CFG->templatesroot . "Default_Template/css"); 
    51      
    52     $template_definition[] = array( 
    53                                    'id' => 'pageshell', 
    54                                    'name' => __gettext("Page Shell"), 
    55                                    'description' => __gettext("The main page shell, including headers and footers."), 
    56                                    'glossary' => array( 
    57                                                        '{{metatags}}' => __gettext("Page metatags (mandatory) - must be in the 'head' portion of the page"), 
    58                                                        '{{title}}' => __gettext("Page title"), 
    59                                                        '{{menu}}' => __gettext("Menu"), 
    60                                                        '{{topmenu}}' => __gettext("Status menu"), 
    61                                                        '{{mainbody}}' => __gettext("Main body"), 
    62                                                        '{{sidebar}}' => __gettext("Sidebar") 
    63                                                        ) 
    64                                    ); 
    65      
    66     $welcome = __gettext("Welcome"); // gettext variable 
    67         
    68     $template['pageshell'] = file_get_contents($CFG->templatesroot . "Default_Template/pageshell"); 
    69  
    70     $template['frontpage_loggedout'] = file_get_contents($CFG->templatesroot . "Default_Template/frontpage_loggedout"); 
    71     $template['frontpage_loggedin'] = file_get_contents($CFG->templatesroot . "Default_Template/frontpage_loggedin"); 
    72      
    73     // REMOVED stylesheet (was old version and should not have been here) 
    74     // TODO: extract all Default_Template stuff from lib/templates.php 
    75  
    76 $template_definition[] = array( 
    77                                     'id' => 'contentholder', 
    78                                     'name' => __gettext("Content holder"), 
    79                                     'description' => __gettext("Contains the main content for a page (as opposed to the sidebar or the title)."), 
    80                                     'glossary' => array( 
    81                                                             '{{title}}' => __gettext("The title"), 
    82                                                             '{{submenu}}' => __gettext("The page submenu"), 
    83                                                             '{{body}}' => __gettext("The body of the page") 
    84                                                         ) 
    85                                     );     
    86  
    87     $template['contentholder'] = <<< END 
    88      
    89     <div class="SectionContent"> 
    90      
    91     <h1>{{title}}</h1> 
    92     {{submenu}} 
    93     </div> 
    94     {{body}} 
    95      
    96 END; 
    97  
    98     $template_definition[] = array( 
    99                                     'id' => 'ownerbox', 
    100                                     'name' => __gettext("Owner box"), 
    101                                     'description' => __gettext("A box containing a description of the owner of the current profile."), 
    102                                     'glossary' => array( 
    103                                                             '{{name}}' => __gettext("The user's name"), 
    104                                                             '{{profileurl}}' => __gettext("The URL of the user's profile page, including terminating slash"), 
    105                                                             '{{usericon}}' => __gettext("The user's icon, if it exists"), 
    106                                                             '{{tagline}}' => __gettext("A short blurb about the user"), 
    107                                                             '{{usermenu}}' => __gettext("Links to friend / unfriend a user"), 
    108                                                             '{{lmshosts}}' => __gettext("Links to any lms hosts the user is attached to"), 
    109                                                         ) 
    110                                     ); 
    111  
    112     $tags = __gettext("Tags"); 
    113     $resources = __gettext("Resources"); 
    114     $template['ownerbox'] = <<< END 
    115      
    116     <div class="me"> 
    117         <div style="float: left; width: 70px"><a href="{{profileurl}}">{{usericon}}</a></div> 
    118         <div style="margin-left: 75px; margin-top: 0px; padding-top: 0px; text-align: left" ><p> 
    119             <span class="userdetails">{{name}}<br /><a href="{{profileurl}}rss/">RSS</a> | <a href="{{profileurl}}tags/">$tags</a> | <a href="{{profileurl}}newsclient/">$resources</a></span></p> 
    120             <p>{{tagline}}</p> 
    121             <p>{{lmshosts}}</p> 
    122             <p style="margin-bottom: 3px" class="usermenu">{{usermenu}}</p> 
    123         </div> 
    124     </div> 
    125  
    126 END; 
    127                                      
    128     $template_definition[] = array( 
    129                                     'id' => 'infobox', 
    130                                     'name' => __gettext("Information Box"), 
    131                                     'description' => __gettext("A box containing a caption and some text, used extensively throughout the site. For example, the 'friends' box and most page bodies are info boxes. Of course, you can alter this template however you wish - it doesn't need to be an actual box."), 
    132                                     'glossary' => array( 
    133                                                             '{{name}}' => __gettext("The title"), 
    134                                                             '{{contents}}' => __gettext("The contents of the box") 
    135                                                         ) 
    136                                     ); 
    137     $template['infobox'] = <<< END 
    138  
    139 <table class="infobox" width="100%"> 
    140     <caption align="top"> 
    141         {{name}} 
    142     </caption> 
    143     <tr> 
    144         <td> 
    145 {{contents}} 
    146         </td> 
    147     </tr> 
    148 </table><br /> 
    149 END; 
    150  
    151     $template_definition[] = array( 
    152                                     'id' => 'messageshell', 
    153                                     'name' => __gettext("System message shell"), 
    154                                     'description' => __gettext("A list of system messages will be placed within the message shell."), 
    155                                     'glossary' => array( 
    156                                                             '{{messages}}' => __gettext("The messages") 
    157                                                         ) 
    158                                     ); 
    159  
    160     $template['messageshell'] = <<< END 
    161      
    162     <div id="js">{{messages}}</div><br /> 
    163      
    164 END; 
    165  
    166     $template_definition[] = array( 
    167                                     'id' => 'messages', 
    168                                     'name' => __gettext("Individual system messages"), 
    169                                     'description' => __gettext("Each individual system message."), 
    170                                     'glossary' => array( 
    171                                                             '{{message}}' => __gettext("The system message") 
    172                                                         ) 
    173                                     ); 
    174  
    175     $template['messages'] = <<< END 
    176  
    177     <p> 
    178         {{message}} 
    179     </p> 
    180      
    181 END; 
    182      
    183  
    184     $template_definition[] = array( 
    185                                     'id' => 'menu', 
    186                                     'name' => __gettext("Main menu shell"), 
    187                                     'description' => __gettext("A list of main menu items will be placed within the menubar shell."), 
    188                                     'glossary' => array( 
    189                                                             '{{menuitems}}' => __gettext("The menu items") 
    190                                                         ) 
    191                                     ); 
    192  
    193     $template['menu'] = <<< END 
    194      
    195       {{menuitems}} 
    196 END; 
    197  
    198     $template_definition[] = array( 
    199                                     'id' => 'menuitem', 
    200                                     'name' => __gettext("Individual main menu item"), 
    201                                     'description' => __gettext("This is the template for each individual main menu item. A series of these is placed within the menubar shell template."), 
    202                                     'glossary' => array( 
    203                                                             '{{location}}' => __gettext("The URL of the menu item"), 
    204                                                             '{{name}}' => __gettext("The menu item's name") 
    205                                                         ) 
    206                                     ); 
    207  
    208     $template['menuitem'] = <<< END 
    209      
    210     <li><a href="{{location}}">{{name}}</a></li> 
    211      
    212 END; 
    213  
    214 $template_definition[] = array( 
    215                                     'id' => 'selectedmenuitem', 
    216                                     'name' => __gettext("Selected individual main menu item"), 
    217                                     'description' => __gettext("This is the template for an individual main menu item if it is selected."), 
    218                                     'glossary' => array( 
    219                                                             '{{location}}' => __gettext("The URL of the menu item"), 
    220                                                             '{{name}}' => __gettext("The menu item's name") 
    221                                                         ) 
    222                                     ); 
    223  
    224     $template['selectedmenuitem'] = <<< END 
    225      
    226     <li><a class="current" href="{{location}}">{{name}}</a></li> 
    227      
    228 END; 
    229  
    230     $template_definition[] = array( 
    231                                     'id' => 'submenu', 
    232                                     'name' => __gettext("Sub-menubar shell"), 
    233                                     'description' => __gettext("A list of sub-menu items will be placed within the menubar shell."), 
    234                                     'glossary' => array( 
    235                                                             '{{submenuitems}}' => __gettext("The menu items") 
    236                                                         ) 
    237                                     ); 
    238  
    239     $template['submenu'] = <<< END 
    240      
    241         <h3> 
    242             {{submenuitems}} 
    243         </h3> 
    244 END; 
    245  
    246     $template_definition[] = array( 
    247                                     'id' => 'submenuitem', 
    248                                     'name' => __gettext("Individual sub-menu item"), 
    249                                     'description' => __gettext("This is the template for each individual sub-menu item. A series of these is placed within the sub-menubar shell template."), 
    250                                     'glossary' => array( 
    251                                                             '{{location}}' => __gettext("The URL of the menu item"), 
    252                                                             '{{menu}}' => __gettext("The menu item's name") 
    253                                                         ) 
    254                                     ); 
    255  
    256     $template['submenuitem'] = <<< END 
    257      
    258     <a href="{{location}}">{{name}}</a>&nbsp;| 
    259      
    260 END; 
    261  
    262     $template_definition[] = array( 
    263                                     'id' => 'topmenu', 
    264                                     'name' => __gettext("Status menubar shell"), 
    265                                     'description' => __gettext("A list of statusbar menu items will be placed within the status menubar shell."), 
    266                                     'glossary' => array( 
    267                                                             '{{topmenuitems}}' => __gettext("The menu items") 
    268                                                         ) 
    269                                     ); 
    270  
    271     $template['topmenu'] = <<< END 
    272      
    273         <div id="StatusRight"> 
    274             {{topmenuitems}} 
    275         </div> 
    276  
    277 END; 
    278  
    279 $template_definition[] = array( 
    280                                     'id' => 'topmenuitem', 
    281                                     'name' => __gettext("Individual statusbar menu item"), 
    282                                     'description' => __gettext("This is the template for each individual statusbar menu item. A series of these is placed within the status menubar shell template."), 
    283                                     'glossary' => array( 
    284                                                             '{{location}}' => __gettext("The URL of the menu item"), 
    285                                                             '{{menu}}' => __gettext("The menu item's name") 
    286                                                         ) 
    287                                     ); 
    288  
    289     $template['topmenuitem'] = <<< END 
    290      
    291     [<a href="{{location}}">{{name}}</a>]&nbsp; 
    292      
    293 END; 
    294  
    295     $template_definition[] = array( 
    296                                     'id' => 'databox', 
    297                                     'name' => __gettext("Data input box (two columns)"), 
    298                                     'description' => __gettext("This is mostly used whenever some input is taken from the user. For example, each of the fields in the profile edit screen is a data input box."), 
    299                                     'glossary' => array( 
    300                                                             '{{name}}' => __gettext("The name for the data we're inputting"), 
    301                                                             '{{column1}}' => __gettext("The first item of data"), 
    302                                                             '{{column2}}' => __gettext("The second item of data") 
    303                                                         ) 
    304                                     ); 
    305  
    306     $template['databox'] = <<< END 
    307  
    308 <div class="infobox"> 
    309     <table width="95%" class="profiletable" align="center" style="margin-bottom: 3px"> 
    310     <tr> 
    311  
    312         <td width="20%" class="fieldname" valign="top"> 
    313             <p><b>{{name}}</b></p> 
    314         </td> 
    315         <td width="50%" valign="top"> 
    316             <p>{{column1}}</p> 
    317         </td> 
    318         <td width="30%" valign="top"> 
    319             <p>{{column2}}</p> 
    320         </td> 
    321     </tr> 
    322     </table> 
    323 </div> 
    324          
    325 END; 
    326  
    327     $template_definition[] = array( 
    328                                     'id' => 'databox1', 
    329                                     'name' => __gettext("Data input box (one column)"), 
    330                                     'description' => __gettext("A single-column version of the data box."), 
    331                                     'glossary' => array( 
    332                                                             '{{name}}' => __gettext("The name of the data we're inputting"), 
    333                                                             '{{column1}}' => __gettext("The data itself") 
    334                                                         ) 
    335                                     ); 
    336  
    337     $template['databox1'] = <<< END 
    338  
    339 <div class="infobox"> 
    340     <table width="95%" class="profiletable" align="center" style="margin-bottom: 3px"> 
    341     <tr> 
    342  
    343         <td width="20%" class="fieldname" valign="top"> 
    344             <p><b>{{name}}</b></p> 
    345         </td> 
    346         <td width="80%" valign="top"> 
    347             <p>{{column1}}</p> 
    348         </td> 
    349     </tr> 
    350     </table> 
    351 </div> 
    352          
    353 END; 
    354  
    355     $template_definition[] = array( 
    356                                     'id' => 'databoxvertical', 
    357                                     'name' => __gettext("Data input box (vertical)"), 
    358                                     'description' => __gettext("A slightly different version of the data box, used on this edit page amongst other places."), 
    359                                     'glossary' => array( 
    360                                                             '{{name}}' => __gettext("Name of the data we\'re inputting"), 
    361                                                             '{{contents}}' => __gettext("The data itself") 
    362                                                         ) 
    363                                     ); 
    364  
    365     $template['databoxvertical'] = <<< END 
    366 <div class="infobox"> 
    367     <table width="95%" class="fileTable" align="center" style="margin-bottom: 3px"> 
    368         <tr> 
    369             <td class="fieldname"> 
    370                 <p><b>{{name}}</b></p> 
    371             </td> 
    372         </tr> 
    373         <tr> 
    374             <td> 
    375                 <p>{{contents}}</p> 
    376             </td> 
    377         </tr> 
    378     </table> 
    379 </div> 
    380          
    381 END; 
    382 return $run_result; 
    383 } 
    384  
    38533function templates_main () { 
    38634