Jump to content

Opera image isn't showing up on Recently Used Devices


Adriano Faria

Recommended Posts

Althought it's in the template:

					<span class="ipsDataItem_generic">
						{{if \in_array( $userAgent->browser, array( 'Android Browser', 'AppleWebKit', 'Camino', 'Chrome', 'Edge', 'Firefox', 'IEMobile', 'Midori', 'MSIE', 'Opera', 'Puffin', 'Safari', 'SamsungBrowser', 'Silk', 'UCBrowser', 'Vivaldi' ) )}}
							{{$browser = str_replace( ' ', '', $userAgent->browser );}}
							<img src="{resource="logos/browsers/{$browser}.png" location="interface"}" width="24">
						{{endif}}
						{$userAgent->browser} {$userAgent->browserVersion}
					</span>

it doesn't show:

Tkg0h8X.png

The image exists is in the right folder: applications/core/interface/logos/browsers

Link to comment
Share on other sites

5 minutes ago, Mark Round said:

can you see whats happening with the inspector in browser (image path) is it pointing correctly to the image,does the image exist?

No image is shown; it's replaced by the browser and version.

<span class="ipsDataItem_generic">
							
							Opera Next 66.0.3515.36
						</span>

 

Using a plugin I have, I see it searchs for an image called Opera Next.

spacer.png

 

Ga7fChp.png

In applications/core/interface/logos/browsers it's like Opera only.

Link to comment
Share on other sites

<img src="//yoursite.com/applications/core/interface/logos/browsers/OperaNext.png" width="24">

it looks like its because the browser is calling itself Opera Next instead of Opera when you change the template field to 'Opera Next' it looks for an image.A workaround would be to add an image in that filepath but it isnt solving the problem.

 

<img src="//yoursite.com/applications/core/interface/logos/browsers/OperaNext.png" width="24">

Link to comment
Share on other sites

{{if \in_array( $device->userAgent()->browser, array( 'Opera Next' ) )}}
                          <img src="{resource="logos/browsers/Opera.png" location="interface"}" width="24">  
                          {{endif}}
13 minutes ago, Adriano Faria said:

If I change the template or the image name will work, of course but as this is a core thing, IPS should handle this.

Agreed thats why i said this is a bug,above code fixes it for now

 

 

 

Link to comment
Share on other sites

  • 3 weeks later...

In the very template you originally quoted in your first post we have this:

{{$browser = str_replace( ' ', '', $userAgent->browser );}}

I'm failing to see how we'd end up looking for "Android Browser.png". Are you sure that's not just in your customization, which needs the same code added to the template? If you're positive, please tell me where in the Suite this is showing up/how I can reproduce so we can take a closer look.

Link to comment
Share on other sites

Just now, bfarber said:

In the very template you originally quoted in your first post we have this:


{{$browser = str_replace( ' ', '', $userAgent->browser );}}

I'm failing to see how we'd end up looking for "Android Browser.png". Are you sure that's not just in your customization, which needs the same code added to the template? If you're positive, please tell me where in the Suite this is showing up/how I can reproduce so we can take a closer look.

It isn’t showing in Account Settings-> Devices too. And the script in first post is a core template in 4.4.9.

Link to comment
Share on other sites

6 hours ago, Adriano Faria said:

It isn’t showing in Account Settings-> Devices too. And the script in first post is a core template in 4.4.9.

{{if \in_array( $userAgent->browser, array( 'Android Browser', 'AppleWebKit', 'Camino', 'Chrome', 'Edge', 'Firefox', 'IEMobile', 'Midori', 'MSIE', 'Opera', 'Puffin', 'Safari', 'SamsungBrowser', 'Silk', 'UCBrowser', 'Vivaldi' ) )}}
	{{$browser = str_replace( ' ', '', $userAgent->browser );}}
	<img src="{resource="logos/browsers/{$browser}.png" location="interface"}" width="24">
{{endif}}

Do you see Opera Next in the array? I don't. So the image doesn't display on Account settings page

Regarding Android Browser

android.jpg.93d1fa5e34944b1a8c4dc7918e72413d.jpg

Link to comment
Share on other sites

Detection of "Opera Next" was flawed because Opera recently changed their default user-agent string. The third party library we use to parse user agent headers released an update and that concern is resolved.

My questions were regarding Android Browser, but thank you @newbie LAC for confirming it is showing for you. I couldn't find a device that would actually be identified as "Android Browser" without more specifics (I did confirm SamsungBrowser was properly picked up, and other devices simply reflected as "Chrome").

Link to comment
Share on other sites

8 minutes ago, bfarber said:

Detection of "Opera Next" was flawed because Opera recently changed their default user-agent string.

Yes, that is fixed in 4.4.10. Tks.

9 minutes ago, bfarber said:

My questions were regarding Android Browser, ... I couldn't find a device that would actually be identified as "Android Browser" without more specifics (I did confirm SamsungBrowser was properly picked up, and other devices simply reflected as "Chrome").

That was a misinformation about a report from a user in one of my resources. As I don't have any Android device to test it, I supposed it was the same issue from Opera but it wasn't. It was really missing the str_replace in my plugin to remove the space to meet the image name properly.

Tks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...