News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

In subs.php, where 'is_last' has came from?

Started by f00ty, September 21, 2010, 03:53:12 AM

Previous topic - Next topic

f00ty

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.

xenovanis

f00ty, does that error show while testing the installation or after the installation?
"Insanity: doing the same thing over and over again and expecting different results."

f00ty

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.

xenovanis

I just parsed the mod 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.
"Insanity: doing the same thing over and over again and expecting different results."

f00ty

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. ;)

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

Advertisement: