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.
|
Tried it but still not working when surfing the forum from my mobile phone but works only when using my laptop!
How can I change /2.3 into px?
should it look like that:
$ameinfo['height'] = round($ameinfo['height']/150px);
$ameinfo['width'] = round($ameinfo['width']/200px);
Thanks