View Full Version : Can I format things differently depending on the layout?
AlexC
04-09-2011, 12:28 PM
I was wondering if it was possible to have a page or code that will only activate certain changes to a page if it's on a certain layout.
Like if I could have the MyAdopts page formatted differently for a different layout, and stuff like that.
I assume it would be possible... but I have no idea how - any ideas/suggestions?
Kaeliah
04-09-2011, 03:02 PM
For each 'theme' you can have a different template(layout) and CSS(coloring and formatting). If you're talking about a certain code being active only when someone uses a specific theme, you can use a query to identify users with that theme.
$result = runquery("SELECT * FROM ".$GLOBALS[prefix]."users WHERE username='".$loggedinname."' ");
$row = mysql_fetch_array($result);
if($row['theme'] == "THEMENAME"){
// Enable block of coding. Otherwise skip and do nothing.
}
AlexC
04-09-2011, 07:11 PM
Alright, thank you very much!
Can I still do things like perhaps edit the way the myadopts page is formatted to fit the othe theme? Or is that impossible?
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.