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
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
You should be able to change your link visited/active/hover colors using the stylesheets.
Examples:


A:link {
color: #0000FF;
}
A:visited {
color: #FF0000;
}
A:active {
color: #00FF00;
}
A:HOVER {
color: #FF0000;
}

.onbody A:LINK {
color: #0000FF;
}
.onbody A:VISITED {
color: #FF0000;
}
.onbody A:ACTIVE {
color: #00FF00;
}
.onbody A:HOVER {
color: #FF0000;
}

sjsaunders #224677 09/16/2002 9:45 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
LOL

Gee that seems a lot simpler than what I thought.

Also Lerosia.... the post icon could be edited out of the postlist.tmpl template.

Last edited by JoshPet; 09/16/2002 9:46 AM.
Joined: Aug 2002
Posts: 37
User
User
Offline
Joined: Aug 2002
Posts: 37
Hi Dave

Funny I was just popping back in to post the stylesheet I was using.
Where do I change it"

Heres my stylesheet:

A:link, A:visited, A:active, A:hover {
text-decoration: none;
font-weight: regular;
}
A:link {
color: #990000;
}
A:visited {
color: #990000;
}
A:active {
color: #990000;
}
A:HOVER {
color: #dc143c;
}
.onbody{
background: #FFFFEE:;
}
.onbody A:LINK {
color: #990000;
}
.onbody A:VISITED {
color: #990000;
}
.onbody A:ACTIVE {
color: #990000;
}
.onbody A:HOVER {
color: #dc143c;
}
BODY,P,TABLE,TD,TR {
font-size: 9pt;
font-family: verdana,arial,sans-serif;
}
BODY {
background: #FFFFFF;
}
PRE {
font-size: 8pt;
font-family: courier;
}
.tableborders {
background: #000000;
}
.tdheader {
font-size: 11pt;
font-weight: bold;
color: #ffffff;
background: #006666;
font-family: arial;
}
.tdheader A:LINK {
color: #f5f5f5;
}
.tdheader A:VISITED {
color: #f8f8ff;
}
.tdheader A:ACTIVE {
color: #ff0000;
}
.menubar{
font-size: 10pt;
font-family: vedana, arial;
background: #d3d3d3;
color: #006666;
}
.post {
}
.post:FIRST-LINE {
}
.post:FIRST-LETTER {
}
.new {
font-size: 8pt;
color: #dc143c;
}
.catandforum {
font-size: 8pt;
}
.posttime {
font-size: 8pt;
font-style: oblique;
text-align: center;
background: #EFEFEF;
}
.threadtotal {
font-size: 8pt;
background: #EFEFEF;
}
.posttotal {
font-size: 8pt;
background: #d3d3d3;
}
.small {
font-size: 8pt;
font-family: helvetica,arial;
}
.standouttext {
color: blue;
}
.welcome {
background: #ffffff;
font-family: Times new roman;
color: #000000;
}
.forumtitle {
}
.forumdescript {
font-size: 8pt;
}
.lighttable {
background: #f5fffa;
color: #000000;
}
.darktable {
background: #ffffff;
color: #000000;
}
.darktable A:LINK {
color: #990000;
}
.darktable A:VISITED {
color: #990000;
}
.darktable A:ACTIVE {
color: #006666;
}
.darktable A:HOVER {
color: #dc143c;
}
.cleartable {
background: #FFFFFF;
}
.footertable {
background: #d3d3d3;
}
.alternatetable {
background: #FFFFFF;
}
.subjecttable {
background: #ffffff;
}
.formboxes{
font-family: geneva, arial, sans-serif;
background-color: #ffffff;
color: #000000;
}
.buttons {
font-family: geneva, arial, sans-serif;
background-color: #cccccc;
color: #000000;
}



Lerosia


[:"red}Ifyouwanttomakeyourcomputergoreally,reallyfast,thowitoutthewindow[/color"]
Calis #224679 09/16/2002 10:31 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Moving to "how do I?"


- Allen wavey
- What Drives You?
Sponsored Links
SurfMinister #224680 09/16/2002 11:50 PM
Joined: Aug 2002
Posts: 37
User
User
Offline
Joined: Aug 2002
Posts: 37
I had a feeling this was a How Do I post but not sure because of the code

FYI, Thank you very much for the fix info. It was just a couple of changes to my stylesheets
I havent played with stylesheets so I was a bit nervous but after a few test sheets it worked fine

Thanks again



Lerosia


[:"red}Ifyouwanttomakeyourcomputergoreally,reallyfast,thowitoutthewindow[/color"]
Calis #224681 09/17/2002 12:07 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
no problem, just keeping the forums as neat and useful as possible. Glad you got it working


- Allen wavey
- What Drives You?

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
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 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
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)