Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Technical Support    Question and Answer  ›  Adding html to Board Index only
Users Browsing Forum
No Members and 3 Guests

Adding html to Board Index only  This thread currently has 1,897 views. Print
1 Pages 1 Recommend Thread
Apollo
March 9, 2008, 4:48am Report to Moderator Report to Moderator

E-Blah Member
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).
Logged Offline
Site Site Private Message Private message
pcmantinker
March 9, 2008, 6:35am Report to Moderator Report to Moderator

It's not what is seen that matters, it's character
Forum Support Team
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]
Logged Offline
Site Site Private Message Private message AIM AIM YIM YIM Windows Live Messenger WLM Skype Skype Reply: 1 - 7
Apollo
March 9, 2008, 11:13am Report to Moderator Report to Moderator

E-Blah Member
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
Logged Offline
Site Site Private Message Private message Reply: 2 - 7
Justin
March 9, 2008, 11:41am Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
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
Sure you can.  

http://www.eblah.com/forum/m-1169529278/s-9/#num9

Read that, then do this to your template:

Code
<?
	if($URL{'v'} eq '') {
	$header .= qq~This
will add text where
you add the code
~;
}
?> 


This is how the "tag post" message works (go to the post page) and also how the guests message works (the little reddish box that comes up when you are a guest).  


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

Logged Offline
Site Site Private Message Private message Reply: 3 - 7
Apollo
March 9, 2008, 9:25pm Report to Moderator Report to Moderator

E-Blah Member
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).
Logged Offline
Site Site Private Message Private message Reply: 4 - 7
Justin
March 9, 2008, 11:01pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
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

Logged Offline
Site Site Private Message Private message Reply: 5 - 7
Apollo
March 10, 2008, 4:47am Report to Moderator Report to Moderator

E-Blah Member
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)
Logged Offline
Site Site Private Message Private message Reply: 6 - 7
Justin
March 10, 2008, 10:33pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
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
It's not a bug.  It's a security feature put in place so that people cannot login to the forum and hack it.


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

Logged Offline
Site Site Private Message Private message Reply: 7 - 7
1 Pages 1 Recommend Thread
Print

E-Blah Community    Technical Support    Question and Answer  ›  Adding html to Board Index only