Hide things when on mobile device

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
testingground
Registered User
Posts: 124
Joined: Thu Apr 21, 2016 10:59 am

Hide things when on mobile device

Post by testingground » Fri Feb 02, 2018 8:22 pm

I want to reduce some of the things on my forum when viewed by a mobile device.
For example I have a side bar and on a mobile this defaults to under the boards, but they arent really worth having on a mobile so how do I hide them?

User avatar
david63
Jr. Extension Validator
Posts: 15048
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Hide things when on mobile device

Post by david63 » Sat Feb 03, 2018 1:25 am

As there is no sidebar in a standard phpBB you would probably be better asking at the place where you got the sidebar.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

testingground
Registered User
Posts: 124
Joined: Thu Apr 21, 2016 10:59 am

Re: Hide things when on mobile device

Post by testingground » Sat Feb 03, 2018 8:17 am

OK thanks but what if I wanted to hide the info at the bottom of the forum, or ads etc?

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49730
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Hide things when on mobile device

Post by stevemaury » Sat Feb 03, 2018 2:58 pm

What "info at the bottom of the forum"? phpBB has no ads, so we can not tell you how to hide them because we don't know how they got there.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

testingground
Registered User
Posts: 124
Joined: Thu Apr 21, 2016 10:59 am

Re: Hide things when on mobile device

Post by testingground » Sat Feb 03, 2018 5:29 pm

whos logged in for example. :roll:

I only want them hidden when on mobile devices

(Why do I get the impression you know dam well what Im on about but because Ive mentioned non standard phpbb things you brush me off?)

User avatar
Lumpy Burgertushie
Registered User
Posts: 65301
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Hide things when on mobile device

Post by Lumpy Burgertushie » Sat Feb 03, 2018 6:20 pm

nobody is brushing you off. you have not been specific with your questions. you ask about things that don't exist in phpbb and expect us to understand what you are talking about.

when you have specific questions we can give you specific answers.

for instance:
testingground wrote:
Sat Feb 03, 2018 5:29 pm
whos logged in for example. :roll:

I only want them hidden when on mobile devices
that is specific and related to phpbb .

some of that info can be turned off /on from the admin panel.
other parts of it can't but there could be an extension to take care of it. if not, then you can request one be created for that purpose.
also, you can create a child style and make those edits to the style template files manually to remove whatever you wish.
since phpbb is moblie friendly/responsive out of the box, those things will either be removed automatically or moved so that it all works well on phones etc.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

testingground
Registered User
Posts: 124
Joined: Thu Apr 21, 2016 10:59 am

Re: Hide things when on mobile device

Post by testingground » Sat Feb 03, 2018 6:35 pm

I only want it turned off when viewed on a mobile device.

Ive seen something about adding a code that detects mobile and doesnt show.

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3328
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: Hide things when on mobile device

Post by HiFiKabin » Sat Feb 03, 2018 7:06 pm

Wrap the code you want to hide between <span class="responsive-hide"> and </span>

eg (in index_body.html)

Code: Select all

<span class="responsive-hide">
<!-- IF S_DISPLAY_ONLINE_LIST -->
	<div class="stat-block online-list">
		<!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
		<p>
			<!-- EVENT index_body_block_online_prepend -->
			{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> 
			<!-- IF U_VIEWONLINE -->
				<br />{LOGGED_IN_USER_LIST}
				<!-- IF LEGEND --><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF -->
			<!-- ENDIF -->
			<!-- EVENT index_body_block_online_append -->
		</p>
	</div>
<!-- ENDIF -->
</span>
will hide the who is online block of code

Use a proper code editor (not a word processor) keep a copy and purge the cache after uploading the edited file

testingground
Registered User
Posts: 124
Joined: Thu Apr 21, 2016 10:59 am

Re: Hide things when on mobile device

Post by testingground » Sat Feb 03, 2018 8:06 pm

Thank you, that is what im after

User avatar
Lumpy Burgertushie
Registered User
Posts: 65301
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Hide things when on mobile device

Post by Lumpy Burgertushie » Sat Feb 03, 2018 9:42 pm

keep in mind that if your are using prosilver style then you will have to redo that changes every time you update.


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49730
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Hide things when on mobile device

Post by stevemaury » Sun Feb 04, 2018 3:22 pm

testingground wrote:
Sat Feb 03, 2018 5:29 pm
whos logged in for example. :roll:

I only want them hidden when on mobile devices

(Why do I get the impression you know dam well what Im on about but because Ive mentioned non standard phpbb things you brush me off?)
Who is logged in is not "at the bottom of the forum". It is on the index page, not viewforum. For future reference in asking clear questions:

phpbb.com/community is a "Board"
[3.1.x Support Forum} is a "Forum"
"Hide things when on a mobile device" is a "Topic".
"Re: Hide things when on a mobile device" is a "Reply"
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

testingground
Registered User
Posts: 124
Joined: Thu Apr 21, 2016 10:59 am

Re: Hide things when on mobile device

Post by testingground » Tue Feb 06, 2018 11:02 am

Nit Picking, you knew what I meant

User avatar
Lumpy Burgertushie
Registered User
Posts: 65301
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Hide things when on mobile device

Post by Lumpy Burgertushie » Tue Feb 06, 2018 4:11 pm

most times, when asking for and giving support, picking a few nits is the best way to make everyone happy. well, maybe not everyone. ;)


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49730
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Hide things when on mobile device

Post by stevemaury » Tue Feb 06, 2018 5:56 pm

testingground wrote:
Tue Feb 06, 2018 11:02 am
Nit Picking, you knew what I meant
No, I didn't. That was the point.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

Locked

Return to “[3.1.x] Support Forum”

Who is online

Users browsing this forum: Exabot [Bot] and 23 guests