PDA

View Full Version : New Posts on Forumtitle-Link


Kars10
05-10-2003, 10:00 PM
Hello Hackers!
This little Hack allows you to show "new Posts" directly on the Forumtitle of the Forumhome. So if you want you can remove your ON/OFF Icon (like i did). ;) Screenshot in the next Post (the black Forum is read "no new Posts", the green Forum is unread "new Posts").


Files to edit: 1 (index.php)
Templates to edit: 2 (forumhome_forumbit_level1_post, forumhome_forumbit_level1_post)
Templates to add: 0
Replacements to add: 1

Time to Install: max. 5 min

Note: If you want the same thing on your Forumdisplay,
do the same changes to the forumdisplay.php, and the forumdisplay_forumbit_level1_post
and forumdisplay_forumbit_level2_post-Templates.

Have fun and please klick, lick or kick Install
Kars :)

Kars10
05-11-2003, 12:41 PM
Screenshot: :)

Boofo
05-11-2003, 12:50 PM
I still don't follow. Can you do a bigger screenshot? ;)

Kars10
05-11-2003, 12:58 PM
@ Boofo, it marks unread forums on the forumtitle-Link. The black Forum is read (no new Posts), the green Forum is unread (new Posts).
Kars :)

Boofo
05-11-2003, 01:00 PM
Does it still do the link color on mouseover? ;)

Robink
05-11-2003, 01:01 PM
I understand now...

Good idea.. I'll try it now..

Kars10
05-11-2003, 01:01 PM
Today at 16:00 Boofo said this in Post #5 (https://vborg.vbsupport.ru/showthread.php?postid=393708#post393708)
Does it still do the link color on mouseover? ;)

Yes, on read Forums is the Linkcolor (and Hovercolor by Mouseover), and on unread Forums is the marking color. :)

Kars

FFArmageddon
05-11-2003, 04:40 PM
nice idea, but alot of my members are new to VB so they may get confused,

ethics
05-12-2003, 12:16 AM
I like it, Kriek, but the instructions for forumdisplay templates has got to be wrong. I am assuming the replacement is the same for forumhome as it is for forumdisplay?

thamyeuvn
05-12-2003, 05:46 AM
Nice idea.

thamyeuvn
05-12-2003, 05:48 AM
but i can't install this back because the instructions is wrong :p

Can i release another instructions ?

Kars10
05-12-2003, 06:59 AM
Today at 08:48 thamyeuvn said this in Post #11 (https://vborg.vbsupport.ru/showthread.php?postid=394029#post394029)
but i can't install this back because the instructions is wrong :p

Can i release another instructions ?

For me its working fine. :) What Problems do you have with this hack?

Kars

Boofo
05-12-2003, 08:46 AM
you could cut out editing the templates by doing this:

Change this:

if ($userlastvisit<$forum['lastpost']) {
$forum['onoff']='on';
} else {
$forum['onoff']='off';
}
}

To this:

if ($userlastvisit<$forum['lastpost']) {
$forum['onoff']='on';
$forum[title] = "<font color=\"{newpostscolor}\"><i>$forum[title]</i></font>";
} else {
$forum['onoff']='off';
}
}

Chris M
05-12-2003, 10:50 AM
^^ Don't you mean:
if ($userlastvisit<$forum['lastpost']) {
$forum['onoff']='on';
$forum[title] = "<font color=\"{newpostscolor}\"><i>$forum[title]</i></font>";
} else {
$forum['onoff']='off';
}
}

a.) Why include code to confirm the name of the forum title if it isn't changing?;)
b.) You forgot a closing > in the first part of the <font> tag;)
c.) You forgot to parse the code correctly;)

Edit: Nice hack Karsten;):)

;)

Satan

Boofo
05-12-2003, 12:01 PM
Ok, I changed it. I use:

$forum[title] = "<i>$forum[title]</i>";

myself, so I just added the color part for anyone wanting color.

Also, the reason I included the "code to confirm the name of the forum title if it isn't changing'' in the original code was for any newbies that do it that way and to avoid any of the "what about if there aren't any new posts in the forum?" questions. ;)

Chris M
05-12-2003, 12:27 PM
I suppose, but you could alternatively just state that if there are no changes to the forum title, there is no need to include it in the code;):)

:)

Satan

Boofo
05-12-2003, 01:11 PM
Whatever, Chris. ;)