Templating ... a simple guide

All style (template, theme and imageset) related questions for the new release; advice, feedback here please.
Post Reply
Registered User
Posts: 2
Joined: Fri May 16, 2008 6:26 am

Re: Templating ... a simple guide

Post by Ethrel »

Thank you so much, EXreaction. Figures it would be something simple like that. :?

Registered User
Posts: 1
Joined: Wed Jun 04, 2008 3:27 pm

How to branch on page number?

Post by martonic »

Re: phpbb3

How can viewtopic_body.html know which page it is processing?

I want to have a block of code run only on the first page of posts.

How can this be achieved?

User avatar
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: Templating ... a simple guide

Post by EXreaction »

You have it backwards.

The PHP files call the template files, not the other way around.

Registered User
Posts: 3
Joined: Wed Dec 01, 2010 7:51 pm

Re: Templating ... a simple guide

Post by Velaxi »


Nevermind, I fixed it myself (finally!).

I simply wasn't doing it in the right place (trying to use it in the $template array in functions.php).
I added:
'S_IN_PORTAL' => true,
to the $template array inside portal.php, and now it works just fine.


I'm really sorry that I'm a nub poster, and for most of you my question is stupid-simple, but I've been trying to get this to work for ~14 hours now.
The worst part is, all I want to do is get a stupid true/false response to an argument defined in a page.
Everywhere I look, though, all the examples and explanations go into 3-12 layers of abstracts, when I just want to get a simple true/false response.
So, yeah, eh? I'm frustrated.

On to the question.

I installed portal.php on my phpBB3 install (not quite in the default locations), and in order to get my breadcrumbs showing how I wanted (showing forum root) I simply inserted a {U_INDEX}->{L_INDEX} link before the <!-- BEGIN navlinks -->.

Now, however, I want my breadcrumbs to display like so:
Home -> Forums -> Forum_1 -> SubForum_2 (or if you prefer)
{L_PORTAL} -> {L_FORUM} <navlinks>
I do not want {L_FORUM} to show if I'm on the portal.php (home) page.

So, portal.php has the define:

define('IN_PORTAL', true);

So I just thought I would use that as a definer and pass if NOT in portal -> show this.

Which means I need to define "S_IN_PORTAL" in either portal.php or functions.php, correct?

Except for the life of me I can't figure it out.
And, as I wrote at the start, trying to find a simple boolean pass is like asking for "just black coffee" at starbucks.

Please help...?

Registered User
Posts: 106
Joined: Thu Apr 01, 2004 7:56 am
Location: Dublin

Re: Templating ... a simple guide

Post by Michaelo »

Don't know which portal you are relating to but it should work fine in functions.php
Mods: Forum Icons Enhancement, Kiss Portal Engine
Kiss Portal Engine (dev site) Stargate Portal (archive site) ...
Styles: Technika

Post Reply