The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Forum Widget Only Show in Home Page

3 posters

Go down

In progress Forum Widget Only Show in Home Page

Post by kumotta 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
kumotta
Forumember

Female Posts : 203
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 January 22nd 2015, 4:35 am

Hello @kumotta,

Could you provide the version of your forum ?

Thanks
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Forum Widget Only Show in Home Page

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

i use punBB version Mr. Green
kumotta
kumotta
Forumember

Female Posts : 203
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 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
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Forum Widget Only Show in Home Page

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

Forum Widget Only Show in Home Page Screen15

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

Female Posts : 203
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 January 22nd 2015, 5:46 am

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

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Forum Widget Only Show in Home Page

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

Forum Widget Only Show in Home Page Screen16
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
kumotta
Forumember

Female Posts : 203
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 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
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 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
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

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