|
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. <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. 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: <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">
</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: {$config.BASE_URL}/forums/images/{$style_array.general}/header.jpg
That would give you something like this: http://www.yourdomainname.com/forums/images/general/header.jpg As you have it in your current header it is calling: http://www.yourdomainname.com/images/general/header.jpg
|
|
|
|
Joined: Aug 2006
Posts: 583
old hand
|
old hand
Joined: Aug 2006
Posts: 583 |
Try this: {$config.BASE_URL}/forums/images/{$style_array.general}/header.jpg
That would give you something like this: http://www.yourdomainname.com/forums/images/general/header.jpg As you have it in your current header it is calling: http://www.yourdomainname.com/images/general/header.jpg What is is actually outputting is 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: {$config.BASE_URL}/images/{$style_array.general}/newpm.gif equals this: 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 |
Ok I figured it out This: {$config.BASE_URL}/images/{$style_array.general}/newpm.gif equals this: 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:
<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">
</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.
<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,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 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.
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
BTW, I usually use: Then add to it as needed, need an image, add the image code; need to use CSS? Add an "extra" class as "#header".
|
|
|
|
Joined: Aug 2006
Posts: 583
old hand
|
old hand
Joined: Aug 2006
Posts: 583 |
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.
<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 |
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,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 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
|
|
|
|
Joined: Aug 2006
Posts: 583
old hand
|
old hand
Joined: Aug 2006
Posts: 583 |
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.
|
|
|
|
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 |
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,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 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.
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
2 members (DennyP, 1 invisible),
969
guests, and
171
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|