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
Bump.
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)
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(
),
),
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(
),
),
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.
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
Try this.
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?
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,
),
),
),
So what do I do with it?
Im sorry, but im not good with Php that much. Lol
Bump.
I still need help with this, this hasn't been resolved yet. :-\
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
Also check the file permissions on it too, should be at least 644.
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.
Joker, did write a Crowns mod, that is in the mod queue, should be approved shortly.
It is kind of confusing to try to deal with 3 issues at once in a single thread, isn't it?
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:)
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?
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.
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.
Is it possible that I can find line 8009? Im no expert, but is there a way?
Open Subs.php in a text-editor such as Notepad++ which has a linecount on the left hand side.
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.
Who makes bugs when they develop mods? :o
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.
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.
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)
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.
Okay thanks.
Subs.php
'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,
),
),
),
'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,
),
),
),
Worked thanks. Marking resolved. =)
No problem, glad I could help :)