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=ScratchJoshPet's Message & ModI 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