[ALPHA] Notification of Post Moving

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
dapaintballer333
Registered User
Posts: 177
Joined: Sat Oct 23, 2004 4:02 pm

[ALPHA] Notification of Post Moving

Post by dapaintballer333 » Mon Aug 14, 2006 5:52 pm

MOD Title: Notification of Post Moving
MOD Description: Sends an email to a thread starter when his/her thread is moved.
MOD Version: 1.1.0
MOD Download: http://www.mooload.com/new/file.php?fil ... Moving.mod
or
http://www.egoshare.com/4776542ef2250b7 ... ngmod.html
or
http://www.filewire.com/download.php?id ... 724d4f02ca
Last Stable version: 1.1.0

This is great for people that hate when your topic is moved and you don't know where it went. It works well, and an improved version should come standard.

Now language friendly.

New features:
1. Admins/Mods have a checkbox they can uncheck to not send a email
2. Admins/Mods can specify a "reason" that they moved the topic. The reason, if entered, will get added into the email.
Last edited by dapaintballer333 on Wed Aug 16, 2006 3:21 pm, edited 3 times in total.

Marvi
Registered User
Posts: 210
Joined: Wed Jun 07, 2006 4:36 am

Post by Marvi » Mon Aug 14, 2006 7:22 pm

The dowload link is not working. :?

dapaintballer333
Registered User
Posts: 177
Joined: Sat Oct 23, 2004 4:02 pm

Post by dapaintballer333 » Mon Aug 14, 2006 8:29 pm

yes it is. Go there, scroll down and the link is right below "DOWNLOAD LINK"

The link it generates is temporary so i'm not giving that. Mooload makes money from the ads you see next to the dl link.

User avatar
Ramon Fincken
Registered User
Posts: 4835
Joined: Thu Oct 14, 2004 1:04 am
Location: NL, The Netherlands Amsterdam area @GMT +1
Contact:

Post by Ramon Fincken » Mon Aug 14, 2006 8:31 pm

watching this with interest !
Dutch quality fully managed WordPress hosting - ManagedWPHosting.nl

Before changing a file, some code or installing a MOD >> Make a backup first!

Do you like my mods? paypal me $1 :) forumsoftware[AT}creativepulses[DOT}nl [/size]
PhpBBantispam.com || Instant find your mod here

User avatar
bonelifer
Community Team Member
Community Team Member
Posts: 3480
Joined: Wed Oct 27, 2004 11:35 pm
Name: William
Contact:

Post by bonelifer » Mon Aug 14, 2006 10:50 pm

Actually in order to officially release the mod you have to provide lang variables. Hardcoding the language isn't allowed.
Knowledge Base | phpBB Board Rules | Search Customisation Database
Image
Please don't contact me via PM or email for phpBB support .

dapaintballer333
Registered User
Posts: 177
Joined: Sat Oct 23, 2004 4:02 pm

Post by dapaintballer333 » Mon Aug 14, 2006 11:19 pm

ok, can someone delete this topic? Back to the drawingboard :)

User avatar
Ramon Fincken
Registered User
Posts: 4835
Joined: Thu Oct 14, 2004 1:04 am
Location: NL, The Netherlands Amsterdam area @GMT +1
Contact:

Post by Ramon Fincken » Mon Aug 14, 2006 11:29 pm

bonelifer wrote: Actually in order to officially release the mod you have to provide lang variables. Hardcoding the language isn't allowed.


true, it is not allowed in official phpbb coding

but... this is an ALPHA mod so no worries from me there!
dapaintballer333 wrote: ok, can someone delete this topic? Back to the drawingboard :)


[ see my reaction to bonelifer ]
Dutch quality fully managed WordPress hosting - ManagedWPHosting.nl

Before changing a file, some code or installing a MOD >> Make a backup first!

Do you like my mods? paypal me $1 :) forumsoftware[AT}creativepulses[DOT}nl [/size]
PhpBBantispam.com || Instant find your mod here

User avatar
Ramon Fincken
Registered User
Posts: 4835
Joined: Thu Oct 14, 2004 1:04 am
Location: NL, The Netherlands Amsterdam area @GMT +1
Contact:

Post by Ramon Fincken » Mon Aug 14, 2006 11:35 pm

please use tabs for the if else statements...

:oops:
like this:

Code: Select all

//start notification mod by dapaintballer331					
$notifysql = 'SELECT topic_poster FROM ' . TOPICS_TABLE . ' WHERE topic_id=' . $topic_id;
if (!$notifyresult = $db->sql_query($notifysql)) {
	message_die(GENERAL_ERROR, 'Error finding original poster id', '', __LINE__, __FILE__, $sql); 
}

if ($db->sql_numrows($notifyresult) == 0) {
	message_die(GENERAL_ERROR, 'Error finding original poster id. None found.', '', __LINE__, __FILE__, $sql); 
}
$notifyrow = $db->sql_fetchrow($notifyresult);
$originalposterid = $notifyrow['topic_poster'];
$notifysql = 'SELECT * FROM ' . USERS_TABLE . ' WHERE user_id=' . $originalposterid;

if (!$notifyresult = $db->sql_query($notifysql)) {
	message_die(GENERAL_ERROR, 'Error finding original poster username or email. ', '', __LINE__, __FILE__, $sql); 
}

if ($db->sql_numrows($notifyresult) == 0) {
	message_die(GENERAL_ERROR, 'Error finding original poster username or email. None found for specified user_id. ', '', __LINE__, __FILE__, $sql); 
}

$notifyrow = $db->sql_fetchrow($notifyresult);
$originalposterun = $notifyrow['username'];
$originalposterem = $notifyrow['user_email'];
$scriptpath = $board_config['script_path'];
$sitename = $board_config['sitename'];
$servername = $board_config['server_name'];  

$to = $originalposterem;
$subject = "Your topic was moved in the " . $sitename . ' forums.';
$message = 'A moderator or administrator at ' . $sitename . ' moved one of your topics to another forum. The administrator requires a notification to be sent to the original poster as a courtesy.' . "\n\n" . 'The url of the moved topic is: ' . "\n" . $servername . $scriptpath . 'viewtopic.php?t=' . $topic_id . "\n\n" . 'Just thought you should know ' . $originalposterun . ', bye.';
$from = $board_config['board_email'];   

$message = wordwrap($message, 70);
$header = "Reply-to: $from"."\n"."From: $from"."\n"."Message-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">";
mail($to, $subject, $message, $header); 
//end notification mod by dapaintballer331
Dutch quality fully managed WordPress hosting - ManagedWPHosting.nl

Before changing a file, some code or installing a MOD >> Make a backup first!

Do you like my mods? paypal me $1 :) forumsoftware[AT}creativepulses[DOT}nl [/size]
PhpBBantispam.com || Instant find your mod here

User avatar
onigumo
Registered User
Posts: 1755
Joined: Fri Oct 31, 2003 2:32 am
Contact:

Post by onigumo » Tue Aug 15, 2006 12:43 am

How about through PM instead?
I write articles on community building
@ The Infinity Program.

dapaintballer333
Registered User
Posts: 177
Joined: Sat Oct 23, 2004 4:02 pm

Post by dapaintballer333 » Tue Aug 15, 2006 2:41 am

well the requester asked for it to be by email, but pm sounds good too, but probably harder to make.

Here is the latest version.

Now language friendly.

New features:
When the mod/admin moves topics, they can opt not to have the email sent, but they can also specify a reason the topic was moved, which gets added to the email.

Originally it was indented, here is the latest version with new features and better indentations.

ps, don't delete this topic any more 8)

Marvi
Registered User
Posts: 210
Joined: Wed Jun 07, 2006 4:36 am

Post by Marvi » Tue Aug 15, 2006 6:09 am

I know the way how to download, but that tackes some require and then I see the blank page. Do you know how to download?
DOWNLOAD LINK
Click Here To Download!

User avatar
Ramon Fincken
Registered User
Posts: 4835
Joined: Thu Oct 14, 2004 1:04 am
Location: NL, The Netherlands Amsterdam area @GMT +1
Contact:

Post by Ramon Fincken » Tue Aug 15, 2006 7:45 am

Dutch quality fully managed WordPress hosting - ManagedWPHosting.nl

Before changing a file, some code or installing a MOD >> Make a backup first!

Do you like my mods? paypal me $1 :) forumsoftware[AT}creativepulses[DOT}nl [/size]
PhpBBantispam.com || Instant find your mod here

dapaintballer333
Registered User
Posts: 177
Joined: Sat Oct 23, 2004 4:02 pm

Post by dapaintballer333 » Tue Aug 15, 2006 1:52 pm

i added 2 more dl links to other sites for people who can't figure it out ;)

I'm going to make an second version for people who prefer pms instead.

edit: ahh I quit with the pms. That function is messing a lot up. It requires all kinds of functions, and eventually i ended up with lots of pregreplace errors saying the regular expression was empty.

To do:
Make language friendlyImage
Make template friendly Image

dapaintballer333
Registered User
Posts: 177
Joined: Sat Oct 23, 2004 4:02 pm

Post by dapaintballer333 » Wed Aug 16, 2006 3:25 pm

Ok, can someone test it/release it? What now, I think its done.

Marvi
Registered User
Posts: 210
Joined: Wed Jun 07, 2006 4:36 am

Post by Marvi » Wed Aug 16, 2006 4:47 pm

Yes, I´ve tested its really nice, I liked thank you so much! :D

Post Reply

Return to “[2.0.x] MODs in Development”