Previous Thread
Next Thread
Print Thread
Hop To
#258339 05/01/2016 2:07 AM
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
I have been way form UBB too long…I used to know this stuff, but….if I want a header above the forum, I know I have to insert HTML code in the Default Header Include field. But I want the background color, text, etc, that appears up there to take on the colors of certain tables within the main forum. Can someone give me a hint to get me started in the right direction? Thanks


Joined: Feb 2007
Posts: 1,294
Likes: 2
Veteran
Veteran
Joined: Feb 2007
Posts: 1,294
Likes: 2
I use HTML in a JavaScript insert in the header as I use the same in every page with in the UBB and single pages outside on independent pages. Here is a example of my HTML used with style inserts.

Code
<TD style="border-bottom:1px solid #000000;" HEIGHT="18" BACKGROUND="'+PWloc+backgrPWloc+saybar+'"><FONT style="font-family: Times New Roman; font-size: 12px; font-color: #000000; font-weight: bold;"><CENTER>'+mobsaying+'</CENTER></FONT></TD>

Last edited by JAISP; 05/01/2016 7:56 AM.
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Thanks for the Reply, JAISP. I understand (mostly ) HTML, but when you start talking JavaScript wrappers, you kinda loose me. No, not kinda. You loose me. onoes

What I want to do for starters is just basically have a table appear above the breadcrumb/navigation table that has the same properties as the bead crumb table (it terms of color, text style, etc.

Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Update. After searching bit on here, I think I found what I need:

<table class="t_inner" align="center" width="800">
<tr>
<td align="center" valign="middle" width="325">
<a href="http://My 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>

Joined: Feb 2007
Posts: 1,294
Likes: 2
Veteran
Veteran
Joined: Feb 2007
Posts: 1,294
Likes: 2
Yes that is the correct way that you have explained for what you are attempting to do. I misunderstood somewhat as to what you had wanted.

Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Ok, so I sort of have it working if I use the same header image with a fixed URL; BUT I want to have an 3 images named header.jpg that will be slightly different for each of my current 3 styles. This is what I have on my Default Header Includes that is not working:

HTML
<table class="t_inner" align="center" width="800">
<tr>
<td align="center" valign="middle" width="325">
<a href="http://YOUR_FORUM_URL/" target="_top">
<img src="{$config.BASE_URL}/images/{$style_array.general}/header.jpg" border="0" alt="FORUM NAME" width="500" height="100"></a>
</td>
<td align="center" valign="middle">

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

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

Note my image URL. Unfortunately the {config.BASIL_URL| and the {$style_array.general} are not parsing (not being replaced with the actual directories for each style). The image location just stays as "{$config.BASE_URL}/images/{$style_array.general}/header.jpg"

What do I need to do to make this work?

Joined: Feb 2007
Posts: 1,294
Likes: 2
Veteran
Veteran
Joined: Feb 2007
Posts: 1,294
Likes: 2
Try this:

PHP Code
{$config.BASE_URL}/forums/images/{$style_array.general}/header.jpg 

That would give you something like this:

Code
http://www.yourdomainname.com/forums/images/general/header.jpg

As you have it in your current header it is calling:

Code
http://www.yourdomainname.com/images/general/header.jpg

Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Originally Posted by JAISP
Try this:

PHP Code
{$config.BASE_URL}/forums/images/{$style_array.general}/header.jpg 

That would give you something like this:

Code
http://www.yourdomainname.com/forums/images/general/header.jpg

As you have it in your current header it is calling:

Code
http://www.yourdomainname.com/images/general/header.jpg

What is is actually outputting is
PHP Code
http://{$config.BASE_URL}/forums/images/{$style_array.general}/header.jpg 
In other words, it is NOT parsing the $config.BASE_URL nor the $style_array.general parts at all. If I can figure out how to get it to parse correctly, I'm sure I can get it to work after that.


Joined: Feb 2007
Posts: 1,294
Likes: 2
Veteran
Veteran
Joined: Feb 2007
Posts: 1,294
Likes: 2
Ok I figured it out

This:
Code
{$config.BASE_URL}/images/{$style_array.general}/newpm.gif

equals this:

Code
http://www.yourdomain.com/forums/images/general/default/newpm.gif

Now this is assuming your style is the default board style. If you are using a style with it's own image folder such as "beagleworld" then "default" would be "beagleworld".

Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Originally Posted by JAISP
Ok I figured it out

This:
Code
{$config.BASE_URL}/images/{$style_array.general}/newpm.gif

equals this:

Code
http://www.yourdomain.com/forums/images/general/default/newpm.gif

Now this is assuming your style is the default board style. If you are using a style with it's own image folder such as "beagleworld" then "default" would be "beagleworld".

Yes! That's what I am trying to do BUT it is not parsing. I must need to put something else to cause the code to parse.

This is what I have in my HTML includes Tab in the Default Header box:

HTML
<table class="t_inner" align="center" width="800">
<tr>
<td align="center" valign="middle" width="325">
<a href="http://YOUR_FORUM_URL/" target="_top">
<img src="{$config.BASE_URL}/images/{$style_array.general}/header.jpg" border="0" alt="FORUM NAME" width="500" height="100"></a>
</td>
<td align="center" valign="middle">

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

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

The table is working, but I get a broken image icon instead of the header image. And when I right-click on the broken image icon and copy the image address, I'm getting:

http://$config.BASE_URL}/images/{$style_array.general}/header.jpg

In other words - the issue is that the $config.BASE_URL and $style_array.general parts are not getting parsed! What do I need to do to my code above so that in interprets $config.BASE_URL" to be www.mysite.com/forums/ ???

Joined: Feb 2007
Posts: 1,294
Likes: 2
Veteran
Veteran
Joined: Feb 2007
Posts: 1,294
Likes: 2
Ok I just cut and pasted your code into both UBB.Threads 7.5.9 and UBB.Threads 7.6.0 with the only change of the actual image file name as follows below and it worked on both versions. I wanted to make sure that where I was testing it that it wasn't making a difference on the version of the UBB Software.

Code
<table class="t_inner" align="center" width="800">
<tr>
<td align="center" valign="middle" width="325">
<a href="http://YOUR_FORUM_URL/" target="_top">
<img src="{$config.BASE_URL}/images/{$style_array.general}/newpm.gif" border="0" alt="FORUM NAME" width="500" height="100"></a>
</td>
<td align="center" valign="middle">

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

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

Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Really, all you'd need to do is call the CSS classes for your header design; the easiest place to see them all would be to view the source of the stylesheet you're using.

I don't believe that you can call variables in the header, it's definitely something you'd have to fiddle with yourself. Do you have a header graphic that is different depending on the styles? If so, just make an "extra css" for the cell that your image is in, then change it in the styles; or if it's a static image that will not change, just put it in the /images folder and embed it directly.


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: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
BTW, I usually use:
Code
<div id="header"></div>

Then add to it as needed, need an image, add the image code; need to use CSS? Add an "extra" class as "#header".


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: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Originally Posted by JAISP
Ok I just cut and pasted your code into both UBB.Threads 7.5.9 and UBB.Threads 7.6.0 with the only change of the actual image file name as follows below and it worked on both versions. I wanted to make sure that where I was testing it that it wasn't making a difference on the version of the UBB Software.

Code
<table class="t_inner" align="center" width="800">
<tr>
<td align="center" valign="middle" width="325">
<a href="http://YOUR_FORUM_URL/" target="_top">
<img src="{$config.BASE_URL}/images/{$style_array.general}/newpm.gif" border="0" alt="FORUM NAME" width="500" height="100"></a>
</td>
<td align="center" valign="middle">

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

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

Maybe we are cutting and pasting into different places? Let me be very clear about where I am pasting:

In CP >> Display Options >> General >> HTML Includes (Tab) Then I past into the "Default Header" box.

Is that where you pasted my code, or in some file? And did it actually display the image and not a broken image?

Last edited by Basil; 05/01/2016 6:42 PM.
Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Originally Posted by Gizmo
Really, all you'd need to do is call the CSS classes for your header design; the easiest place to see them all would be to view the source of the stylesheet you're using.

I don't believe that you can call variables in the header, it's definitely something you'd have to fiddle with yourself. Do you have a header graphic that is different depending on the styles? If so, just make an "extra css" for the cell that your image is in, then change it in the styles; or if it's a static image that will not change, just put it in the /images folder and embed it directly.

I wanted to have a table at the very top that has the same properties as the breadcrumb table. Using <table class="t_inner" ...> I got that part to work fine. But it's pointing different graphics per style that isn't working (but JAISP said it worked for him). Weird.


Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
If you're making a new one to work along side the default one, why call the new pm graphic? it's not needed... unless i'm missing something


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: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Originally Posted by Gizmo
If you're making a new one to work along side the default one, why call the new pm graphic? it's not needed... unless i'm missing something

You are looking at what JAISP did just to try it out. My graphic is simply called header. He was just pointing to that image to see if my code (in my first post) worked - it did for him, but I can't get it to work for me. frown

Joined: Feb 2007
Posts: 1,294
Likes: 2
Veteran
Veteran
Joined: Feb 2007
Posts: 1,294
Likes: 2
I went into the template editor and edited the header.tpl file and placed it under the navigation bar.

Joined: Aug 2006
Posts: 583
old hand
old hand
Joined: Aug 2006
Posts: 583
Originally Posted by JAISP
I went into the template editor and edited the header.tpl file and placed it under the navigation bar.

I gave up making it work via the HTML Includes page. I did what you did, except I placed it above the Nav bar. Works great so far.

Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Yeah, placing it in the template would make it force the coding. I use the html includes items to include a php script that I put all of my changes in, so I can just use FTP and an editor to tweak.


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
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Ruben), 476 guests, and 111 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)