Forum Widget Only Show in Home Page Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
3 posters

    Forum Widget Only Show in Home Page

    kumotta
    kumotta
    Forumember


    Female Posts : 204
    Reputation : 3
    Language : English

    In progress Forum Widget Only Show in Home Page

    Post by kumotta Thu 22 Jan 2015 - 4:25

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


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

    In progress Re: Forum Widget Only Show in Home Page

    Post by Ange Tuteur Thu 22 Jan 2015 - 4:35

    Hello @kumotta,

    Could you provide the version of your forum ?

    Thanks
    kumotta
    kumotta
    Forumember


    Female Posts : 204
    Reputation : 3
    Language : English

    In progress Re: Forum Widget Only Show in Home Page

    Post by kumotta Thu 22 Jan 2015 - 4:40

    i use punBB version Mr. Green
    Ange Tuteur
    Ange Tuteur
    Forumaster


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

    In progress Re: Forum Widget Only Show in Home Page

    Post by Ange Tuteur Thu 22 Jan 2015 - 5:06

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


    Female Posts : 204
    Reputation : 3
    Language : English

    In progress Re: Forum Widget Only Show in Home Page

    Post by kumotta Thu 22 Jan 2015 - 5:31

    Forum Widget Only Show in Home Page Screen15

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


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

    In progress Re: Forum Widget Only Show in Home Page

    Post by Ange Tuteur Thu 22 Jan 2015 - 5:46

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


    Female Posts : 204
    Reputation : 3
    Language : English

    In progress Re: Forum Widget Only Show in Home Page

    Post by kumotta Thu 22 Jan 2015 - 13:48

    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
    Mad Scientist
    Mad Scientist
    New Member


    Male Posts : 18
    Reputation : 2
    Language : English

    In progress Re: Forum Widget Only Show in Home Page

    Post by Mad Scientist Thu 22 Jan 2015 - 14:21

    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.
    Ange Tuteur
    Ange Tuteur
    Forumaster


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

    In progress Re: Forum Widget Only Show in Home Page

    Post by Ange Tuteur Thu 22 Jan 2015 - 14:37

    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