The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Forum Widget Only Show in Home Page

View previous topic View next topic Go down

In progress Forum Widget Only Show in Home Page

Post by kumotta on January 22nd 2015, 4:25 am

hello, i want to show forum widget ONLY in home page. can i do it? thanks anyway Hello

kumotta
Forumember

Female Posts : 204
Reputation : 3
Language : English

http://komiku.forumid.net/

Back to top Go down

In progress Re: Forum Widget Only Show in Home Page

Post by Ange Tuteur on January 22nd 2015, 4:35 am

Hello @kumotta,

Could you provide the version of your forum ?

Thanks

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Forum Widget Only Show in Home Page

Post by kumotta on January 22nd 2015, 4:40 am

i use punBB version Mr. Green

kumotta
Forumember

Female Posts : 204
Reputation : 3
Language : English

http://komiku.forumid.net/

Back to top Go down

In progress Re: Forum Widget Only Show in Home Page

Post by Ange Tuteur on January 22nd 2015, 5:06 am

Add this to your stylesheet :
Display > Colors > CSS stylesheet
Code:
#right { display:none }
#content-container div#content { margin-right:0 }

and this to your homepage message :
Display > Generalities
Code:
<style type="text/css">#right { display:block }
#content-container div#content { margin-right:183px }</style>

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Forum Widget Only Show in Home Page

Post by kumotta on January 22nd 2015, 5:31 am



it's work, but i have border there... how to hide it? Shocked

kumotta
Forumember

Female Posts : 204
Reputation : 3
Language : English

http://komiku.forumid.net/

Back to top Go down

In progress Re: Forum Widget Only Show in Home Page

Post by Ange Tuteur on January 22nd 2015, 5:46 am

Add this to your stylesheet to hide the homepage message :
Code:
#pun-announcement { display:none }

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Forum Widget Only Show in Home Page

Post by kumotta on January 22nd 2015, 1:48 pm


it's work, but that's way make mess my homepage. Crying or Very sad
do you have alternative way to use javascript? Embarassed

kumotta
Forumember

Female Posts : 204
Reputation : 3
Language : English

http://komiku.forumid.net/

Back to top Go down

In progress Re: Forum Widget Only Show in Home Page

Post by Mad Scientist on January 22nd 2015, 2:21 pm

Hello @kumotta,

I will use Ange Tueur's CSS codes assuming they work as intended in punBB forum. So, after using his 1st part of CSS code in your CSS stylesheet, your widgets are hidden from all pages. To unhide it just for homepage you can use something like this:

Code:
$(document).ready(function() {
    if ($(location).attr('href') == "URL_of_your_forum_homepage_goes_here") {
  $('#right').css('display','block');
  $('#content-container div#content').css('margin-right','183px');
    }
});

I did not test it out, but the concept is there. Try and tell me how it went. If it doesn't work, please give me the URL of your forum too (I suspect the one that is in your profile is not the same forum as the one in screenshots you have provided here).

P.S. Put the code in Modules -> Javascript Management and tick only at homepage.

Mad Scientist
New Member

Male Posts : 18
Reputation : 2
Language : English

http://www.duelacademia.com/

Back to top Go down

In progress Re: Forum Widget Only Show in Home Page

Post by Ange Tuteur on January 22nd 2015, 2:37 pm

Try increasing the right margin in the homepage message.
Code:
<style type="text/css">#right { display:block }
#content-container div#content { margin-right:183px }</style>

I can't exactly give you a surefire code since you haven't provided your forum URL. Wink

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum