Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 2002
Posts: 37
User
User
Offline
Joined: Aug 2002
Posts: 37
Hi


I asked JoshPet for help with a hack to make the already "read posts" a visited link colour.

The mod doesnt seem to work so he suggested that I post the code here for some help.

In a nutshell I want the posts that have already been read to turn a visited link colour (users arent used to the yellow and orange open book icons)

Here is an excerpt from my message:



"You know the two icons that tell you whether a thread has a new post(little orange open book) and the little yellow open book?
Well the users want the subject line itself to change colour if the post has been read

Like in our existing older forum.
http://www.b2g3.com/boards/board.cgi?user=CYABC

Is there anyway to change that or are the post icons in the Legend: New Posts and No new posts the only option we have?

Can I make the *read post* a visited link colour?

Did that make sense?

For instance: Poster Views Replies

Subject: Leanna 2 0

(orange new post icon here depicting new message)
Josh is Great

Now once I have clicked on *josh is great* to read it, can that Josh is Great text be turned into a visited link colour(as well as the yellow *post has been read icon*?

The members are used to their text being a visited link."


Below is the mod that Josh did for me but it doesnt seem to work. (nothing happens at all)

Btw, here is my ubbthreads form addy:
http://cyabc.infopop.cc/ubbthreads/postlist.php?Cat=&Board=Scratch


JoshPet's Message & Mod

I would think that the text link appearing the color of a visited link happens in the browser.. but it doens't in threads...might be the stylesheet overriding something...
My forums the link does change color after you've visited it. But not each time... in other words it's not a read/unread thing.. the browser just remembers.

I don't know if you would be able to make the text different colors for read/unread messages.

Now I havne't tested this out... I do alot of things with trial and error.. .but you might see if you could hack something together.....

In postlist.php find this:

// ----------------------------------------------------------------
// If we are going to be viewing in flat mode, let's show all pages
$pageprint = "";
if ( ($mode == "showflat") && ($Replies >= $user['U_FlatPosts']) ) {
$pages = $Replies;
if ($Replies <= $user['U_FlatPosts']) { $pages= $pages + 1; }
if ($user['U_FlatPosts']) {
$pages = ($pages) / $user['U_FlatPosts'];
}
$pageprint = " <font class="small">( {$ubbt_lang['PAGE_TEXT']} ";
for ($prints = 1; $prints <= ($pages+1); $prints++) {
$pageprint .= "<a href="{$config['phpurl']}/showflat.php?Cat=$Cat&Board=$Board&Number=$Number&page=$page&view=$view&sb=$sb&o=$o&fpart=$prints">$prints</a> ";
}
$pageprint .= "<a href="{$config['phpurl']}/showflat.php?Cat=$Cat&Board=$Board&Number=$Number&page=$page&view=$view&sb=$sb&o=$o&fpart=all">{$ubbt_lang['TEXT_ALL']}</a> )</font>";
}

And see if something like this might work:
// ----------------------------------------------------------------
// If we are going to be viewing in flat mode, let's show all pages
$pageprint = "";
if ( ($mode == "showflat") && ($Replies >= $user['U_FlatPosts']) ) {
$pages = $Replies;
if ($Replies <= $user['U_FlatPosts']) { $pages= $pages + 1; }
if ($user['U_FlatPosts']) {
$pages = ($pages) / $user['U_FlatPosts'];
}
$pageprint = " <font class="small">( {$ubbt_lang['PAGE_TEXT']} ";
for ($prints = 1; $prints <= ($pages+1); $prints++) {
if ( ($Posted > $unread) && ( !ereg($thisone,$read) ) ) {
$pageprint .= "<font color="0000ef"><a href="{$config['phpurl']}/showflat.php?Cat=$Cat&Board=$Board&Number=$Number&page=$page&view=$view&sb=$sb&o=$o&fpart=$prints">$prints</a></font> ";
}
else {
$pageprint .= "<font color="9c009c"><a href="{$config['phpurl']}/showflat.php?Cat=$Cat&Board=$Board&Number=$Number&page=$page&view=$view&sb=$sb&o=$o&fpart=$prints">$prints</a></font> ";
}
}
if ( ($Posted > $unread) && ( !ereg($thisone,$read) ) ) {
$pageprint .= "<font color="0000ef"><a href="{$config['phpurl']}/showflat.php?Cat=$Cat&Board=$Board&Number=$Number&page=$page&view=$view&sb=$sb&o=$o&fpart=all">{$ubbt_lang['TEXT_ALL']}</a> )</font>";
}
else {
$pageprint .= "<font color="0000ef"><a href="{$config['phpurl']}/showflat.php?Cat=$Cat&Board=$Board&Number=$Number&page=$page&view=$view&sb=$sb&o=$o&fpart=all">{$ubbt_lang['TEXT_ALL']}</a> )</font>";
}
}

Note how I've added the "if unread" conditions, then manually inserted the font tags with colors (you might need to tweak the colors).

That would be my best GUESS... but I don't know. You might try playing and see.... if not... post the code above on threadsdeve and say "I'm close but this isn't working" and maybe someone (smarter than me LOL) would know.

Hope that helps a bit.

Josh

-------------------------------------------------------



Also. I would like to get rid of some of those post icons, and have the unread and read posts as a link color, the yellow book and orange book clutter the board IMO


Any ideas gentleman?


Thanks in advance

Lerosia


[:"red}Ifyouwanttomakeyourcomputergoreally,reallyfast,thowitoutthewindow[/color"]
Sponsored Links
Entire Thread
Subject Posted By Posted
Make a "Read Post" a Visited Link Colour -Code Fix Lerosia 09/16/2002 4:19 PM
Re: Make a "Read Post" a Visited Link Colour -Code Fix JustDave 09/16/2002 4:29 PM
Re: Make a JoshPet 09/16/2002 4:45 PM
Re: You read my mind Lerosia 09/16/2002 5:03 PM
Re: You read my mind AllenAyres 09/16/2002 5:31 PM
Sorry Allen Lerosia 09/17/2002 6:50 AM
Re: Sorry Allen AllenAyres 09/17/2002 7:07 AM

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
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,824
Most Online6,139
Sep 21st, 2024
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,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
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-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)