Customizing SMF > SMF Coding Discussion

Where does BoardIndex.Template come from??

(1/2) > >>

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.

Aquilo:
in boardindex.php close to the top find


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

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?

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.

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.

Navigation

[0] Message Index

[#] Next page

Go to full version