SimplePortal

Customization => Custom Coding => Topic started by: AncientDragonfly on July 23, 2009, 06:14:24 PM

Title: Text to show on forum but not on portal
Post by: AncientDragonfly on July 23, 2009, 06:14:24 PM
Greetings.  I really appreciate what SimplePortal has allowed me to do with my forum.  It is perfect for my needs.

I'm using SMF 2.0 RC1.2 and SimplePortal 2.2.2, with no other mods currently installed, though I do plan to install a few, including Custom Actions.  I'm using SP in Standalone mode, with www.example.com as the portal page, and forum.example.com for the forum.

What I need to do is to have some text at the top of the forum pages (where the SMF logo is on the unchanged default theme) that says something like "If you don't understand this forum, click here" and have the "click here" take you to the portal page.  I understand how to put that text and link into the template that defines that section.

What I would like is to not include that text on the portal page, because the visitor will already be where they need to be for the introduction.  In other words, "click here" on the portal page would just reload the portal page.

Would someone be so kind as to offer up the code I need to include in the template to have SMF determine whether it's on a forum page or the portal page, and include the text or not, appropriately?

Thanks.

Edit: 2009-07-28
Still watching, waiting, trying to be patient...

I realize this is somewhat of an unusual request.  As an alternate, can anyone tell me which file(s) something like this might go into, and maybe I can piece it together myself?
Title: Re: Text to show on forum but not on portal
Post by: AncientDragonfly on July 31, 2009, 12:16:26 PM
I know it's bad form to reply to yourself, but since no one else replied, deal with it.  I'm putting the answer here for future perplexed people.

After reading the entire thread, I found the answer on page 45, at 50 posts per page, on the Simple Machines forum:
http://www.simplemachines.org/community/index.php?topic=227599.msg2080501#msg2080501
and several posts following.

Quote from: [SiNaN]
It should be something like this:

Code: [Select]
<meta name="description" content="';

if (!empty($context['standalone']))
echo 'This is the description of the portal';
else
echo 'This is the description of the forum';

echo '" />

Thanks, [SiNaN].
SimplePortal 2.3.8 © 2008-2024, SimplePortal