UBB.Dev
Posted By: Astaran PM on moved thread hack - 05/26/2002 1:37 PM
PM on moved thread hack

Sends a PM to the owner of a thread if it's moved to another forum. Admin/Mod can enter a reason (optional).
User gets a mail like: Your post (Subject) has been moved from (forum) to (newforum). The thread can be found here (link).

Any improvements are welcome. Next step would be to send a PM to all users who made a reply to the thread. Anyone? ;-)

Attached File
Posted By: Gardener Re: PM on moved Thread Hack - 05/26/2002 1:39 PM
Yes, I think this would be a good idea, to let the people interested of a thread know where it has gone.
Posted By: MTO Re: PM on moved thread hack - 05/26/2002 2:53 PM
This will be real nice, its an often requested feature.
Posted By: MTO Re: PM on moved thread hack - 05/26/2002 2:56 PM
One thing that just came to my mind:
If you move a post and all its replies (not the original parent post), who does it PM to?
Posted By: Astaran Re: PM on moved thread hack - 05/26/2002 3:07 PM
Nothing, it's only a hack for moving the hole thread.
Moving posts an an replies is handled via movepost.php...
Posted By: AllenAyres Re: PM on moved thread hack - 05/26/2002 10:01 PM
Nice one, thanks... very requested
Posted By: caymuc Re: PM on moved thread hack - 05/27/2002 12:19 AM
Works great, thank you

A few minor changes had to be done though.

Also I added a button here where I can select the language of the automatic message (I run a bi-language board).

ALso a suggestion:
In your instructions, instead of using line numbers, please quote pieces of original code, wherafter the changes occur.
After hacks and such, linenumbers might change and this can cause misunderstandings. (the formbox belongs after the </select> which caused confusion here at first.

Greetings



Posted By: Muhammad Re: PM on moved thread hack - 05/28/2002 4:15 PM
Very nice feature...

Would be nice if it sent a PM to ALL posters in the thread, too.
Posted By: caymuc Re: PM on moved thread hack - 05/28/2002 4:43 PM
Yes, good suggestion
Posted By: Dave_L_dup1 Re: PM on moved thread hack - 05/28/2002 7:10 PM
How about an option to leave a "pointer" instead (or in addition)? Previously posted as a feature request.
Posted By: MTO Re: PM on moved thread hack - 05/28/2002 7:13 PM
Make it an option to PM the thread owner or everyone who has replied. Sometimes it wont make sense to notify everyone.

Going further, though more complex. A Checkbox with the names of everyone who has replied to select the ones to notify. I can think of many situations where you´d only notify 4 out of 20.
Posted By: Muhammad Re: PM on moved thread hack - 05/28/2002 7:15 PM
I always like your more complex ideas, Mateo.
Posted By: Jim Osby Re: PM on moved thread hack - 06/03/2002 6:36 AM
"How about an option to leave a "pointer" instead (or in addition)?"


Absolutely. It's a wonderful hack, Astaran, but it leaves out those who participated in a thread (but didn't start it), who have just as much interest in hearing about a moved thread.

And including them in the private message scheme (per Muhammad's suggestion) would help, but it still leaves out readers-along who ALSO wonder where a thread went.

Leaving behind a pointer ("This thread has been moved to....") solves everything very simply and elegantly for all parties, IMO.

JIM
Posted By: Jim Osby Re: PM on moved thread hack - 06/03/2002 9:18 AM
ps--if there's a "marker", it should probably automatically self destruct after a week or so, so as not to clutter the board.
Posted By: MTO Re: PM on moved thread hack - 06/03/2002 4:33 PM
Yes, agreed, a pointer/marker/shortcut (choose your name!, haha) would probably be the best. Ideally you could set the expiration date on it when moving it.

This would be especially beneficial when thread has been started by a newbie unregistered user.
Posted By: Astaran Re: PM on moved thread hack - 06/03/2002 8:25 PM
I updated the instructions for easier implementing.
No additional functions, yet.

A pointer would be a nice feature, but it'll require some kind of cron job, that deletes the records after a certain time. I'm not able to implement that in the next weeks, sorry. Maybe someone else can do this?
But i would that make an additional option, but this function can produce much clutter on high traffic boards. In some situation you want to clean the forum with movíng threads. A pointer still occurs in the postlist, so that mods have no chance to clean forums up.

[] Going further, though more complex. A Checkbox with the names of everyone who has replied to select the ones to notify. I can think of many situations where you´d only notify 4 out of 20. [/]
Jepp, wan't to get this one in. Only have to think of a way to get the pm send only once to each user, even if they make several replies in one thread.
Posted By: Astaran Re: PM on moved thread hack - 06/03/2002 10:09 PM
Forgot the attachment. I'm getting old

Attached File
48661-PM_Moved_v1.1.txt  (45 downloads)
Posted By: caymuc Re: PM on moved thread hack - 06/03/2002 11:27 PM
Hi Asteran,
thanks for the new version. It's getting pretty cool.

You have some Denglish (German/English mix) in it, did you realize that?

By the way, I tried to find a way to address a user in their language, as I am running a bi-langual website. In your code I changed this:
[:"green"]
$Sender = $user['U_Username'];
$To = $poster;

//Hack in Hack, additionally: Language!
If ($Sprache == "German") {

if ($Reason != "") {
$Message2 ="<br /><br />Anmerkung: <br><br> $Reason";
}
$Subject = "Dein Thread "$mSubject" wurde verschoben.";
$mess = "Dein Thread "$mSubject" wurde von "$boardin" in's "$boardm" Board verchoben. Der Thread kann jetzt
<a href="$config[phpurl]/showthreaded.php?Cat=$Cat&Board=$Keyword_q&Number=$number">hier</a> gefunden werden.$Message2";

} else {

if ($Reason != "") {
$Message2 ="<br /><br />Annotation: <br><br> $Reason";
}
$Subject = "Your thread "$mSubject" has been moved";
$mess = "Your thread "$mSubject" has been moved from "$boardin" to "$boardm". The thread can be found
<a href="$config[phpurl]/showthreaded.php?Cat=$Cat&Board=$Keyword_q&Number=$number">here</a>.$Message2";

}
// End Hack in Hack
$html -> send_message ($Sender,$To,$Subject,$mess);
[/]

How to I get the variable $Sprache?
On the admin part, I added a selection. So the admin, while moving the thread, decides in what language he wants to address the user with the "reason":

[:"green"]
echo "</br /></br />
<p><b>Automatic Info-Message to the user who started the thread: </b></p>
<p>
a) Choose language of the User: <i><input type="radio" name="Sprache" value="German" checked="checked" border="0" />German <input type="radio" name="Sprache" value="English" border="0" />English</i>
</p><p>
b) Give a reason (optional): <input type="text" name=Reason size="24" border="0" class="formboxes" />
</p>
";
[/]


But there is probably a better way: to pick the stored language-variable for each user from the database.
But I am not so good in MySQL so I did it the other way.

If you like the idea, you will probably come up with a better solution, I'm sure

Posted By: Astaran Re: PM on moved thread hack - 06/04/2002 12:25 AM
Thanks for the info. Removed the german parts now.

Yes, it would be more elegant to grab the user language from the users table. Should be easy. But i'll have to do this before the moderator can enter his annotations, cause he needs to now the language he has to use.
Hope to get that into the next update.

Attached File
48674-PM_Moved_v1.2.txt  (54 downloads)
Posted By: Jim Osby Re: PM on moved thread hack - 06/04/2002 7:29 AM
whoa, I just thought of something important.

Hope this isn't a programming nightmare, but there's got to be a way to have a marker NOT left if a thread is moved to an invisible board!

Otherwise...geez....we'd have markers telling the world that threads called "Extend Your Sexual Satisfaction" or "The People Running This Board Are Doody-Heads" have been moved to the Purgatory Board, etc etc.

JIM
Posted By: Lisa_P Re: PM on moved thread hack - 06/04/2002 7:50 AM
I had the same concern, i.e., moving threads to a graveyard type forum. I was thinking perhaps the code could be changed so that if the thread was moved to (whatever keyword you have for this type forum) the members would receive a different PM -- one that said something like "This post was removed because . . ." and not list where it was removed to. Of course I don't know PHP, so I have no idea if this would be hard or not.
Posted By: Jim Osby Re: PM on moved thread hack - 06/04/2002 8:07 AM
Well, I prefer a public marker rather than PM when a thread is moved, because that way all onlookers know what happened to the thread.

But I would NOT want users automatically notified that their post/thread was killed (i.e. moved out of view), via PM OR via marker, cuz it would be an admin nightmare to handle all the complaints (especially on real busy boards).

If I want to notify a poster of a deletion, it's easy enough to do so. The program shouldn't force that notification, it's too delicate an issue.

Just MHO....


JIM
Posted By: MTO Re: PM on moved thread hack - 06/04/2002 3:55 PM
Just dont make it always leave a marker. That could be a nightmare, not only because of what you say, but because of having a whole bundh of markers.
Sometimes you want to move an old thread, no need to leave marker. Other times 3 persons have seen the thread, no need to leave the marker. It just depends on situations.
Never make it unconditionally put a marker. It should be an option.
Posted By: Jim Osby Re: PM on moved thread hack - 06/04/2002 7:49 PM
MTO, the issue of board clutter would be addressed by having the markers set to self destruct, no?

But, sure....I see no problem with having markers be an option when moving threads...and having it default to off. That solution would address my concerns as well, and head off a programming nightmare (of having to configure to NOT leave markers when moving to non-public boards).
Posted By: santana Re: PM on moved thread hack - 10/07/2002 5:50 PM
Hai.

It does'nt work on my 6.1 version.

Posted By: Astaran Re: PM on moved thread hack - 10/09/2002 9:01 AM
Can you provide any error description?
It's working on my 6.1.1 development board
Posted By: ksanuk Re: PM on moved thread hack - 10/16/2002 2:18 PM
Hi,

I too am having some problems with this (using 6.1.1). The thread is moved without any problems, but no PM is send (or at least not received).

Suggestions?

Sanuk!

PS I already changed the references to 'w3t_Boards' to '{$config['tbprefix']}Boards'
© UBB.Developers