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.

Show widgets only on homepage

View previous topic View next topic Go down

Solved Show widgets only on homepage

Post by Valoish on July 2nd 2017, 8:22 pm

Technical Details

Forum version : #phpBB2
Position : Founder
Concerned browser(s) : Mozilla Firefox, Google Chrome, Internet Explorer, Opera, Safari
Who the problem concerns : All members
Forum link : http://www.canvasforums.com

Description of problem

I currently have widgets enabled on my forum but I'd like for them to only show on the homegage.
I searched through the forums but wasn't able to find anything for phpBB2 that didn't leave a blank white space where the widgets should be on all pages other than the homepage.
I was wondering if it'd be possible to move the widgets to one of the templates instead of having widgets enabled (and using some CSS in the stylesheet and homepage message)


Last edited by Valoish on July 3rd 2017, 1:45 am; edited 1 time in total
avatar
Valoish
Forumember

Female Posts : 291
Reputation : 53
Language : English
Location : NYC

http://www.canvastutorials.org/

Back to top Go down

Solved Re: Show widgets only on homepage

Post by Ange Tuteur on July 2nd 2017, 10:06 pm

Hi @Valoish,

Does using display:none; on the column work ?
Code:
#left {
  display:none;
}

If it does you can follow up with two methods for showing the column on the homepage only.

1. You can use a snippet of JS to add CSS to the <head> section which will override the rule in your stylesheet.
Modules > JS Codes management > New script. Placement should be in the homepage.
Code:
$('head').append('<style>#left { display:block; }</style>');

2. The first method isn't exactly reliable for noscript users, so you could always embed the CSS on your homepage via the homepage message or index_body template.
Code:
<style>#left { display:block; }</style>

If any questions let me know.
avatar
Ange Tuteur
Forumaster

Male Posts : 13175
Reputation : 2876
Language : EN10, FR5
Location : Macungie, PA

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Show widgets only on homepage

Post by Ali Ugbede on July 2nd 2017, 10:39 pm

Ange Tuteur wrote:Hi @Valoish,

Does using display:none; on the column work ?
Code:
#left {
 display:none;
}

If it does you can follow up with two methods for showing the column on the homepage only.

1. You can use a snippet of JS to add CSS to the <head> section which will override the rule in your stylesheet.
Modules > JS Codes management > New script. Placement should be in the homepage.
Code:
$('head').append('<style>#left { display:block; }</style>');

2. The first method isn't exactly reliable for noscript users, so you could always embed the CSS on your homepage via the homepage message or index_body template.
Code:
<style>#left { display:block; }</style>

If any questions let me know.
i also have interest in showing widget on home page, but i dont really understand the process of placing this codes, please can you clarify me
avatar
Ali Ugbede
Forumember

Posts : 84
Reputation : 1
Language : English

Back to top Go down

Solved Re: Show widgets only on homepage

Post by Draxion on July 3rd 2017, 12:25 am

Hi, @Valoish,

All you have to do is add the CSS rule on the templates where you want the widgets to not be displayed.


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 1710
Reputation : 223
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

Solved Re: Show widgets only on homepage

Post by Ali Ugbede on July 3rd 2017, 12:35 am

Draxion wrote:Hi, @Valoish,

All you have to do is add the CSS rule on the templates where you want the widgets to not be displayed.
though am not into programming , can you please show me the codes to use and where to place them
avatar
Ali Ugbede
Forumember

Posts : 84
Reputation : 1
Language : English

Back to top Go down

Solved Re: Show widgets only on homepage

Post by Valoish on July 3rd 2017, 1:03 am

@Ange Tuteur That worked~ Thanks Ange ^^
Now I just wanna make the background of the widgets transparent cuz right now it's taking on the bg color of td.row1 (#fcfcfc) and when I try to set it to transparent this happens:

I tried searching my stylesheet for that pink color and for td.row1 and nothing came up so Idk where the pink is coming from x'D

Edit:So I found the selector that is making things pink (.forumline { background-color: pink!important; } but I can't find it in the CSS, templates (index_body and index_box), or in the colors section of the ACP x_x

@Ali Ugbede
1. Go to ACP > Display > Pictures and Colors > Colors > CSS Stylesheet and past the following code at the bottom of your stylesheet:
Code:
#left {
 display:none;
}

2. Login to the Founder's account (if you haven't already) or ask the Founder of the forum to do the following: ACP > Display > Templates > General > index_body (not index_box) then paste the following at the bottom of the page:
Code:
<style>#left { display:block; }</style>
Save and then don't forget to Publish the template so that the changes can be applied.
avatar
Valoish
Forumember

Female Posts : 291
Reputation : 53
Language : English
Location : NYC

http://www.canvastutorials.org/

Back to top Go down

Solved Re: Show widgets only on homepage

Post by Ange Tuteur on July 3rd 2017, 1:14 am

Try placing
Code:
#left
in front of the .row1 class, so you get the following result.
Code:
#left .row1 {
  background:transparent;
}
That should only select elements with the class .row1 that are inside the left column. You can place
Code:
#left
(or
Code:
#right
) in front of other selectors too, so you can specifically style elements that are inside the widget column.
avatar
Ange Tuteur
Forumaster

Male Posts : 13175
Reputation : 2876
Language : EN10, FR5
Location : Macungie, PA

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Show widgets only on homepage

Post by Valoish on July 3rd 2017, 1:16 am

@Ange Tuteur The pinkis still there from before but I honestly can't find it anywhere??
Never mind, I found it Lol
avatar
Valoish
Forumember

Female Posts : 291
Reputation : 53
Language : English
Location : NYC

http://www.canvastutorials.org/

Back to top Go down

Solved Re: Show widgets only on homepage

Post by Draxion on July 3rd 2017, 3:19 am

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 1710
Reputation : 223
Language : English
Location : USA

http://www.draxionsgameden.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