Templating ... a simple guide
Re: Templating ... a simple guide
Thank you so much, EXreaction. Figures it would be something simple like that.
How to branch on page number?
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?
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?
- EXreaction
- Registered User
- Posts: 1555
- Joined: Sat Sep 10, 2005 2:15 am
Re: Templating ... a simple guide
You have it backwards.
The PHP files call the template files, not the other way around.
The PHP files call the template files, not the other way around.
Re: Templating ... a simple guide
***EDIT***
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.
***/EDIT***
OK.
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.
Anyway.
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>
***Except***
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...?
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.
***/EDIT***
OK.
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.
Anyway.
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>
***Except***
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...?
Re: Templating ... a simple guide
Don't know which portal you are relating to but it should work fine in functions.php
Mods: Forum Icons Enhancement, Kiss Portal Engine
Links: Kiss Portal Engine (dev site) Stargate Portal (archive site) ...
Styles: Technika
Links: Kiss Portal Engine (dev site) Stargate Portal (archive site) ...
Styles: Technika