Previous Thread
Next Thread
Print Thread
Hop To
Joined: Sep 2007
Posts: 4
B
stranger
stranger
B Offline
Joined: Sep 2007
Posts: 4
I have different styles on my forum (www.novisux.com) and since I have two different themes, I would like to dynamically include in HTML Includes (Control Panel » Display Options » HTML Includes » HTML Includes » Default Header)logo image regarding to user's style.

I know I can do this in PHP, has anyone already has this done? At least, what cookie/session name must i check?

Or is there another, even easier way?

Thank you

Joined: Aug 2006
Posts: 1,360
Likes: 2
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,360
Likes: 2
I think you can just name the image you want in your stylesheet and just display that. That would be the easypeasiest.


[Linked Image from siemons.org]
Joined: Jun 2006
Posts: 16,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
if we're just talking "logo" there are several posts here reguarding using a div in the header content area and then using the background-image css attribute; feel free to use the search function here to locate these threads.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Sep 2007
Posts: 4
B
stranger
stranger
B Offline
Joined: Sep 2007
Posts: 4
Hmmm, maybe I wasn't clear on this subject. I'm looking for something like that:

PHP Code


<?php
if (isset($_COOKIE['ubb_style']) && ($_COOKIE['ubbstyle'] == 'mystyle'))
{
   echo '<a href="<img src="images/header_mystyle.gif">';
}
else
{
   echo '<a href="<img src="images/header_otherstyle.gif">';
}
?>



Actually, now I will just look for cookie/session name and the problem will be solved. wink
Thanks.

Joined: Jun 2006
Posts: 16,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
I just do something like:
Code
<div class="my_logo"></div>

Then define the class in each style:
Code
.my_logo {
background: url('http://www.yoursite.tld/images/image1.gif');
background-repeat: none;
}


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Upgraded to ver8 - now can't login
by phoenix011235 - 10/24/2024 8:50 AM
Who's Online Now
0 members (), 490 guests, and 102 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)