View Full Version : Last Reply Alert: Add last reply alert under new reply button
calorie
11-11-2006, 10:00 PM
Last Reply Alert: Add last reply alert under new reply button
The alert warns members that the thread is days, weeks, months, or years old. You can set when the alert first starts to show. See screenshots. Import one product. Edit one template. That's it. Enjoy!
https://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=131350)
hotwheels
11-12-2006, 04:11 PM
great idea........
Ryan McBain
11-12-2006, 05:09 PM
love it.....thanks ;)
Ryan McBain
11-12-2006, 05:27 PM
BTW what would I have to do so its in more detail? As of right now, the oldest post makes the hack say more than 2 months. What would I have to do to make it say for example more than 3 months, 4 months, 5 months ect. Also can it also include years? I have people on my board that sometimes reply to really old threads
Milez
11-12-2006, 05:34 PM
Nice hack but I agree with the post above. Installed.
Guest210212002
11-12-2006, 09:27 PM
Probably a silly question, but what's the default age of the last reply required to show the phrase?
calorie
11-12-2006, 09:37 PM
At one week it starts to show. It has one week, two weeks, one month, and two months. More can be added, but at that point it should probably be a plugin, so to avoid the big if-else bit in a template. Maybe I'll do it later.
Guest210212002
11-12-2006, 09:39 PM
So if I only wanted the two month notification, the only conditional in there would be just '60 * 86400', correct? (Or am I horrible at math? :D)
calorie
11-12-2006, 09:43 PM
If you only want two months, use this in the template:
<if condition="$show[closethread] AND (TIMENOW - $thread[lastpost] > 60 * 86400)">
<span class="highlight"><br /><phrase 1="2" 2="$vbphrase[months]">$vbphrase[attention_last_reply_in_this_thread_was_more_than_ x_y_ago]</phrase></span>
</if>
Guest210212002
11-12-2006, 09:44 PM
Thanks much. :D
Ryan McBain
11-12-2006, 10:30 PM
At one week it starts to show. It has one week, two weeks, one month, and two months. More can be added, but at that point it should probably be a plugin, so to avoid the big if-else bit in a template. Maybe I'll do it later. Well if you ever get around to it, that would be great. Thanks again for the mod.
tanyeri24
11-12-2006, 10:44 PM
great calorie i love you :)
calorie
11-13-2006, 01:00 AM
This has now been 'pluginized' so just check the README for upgrade instructions.
Ryan McBain
11-13-2006, 03:53 AM
This has now been 'pluginized' so just check the README for upgrade instructions. Once again thanks. What would have to be done to have the time of the plast reply to be more current? And to include years?
calorie
11-13-2006, 03:58 AM
Go to 'Last Reply Alert' in vB Options to make the alert appear ealier. Days, weeks, months, and years are automatically done for you in the product.
Ryan McBain
11-13-2006, 04:17 AM
Go to 'Last Reply Alert' in vB Options to make the alert appear ealier. Days, weeks, months, and years are automatically done for you in the product. Awesome. Thank you very much. This should stop people from replying to old threads.
How many query will be added ?
Ryan McBain
11-13-2006, 06:23 AM
If you choose to update this I have an idea.
When the last reply comes out at a week, month or a year exactly, it always shows more than a week month year ect. My idea would be to show that it has been a week, month or year since the last reply rather than more when its the exact time. Just a thought. Once again thanks
Milez
11-13-2006, 08:20 AM
I don't think there will be any queries added with this hack...Calorie?
calorie
11-13-2006, 08:22 AM
@Zia: None.
@Ryan McBain: Thanks, 'more than' seemed to fit, as exact is only exact for the second, unless of course you're looking at days on the whole. Also, there's going to be a bit of rounding here and there, as it uses 86400 seconds for day, 7 days for week, 30 days for month, 365 days for year, obviously not accounting for leap seconds, months with 28 or 31 days, leap years, etcetera. To be more precise, it'd probably be better then to report the actual date and time of the last post rather than output an 'X whatever ago' message. If you want to have the date and time, just reimport the product and set the 'Text Format' setting to no.
@Milez: Correct.
projectego
11-13-2006, 08:35 AM
Great idea! Thanks. ;)
Bubble #5
02-08-2007, 03:27 AM
Thanks Calorie! Very creative idea. I love it, thanks! :up:
Dream
04-08-2007, 04:35 AM
Sounds nice, is it phrased?
works perfect, thanks :)
vip-q.com
04-08-2007, 07:08 AM
thanks man I like it
( Installed )
Dream
04-08-2007, 07:13 AM
If you want to add this to the bottom reply button too, find in SHOWTHREAD
<a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$LASTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a>
and before add
<if condition="$show[closethread] AND $last_reply_alert_phrase"><span class="highlight">$last_reply_alert_phrase</span></if>
momo2
09-07-2007, 05:34 PM
there are 2 make sure u use the first one.... if u use the second, than it will show as below the post...
Dream
09-09-2007, 01:18 AM
Just to say again, this is a great mod.
People replying to old posts dropped dramatically in my forums.
vb should be a similar default feature.
adnedarn
04-06-2008, 08:31 PM
Old topic, I know... but it's what I was looking for. :) I added it along with the modification to show with the bottom Add Reply button, but the phrase "Attention: Last reply in this thread was more than 11 Months ago" pushes the add reply button to the right instead of showing above (or below) it... I don't know any code to resolve this... I'm adding a bit of the code before and after... Thanks to anyone with suggestions :)
Andrew
<!-- start content table -->
$spacer_open
<!-- / start content table -->
<!-- controls below postbits -->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr valign="top">
<if condition="$show['largereplybutton']">
<td class="smallfont">
<if condition="$show[closethread] AND $last_reply_alert_phrase"><span class="highlight">$last_reply_alert_phrase</span></if>
<a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$LASTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
<else />
<td class="smallfont"> </td>
</if>
<if condition="$show['pagenav'] OR $show['inlinemod']">
<td align="$stylevar[right]">$pagenav
<if condition="$show['inlinemod']">
<div class="smallfont"
Alien
12-05-2008, 11:11 PM
Anyone know if this still works on 3.8 RC1?
SVTCobraLTD
03-01-2011, 11:27 PM
3.8?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.