collapse collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 171
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Home button for Standalone mode edit  (Read 4454 times)

0 Members and 1 Guest are viewing this topic.

Offline 1cor1313

  • Newbie
  • Posts: 3
  • SMF Version: 2 RC3
  • SP Version: 2.3.3
Home button for Standalone mode edit
« on: December 02, 2010, 07:04:07 AM »
 :-[

Ever since I updated Simple Portal, my home button no longer links to my front page (the front page of my site and not the front page of simple portal)

I tried following the tutorial on SMF for editing urls but I kept getting a parse error and it would crash my forum. I would open subs.php and tried to change the home button url from this:
Code: [Select]
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),

to this:
Code: [Select]
'home' => array(
'title' => $txt['home'],
'href' => 'http://gay-nerds.com/site',
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),


Also, I tried following the tutorial over here and various sites. I tried looking for this text in my index-template.php file but I could not find it.
Code: [Select]
// Show the [home] button.
          echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
            <a href="', $scripturl, '">' , $txt[103] , '</a>
            </td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

What I have is:
Code: [Select]
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

echo '
<div id="main_menu">
<ul class="dropmenu" id="menu_nav">';

foreach ($context['menu_buttons'] as $act => $button)
{
echo '
<li id="button_', $act, '">
<a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>
</a>';
if (!empty($button['sub_buttons']))
{
echo '
<ul>';

foreach ($button['sub_buttons'] as $childbutton)
{
echo '
<li>
<a href="', $childbutton['href'], '"', isset($childbutton['target']) ? ' target="' . $childbutton['target'] . '"' : '', '>
<span', isset($childbutton['is_last']) ? ' class="last"' : '', '>', $childbutton['title'], !empty($childbutton['sub_buttons']) ? '...' : '', '</span>
</a>';
// 3rd level menus :)
if (!empty($childbutton['sub_buttons']))
{
echo '
<ul>';

foreach ($childbutton['sub_buttons'] as $grandchildbutton)
echo '
<li>
<a', $grandchildbutton['active_button'] ? ' class="active"' : '', ' href="', $grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '>
<span', isset($grandchildbutton['is_last']) ? ' class="last"' : '', '>', $grandchildbutton['title'], '</span>
</a>
</li>';

echo '
</ul>';
}

echo '
</li>';
}
echo '
</ul>';
}
echo '
</li>';
}

echo '
</ul>
</div>';
}


I also tried this part in the tutorial but I found the instance of the href="" part twice so I did either or and it still didn't work. (Didn't crash my forum this time though...
Quote
Editing the 'Home' button:
For standalone mode, you will have to edit the 'Home' button, so that 'Standalone Url' is used, instead of the normal forum url.

Find this code:
Code: [Select]
href="', $scripturl, '"
Replace with this code:
Code: [Select]
href="', ($modSettings['sp_portal_mode'] == 3 && empty($context['disable_sp']) ? $modSettings['sp_standalone_url'] : $scripturl), '"[/quote]

I'm really lost and I feel like I'm overlooking something simple. Please help me :(

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Home button for Standalone mode edit
« Reply #1 on: December 02, 2010, 05:06:25 PM »
I would classify this as an install problem. I'll explain:
 
It looks like SimplePortal did not install properly.
The Package Manager should have made certain changes to Subs.php. But, according to the snippet you showed me -- it did not.
 
I don't know why Package Manager failed. Maybe it was a permission problem.
I don't know if some other part of that install failed.
 
Did you get any "test failed" warnings before you did the install?
 
The good news is that you can use the manual install instructions to paste in the correct text.
For SMF 2 with a Curve-based theme, do not even look at template_menu. Ignore those SMF1 parts of the tutorial.
 
* go to the simplemachines.org mod site and search for SimplePortal
* Select your versions of SimplePortal and SMF and click the button for manual install instructions
* find the part about Subs.php
* copy the "replace" code in place of the "find" code.
* ftp that altered Subs.php up to your site.
 
I'm not sure, reading your post if you saw any evidence of install failures in your theme, but you can certainly use the manual install instructions to search through your theme files and fix anything that is missing.
 
You should be able to set up SimplePortal with the standalone URL of http://gay-nerds.com/site/index.php
SimplePortal standalone was meant to work with a Simpleportal standalone file. But I don't know of any reason it shouldn't work with a NON-SimplePortal standalone file. And I guess it did, before the upgrade.
 
Please let us know how it works after you fix Subs.php, using the manual install instructions.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline 1cor1313

  • Newbie
  • Posts: 3
  • SMF Version: 2 RC3
  • SP Version: 2.3.3
Re: Home button for Standalone mode edit
« Reply #2 on: December 02, 2010, 06:40:47 PM »
I did not get any install failed problems but I did upgrade from 2.3.2 to 2.3.3. There were no issues and everything is working fine minus that I can't add the buttons...

I'll try looking at the manual installation...

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Home button for Standalone mode edit
« Reply #3 on: December 02, 2010, 08:15:01 PM »
Sometimes that happens.
PackageManager cannot write the changed file, and it doesn't seem to realize that there is a problem.
 
You will be able to fix it.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline 1cor1313

  • Newbie
  • Posts: 3
  • SMF Version: 2 RC3
  • SP Version: 2.3.3
Re: Home button for Standalone mode edit
« Reply #4 on: December 03, 2010, 05:29:47 AM »
Thank you for your detailed instructions. What happened was that the home array part did not fully install (which sounds weird, I know)

So instead of the normal text below, my installation had everything except the red text
Quote
'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(
            ),
         ),


Thank you for being so helpful :)

I'm posting this link over here just in case someone finds my topic looking for the instructions that I followed: http://custom.simplemachines.org/mods/index.php?mod=1104

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Home button for Standalone mode edit
« Reply #5 on: December 03, 2010, 05:06:16 PM »
Glad this helped.  Marked as solved.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

 

SimplePortal 2.3.7 © 2008-2021, SimplePortal