Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Valdes on January 23, 2011, 01:15:00 PM

Title: SMF 2 RC4 Help with certain things
Post by: Valdes 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
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes on January 23, 2011, 06:13:02 PM
Bump.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Road Rash Jr. on January 23, 2011, 06:39:25 PM
Try this for your tabs http://www.simplemachines.org/community/index.php?topic=261880.0 (http://www.simplemachines.org/community/index.php?topic=261880.0)
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes 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(
            ),
         ),
Title: Re: SMF 2 RC4 Help with certain things
Post by: ARG01 on January 23, 2011, 09:45:02 PM
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(
),
),
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes 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.
Title: Re: SMF 2 RC4 Help with certain things
Post by: ARG01 on January 23, 2011, 10:09:58 PM
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
Title: Re: SMF 2 RC4 Help with certain things
Post by: ARG01 on January 23, 2011, 10:23:26 PM
Try this.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes 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?
Title: Re: SMF 2 RC4 Help with certain things
Post by: ARG01 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:

'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,
),
),
),
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes 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
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes on January 24, 2011, 09:10:02 PM
Bump.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes on February 20, 2011, 11:40:25 PM
I still need help with this, this hasn't been resolved yet.  :-\
Title: Re: SMF 2 RC4 Help with certain things
Post by: Angelina Belle 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.

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
Title: Re: SMF 2 RC4 Help with certain things
Post by: Arantor on March 10, 2011, 10:55:51 AM
Also check the file permissions on it too, should be at least 644.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Angelina Belle 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.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Matthew K. on March 10, 2011, 01:57:29 PM
Joker, did write a Crowns mod, that is in the mod queue, should be approved shortly.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Angelina Belle 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?
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes 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:)
Title: Re: SMF 2 RC4 Help with certain things
Post by: Angelina Belle 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?
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes on April 01, 2011, 05:35:51 PM
Quote from: AngelinaBelle 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?
No, the replacement Subs.php did not work, it gave me this:


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.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Angelina Belle 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.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes 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?
Title: Re: SMF 2 RC4 Help with certain things
Post by: Matthew K. 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.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Angelina Belle 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.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Matthew K. on April 05, 2011, 01:00:38 PM
Who makes bugs when they develop mods?  :o
Title: Re: SMF 2 RC4 Help with certain things
Post by: Arantor on April 05, 2011, 01:32:44 PM
Quote from: Labradoodle-360 on April 05, 2011, 01:00:38 PM
Who makes bugs when they develop mods?  :o

Anyone who writes anything of complexity will make bugs.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Matthew K. on April 05, 2011, 01:41:03 PM
That was sarcasm, Arantor. I was joking.
Quote from: Arantor on April 05, 2011, 01:32:44 PM
Quote from: Labradoodle-360 on April 05, 2011, 01:00:38 PM
Who makes bugs when they develop mods?  :o

Anyone who writes anything of complexity will make bugs.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes on April 12, 2011, 06:20:00 PM
This is what my line 8009 of my Subs.php
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi56.tinypic.com%2Ffk8ozs.jpg&hash=170c83ecd8f1d02bc8117bffbc0ca04a007ae00a)
Title: Re: SMF 2 RC4 Help with certain things
Post by: Matthew K. 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.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes on April 12, 2011, 06:28:14 PM
Okay thanks.
Title: Re: SMF 2 RC4 Help with certain things
Post by: Matthew K. 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,
),
),
),
Title: Re: SMF 2 RC4 Help with certain things
Post by: Valdes on April 12, 2011, 06:37:29 PM
Worked thanks. Marking resolved. =)
Title: Re: SMF 2 RC4 Help with certain things
Post by: Matthew K. on April 12, 2011, 08:49:12 PM
No problem, glad I could help :)