Previous Thread
Next Thread
Print Thread
Rating: 5
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
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.
Attachments

Sponsored Links
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609

Joined: Aug 2002
Posts: 109
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 109
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?

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
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;
}

Joined: Aug 2002
Posts: 109
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 109
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...

Sponsored Links
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
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

Joined: Aug 2002
Posts: 109
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 109
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

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
yeah thats just a mouseover you can put javascript in there also.

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
I really love this mod!

One thing I miss: Make the new posticons also visible in the stylesheet preview


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)