Previous Thread
Next Thread
Print Thread
Hop To
#174244 01/18/2007 11:34 AM
Joined: Nov 2006
Posts: 31
M
newbie
newbie
M Offline
Joined: Nov 2006
Posts: 31
Hello people,

Does anybody know of a quick way to add an image to the top-left corner of the page? Like a title image that would display on every page?

Thanks,

MW

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Easiest way is to add a bit of HTML in the Display Options -> General -> HTML Includes tab. Just stick it in the Default Header box.

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
There are several threads about doing this with a div and the style system.

I thought I had one on my watchlist, but it comes up with nothing too helpful, but i'm sure the search will wink


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: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1

Here's a simple HTML solution; adjust accordingly.
Add to Control Panel » Display Options » HTML Includes » Default Header:

Code
<br />
<table align="center" width="800">
<tr>
<td align="center" valign="middle" width="325">
<a href="http://YOUR_FORUM_URL/" target="_top">
<img alt="FORUM NAME" width="300" height="50" 
     src="YOUR_FORUM_LOGO" border="0"></a>
</td>
<td align="center" valign="middle">

<!--// This gives you another column for ads, etc //-->

</td>
</tr>
</table>
<br />


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
That's a good basic one jgeoff, but what if you had a different logo for each style wink...


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: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
FLASH or JS Rotator ?

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Originally Posted by ntdoc
FLASH or JS Rotator ?
nope....

As I said, add a div, set it to a non existant class:
Code
<div id="my_header">&nbsp;</div>

Then set a new section in your style editor to add a custom class, and set a background image, then use the height attribute then whammo, custom background images for every style wink...

Code
#my_header {
color: #000000;
background-image: url('images/stylename/header.gif');
background-repeat: no-repeat;
height: 230px;
position: relative;
}


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: Dec 2006
Posts: 184
member
member
Joined: Dec 2006
Posts: 184
Quoting Rick from a question I asked :

"Basically, I added a div with a custom class name in the header:"


Code
<div class="header_graphic">
</div>


"And then in the Extra Properties for each stylesheet, I define the image to use and it's height. Looks something like this:"


Code
.header_graphic {
background: url(/site_images/header_custom.gif) no-repeat 50% 0; 
height: 98px; 
position: relative;
}


smile

Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
What you no like JS? sick

Joined: Dec 2006
Posts: 184
member
member
Joined: Dec 2006
Posts: 184
eek

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
psh, it's basically the same as mine, only i use "id" versus "class" hehe...

And NT, I respect JavaScript, however I don't respect it enough to do things that I could better do with CSSing wink


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: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Just ribbing ya Giz wink

Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
Originally Posted by ntdoc
Just ribbing ya Giz wink
careful, i spit wink


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: Aug 2006
Posts: 1,649
Likes: 1
Pooh-Bah
Pooh-Bah
Joined: Aug 2006
Posts: 1,649
Likes: 1
Originally Posted by Gizmo
That's a good basic one jgeoff, but what if you had a different logo for each style wink...


See, I was just answering the specific question:
Quote
Does anybody know of a quick way to add an image to the top-left corner of the page? Like a title image that would display on every page?

Your solution is great, however, as an answer to a different question. lol laugh


GangsterBB.NET (Ver. 7.6.1.1)
PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
nah, mine expands on this, for additional styles; but we're both right wink


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: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
I knew this existed lol

CSS Images or CSS Graphic Header

That should help with the old search in the future lol.


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
Is there a way to hook up on which CSS is being used?

I'm creating a headers (Images + Text)
and i use a inc.php file to process the date to display
which ever festive image for example.

But if i use a Date to change the image i.e. New Year
i loose the ability to detect which style sheet is being used,
so i cant use the other images as they blend better you see.

So up to now its either, Date shows that image but static color.
Or Blended image, but no date hook up. (via style sheet).

Any workarounds? thanks.
If the answer is java i would need an example to start from.
As me and java dont know each other lol.


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
Bump ?
Any guidance pleeeease lol

Chrimbo is over now and i need to get things back to normal smile


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Jun 2006
Posts: 3,837
I
Ian Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,837
Can't you see the CSS if you view the source?

The useful styles editor, should also assist - don't forget to refresh the image to ensure you are seeing the latest info displayed.

Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
Yes i can, but how can i code it so i can write a script
to show the correct css image for that theme.

I'm using the example above where i have the custom css
as the image. It works as expected.

BUT
I have a script that checks the dates in a php file.
And if its Christmas then a Christmas image is shown.
As the CSS (Image) has to be updated via a style sheet,
i'm loosing the combustibility.
I have to go into every style sheet and update the css path
to the new image manually. I'm trying to get it more Automated.

The CSS method above is great for Text i have that changes
according to the times of the day. But as you like me Ian
you have sub forums too. And ive now realised that i cant
custom image for custom headers as the CSS is already set.

Or after all that.
I need a way of Hooking up what style sheet a member has as
there preferred or default, and then get that css image to show.

I know someone mentioned a java script way, but for that
i wouldnt know the how or the hook ups?


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
Okay a bit of a think later...

I can now have different headers between Normal Headers and custom headers.

What i had to do was to make an additional rule for the custom header for each forum.

Code
<div class="header_graphic">
</div>

and
Code
.header_graphic {
background: url(/site_images/header_custom.gif) no-repeat 50% 0; 
height: 98px; 
position: relative;
}

And to get it to work in the custom headers

Code
<div class="header_custom">
</div>

and
Code
.header_custom {
background: url(/site_images/header_custom.gif) no-repeat 50% 0; 
height: 98px; 
position: relative;
}

So my style sheets contain x2 extra css rules now.
Its going to get longer as i have about 12 i want to customise.

BUT..........

My "HOW" Still remains.
How can i change these images on date references?
By this i mean the likes of Christmas, new year etc..
I cant use transparent images due to the loss of quality (white pix's)

I have or did use a php script that checked for the date,
and then a simple else if would show different images
for the festive season or otherwise.

But because the image source is in the css in the style sheet
i need a way to check and override it.

Check - Which css is being used.
Override - the default image.

I hope that make more sense.


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
I think you'd actually need to reference a script for the header_custom.gif file. That script would check the current date and then display the proper image.

So, something like:

background: url(/path/to/header_custom.php) no-repeat 50% 0;

And then the header_custom.php script would output the proper image.

Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057

background: url(/path/to/header_custom.php) no-repeat 50% 0;

would be in my style sheet as the class rule.

I didn't know you could call a script like that with css.
I like the thinking and it may just work.

Nice One Rick wink

I should have time at the weekend to try this out smile


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
I'm struggling with this one,
i think its more about how it fits together.

A bit of lunch and will have another go...


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Joined: Jul 2006
Posts: 4,057
Joined: Jul 2006
Posts: 4,057
Yehhhh got it working after a bit of hair pulling.
Rick Put me on the right track, and its a neat trick.

Thing to remember is you have to remember IMAGE
as that's what the css background-image is.

Your Style sheet calls the php script.
(Style Sheet Extra Properties)
.my_header {
background-color: none;
background-image: url('http://** Path to my Script**/image.inc.php');
background-repeat: no-repeat;
background-position: top center;
height: 104px;
width:695;
position: relative;
}

PHP FILE

<?php

##Source = Style Sheet Dark Grey.
# Exit must exist or it can cause problems.
# 1 file for the image and 1 file for the text wink

$today = date("dm"); // result == 2806 Day, Month

if ($today == ("0101")) {
header('Location: http://**Path to Seasonal Image/newyear/header-eve-dkblue.gif'); // Voila!
exit;
// Happy New year.
}
?>

You can then add more elseif to include more dates.

Ive read the the EXIT is important. So i would leave it there.

==============================================
Now in the Forum : Custom Inserts : Headers

Call the script to display the image in the div / class tag.
You can find more examples above wink

<table width="100%" border="0" >
<tr>
<td class="my_header"><div align="center"></div></td>
</tr>
</table>



Mines still in testing...
But seems to work fine, just need some headache tablets
as that battered my head at first but its simple now lol

This page my help
http://www.mambers.com/showpost-p_122103-postcount_23.html
or
http://www.mambers.com/showthread-t_24861-page_3.html


Phew was that complicated to get my head around lol


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo

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
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
0 members (), 686 guests, and 131 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 20230217)