PDA

View Full Version : styleid question?


oldfan
06-27-2011, 11:35 PM
I have installed a "like box" forum block, the problem is I have a light and dark style.
Facebook has two separate codes for light and dark so I can only install one.

http://www.metallifukinca.com/forums.php?styleid=81
http://www.metallifukinca.com/forums.php?styleid=80

Is there a way to tell the forum block code to use one code for the light style and the other for the dark style ?


<center><iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fp ages%2Fmetallifukincacom%2F139184612825288&amp;width=2 05&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp; stream=false&amp;header=true&amp;height=230" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:205px; height:230px;" allowTransparency="false"></iframe></center>

Eric
06-28-2011, 12:10 AM
Testing around ... you could do something like this. A Custom HTML/PHP block -> Content Type (PHP) with code:


$light_or_dark = ($vbulletin->userinfo['styleid'] == 80 ? 'light' : 'dark');

$output = "<center><iframe src=\"http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fp ages%2Fmetallifukincacom%2F139184612825288&amp;width=2 05&amp;colorscheme=$light_or_dark&amp;show_faces=true&amp;bord er_ color&amp;stream=false&amp;header=true&amp;height=230\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:205px; height:230px;\" allowTransparency=\"false\"></iframe></center>";

return $output;

oldfan
06-28-2011, 01:48 AM
<iframe src="http://www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fp ages%2Fmetallifukincacom%2F139184612825288&amp;width=2 05&amp;colorscheme=dark&amp;show_faces=true&amp;border_color&amp;s tream=false&amp;header=false&amp;height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:205px; height:62px;" allowTransparency="true"></iframe>

thats the code for the dark version of the like box code