[2.0.17] Warn of Old Topic Before Posting Reply

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
7
58%
Very Good
1
8%
Good
0
No votes
Fair
1
8%
Poor
3
25%
 
Total votes: 12

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 27797
Joined: Sat Aug 16, 2003 7:36 am

[2.0.17] Warn of Old Topic Before Posting Reply

Post by Extensions Robot » Sun Sep 04, 2005 2:52 am

MOD Name: Warn of Old Topic Before Posting Reply
Author: Thatbitextra
MOD Description: This MOD will warn the user via a JavaScript Confirm that they are about to post a reply to an "old" topic. The length of time after which a topic is deemed "old" is configurable via the ACP.


MOD Version: 1.0.0

Download File: warn_of_old_topic_before_posting_reply_v1.0.0c.zip
mods overview page: View
File Size: 7631 Bytes

Security Score: 0
Last edited by Extensions Robot on Mon Apr 30, 2007 12:30 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

User avatar
TerraFrost
Former Team Member
Posts: 5957
Joined: Sun Dec 26, 2004 3:40 am
Location: Austin, TX

Post by TerraFrost » Wed Sep 14, 2005 6:56 am

MOD Validated/Released

Notes:
I think the MOD Description says it all :)

User avatar
Thatbitextra
Former Team Member
Posts: 7604
Joined: Mon Mar 21, 2005 5:04 am
Location: A place where something is or could be located; a site.
Contact:

Post by Thatbitextra » Wed Sep 14, 2005 7:01 am

Thanks for the validation, guys :)
No demo forum at the moment, sorry.
Last edited by Thatbitextra on Sun Nov 05, 2006 11:32 pm, edited 1 time in total.
Styles KB
My MODs: Choose Who to Accept PMs From (Prevents unwanted PMs!) | Warn of Old Topic Before Posting Reply
Style: subBlack (Now updated to phpBB 2.0.22 and 5 new color schemes!)

da_badtz_one
Registered User
Posts: 376
Joined: Thu Jan 29, 2004 8:25 pm

Post by da_badtz_one » Wed Sep 14, 2005 8:24 am

Wow, very nice mod.

Would like to be the first to say thank you for this mod.

simulationcity
Registered User
Posts: 107
Joined: Tue Jun 21, 2005 1:34 pm

Post by simulationcity » Thu Sep 15, 2005 12:09 pm

I get
Critical Error

FIND FAILED: In file [viewtopic.php] could not find:

$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,

MOD script line #179 :: FAQ :: Report


when using EasyMod

Raul Duke
Registered User
Posts: 194
Joined: Sat Jun 25, 2005 9:03 am

Post by Raul Duke » Thu Sep 15, 2005 7:48 pm

Nice mod, Thatbitextra.

Is it possible to set this up so that it only works in certain forums?

Thanks. :)
I got into forum administration for the ladies.

User avatar
Thatbitextra
Former Team Member
Posts: 7604
Joined: Mon Mar 21, 2005 5:04 am
Location: A place where something is or could be located; a site.
Contact:

Post by Thatbitextra » Fri Sep 16, 2005 1:03 am

simulationcity: Do you have any other MODs installed? Because the lines that is referring to are lines 1160-1161 of viewtopic.php. It might be that you have to install it by hand.

Raul Duke: At the moment, no, though if there's enough interest in the MOD, I'll probably update it and include that option :)
Styles KB
My MODs: Choose Who to Accept PMs From (Prevents unwanted PMs!) | Warn of Old Topic Before Posting Reply
Style: subBlack (Now updated to phpBB 2.0.22 and 5 new color schemes!)

imrich
Registered User
Posts: 237
Joined: Tue Nov 09, 2004 9:52 pm

Post by imrich » Sat Sep 24, 2005 2:19 pm

I checked out your demo and tried to make this suggestion:

A better text for the pop up text might be:

Do you realize that you are replying to a topic which is at least X old? A reply to a topic of this age may no longer be appropriate. Do you want to continue?

X can then be:

X days
X months
X years

As appropriate for your time period.

I tried to reply to your demo message as a guest and now your board shows:
Fatal error: Cannot redeclare unhtmlentities() (previously declared in /home/phpbbdemo/domains/demo.thatbitextra.limitless-webhosting.com/public_html/viewtopic.php:1074) in /home/phpbbdemo/domains/demo.thatbitextra.limitless-webhosting.com/public_html/viewtopic.php on line 1074

Sorry for breaking it! :oops:
Rich

[2k]
Registered User
Posts: 36
Joined: Mon Sep 19, 2005 9:01 pm
Location: Netherlands
Contact:

Post by [2k] » Sun Oct 09, 2005 8:16 pm

Hi,

I installed your mod, warn of replying on old topic' and it worked, but after a while it gave me a strange error, possible because of adding other mods or previous added mods.
I didn't find anything which had to due with the pieces of code I had to change, but this is the error I get:

Fatal error: Cannot redeclare unhtmlentities() (previously declared in /home/onlynetw/public_html/forum/viewtopic.php:1086) in /home/onlynetw/public_html/forum/viewtopic.php on line 1086

Line 1086 is in my code the following:

function unhtmlentities ($string)

This is line 172 of the install file: warn_of_old_topic_before_posting_reply_v1.0.0.txt

I hope someone can help me fixing this bug.

User avatar
Thatbitextra
Former Team Member
Posts: 7604
Joined: Mon Mar 21, 2005 5:04 am
Location: A place where something is or could be located; a site.
Contact:

Post by Thatbitextra » Mon Oct 10, 2005 3:24 am

Strange that it doesn't do it straight away.
Hence this fix might not work permanently, but it fixed my demo board, so let me know if it breaks again.

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#

viewtopic.php

#
#-----[ FIND ]------------------------------------------
#
function unhtmlentities ($string)
{
    $trans_tbl = get_html_translation_table (HTML_ENTITIES);
    $trans_tbl = array_flip ($trans_tbl);
    return strtr ($string, $trans_tbl);
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
# i.e delete it

#
#-----[ OPEN ]------------------------------------------
#

includes/functions.php

#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
function unhtmlentities($string)
{
    $trans_tbl = get_html_translation_table (HTML_ENTITIES);
    $trans_tbl = array_flip ($trans_tbl);
    return strtr ($string, $trans_tbl);
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Styles KB
My MODs: Choose Who to Accept PMs From (Prevents unwanted PMs!) | Warn of Old Topic Before Posting Reply
Style: subBlack (Now updated to phpBB 2.0.22 and 5 new color schemes!)

[2k]
Registered User
Posts: 36
Joined: Mon Sep 19, 2005 9:01 pm
Location: Netherlands
Contact:

Post by [2k] » Mon Oct 10, 2005 12:37 pm

It works with that fix.
Thanks a lot!

FoulFoot
Registered User
Posts: 261
Joined: Mon Jun 23, 2003 1:04 am
Location: Honolulu, HI
Contact:

Post by FoulFoot » Sun Oct 23, 2005 12:13 am

Your calculation for months is off (by a factor of seven). To fix:

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------
#
		case 'Month';
			$multiplier = 18748800;
			$unit_name = $lang['Month'];
			break;

#
#-----[ REPLACE WITH ]------------------------------------------
#
		case 'Month';
			$multiplier = 2678400;
			$unit_name = $lang['Month'];
			break;

#
#-----[ FIND ]------------------------------------------
#
		case 'Month';
			$multiplier = 18748800;
			$unit_name = $lang['Months'];
			break;

#
#-----[ REPLACE WITH ]------------------------------------------
#
		case 'Month';
			$multiplier = 2678400;
			$unit_name = $lang['Months'];
			break;
That's based on a month of 31 days. For a 30-day month, use 2592000 in place of the 2678400's above. ** edited: the year is fine **

Mod looks and works great! Thanks.

Foul
Last edited by FoulFoot on Sun Oct 23, 2005 7:32 am, edited 1 time in total.

User avatar
3Di
Registered User
Posts: 13215
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di » Sun Oct 23, 2005 2:21 am

A function that Dicky wrote for a MOD of us could be helpfull if modded in the right way for yours, it takes care also of the leap years:

@ Thatbitextra : feel free to PM him or me about it.

Greets
:game_die: The new Dice Roller extension for phpBB 3.2 is out! :game_die:

Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
Thatbitextra
Former Team Member
Posts: 7604
Joined: Mon Mar 21, 2005 5:04 am
Location: A place where something is or could be located; a site.
Contact:

Post by Thatbitextra » Sun Oct 23, 2005 2:22 am

Hmm, yes, you're right about the months :? I'm not sure how that got back in, as it was a very early bug which I removed. Not sure how it remained in :oops:

However, the year is correct at 31557600.

Thanks for pointing the first one out, I'll update this mod ASAP :)

(P.S. FoulFoot, please change the avatar, animated ones are not allowed. Thanks)

Edit: 3di, I might write my own, though this MOD is getting too pedantic anyway. Thanks, though :)
Last edited by Thatbitextra on Sun Oct 23, 2005 2:25 am, edited 1 time in total.
Styles KB
My MODs: Choose Who to Accept PMs From (Prevents unwanted PMs!) | Warn of Old Topic Before Posting Reply
Style: subBlack (Now updated to phpBB 2.0.22 and 5 new color schemes!)

User avatar
3Di
Registered User
Posts: 13215
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di » Sun Oct 23, 2005 2:24 am

Thatbitextra wrote: Hmm, yes, you're right about the months :? I'm not sure how that got back in, as it was a very early bug which I removed. Not sure how it remained in :oops:

However, the year is correct at 31557600.

Thanks for pointing the first one out, I'll update this mod ASAP :)

(P.S. FoulFoot, please change the avatar, animated ones are not allowed. Thanks)


See my above post. ;)
:game_die: The new Dice Roller extension for phpBB 3.2 is out! :game_die:

Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

Post Reply

Return to “[2.0.x] MOD Database Releases”

Who is online

Users browsing this forum: Bing [Bot] and 200 guests