News:

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

Main Menu

SMF 2 RC4 Help with certain things

Started by Valdes, January 23, 2011, 01:15:00 PM

Previous topic - Next topic

Valdes

Hi. Im back with more questions(:

First of all, I'm using smf2 rc4, and the theme is Inferno.
Second, I installed simpleportal, and it took away the forum tab.
I looked up on how to put in tabs, and I put it into my index.template. While I did that, I tried to put in a "Play Now!" tab too.
None of these showed up, and I'm new to this, so I could use some help. I attached my index.template to this post.

My second question, is it possible to give crowns to the staff on my forum? I know there's a mod, but its for 1.1 and I don't know if its possible for smf2.


Thanks for reading, and thanks for the support,

Valdes


Road Rash Jr.

Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Valdes

I had done that, and it didn't work. I don't know what I'm doing wrong. :L

This is what I had put for it:


// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
   if (($menu_buttons = cache_get_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
   {
      $buttons = array(
         'home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
         ), 
         'Forum' => array(
                     'title' => $txt['Forum'],
                      'href' => 'http://epk.lesterknome.org/index.php',
                      'show' => true,
                       'sub_buttons' => array(
                        ),

                           ),
         'Play Now!' => array(
                        'title' => $txt['Play Now!'],
                       'href' => 'http://pk.lesterknome.org/webclient.htm',
                       'show' => true,
                      'sub_buttons' => array(
                      ),

         ),
         'help' => array(
            'title' => $txt['help'],
            'href' => $scripturl . '?action=help',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),
         'search' => array(
            'title' => $txt['search'],
            'href' => $scripturl . '?action=search',
            'show' => $context['allow_search'],
            'sub_buttons' => array(
            ),
         ),

ARG01

#4
Try this.

// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
if (($menu_buttons = cache_get_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
{
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
          ),
          ), 
'Forum' => array(
            'title' => $txt['Forum'],
          'href' => $scripturl . '?action=forum',
          'show' => true,
            'sub_buttons' => array(
               ),
                 ),
'Play Now!' => array(
            'title' => $txt['Play Now!'],
          'href' => 'http://pk.lesterknome.org/',
          'show' => true,
            'sub_buttons' => array(
          ),
           ),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
         ),
          ),
'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Valdes

It didn't work, but I'm not smart at this either.
I'll attach my subs.php file, just incase i did something wrong.

ARG01

Quote from: Valdes on January 23, 2011, 09:58:39 PM
I'll attach my subs.php file, just incase i did something wrong.

WOW! What a mess.  ;D
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

ARG01

No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Valdes

It didnt work. I got this error:
"
Strict 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 'America/Chicago' for 'CST/-6.0/no DST' instead in /home/kionf/public_html/epk/index.php on line 62

Warning: require_once(/home/kionf/public_html/epk/Sources/Subs.php) [function.require-once]: failed to open stream: No such file or directory in /home/kionf/public_html/epk/index.php on line 62

Strict 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 'America/Chicago' for 'CST/-6.0/no DST' instead in /home/kionf/public_html/epk/index.php on line 62

Fatal error: require_once() [function.require]: Failed opening required '/home/kionf/public_html/epk/Sources/Subs.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/kionf/public_html/epk/index.php on line 62"

Any ideas?

ARG01

I have no idea as to why you are getting these errors now. Your Subs.php was such a mess that all I did was copy and paste a certain section of code from the original Subs.php and added this to it:

'play now' => array(
'title' => $txt['play now'],
'href' => 'http://pk.lesterknome.org/',
'show' => true,
'sub_buttons' => array(
),
),


No other part of the code was touched except this part that I cleaned up a bit:

// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
if (($menu_buttons = cache_get_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
{
$buttons = array(
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),
'forum' => array(
'title' => $txt['forum'],
'href' => $scripturl . '?action=forum',
'show' => true,
'sub_buttons' => array(
),
),
'play now' => array(
'title' => $txt['play now'],
'href' => 'http://pk.lesterknome.org/',
'show' => true,
'sub_buttons' => array(
),
),
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),
'search' => array(
'title' => $txt['search'],
'href' => $scripturl . '?action=search',
'show' => $context['allow_search'],
'sub_buttons' => array(
),
),
'admin' => array(
'title' => $txt['admin'],
'href' => $scripturl . '?action=admin',
'show' => $context['allow_admin'],
'sub_buttons' => array(
'featuresettings' => array(
'title' => $txt['modSettings_title'],
'href' => $scripturl . '?action=admin;area=featuresettings',
'show' => allowedTo('admin_forum'),
),
'packages' => array(
'title' => $txt['package'],
'href' => $scripturl . '?action=admin;area=packages',
'show' => allowedTo('admin_forum'),
),
'errorlog' => array(
'title' => $txt['errlog'],
'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
),
'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,
),
),
),
'portal' => array(
'title' => $txt['sp-adminCatTitle'],
'href' => $scripturl . '?action=admin;area=portalconfig',
'show' => allowedTo(array('sp_admin', 'sp_manage_settings')),
'is_last' => true,
),
),
),

'moderate' => array(
'title' => $txt['moderate'],
'href' => $scripturl . '?action=moderate',
'show' => $context['allow_moderation_center'],
'sub_buttons' => array(
'modlog' => array(
'title' => $txt['modlog_view'],
'href' => $scripturl . '?action=moderate;area=modlog',
'show' => !empty($modSettings['modlog_enabled']) && !empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1',
),
'poststopics' => array(
'title' => $txt['mc_unapproved_poststopics'],
'href' => $scripturl . '?action=moderate;area=postmod;sa=posts',
'show' => $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']),
),
'attachments' => array(
'title' => $txt['mc_unapproved_attachments'],
'href' => $scripturl . '?action=moderate;area=attachmod;sa=attachments',
'show' => $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']),
),
'reports' => array(
'title' => $txt['mc_reported_posts'],
'href' => $scripturl . '?action=moderate;area=reports',
'show' => !empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1',
'is_last' => true,
),
),
),
'profile' => array(
'title' => $txt['profile'],
'href' => $scripturl . '?action=profile',
'show' => $context['allow_edit_profile'],
'sub_buttons' => array(
'summary' => array(
'title' => $txt['summary'],
'href' => $scripturl . '?action=profile',
'show' => true,
),
'account' => array(
'title' => $txt['account'],
'href' => $scripturl . '?action=profile;area=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumprofile'],
'href' => $scripturl . '?action=profile;area=forumprofile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
'is_last' => true,
),
),
),
'pm' => array(
'title' => $txt['pm_short'],
'href' => $scripturl . '?action=pm',
'show' => $context['allow_pm'],
'sub_buttons' => array(
'pm_read' => array(
'title' => $txt['pm_menu_read'],
'href' => $scripturl . '?action=pm',
'show' => allowedTo('pm_read'),
),
'pm_send' => array(
'title' => $txt['pm_menu_send'],
'href' => $scripturl . '?action=pm;sa=send',
'show' => allowedTo('pm_send'),
'is_last' => true,
),
),
),
'calendar' => array(
'title' => $txt['calendar'],
'href' => $scripturl . '?action=calendar',
'show' => $context['allow_calendar'],
'sub_buttons' => array(
'view' => array(
'title' => $txt['calendar_menu'],
'href' => $scripturl . '?action=calendar',
'show' => allowedTo('calendar_post'),
),
'post' => array(
'title' => $txt['calendar_post_event'],
'href' => $scripturl . '?action=calendar;sa=post',
'show' => allowedTo('calendar_post'),
'is_last' => true,
),
),
),
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Valdes

So what do I do with it?
Im sorry, but im not good with Php that much. Lol


Valdes

I still need help with this, this hasn't been resolved yet.  :-\

Angelina Belle

#13
Valdes,

I see that another user provided you with a replacement for Subs.php. And that you got errors when you tried to use it.

QuoteWarning: require_once(/home/kionf/public_html/epk/Sources/Subs.php) [function.require-once]: failed to open stream: No such file or directory in /home/kionf/public_html/epk/index.php on line 62

It looks like you have no Subs.php in your Sources directory.
Please check in /epk/Sources and make sure you have spelled the file name correctly (including capitalization).

---
edit -- fixed typo that caused extra code tag
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Arantor

Also check the file permissions on it too, should be at least 644.

Angelina Belle

That's a good point.  If the file is not readable -- php will have as much trouble reading it as if it were not there at all.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Matthew K.

Joker, did write a Crowns mod, that is in the mod queue, should be approved shortly.

Angelina Belle

It is kind of confusing to try to deal with 3 issues at once in a single thread, isn't it?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Valdes

Thanks for the replies guys,
I am on a school computer right now, but I will look at my files and make sure everythings right.

And yes it is hard to deal with 3 issues in one thread  O:)

Angelina Belle

OK. Is the replacement Subs.php working for you? Are you still getting the error that it cannot find Subs.php?
Can you check that you have a Subs.php in the Sources directory?
If it is there, and you still get the error, can you check and correct the permissions (CHMOD) on Sources/Subs.php?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Advertisement: