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: 482
  • 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]

Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Author Topic: How can I create a 'Portal' button for a standalone portal in the Babylon theme?  (Read 5862 times)

0 Members and 1 Guest are viewing this topic.

Offline SinisterForces

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: 1.1.12
  • SP Version: None
First, thank you for the excellent modification for SMF. It is just what I have been looking for. I am learning how to use Simple Portal, and so far it is living up to its name. The basic principles of it are indeed simple to work with.

I want to add a button to my theme with the label of "Portal" and that takes the user to the standalone portal page that I created for the site.

Here are the details:


I tried modifying the information presented in the custom theme tutorial for the Classic and Babylon themes presented here, but I have not been able to make it work.

Here is the code used for the button labeled "Help" that I want to modify:

Code: [Select]
<a href="', $scripturl, '?action=help">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];
I can't figure out what to change in order to create a button with the label "Portal" and no image (at this time) that will take the user to the standalone portal page.

I tried the following code but it caused an error page to appear for the site:

Code: [Select]
<a href="http://www.youmeetinatavern.com/portal/index.php">Portal</a>, $context['menu_separator'];
Do I have to create an action for the new button? If so, how would I do that? Unfortunately I don't know how to program PHP, so any help that is offered is greatly appreciated.
« Last Edit: April 03, 2011, 10:51:57 PM by SinisterForces »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
The [home] button is really your portal button.
So, for that home button, all you need to do is use the string 'Portal', or $txt['sp-portal'] instead of the $txt string currently used there ($txt['home'] or $txt[103])
 
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 SinisterForces

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: 1.1.12
  • SP Version: None
The [home] button is really your portal button.

Thank you, but I am a bit confused here and I need to clarify something.

I am using Simple Portal with the standalone portal option. So my home page is http://www.youmeetinatavern.com/index.php, and my portal page is http://www.youmeetinatavern.com/portal/index.php. The home button for my theme takes the user to the home page, and not the portal page.

I did try to do as you suggested with the following line of code:

Code: [Select]
// Show a button to the Simple Portal standalone portal homepage.
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/portal.gif" alt="' . $txt['sp-portal'] . '" border="0" />' : $txt['sp-portal]), '</a>', $context['menu_separator'];

But it resulted in the following error:

Code: [Select]
Template Parse Error!

There was a problem loading the /Themes/babylon/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected '<' in .../Themes/babylon/index.template.php on line 514
505: {
506: global $context, $settings, $options, $scripturl, $txt;
507:
508: // Show the [home] and [help] buttons.
509: echo '
510: <a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
511: <a href="', $scripturl, '?action=help">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];
512:
513: // Show a button to the Simple Portal standalone portal homepage.
514: <a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/portal.gif" alt="' . $txt['sp-portal'] . '" border="0" />' : $txt['sp-portal]), '</a>', $context['menu_separator'];

I don't know which is the unexpected '<' that the error is referring to.

Offline SinisterForces

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: 1.1.12
  • SP Version: None
I reviewed the code again and saw that I had in one spot:

Code: [Select]
'sp-portal
Instead of:

Code: [Select]
'sp-sportal'
So I revised it to be:

Code: [Select]
// Show a button to the Simple Portal standalone portal homepage.
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/portal.gif" alt="' . $txt['sp-portal'] . '" border="0" />' : $txt['sp-portal']), '</a>', $context['menu_separator'];

Unfortunately the same error occurred after making the change.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
You are on the right track, I think. Please review the tutorial one more time. The info is really all there.
I am sorry I am unable to help much at the moment. I am home sick today and can hardly see straight, so I wouldn't trust myself to offer any useful debugging help right now.
I just wanted to offer you some encouragement.
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 SinisterForces

  • Semi Newbie
  • *
  • Posts: 7
  • SMF Version: 1.1.12
  • SP Version: None
Thanks! I used the information that I found here on the SimpleMachines.org forum combined with what this site offered to solve the problem. The code was very simple:

Code: [Select]
<a href="http://www.youmeetinatavern.com/portal/index.php">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/portal.gif" alt="Portal" style="margin: 2px 0;" border="0" />' : $txt[467]), '</a>', $context['menu_separator'];
I'll work on adding a more elegant fix later with a portal action if possible, but for now I am quite content with what is working (if I don't just make the portal my homepage by default one day instead of the standalone version).

Thanks again for your help with this!