Displaying Widgets Only on Homepage
5 posters
Page 1 of 1
Displaying Widgets Only on Homepage
Technical Details
Forum version : #Invision
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : All members
Forum link : http://www.duelmasters.org
Description of problem
I looked into this matter in the help board but couldn't seem to find code for invision forums. So we have widgets on the both sides of the actual forum, and would like to hide them outside the home page.ABOVE PROBLEM IS MY MAIN CONCERN but I'd love to have the following problems solved as well.
I also have problems with hiding the forum name in the navigational category chain (would love to hide it on the homepage as well).
Then I haven't yet successfully implemented code that would reduce the spacing between different categories thus making the forum feel more "whole".
Re: Displaying Widgets Only on Homepage
Hello ,
Go to :
Administration Panel> MODULES> HTML & JAVASCRIPT> Javascript codes management
*Add a new Javascript Code with these Items :
Title * : as you like
Placement :In the home page
*paste this code
*than SUBMIT
Go to :
Administration Panel> MODULES> HTML & JAVASCRIPT> Javascript codes management
*Add a new Javascript Code with these Items :
Title * : as you like
Placement :In the home page
*paste this code
- Code:
$(document).ready( function() {
var salemh = window.location.href;
if (salemh === "http://www.duelmasters.org") {
document.getElementById("left").style.display = 'none';
document.getElementById("right").style.display = 'none';
}
});
*than SUBMIT
Re: Displaying Widgets Only on Homepage
I already tried that and it worked wonderdully on our phpBB3 based forum but not on our invision based forum.skouliki wrote:hello
maybe read this thread https://help.forumotion.com/t153252-show-widgets-only-on-homepage?highlight=widget+homepage
That's why I am asking the code for INVISION here.
Re: Displaying Widgets Only on Homepage
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Displaying Widgets Only on Homepage
Hello @ELTP,
Thanks @SLGray ,
Please go to ACP(Admin Control Panel) > Modules > HTML & JAVASCRIPT > Javascript codes management > Javascript Codes > Javascript Codes and create a new javascript:
Name: Disable Widgets
Placement: In all the pages
Javascript Code:
Then press submit. You can adjust your forum width as you wish.
It will dynamically hide your widgets in all of the pages except your home page.
Thanks @SLGray ,
Please go to ACP(Admin Control Panel) > Modules > HTML & JAVASCRIPT > Javascript codes management > Javascript Codes > Javascript Codes and create a new javascript:
Name: Disable Widgets
Placement: In all the pages
Javascript Code:
- Code:
jQuery(document).ready(function(){
if (location.pathname !== '/') {
jQuery('.module .box-content').css('display','none');
jQuery('#content').css('margin-right','0px');
jQuery('#left').css('display','none');
jQuery('#content').css('margin-left','0px');
jQuery("div#main").css('width','1260px');
}
});
Then press submit. You can adjust your forum width as you wish.
It will dynamically hide your widgets in all of the pages except your home page.
Similar topics
» Adding widgets on homepage version phpBB3
» Displaying the newest tagged posts in widgets
» Help with Txt displaying
» Photo's not displaying
» Widgets in homepage message
» Displaying the newest tagged posts in widgets
» Help with Txt displaying
» Photo's not displaying
» Widgets in homepage message
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum