Quote:
Originally Posted by BirdOPrey5
If anyone is running AME 2.5 (automatic media embedder) I have figured out how to have embedded videos made smaller in the mobile style so they can still be watched inside posts.
In the file ame_bbcode.php that came with the AME mod (in your /includes directory)
find:
PHP Code:
$dimensions = "_$ameinfo[zone]";
$ameinfo['width'] = $vbulletin->options['automediaembed_width' . $dimensions];
$ameinfo['height'] = $vbulletin->options['automediaembed_height' . $dimensions];
and below it Add:
PHP Code:
if ($vbulletin->userinfo['styleid'] == 38)
{
$ameinfo['height'] = round($ameinfo['height']/2.3);
$ameinfo['width'] = round($ameinfo['width']/2.3);
}
Change 38 to the styleid of your mobile style.
Yo can set absolute heights and widths if you prefer, I am calculating it as a fraction of my set values which words well for me. You can experiment with the exact numbers to find what works best for you.
|
How can I do this with out using the styleid conditional? See my mobile site is on mobile.example.com so its a dirrfent url than just example.com. And my members style id user info never changes from 0 / default. Any way to compare the url and if .mobile exists in it then downsize AME videos.
And finally I want to thank all that helped with getting a mobile version of my forum up and ready. I no longer feel left out with vb4 getting all the mobile love.