Advertisement:

Author Topic: SMF 2 RC4 Help with certain things  (Read 5998 times)

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
SMF 2 RC4 Help with certain things
« on: January 23, 2011, 01:15:00 PM »
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
« Last Edit: April 01, 2011, 05:37:10 PM by Valdes »

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #1 on: January 23, 2011, 06:13:02 PM »
Bump.

Offline Road Rash Jr.

  • Sr. Member
  • ****
  • Posts: 765
Re: SMF 2 RC4 Help with certain things
« Reply #2 on: January 23, 2011, 06:39:25 PM »
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #3 on: January 23, 2011, 09:28:51 PM »
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(
            ),
         ),

Offline ARG01

  • SMF Hero
  • ******
  • Posts: 4,596
  • Dziner-Studio
    • Dziner-Studio
Re: SMF 2 RC4 Help with certain things
« Reply #4 on: January 23, 2011, 09:45:02 PM »
Try this.

Code: [Select]
// 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(
),
),
« Last Edit: January 23, 2011, 09:49:12 PM by G1 »
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #5 on: January 23, 2011, 09:58:39 PM »
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.

Offline ARG01

  • SMF Hero
  • ******
  • Posts: 4,596
  • Dziner-Studio
    • Dziner-Studio
Re: SMF 2 RC4 Help with certain things
« Reply #6 on: January 23, 2011, 10:09:58 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.

Offline ARG01

  • SMF Hero
  • ******
  • Posts: 4,596
  • Dziner-Studio
    • Dziner-Studio
Re: SMF 2 RC4 Help with certain things
« Reply #7 on: January 23, 2011, 10:23:26 PM »
Try this.
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #8 on: January 24, 2011, 03:09:01 PM »
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?

Offline ARG01

  • SMF Hero
  • ******
  • Posts: 4,596
  • Dziner-Studio
    • Dziner-Studio
Re: SMF 2 RC4 Help with certain things
« Reply #9 on: January 24, 2011, 04:13:24 PM »
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:

Code: [Select]
'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:

Code: [Select]
// 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.

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #10 on: January 24, 2011, 05:34:12 PM »
So what do I do with it?
Im sorry, but im not good with Php that much. Lol

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #11 on: January 24, 2011, 09:10:02 PM »
Bump.

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #12 on: February 20, 2011, 11:40:25 PM »
I still need help with this, this hasn't been resolved yet.  :-\

Offline Angelina Belle

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,586
Re: SMF 2 RC4 Help with certain things
« Reply #13 on: March 10, 2011, 09:59:04 AM »
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.

Quote
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

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
« Last Edit: April 01, 2011, 10:13:15 AM by AngelinaBelle »
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,994
    • StoryBB/StoryBB on GitHub
Re: SMF 2 RC4 Help with certain things
« Reply #14 on: March 10, 2011, 10:55:51 AM »
Also check the file permissions on it too, should be at least 644.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Angelina Belle

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,586
Re: SMF 2 RC4 Help with certain things
« Reply #15 on: March 10, 2011, 01:47:31 PM »
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

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,430
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: SMF 2 RC4 Help with certain things
« Reply #16 on: March 10, 2011, 01:57:29 PM »
Joker, did write a Crowns mod, that is in the mod queue, should be approved shortly.

Offline Angelina Belle

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,586
Re: SMF 2 RC4 Help with certain things
« Reply #17 on: March 10, 2011, 02:07:05 PM »
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

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #18 on: April 01, 2011, 09:10:31 AM »
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:)

Offline Angelina Belle

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,586
Re: SMF 2 RC4 Help with certain things
« Reply #19 on: April 01, 2011, 10:16:15 AM »
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

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #20 on: April 01, 2011, 05:35:51 PM »
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?
No, the replacement Subs.php did not work, it gave me this:

Code: [Select]
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 'CDT/-5.0/DST' instead in /home/kionf/public_html/epk/Sources/Subs.php on line 8009

Parse error: syntax error, unexpected ',' in /home/kionf/public_html/epk/Sources/Subs.php on line 8009
I checked the file permissions, they are 0644, and it is in the sources folder.

I don't know what's wrong.

Offline Angelina Belle

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,586
Re: SMF 2 RC4 Help with certain things
« Reply #21 on: April 04, 2011, 06:59:41 AM »
You have a syntax error on line 8009 of Subs.php.
The php parser did not expect a comma where it found it. This could mean something else (like a closing parenthesis) was missing before that point, perhaps even on an earlier line, if 8009 is part of a multi-line statement.

I don't know what line 8009 of your Subs.php looks like, so I cannot give you any more help than that.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #22 on: April 04, 2011, 04:32:02 PM »
Is it possible that I can find line 8009? Im no expert, but is there a way?

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,430
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: SMF 2 RC4 Help with certain things
« Reply #23 on: April 04, 2011, 04:39:05 PM »
Open Subs.php in a text-editor such as Notepad++ which has a linecount on the left hand side.

Offline Angelina Belle

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,586
Re: SMF 2 RC4 Help with certain things
« Reply #24 on: April 05, 2011, 09:47:26 AM »
Valdes, I highly recommend a half-decent editor with line numbers if you are going to do any kind of customization. Otherwise, I am afraid you will lose your mind!

Writing code always means making bugs. Better tools means an easier time finding them.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,430
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: SMF 2 RC4 Help with certain things
« Reply #25 on: April 05, 2011, 01:00:38 PM »
Who makes bugs when they develop mods?  :o

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,994
    • StoryBB/StoryBB on GitHub
Re: SMF 2 RC4 Help with certain things
« Reply #26 on: April 05, 2011, 01:32:44 PM »
Who makes bugs when they develop mods?  :o

Anyone who writes anything of complexity will make bugs.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,430
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: SMF 2 RC4 Help with certain things
« Reply #27 on: April 05, 2011, 01:41:03 PM »
That was sarcasm, Arantor. I was joking.
Who makes bugs when they develop mods?  :o

Anyone who writes anything of complexity will make bugs.

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #28 on: April 12, 2011, 06:20:00 PM »
This is what my line 8009 of my Subs.php


Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,430
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: SMF 2 RC4 Help with certain things
« Reply #29 on: April 12, 2011, 06:22:02 PM »
The problem is that the Admin array is closed off before SimplePortals tab.

Remove the three ), that are right above the portal tab, and it'll fix it.

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #30 on: April 12, 2011, 06:28:14 PM »
Okay thanks.

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,430
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: SMF 2 RC4 Help with certain things
« Reply #31 on: April 12, 2011, 06:32:59 PM »
Subs.php
Code: (Find) [Select]
'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,
),
),
),
Code: (Replace) [Select]
'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,
),
),
),

Offline Valdes

  • Semi-Newbie
  • *
  • Posts: 25
Re: SMF 2 RC4 Help with certain things
« Reply #32 on: April 12, 2011, 06:37:29 PM »
Worked thanks. Marking resolved. =)

Offline Matthew K.

  • SMF Super Hero
  • *******
  • Posts: 12,430
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: SMF 2 RC4 Help with certain things
« Reply #33 on: April 12, 2011, 08:49:12 PM »
No problem, glad I could help :)