EntropySink

Technical & Scientific => Programming => Topic started by: Steve on October 05, 2008, 05:19:20 PM

Title: SMF Support
Post by: Steve on October 05, 2008, 05:19:20 PM
The support staff of SMF is really getting burnt out. It seems like if your question is somewhat technical, and its not already documented somewhere, you get no help. The old hats are just tired, and the new guys seem to only help when they can copy and paste or link you and point out the search function.

It just sucks. I asked what i thought was a simple question about the difference in templates from 1.1.x to 2.0 so that i can update my forums theme to the new system. Rather then try and help the only person who replied simply pointed out the obvious by saying i was trying to use a 1.1.x theme on 2.0 and that was the problem. Which is funny because i said exactly that in my original post.

One of the things that made SMF so great was the support staff but i dont know what happened to it.

Mike, go back bro :P
Title: Re: SMF Support
Post by: Mike on October 06, 2008, 03:17:01 PM
Yeah.... I don't see that happening
Title: Re: SMF Support
Post by: Steve on October 06, 2008, 03:31:45 PM
:lol:

It's so useless to go over there now. Any chance u know of a documentation to show the changes across 1.1 to 2.0 as far as the themes?
Title: Re: SMF Support
Post by: Mike on October 06, 2008, 03:33:36 PM
Sorry, I really don't.  Form what I hear there are more coming down the pipeline
Title: Re: SMF Support
Post by: Steve on October 06, 2008, 03:36:24 PM
Sweet :) I know 2.0 has been in testing/dev for like, almost 2 years now at least so i was suprised it wasnt already known.
Title: Re: SMF Support
Post by: Steve on October 08, 2008, 03:58:24 PM
I found everything i needed, actually, except one thing you may know mike.

The previous themes all had something like

//Show the [help) button
.....

and i could add

//Show the [Gallery] button
.....

where i wanted it. In the theme im using i dont see these anywhere....i didnt check the default one yet but im wondering if its changed in 2.0 and thats why?
Title: Re: SMF Support
Post by: Mike on October 08, 2008, 04:23:51 PM
Menu buttons are now in Subs.php  Look for something like menu_buttons
Title: Re: SMF Support
Post by: Steve on October 08, 2008, 08:36:14 PM
ahhhhhh...ok so i found this:

Code: [Select]
// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
if (($buttonData = 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(
),
),
'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'),
),
),
),
'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']),
),
'poststopics' => array(
'title' => $txt['mc_unapproved_poststopics'],
'href' => $scripturl . '?action=moderate;area=postmod;sa=posts',
'show' => $modSettings['postmod_active'],
),
'attachments' => array(
'title' => $txt['mc_unapproved_attachments'],
'href' => $scripturl . '?action=moderate;area=attachmod;sa=attachments',
'show' => $modSettings['postmod_active'],
),
'reports' => array(
'title' => $txt['mc_reported_posts'],
'href' => $scripturl . '?action=moderate;area=reports',
'show' => 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;sa=account',
'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
),
'profile' => array(
'title' => $txt['forumProfile'],
'href' => $scripturl . '?action=profile;sa=forumProfile',
'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
),
),
),
'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'),
),
),
),
'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'),
),
),
),
'mlist' => array(
'title' => $txt['members_title'],
'href' => $scripturl . '?action=mlist',
'show' => $context['allow_memberlist'],
'sub_buttons' => array(
'mlist_view' => array(
'title' => $txt['mlist_menu_view'],
'href' => $scripturl . '?action=mlist',
'show' => true,
),
'mlist_search' => array(
'title' => $txt['mlist_search'],
'href' => $scripturl . '?action=mlist;sa=search',
'show' => true,
),
),
),
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),
'register' => array(
'title' => $txt['register'],
'href' => $scripturl . '?action=register',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => true,
),
'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl . '?action=logout;sesc=%1$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => true,
),
);

Any changes, additions, etc i make here end in parsing errors. I even tried leaving help in tact and just changing the url and parsing error. Tried adding a new one, same thing.
Title: Re: SMF Support
Post by: Steve on October 08, 2008, 08:42:48 PM
well this works, but i cant change the display title

Code: [Select]
'help' => array(
'title' => $txt['help'],
'href' => '/chat',
'show' => true,
'sub_buttons' => array(
),
),
Title: Re: SMF Support
Post by: Mike on October 08, 2008, 10:49:18 PM
change the value of $txt['help'] then
Title: Re: SMF Support
Post by: Steve on October 08, 2008, 11:44:02 PM
i did. the second i went from

'title' => $txt['help']

to

'title' => $txt['chat']

the errors kick up. I tried making a whole new entry also, all errors.
Title: Re: SMF Support
Post by: Mike on October 09, 2008, 12:19:09 AM
Wow, errors.  So descriptive...
Title: Re: SMF Support
Post by: Steve on October 09, 2008, 12:48:33 AM
Sorry multi tasking.

If i dont change the title the link works perfect. if i change it, i get the following xml error:

XML parsing failed: syntax error (Line: 2, Character: 0)

Reparse document as HTML
Error:unexpected start-tag (root element already specified)
Specification:http://www.w3.org/TR/REC-xml/
  1:

  2: Notice:  Undefined index:  chat in /homepages/19/d249947006/htdocs/ltr450hq/Sources/Subs.php on line 3832

  3: <?xml version="1.0" encoding="UTF-8"?>
  4: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
Title: Re: SMF Support
Post by: Steve on October 09, 2008, 12:49:15 AM
note that chat on line 3832 is the title
Title: Re: SMF Support
Post by: Mike on October 09, 2008, 01:09:17 AM
Clear your cache.
Title: Re: SMF Support
Post by: Steve on October 09, 2008, 09:29:10 AM
I did, no dice. It also doesnt show the new title, the button is there but no text.
Title: Re: SMF Support
Post by: Mike on October 09, 2008, 09:38:36 AM
Well if you read the error you'll see that $txt['chat'] is undefined.  That should give you an idea.
Title: Re: SMF Support
Post by: Steve on October 09, 2008, 09:46:55 AM
yea i was hoping you would just tell me where the buttons were defined at so i can add the text for chat but guess im going hunting :p
Title: Re: SMF Support
Post by: Mike on October 09, 2008, 09:53:01 AM
Well you could always hardcode the text...
Title: Re: SMF Support
Post by: Steve on October 09, 2008, 09:56:40 AM
how so? Much of the smf code confuses me and i usually end up making a royal mess of it.
Title: Re: SMF Support
Post by: Mike on October 09, 2008, 10:06:58 AM
'title' => 'Chat with me biatches!',
Title: Re: SMF Support
Post by: Steve on October 09, 2008, 10:08:11 AM
ok let me give it a try :)
Title: Re: SMF Support
Post by: Steve on October 09, 2008, 10:09:47 AM
perfect! silly as it is i just learned something, thnx mike :)
Title: Re: SMF Support
Post by: Steve on October 10, 2008, 09:26:13 AM
One more question if i may. What file contains the functions that limit the number of characters per post? I am trying to modify the forum so that you can only have x amount of smileys per post, and since its not an option or mod package i have to fly it solo. I'm guessing thats where i need to start
Title: Re: SMF Support
Post by: Mike on October 10, 2008, 11:09:48 AM
Maybe the ones with the word "post" in the file name?
Title: Re: SMF Support
Post by: Steve on October 10, 2008, 12:42:10 PM
i figured i would ask. I dont think you understand my ability to seriously fuck some shit up :P
Title: Re: SMF Support
Post by: Mike on October 10, 2008, 02:09:06 PM
Meh
Title: Re: SMF Support
Post by: Steve on October 10, 2008, 02:38:46 PM
ty mike :P
Title: Re: SMF Support
Post by: Mike on October 10, 2008, 02:47:50 PM
I've kinda stopped caring about SMF.  It is only my surfing habits that keep me going back to the forums
Title: Re: SMF Support
Post by: Steve on October 10, 2008, 03:23:11 PM
Yea i know but im lucky enough to be a member here with someone who was pretty key with development. Because support there often takes days to get an actual useful answer.