Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: f00ty on September 21, 2010, 03:53:12 AM

Title: In subs.php, where 'is_last' has came from?
Post by: f00ty on September 21, 2010, 03:53:12 AM
I'm trying to install SimplePortal 2.3.2 for SMF 2.0 RC3, I'm using Finnish language pack. It shows errors in subs.php -file, for example:

Find:
'home' => array( 'title' => $txt['home'], 'href' => $scripturl, 'show' => true, 'sub_buttons' => array( ), ),

Replace with:
'home' => array( 'title' => $txt['home'], 'href' => $modSettings['sp_portal_mode'] == 3 && empty($context['disable_sp']) ? $modSettings['sp_standalone_url'] : $scripturl, 'show' => true, 'sub_buttons' => array( ), ), 'forum' => array( 'title' => empty($txt['sp-forum']) ? 'Forum' : $txt['sp-forum'], 'href' => $scripturl . ($modSettings['sp_portal_mode'] == 1 && empty($context['disable_sp']) ? '?action=forum' : ''), 'show' => in_array($modSettings['sp_portal_mode'], array(1, 3)) && empty($context['disable_sp']), 'sub_buttons' => array( ), ),
Now the error is that the code has one extra line in it:
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'], <- this is the extra
// 'target' => '_blank',
),


Any ideas where this has appeared? I think that SimplePortal would be painful to install manually. So I'd like to install it automatically, only error is with those 'is_last' things.

I looked through my installed mods, and I didn't see any of those would add that line.
Title: Re: In subs.php, where 'is_last' has came from?
Post by: xenovanis on September 21, 2010, 03:51:26 PM
f00ty, does that error show while testing the installation or after the installation?
Title: Re: In subs.php, where 'is_last' has came from?
Post by: f00ty on September 21, 2010, 03:54:04 PM
That error occurs when I'm trying to install the mod (in the list where it lists changes in files, and should say that they all are ok). There few this kind of errors involving with subs.php.
Title: Re: In subs.php, where 'is_last' has came from?
Post by: xenovanis on September 21, 2010, 04:03:54 PM
I just parsed the mod (http://custom.simplemachines.org/mods/index.php?action=parse;mod=1104;attach=139821;smf_version=2.0_RC3) and for as far as I can tell it's looking for multiple possibilities to add the home and forum button. It looks like it just searches for the used piece of code, so if one isn't working, the other one will.

If you really want to be sure though, it's best to ask this in the support topic for the mod here:
http://www.simplemachines.org/community/index.php?topic=227599.0

Or on their site: http://www.simpleportal.net.
Title: Re: In subs.php, where 'is_last' has came from?
Post by: f00ty on September 21, 2010, 04:20:04 PM
Oh yes, thank you, now I see. There's one error though, which prevents me installing it, there's no mention about "This operation isn't vital to the installation of this mod." etc.

It's this:

Find: [Select]
\?((?:board|topic

Replace With: [Select]
\?((?:board|topic|page

When I search through subs.php, I cannot find "\?((?" or "board|" or "|topic". I searched through forum and I noticed it's because PrettyUrls mod have changed that part of the subs.php, but it's not crucial to SimplePortal to work (you just have to edit code manually). This is just notice anyone else who notices same error. ;)
Title: Re: In subs.php, where 'is_last' has came from?
Post by: xenovanis on September 21, 2010, 04:21:25 PM
Great, thanks for sharing :)