Sidebars for 3.1 - I want answers! :D

For support and discussion related to templates, themes, and imagesets in phpBB 3.1.
Suggested Hosts
Locked
User avatar
Hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 1018
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: Sidebars for 3.1 - I want answers! :D

Post by Hanakin »

either way it will be sometime before themes are updated... so I would use 3.1 if you are locked into using a custom theme
ngaia
Registered User
Posts: 303
Joined: Sat Apr 23, 2016 4:28 am

Re: Sidebars for 3.1 - I want answers! :D

Post by ngaia »

How can i make my ads to stick, whenever i scrol mouse up or down.

I want my board to have this sidebade http://www.phpbb3bbcodes.com/index.php , i dnt want it to show on mobile screen it should appear only on desktop.

And out of nowhere below ads picture board index appear :mrgreen:

here is my code looks like

overall header

Code: Select all

<!-- EVENT overall_header_page_body_before -->

	<a id="start_here" class="anchor"></a>
	<div id="page-body" role="main">
	<div class="page-body-inner">
overall footer

Code: Select all

<!-- EVENT overall_footer_content_after -->
	</div>
 </div>
<div class="sidebar"> <div id="stickyunit">
<script type="text/javascript">
    google_ad_client = "ca-pub-6804718789467829";
    google_ad_slot = "2339870195";
    google_ad_width = 300;
    google_ad_height = 600;
</script>
<!-- side bar -->
<script type="text/javascript"
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script> </div>

<!-- EVENT overall_footer_page_body_after -->
content.css (at the bottom of the page)

Code: Select all

#page-body { float: left; width: 100%; margin-right: -260px; }
.page-body-inner { margin-right: 260px; }
.sidebar { float: right; width: 250px; }
#page-footer { clear: both; }

#stickyunits {

position: fixed;

}
sticky.png
User avatar
Lumpy Burgertushie
Registered User
Posts: 68111
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Sidebars for 3.1 - I want answers! :D

Post by Lumpy Burgertushie »

check this out:
http://stickyjs.com/

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
ngaia
Registered User
Posts: 303
Joined: Sat Apr 23, 2016 4:28 am

Re: Sidebars for 3.1 - I want answers! :D

Post by ngaia »

Lumpy Burgertushie wrote:check this out:
http://stickyjs.com/

robert
thank you, should i place this code at content.css?

Code: Select all

<script src="jquery.js"></script>
<script src="jquery.sticky.js"></script>
<script>
  $(document).ready(function(){
    $("#sticker").sticky({topSpacing:0});
  });
</script> 
User avatar
Lumpy Burgertushie
Registered User
Posts: 68111
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Sidebars for 3.1 - I want answers! :D

Post by Lumpy Burgertushie »

no, that is not css. that is javascript so it would go in the overall_footer.html file or in the sidebar.html file

personally, I would simply put all of the sticky css and the sticky javascript in the same html file that you are using for the sidebar html.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
ngaia
Registered User
Posts: 303
Joined: Sat Apr 23, 2016 4:28 am

Re: Sidebars for 3.1 - I want answers! :D

Post by ngaia »

doesnt work, plus, i dnt want sidebar on mobile device, it doesnt show on uc browser, but i appear on opera mini and chrome
User avatar
canam800er
Registered User
Posts: 129
Joined: Thu Jul 21, 2011 7:42 pm
Contact:

Re: Sidebars for 3.1 - I want answers! :D

Post by canam800er »

Hi
Try this Extension also appears responsive. English language pack is also included.
Sorry for my bad english, I am German and translated with Google!
My Extensionen!
ngaia
Registered User
Posts: 303
Joined: Sat Apr 23, 2016 4:28 am

Re: Sidebars for 3.1 - I want answers! :D

Post by ngaia »

i already tried this, but i want side for ads, and i need it to visible all the time
User avatar
Talk19Zehn
Registered User
Posts: 560
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Sidebars for 3.1 - I want answers! :D

Post by Talk19Zehn »

Hi ngaia,
ngaia wrote:How can i make my ads to stick, whenever i scrol mouse up or down.
At first: I think this is to wide ....
...(...)... google_ad_width = 300;
...(...)...
A first aid for a scrollbox: Only a simple example(!) --> Finishing you must the CSS and HTML please by yourself.

TEST(!)
Prosilver phpBB-3.1.9 (Standard #wrap -> max-width: 1152px; (!)

CSS:

Code: Select all

#scrollboxonrightside {
	background-color: #176122;
	border: 6px solid #7b9566;
	text-align: center;
	top: 42px;
	box-shadow: 5px 6px rgba(0, 0, 0, 0.9);
	color: #e2bc83;
	min-height: 620px;
	position: fixed;
	right: 8px;
	transition-duration: 2s;
	width: 210px;
	z-index: 19001;
}
/* responsive design */
@media only screen and (max-width: 1220px), only screen and (max-device-width: 1220px) {
	#scrollboxonrightside {
		display: none;
	}
HTML: overall_header.html

add after <!-- EVENT overall_header_body_before -->

Code: Select all

<div id="scrollboxonrightside">
	<!-- IF U_SITE_HOME -->
		<div>
			<p style="text-align:center; margin-top:14px;"><span><a href="{U_SITE_HOME}" style="text-decoration: underline; font-weight: bold; color: #FFFFFF;">{L_SITE_HOME}</a></span></p>
		</div>
	<!-- ENDIF -->
	<div>
		your Code here
	</div>
</div>


Regards



Edit:
At last read perhaps here: Guide to ad sizes ....
https://support.google.com/adsense/answer/6002621?hl=de

Best wishes.
Last edited by Talk19Zehn on Tue Sep 20, 2016 10:29 am, edited 1 time in total.
ngaia
Registered User
Posts: 303
Joined: Sat Apr 23, 2016 4:28 am

Re: Sidebars for 3.1 - I want answers! :D

Post by ngaia »

Arty wrote:How to add 1 sidebar:

Basic sidebar code would be like this: in overall_header.html find

Code: Select all

<div id="page-body" role="main">
add after it

Code: Select all

<div class="page-body-inner">
then in overall_footer.html find

Code: Select all

		<!-- EVENT overall_footer_content_after -->
	</div>
add after it

Code: Select all

</div>
<div class="sidebar"> sidebar code </div>
That will add additional wrapper for content block and div for sidebar. Next you need to add css for it like this:

Code: Select all

#page-body { float: left; width: 100%; margin-right: -260px; }
.page-body-inner { margin-right: 260px; }
.sidebar { float: right; width: 250px; }
#page-footer { clear: both; }
Can these codes effects other file, i tried these code at my board, its not satisfy my need so i delete the code, but my board index is too narrow in mobile browser, the text became 2/3 lines now, before it was writen in one line ..
before
before
after
after
how to restore as previous looks
User avatar
Lumpy Burgertushie
Registered User
Posts: 68111
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Sidebars for 3.1 - I want answers! :D

Post by Lumpy Burgertushie »

I don't see that . purge your cache, refresh your browser cache.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
ngaia
Registered User
Posts: 303
Joined: Sat Apr 23, 2016 4:28 am

Re: Sidebars for 3.1 - I want answers! :D

Post by ngaia »

Lumpy Burgertushie wrote:I don't see that . purge your cache, refresh your browser cache.


robert
i did purge, i even reupload prossilver folder from fresh copy. my board is www.storyfb.com
ngaia
Registered User
Posts: 303
Joined: Sat Apr 23, 2016 4:28 am

Re: Sidebars for 3.1 - I want answers! :D

Post by ngaia »

it was my protal, it's been fix now, but i still coudnt get to work my sidebar ads
Locked

Return to “[3.1.x] Styles Support & Discussion”