News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Where does BoardIndex.Template come from??

Started by AmphetaMarinE, May 13, 2004, 05:27:45 AM

Previous topic - Next topic

AmphetaMarinE

I am kinda workin on a project... atm it's kinda low-key, as I'm not sure if I have yet learned enough to complete it.....
So for now we will call it SSkn v0.1a

So.... here's where I need a little help....

If I wanted to say.... display the Forum, with a complately different display to the regular one.. (You know, the front page where the Topics and stuff go....)

To do this I figure I would have to edit BoardIndex.template.php correct???

OK, So what if i wanted to create a new file, say... FrameIndex.template.php

Where would the references be, which currently point to BoardIndex.template.php, so that I can now update them to say FrameIndex.template.php

I only need the ones which originally load the boardindex into your main template, for display on the first page view of your forum.

Anyone that can help me, THANK YOU in advance.

I'm still only learning, but have a pretty ambitious nature.

Once i have this sussed out, be sure I will update you guys on what the idea behind SSkn is, and possibly I will work out how to make it into a proper Package Manager Package.

Cheers,
Amph.
Sign Here: X..........................................................................................

Aquilo

in boardindex.php close to the top find

// For wireless, we use the Wireless template...
if (WIRELESS)
$context['sub_template'] = WIRELESS_PROTOCOL . '_boardindex';
else
loadTemplate('BoardIndex');


you can change loadTemplate('BoardIndex'); to loadTemplate('FrameIndex'); this will load that template.

AmphetaMarinE

Nah, I don't wanna actually change BoardIndex itself....
I wanna change the file which originally calls BoardIndex.....
Hard to explain, but it won't work if I change any of the template files....
I have to add new files, not change existing ones.
Do you happen to know where BoardIndex.template.php is called from when the site originally loads?
Sign Here: X..........................................................................................

Grudge

Aquilo is right.

loadTemplate(NAME) basically loads up NAME.template.php.

If you were to rename BoardIndex.template.php to FrameIndex.template.php and make the change Aquilo said it would work just the same as before - using the new file.
I'm only a half geek really...

AmphetaMarinE

Ahhh but i don't want to disable the loading of the BoardIndex....

I want, essentially, to find where the file is which first loads the boardindex, then make a copy of it, and run it from elsewhere in the site, but loading FrameIndex instead of BoardIndex....

Like I said, its too hard to explain.
I can't seem to get across what I'm trying to do lol....
Will just have to keep looking.
Sign Here: X..........................................................................................

Grudge

Well - here is a breakdown of what happens normally when you try access the boardindex:
index.php => Sources/boardindex.php => Themes/default/BoardIndex.template.php

Basically, index.php calls a function in boardindex.php which in itself loads the template.
I'm only a half geek really...

AmphetaMarinE

ahhh ok..... cool
Thanks Grudge, thats exactly what I needed...
Kinda a working breakdown of the way all the code runs... :D
Thx mate, I got it now :)
Sign Here: X..........................................................................................

Advertisement: