News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

errors in SUBS.PHP plz help me out to correct it

Started by Baloch, May 07, 2011, 09:04:11 AM

Previous topic - Next topic

Baloch

Hello there,

today i have upgraded my site from SMF 2.0 RC 4 to SMF 2.0 RC 5. it has been  upgraded without any issue but copy right is still old like "Powered by SMF 2.0 RC5 | SMF © 2006–2010, Simple Machines LLC"

When I tried to reinstall my all mods (RC5 Compatible ) few of them showed test error.
Then I have tried to add customized buttons in subs.php during this i had lost actual contents of subs.php and my sites control.
Then I have resumed subs.php from Large Package folder then installed all modules and all installed successfully without any error.
but now another issue is in front of mine.

I have to add few buttons in b/w HOME and HELP i have added these lines in subs.php
Quote
           'brahvai' => array(
            'title' => 'Brahvai Literature',
            'href' => ' http://baask.com/diwwan/index.php?board=8.0',
            'show' => true,
            'sub_buttons' => array(
     'brahvaikb' => array(
          'title' => 'Download Brahvai Keyboard',
          'href' => 'http://baask.com/download/ZBK4.zip',
                  'show' => true,
               ),
     'brahvaiphrase' => array(
      'title' => 'Brahvai Phrases for Learners',
'href' => 'http://baask.com/diwwan/index.php?topic=3374',
                  'show' => true,
               ),
   ),
         ),

         'Learn' => array(
            'title' => 'Learn',
            'href' => 'http://baask.com/diwwan/index.php?page=learn',
            'show' => true,
            'sub_buttons' => array(
     'baluchil' => array(
          'title' => 'Basic & Intermediate Baluchi',
          'href' => 'http://baask.com/diwwan/index.php?page=learn',
                  'show' => true,
               ),
     'brahvail' => array(
                  'title' => 'Brahvai Phrases',
'href' => 'http://baask.com/diwwan/index.php?topic=3374',
                  'show' => true,
               ),
'inpagecomp' => array(
             'title' => ' Baluchi Composing in INPAGE',
'href' => 'http://www.baask.com/diwwan/?topic=3601',
                  'show' => true,
               ),
'poetrydesign' => array(
             'title' => 'Balochi Poetry Background Designing',
'href' => 'http://www.baask.com/diwwan/?topic=1914',
                  'show' => true,
               ),
            ),
         ),


         'multimedia' => array(
            'title' => 'Multimedia',
            'href' => 'http://baask.com/media',
            'show' => true,
            'sub_buttons' => array(
     'audio' => array(
          'title' => 'Audio Albums',
          'href' => 'http://baask.com/media/index.php?p=1.%20Audio%20Library',
                  'show' => true,
               ),
     'video' => array(
                  'title' => 'Video Albums',
'href' => 'http://baask.com/media/index.php?p=2.%20Video%20Library',
                  'show' => true,
               ),
'ringtone' => array(
             'title' => ' Balochi Mobile Ring Tones',
'href' => 'http://baask.com/media/index.php?p=Baluchi%20Ringing%20Tone',
                  'show' => true,
               ),
'mushairah' => array(
             'title' => 'Balochi Mushairah',
'href' => 'http://baask.com/media/index.php?p=Baluchi%20Mushairah',
                  'show' => true,
               ),
'baaskanitawar' => array(
             'title' => ' Baaskani Tawaar',
'href' => 'http://baask.com/media/index.php?p=Baaskani%20Tawar',
                  'show' => true,
               ),
'youtube' => array(
             'title' => 'Youtube Videos',
'href' => 'http://baask.com/diwwan/index.php?board=53.0',
                  'show' => true,
               ),

            ),
         ),

but i m getting error like this

QuoteStrict Standards: require_once() [function.require-once]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'GMT/0.0/no DST' instead in /home/baaskcom/public_html/diwwan/Sources/Subs.php on line 2384

Parse error: syntax error, unexpected $end in /home/baaskcom/public_html/diwwan/Sources/Subs.php on line 2384




HunterP

#1
Hi Baloch,

First of all, please start using tabs, your added code is very difficult to read :

         'Learn' => array(
            'title' => 'Learn',
            'href' => 'http://baask.com/diwwan/index.php?page=learn',
            'show' => true,
            'sub_buttons' => array(
     'baluchil' => array(
          'title' => 'Basic & Intermediate Baluchi',
          'href' => 'http://baask.com/diwwan/index.php?page=learn',
                  'show' => true,
               ),


This is much better :

'Learn' => array(
'title' => 'Learn',
'href' => 'http://baask.com/diwwan/index.php?page=learn',
'show' => true,
'sub_buttons' => array(
'baluchil' => array(
'title' => 'Basic & Intermediate Baluchi',
'href' => 'http://baask.com/diwwan/index.php?page=learn',
'show' => true,
),


I hope you see the difference and understand what tabs are meant for in programming.

Secondly, this line seems to contain a line break which probably causes your error :

'href' => 'http://dsal.uchicago.edu/dictionaries/list.html#baluchi
',


Last :

'balbooks' => array(             
'title' => ' Baluchi Books',
'href' => 'http://baask.com/literature',
             'show' => true,
'sub_buttons' => array(
),
),


This sub_button array is empty. If no sub_buttons are used, don't add an empty array (I removed it for you)

I've attached a cleaned subs.php, please let me know if this one works ok?

Advertisement: