Site Logo Not Created in Mobile

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
pdub888
Registered User
Posts: 9
Joined: Tue Sep 18, 2018 12:59 pm

Site Logo Not Created in Mobile

Post by pdub888 » Tue Sep 18, 2018 1:03 pm

I have read on the forums how to style the site logo so that it is able to be previewed in mobile
( in responsive css ).

The issue is, the site-logo isn't even being generated in the mobile view ( the actual DOM element ).

I suspect it has something to do with my wrapping it in an a tag.

Where in the templates is a conditional to make sure the a tag is created ( i have already styled it so it should be visible ):

Code: Select all

<a id="logo" class="logo" href="https://www.blahblah.com" title="<!-- IF U_SITE_HOME -->{L_SITE_HOME}<!-- ELSE -->{L_INDEX}<!-- ENDIF -->"><span class="site_logo"></span></a>
Thanks!

User avatar
Dan Stylez
Registered User
Posts: 183
Joined: Tue Jan 16, 2018 6:17 am
Contact:

Re: Site Logo Not Created in Mobile

Post by Dan Stylez » Tue Sep 18, 2018 3:02 pm

Have you tried unwrapping it? And then in responsive.css changing .logo from to display: none - to display: inline-block.

Once you get the standard setup working you can make adjustments after.

pdub888
Registered User
Posts: 9
Joined: Tue Sep 18, 2018 12:59 pm

Re: Site Logo Not Created in Mobile

Post by pdub888 » Wed Sep 19, 2018 1:47 pm

Here is the original block of code. I didn't really do much to change it sans hard coding in the href:

Code: Select all

<div id="site-description" class="site-description">
				<a id="logo" class="logo" href="<!-- IF U_SITE_HOME -->{U_SITE_HOME}<!-- ELSE -->{U_INDEX}<!-- ENDIF -->" title="<!-- IF U_SITE_HOME -->{L_SITE_HOME}<!-- ELSE -->{L_INDEX}<!-- ENDIF -->"><span class="site_logo"></span></a>
				<h1>{SITENAME}</h1>
				<p>{SITE_DESCRIPTION}</p>
				<p class="skiplink"><a href="#start_here">{L_SKIP}</a></p>
			</div>
Could it have something to do with the fact i'm using a en_us language pack?

The DOM element ( logo ) wrapped within headerbar/inner/site-description simply isn't being generated.
It's not as if it's hidden/not inline-block - it's just not there.

pdub888
Registered User
Posts: 9
Joined: Tue Sep 18, 2018 12:59 pm

Re: Site Logo Not Created in Mobile

Post by pdub888 » Wed Sep 19, 2018 2:04 pm

And only is not generated on mobile - it shows fine on desktop ( and when I minimize the window to set off any media queries ).

pdub888
Registered User
Posts: 9
Joined: Tue Sep 18, 2018 12:59 pm

Re: Site Logo Not Created in Mobile

Post by pdub888 » Mon Oct 01, 2018 1:38 pm

I'm not sure where it's happening but the mobile version must not be creating the content.
The only thing created is the site description when it's in mobile.
I keep messing around with overall_header to no avail ( and i've been purging the cache to be sure that template file is cleared ).

Any ideas?

pdub888
Registered User
Posts: 9
Joined: Tue Sep 18, 2018 12:59 pm

Re: Site Logo Not Created in Mobile

Post by pdub888 » Mon Oct 01, 2018 1:44 pm

And any changes I make to the overall_header show up in desktop but they don't in mobile.
There must be some ( not css related but PHP related ) difference somewhere in the the PHP library that is serving a different block of code than overall_header at a certain pixel value.

User avatar
GanstaZ
Jr. Extension Validator
Posts: 642
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: Site Logo Not Created in Mobile

Post by GanstaZ » Mon Oct 01, 2018 1:47 pm

Take a look in responsive.css file:

Code: Select all

@media (max-width: 700px) {

...

    .logo {
        /* change display value to inline-block to show logo */
	display: none;
	float: none;
	padding: 10px;
    }
}
"When answer lies in the question,.. question becomes redundant!"

pdub888
Registered User
Posts: 9
Joined: Tue Sep 18, 2018 12:59 pm

Re: Site Logo Not Created in Mobile

Post by pdub888 » Mon Oct 01, 2018 1:56 pm

Thanks for responding.
I've already changed the value to inline-block.
It's not that it's being hidden by css - it simply isn't being generated at all.
It's like a completely different site description is being created with no a tag and absolutely nothing that I customize in that block.

Say I change overall_header and inside of site-description i hard code this:

Code: Select all

<div id="site-description" class="site-description">
				<a id="logo" class="logo" href="https://www.blahblah.com" title="<!-- IF U_SITE_HOME -->{L_SITE_HOME}<!-- ELSE -->{L_INDEX}<!-- ENDIF -->"><span class="site_logo"></span></a>
				<a id="mobilelogo" href="https://www.blahblah.com">HEY WORK ON MOBILE!!!!</a>
				<h1>Blah blah</h1>
				<p>{SITE_DESCRIPTION}</p>
				<p class="skiplink"><a href="#start_here">{L_SKIP}</a></p>
			</div>
HEY WORK ON MOBILE!!! is generated for desktop views but isn't created for mobile. It's just not there - it's not that it's hidden - when I inspect it there isn't anything generated.

User avatar
GanstaZ
Jr. Extension Validator
Posts: 642
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: Site Logo Not Created in Mobile

Post by GanstaZ » Mon Oct 01, 2018 2:07 pm

Have you checked it with inspect element? What does it show? We can't see your page, we can only guess, but guessing/assuming is pointless from the start.
"When answer lies in the question,.. question becomes redundant!"

pdub888
Registered User
Posts: 9
Joined: Tue Sep 18, 2018 12:59 pm

Re: Site Logo Not Created in Mobile

Post by pdub888 » Mon Oct 01, 2018 2:18 pm

Here is the view on mobile:
Image

pdub888
Registered User
Posts: 9
Joined: Tue Sep 18, 2018 12:59 pm

Re: Site Logo Not Created in Mobile

Post by pdub888 » Mon Oct 01, 2018 2:25 pm

I figured it out.
A bit maddening as my local copy was working and I had done nothing to change any code.
I guess another Admin had installed a Site Logo extension. It must have been doing something behind the scenes. I have disabled it and everything is working as normal.

I didn't know he had done this - I was losing my mind figuring it out.

For future reference if anyone is looking this up, the mod extension will disable mobile views of your logo if there is conflict.

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

Re: Site Logo Not Created in Mobile

Post by david63 » Mon Oct 01, 2018 3:01 pm

pdub888 wrote:
Mon Oct 01, 2018 2:25 pm
I guess another Admin had installed a Site Logo extension. It must have been doing something behind the scenes. I have disabled it and everything is working as normal.

I didn't know he had done this - I was losing my mind figuring it out.

For future reference if anyone is looking this up, the mod extension will disable mobile views of your logo if there is conflict.
As the developer of the Site Logo extension can I just point out that if you had checked on the options within that extension you would have found that there is an option to always display the logo on a mobile device
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

pdub888
Registered User
Posts: 9
Joined: Tue Sep 18, 2018 12:59 pm

Re: Site Logo Not Created in Mobile

Post by pdub888 » Mon Oct 01, 2018 4:45 pm

That's fair.
I just didn't know what was happening b/c I didn't install that extension.
I just opted to disable it -- I was just confused where/what could have been changing the DOM.

Post Reply

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

Who is online

Users browsing this forum: No registered users and 6 guests