|
|
Apollo |
|
|
Posts: 208
Posts Per Day: 0.16
Time Online: 1 days 23 hours 18 minutes
|
I know I can add/modify the html in the Main Template to alter the displayed content and appearance, and recently added a number of RSS feeds so that changes to related sites could be seen by visitors to the forum.
I've noticed a disadvantage to this in as much as adding the feeds to the template means that they appear in EVERY view of the forum, so the feeds show up on messages, calendar, edit etc etc, meaning that the feeds load on every view, which can slow the page view time down.
I was wondering if there was any (EASY) way to inject the code for the feeds so that it only appears on the Board Index page, and no others.
The feeds are brought in using an external service, and are therefore not just simple html, but are using external JavaScript scripts to function.
(I'm only looking for a pointer in case I'm missing something obvious here). |
|
|
|
|
|
pcmantinker |
|
|
Posts: 401
Gender:  Male
Posts Per Day: 0.51
Reputation: 100.00%
Reputation Score: +9 / -0
Time Online: 3 days 28 minutes
Location: Covington, LA
Age: 18
|
You will have to edit BoardIndex.pl. That's where the main page is rendered. |
|  Even if your idea seems whack, stick with it and make it happen. IGA: International Gamers' Alliance: http://www.iga-home.net/Blah-Themes.com http://www.blah-themes.com/ A website devoted to theme development for E-Blah based forums. For it is by grace you have been saved, through faith—and this not from yourselves, it is the gift of God—[Eph 2:8] |
|
|
|
|
|
Apollo |
|
|
Posts: 208
Posts Per Day: 0.16
Time Online: 1 days 23 hours 18 minutes
|
I suspected this would have to be done in the original code, which I don't like - I have enough trouble remembering to redo the mod_rewrite tweaks when E-Blah is upgraded (took 4 days before a user cried Help! due to odd behaviour, and that reminded me). Not needing perl knowledge elsewhere doesn't help either. Thanks for the quick confirmation thought, helps save wondering if I was missing an obvious fiddle somewhere  |
|
|
|
|
|
Justin |
|
|
Posts: 15,075
Gender:  Male
Posts Per Day: 6.52
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 27 minutes
Location: Tallassee, AL
Age: 22
|
|
|
|
|
|
Apollo |
|
|
Posts: 208
Posts Per Day: 0.16
Time Online: 1 days 23 hours 18 minutes
|
Gave it a try, but didn't have too much success:
I wrapped the code between the two 'markers' given in the Code box in the previous message.
A quick check showed this had no effect (really just to confirm I hadn't mis-typed and/or broken anything).
I then edited Settings.pl to set $advancedhtml from 0 to 1.
The effect of this was to shift the div with the RSS feeds from the foot of the page to the head of page, so they all appeared at the top of the page, with the forum below.
There was no change in the pages where these feeds were displayed, and they still appeared on all the pages, as well as the Board Index.
It looks as if the - if($URL{'v'} eq '') - condtion isn't having the desired effect or is being ignored (I did copy/paste rather than type). |
|
|
|
|
|
Justin |
|
|
Posts: 15,075
Gender:  Male
Posts Per Day: 6.52
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 27 minutes
Location: Tallassee, AL
Age: 22
|
|
Code
if($URL{'v'} eq '' && $URL{'b'} eq '' && $URL{'m'} eq '') {
$header .= qq~
<h4 style="line-height: 1.5; border: 1px dashed #FFE222; border-right: 0; border-left: 0; background-color: #FFFBE2">
<img src="/blahdocs/images/tag.png" class="centerimg" alt="" /> Tag Your Posts<br />
<span style="font-size: 11px; font-weight: normal">When posting a thread, please tag your post so that others can find it more easily the next time someone has a question related to your thread.</span>
</h4>
~;
} |
|
Tried that and it worked great here. |
| I do installs for $25 and upgrades for $20.Technical support is always free. Donate to E-Blah! My Websites: Revolution Reality (My Blog) | MinistryTalk.com | Portfolio"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV  |
|
|
|
|
|
Apollo |
|
|
Posts: 208
Posts Per Day: 0.16
Time Online: 1 days 23 hours 18 minutes
|
Ok  The revised conditionals seem to be doing the trick now, and restricting the feeds appearance to the Board Index. I changed $header for $footer so they appeared at the bottom of the page. I may have noted a bug making itself known when $advancedhtml is set to 1... Using the Theme Editor in the Themes Manager is not possible as only the CSS templates are offered for edit, the HTML templates are missing from the list. You have to disable the $advancedhtml option to get them back, or use FTP to edit the HTML template. Thanks, you've done it again, a nice easy fix (if you're perl aware, and know the appropriate variables in E-Blah of course)  |
|
|
|
|
|
Justin |
|
|
Posts: 15,075
Gender:  Male
Posts Per Day: 6.52
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 27 minutes
Location: Tallassee, AL
Age: 22
|
|
|
|
|
|
|