Small Addition of HTML code
3 posters
Page 1 of 1
Small Addition of HTML code
I want to add a single line of HTML somewhere:
So that way "Sub Forums:" appears before the list of sub-forums:
Is this possible, and where would I inject it? :T
- Code:
<h4 class="subforumlistlabel">Sub-Forums:</h4>
So that way "Sub Forums:" appears before the list of sub-forums:
Is this possible, and where would I inject it? :T
Last edited by Corebalt on Sun Aug 28, 2011 11:51 pm; edited 1 time in total
Re: Small Addition of HTML code
You will put the HTML code to the description.
heres the sample html code:
Is that it?
heres the sample html code:
- Code:
<a href="http://www.google.com">Google</a>
Is that it?
Russel- Active Poster
- Posts : 1407
Reputation : 236
Language : English, Filipino
Location : Philippines
Re: Small Addition of HTML code
Russel wrote:You will put the HTML code to the description.
heres the sample html code:
- Code:
<a href="http://www.google.com">Google</a>
Is that it?
Hm. By description, I'm assuming you mean "Site Description". If so, I tired inserting it there and there was no change.
Re: Small Addition of HTML code
Add the following to your homepage message:
- Code:
<script type="text/javascript">
jQuery(function() {
var x=jQuery('.index-box .par').get();
for (i=0; i<x.length; i++) {
if (jQuery(x.nextsibling).find('.gensmall')[0]) {
x.nextSibling.innerHTML='<h4 class="subforumlistlabel">Sub-Forums:</h4>'+x.nextSibling.innerHTML;
}
}
});
</script>
Guest- Guest
Re: Small Addition of HTML code
dion wrote:Add the following to your homepage message:This short script checks each forum block for subforums, and if any exist, the HTML is inserted before the subforum listing. Note that this is only for Invision boards. Its superior DOM makes this task a simple one.
- Code:
<script type="text/javascript">
jQuery(function() {
var x=jQuery('.index-box .par').get();
for (i=0; i<x.length; i++) {
if (jQuery(x.nextsibling).find('.gensmall')[0]) {
x.nextSibling.innerHTML='<h4 class="subforumlistlabel">Sub-Forums:</h4>'+x.nextSibling.innerHTML;
}
}
});
</script>
Ah. Thanks for the reply and code, Dion.
I've added the code in (definitely using Invision), and unfortunately it hasn't made a difference. Do I also need to also need to insert something into the message title? Is there anything that I may have "on" that would stop the code from working?
Re: Small Addition of HTML code
See, that's what happens when you type too quickly.
Try this...I just tested it and I know it works:
Try this...I just tested it and I know it works:
- Code:
<script type="text/javascript">
jQuery(function() {
var x=jQuery('.index-box .par').get();
for (i=0; i<x.length; i++) {
if (x[i].nextSibling.childNodes[1].className=='gensmall') {
x[i].nextSibling.innerHTML='<span class="subforumlistlabel">Sub-Forums: </span>'+x[i].nextSibling.innerHTML;
}
}
});
</script>
Guest- Guest
Re: Small Addition of HTML code
Thank you so much Dion. It definitely works.
The forum admins/mods can lock this up now. ^^
The forum admins/mods can lock this up now. ^^
Re: Small Addition of HTML code
Since this thread is marked solved, I will lock this thread.
Sanket
Sanket
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum