UBB.Dev
Mod Name / Version: Stylesheet Dependant New Post Icons 3.0

Description: This replaces the icons on the Main Index Page with new post icons of
your choosing, for each stylesheet.And the folders icons on the postlist page also.

Working Under: UBB.Threads 6.5

Mod Status: Finished

Any pre-requisites:

Author(s): JoshPet of www.joshuapettit.com

Date: 06/01/04

Credits: Requested by DLWebmaestro, Updated to work with UBB.Threads 6.5 by scroungr

Files Altered: ubbthreads.php, ubbthreads.tmpl, categories.tmpl, categories.php, postlist.php, postlist.tmpl, showthreaded.php

New Files: New Images of your choice

Database Altered: No

Info/Instructions: Inside your 'images' directory, create newposts.gif and nonewposts.gif
images prefaced with the name of the stylesheet. For example: infopop-newposts.gif,
greenday-nonewposts.gif. You'll need a set of images for each stylesheet.

Then follow the included instructions.


Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Attached File
How would/could you modify this to make it so the images in your header and footers depended upon your stylesheet?
I tried just putting in "$fstyle-" into my header/footer includes but it didn't work, I'm guessing you need to escape from the html code and go back to php code in the includes somehow?
in your header do what I do for the holidays styleshets put a code such as

in includes/header.php put

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

and then in each stylesheet put something different for
holidaybanner such as

.holidaybanner {
height: 49px;
background: url('images/electionday.gif');
background-repeat: repeat-y;
background-position: center top;
}
would <img class="holidaybanner"> work?

I ask because I have a couple different images in the header and footer I'de like to change based upon the sheet...I also have a rollover script which uses an "hsrc" function in the <img> tag...why I'de rather specify the images rather than use them as table backgrounds...but if not, then I could just load them static without rollover I guess...
no make a new class call it class1, class2, class3 then set it up as <table><td class = "class1"></table> you can also use <div class = "class1"> if ya don't want to use tables, anyways then in the css make a

.class1{ height: 49px;
background: url('images/class1.gif');
background-repeat: repeat-y;
background-position: center top;}

and do it for each class that way all ya have to do is change the image in the stylesheets
ah yup, that makes sence...
I couldn't use the particular rollover script I use then though...which requires defining 2 images in the same tag...

It loads as a java script in the header and then to activate it, it would be something like <img src="image1.gif" hsrc="image2.gif">...and that would first load image1.gif and then when someone moves their mouse over it, it will change to image2.gif...the script searches for that "hsrc" defination...maybe I could find a different script that works differently that I could use if I did it that way above...

You can see an example of it here. Just move your mouse over the cactus or cart or egg on the right
yeah thats just a mouseover you can put javascript in there also.
I really love this mod!

One thing I miss: Make the new posticons also visible in the stylesheet preview
© UBB.Developers