Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
logo images not displayed
jackmaessen
✭✭✭
I have a problem with displaying the images. The logo images from all the browsers should be loaded but they don't.
I only see the [?] in the right corner.
Can someone tell me why these logos are not displayed at the right top corner?
http://forum.webprofis.nl/discussion/292/increment#latest
/** * Output user agent information. */ protected function AttachInfo($Sender, $Attributes) { $Info = null; # Vanilla 2.1 - comment model passes in serialized string - fixed in https://github.com/vanilla/vanilla/commit/7e86195f0c5ddaf42a5a281341176e5ab2de9de0 if (is_string($Attributes)) { $Attributes = unserialize($Attributes); } $UserAgent = GetValue('UserAgent', $Attributes); $Browser = GetValue('Browser', $Attributes); if ($UserAgent) { if ($Browser) { $Logo = $this->Logos[$Browser]; if ($Logo) { $Info = Img($this->GetResource('logos/'.$Logo, FALSE, FALSE), array('alt' => htmlspecialchars($Browser))); } else { $Info = htmlspecialchars($Browser); } } If (!$Info) { //$Info = '[?]'; // this is the original line, but instead of ? load default browserimage below $Info = Img($this->GetResource('logos/browser_default.png')); } echo Wrap($Info, 'span', array('class' => 'MItem UserAgent', 'title' => htmlspecialchars($UserAgent))); } } }
I already tried to change the [?] for a general browser image but even that image is not loaded.
The path: http://forum.webprofis.nl/plugins/UserAgent/logos/browser_default.png
0
Comments
try
or
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I think he isn't catching the useragent at all; when i echo useragent
echo $UserAgent
, this is the output: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36about previous post: I was testing with Chrome browser. So i am outraged that browsing with Chrome, Mozilla en Safari are also in the output
Did you follow the instructions properl?
are sure you installed browscap.ini properly?
the plugin works perfectly fine without any changes as far as my testing, as long as you set up browsecap properly
create a test file to see if you see an array or values. if you don't your browscap is not working.
browsercap-test.php and run it from your browser.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Mozilla is almost always in the User Agent String for historical reasons:
http://en.wikipedia.org/wiki/User_agent#Format_for_human-operated_web_browsers
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
http://browscap.org/
you can get browscap.in files from here. and then modify your php_ini or httpd.conf to make sure it is properly being used.
that said: seems like its not worth adding the memory consumption for such a trivial info, unless there is a real need to see browser info.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
If you don't want to mess with browscap. and use a very simplistic routine.
here is a simple change.
change in two places in file
to ...
$this->SimpleAttachInfo($Sender, $Attributes);
then add this
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine i copied code above and i put it in useragent3.php
forum.webprofis.nl/test/useragent3.php
I do not see any values below
oke i will try your modified code
obviously it will only work with new postings and the if's may need to be reorganized and some strings may need to be changed. if you have an issue post the useragent you have trouble with.
I just tested it on Firefox.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I see this on your forum
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Works great! @peregrine Thanks again for support
for IE and Opera i did not get an icon, but i already found the solution: I can catch them with Trident and OPR
Sorry, I didn't see this thread until now.
But yes, you definitely need to install browsecap for this to work as intended. Or you can implement your own "what browser is this user agent?" logic per above.