Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
We had a couple of blind users who use our board, and use screen reading software to navigate. They do quite amazingly, but I discovered that they had no way to tell which posts were new. One had basically only worked from the "current threads" section of Dave's Integrated Index Page. Their software would read the alt tag of a graphic. So I set up this little hack to insert the new []http://www.measurection.com/forums/images/new.gif[/] after the subject of new threads. It has the alt tag of "new" so he can tell that the thread is new, or has new replies more easily.

Mod Name / Version - New Image in Subject 1.0
Description - Adds a "new" type graphic next to posts that are new.
Pre-requisites - new.gif image is part of the threads distribution
Author - Joshua Pettit
Credits - uses same technology as the Sticky and Attachment image hacks by JustDave and Lisa_P
Files Altered - postlist.php
Database Altered - no
New Files - none
Any other info - this is a simple tweak

In your postlist.php script find this, around line 871:
code:

if (!$ThreadRating) { $ThreadRating = " "; }



after it, add this:
code:

if ( ($Posted > $unread) && (!ereg($thisone,$read ) ) ) {
$Subject = "$Subject <img src="{$config['images']}/new.gif" border="0" alt="NEW" />";
}

if ( ($new == "yes") || ( ($Last_Post > $unread) && (!$config['newcounter']) ) ) {
$Subject = "$Subject <img src="{$config['images']}/new.gif" border="0" alt="NEW" />";
}




That's it.

I'm not really a programmer, I just copied the right lines of code to the right places. I hope. Seems to be working for me.
Attachments
52890-NewImageinSubject1.0.txt (0 Bytes, 43 downloads)

Last edited by JoshPet; 07/20/2002 12:53 AM.
Sponsored Links
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Why not just change the alt text of the post icon to "new" instead?

Joined: Jun 2002
Posts: 375
Enthusiast
Enthusiast
Offline
Joined: Jun 2002
Posts: 375
This hack works great for me, but the attachment is for a different hack...

Here is your above text pasted into the same filename...
Attachments
52901-NewImageinSubject1.0.txt (0 Bytes, 43 downloads)

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Geesh my head's not on straigh lately is it? LOL Thanks.
Attachments
52902-NewImageinSubject1.0.txt (0 Bytes, 43 downloads)

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I tried that firs....
It looks like the alt image tag for the post icon is supposed to be "." for a read message (from the icons folder) and a "*" for an unread message (from the newicons folder).
I don't know if this is a bug or what. I'm still on 6.0.1 and waiting for 6.1, so I haven't fooled with 6.0.2. But if the whole list is all unready messages then they all have the alt tag of "*", but as soon as at least one of those messages is read...then they all have the alt tag of ".".
So it didn't seem to be accurate.
Did anyone else notice this? Or does this appear to be fixed in 6.0.2?

Sponsored Links

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
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
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
Morgan 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)