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,358
Y
Veteran
Veteran
Y Offline
Joined: Aug 2006
Posts: 1,358
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,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
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, Scouters World
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,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
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, Scouters World
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
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
2 members (2 invisible), 721 guests, and 156 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240501)