vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Last Reply Alert: Add last reply alert under new reply button (https://vborg.vbsupport.ru/showthread.php?t=131350)

calorie 11-11-2006 10:00 PM

Last Reply Alert: Add last reply alert under new reply button
 
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!


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:
Code:

                <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

Quote:

Originally Posted by calorie (Post 1115738)
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

Quote:

Originally Posted by calorie (Post 1115898)
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

Quote:

Originally Posted by calorie (Post 1116026)
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.

Zia 11-13-2006 06:22 AM

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&amp;noquote=1&amp;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

Code:

<!-- 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&amp;noquote=1&amp;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">&nbsp;</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?


All times are GMT. The time now is 06:34 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01196 seconds
  • Memory Usage 1,775KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (30)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete