Gardener
Addict
Registered: 05/11/99
Posts: 1954
Loc: Sweden, Uppsala
Mod Name / Version PM-Reply 1.1 beta1<br />Description Adds a new post extra function to make a reply to the post in a PM.<br />Working under UBB.threads 6.1.0<br />Any pre-requisites None<br />Author(s) Gardener<br />Credits None<br />Demo None<br />Files Altered ubbt.inc.php, showthreaded.php, showflat.php, sendprivate.php, sendmessage.php, templates/default/showthreaded.tmpl, templates/default/showflat.tmpl, templates/default/sendmessage.tmpl, templates/default/sendprivat.tmpl languages/generic.php<br />Database Altered No<br />New Files showpost.php<br />Any other info None<br /><br /><br />CHANGES<br />PM-Reply 1.1 beta1 includes a link to the link to the post that the PM is in reply to in the PM.<br /><br />This post is updated with the newest version of this script.
WrÅith
Enthusiast
Registered: 01/31/02
Posts: 310
Loc: California, USA
Hey Gardener:<br /><br />In your instructions you have the following:<br /><br /><pre><font class="small">code:</font><hr>Step 3<br />Open up the file showflat.php and find these lines (at ~876):<br /> $postrow[$i]['notifylinkstart'] = "<a href=\"{$config['phpurl']}/notifymod.php?Cat=$Cat&Board=$Board&Number=$Number&page=$page&view=$view&sb=$sb&o=$o&vc=1&fpart=$fpart&what=showflat\">";<br /> $postrow[$i]['notifylinkstop'] = "</a>";<br /><br />Add these lines AFTER:<br /> $postrow[$i]['sendpmlinkstart'] = "<a href=\"{$config['phpurl']}/sendprivate.php?Cat=$Cat&User=$EUsername\">";<br /> $postrow[$i]['sendpmlinkstop'] = "</A>";</pre><hr><br /><br />Assuming you wish to have the subject of the private message response be the same as a reply to the post, you should change the instructions to read as follows:<br /><br /><pre><font class="small">code:</font><hr>Step 3<br />Open up the file showflat.php and find these lines (at ~876):<br /> $postrow[$i]['notifylinkstart'] = "<a href=\"{$config['phpurl']}/notifymod.php?Cat=$Cat&Board=$Board&Number=$Number&page=$page&view=$view&sb=$sb&o=$o&vc=1&fpart=$fpart&what=showflat\">";<br /> $postrow[$i]['notifylinkstop'] = "</a>";<br /><br />Add these lines AFTER:<br /> $postrow[$i]['sendpmlinkstart'] = "<a href=\"{$config['phpurl']}/sendprivate.php?Cat=$Cat&User=$EUsername&Subject=Re: $tsubject\">";<br /> $postrow[$i]['sendpmlinkstop'] = "</A>";</pre><hr><br /><br />Basically I just added the &Subject=Re: $tsubject to the first part so it will pass the subject through. Otherwise, good hack! I know it will be appreciated by my members.
Gardener
Addict
Registered: 05/11/99
Posts: 1954
Loc: Sweden, Uppsala
Thanks for the fix, I don't use Flat mode that often so I didn't see that the subject was missing in the link there. I will add this to the instructions before I release it as a finished mod.
I installed this in 6.0.3 and it seemed to work, but when I tried to send the PM I got the error that <br /><br />"We have no record for the Username that you are trying to send this message to."<br /><br />even though the correct Username had been automatically entered into the form textbox.<br /><br />Anyone any ideas please?
Hi, Gardener, yes I've got the 'Allow special characters in usernames' option enabled because as a legacy I had to allow '.' full-stops in the usernames. Is there any way round this that you know of? (e.g. my username is VLE.Tech)<br /><br />thanks for your help.
Gardener
Addict
Registered: 05/11/99
Posts: 1954
Loc: Sweden, Uppsala
That might be the problem, although I haven't checked it yet, I will try to find the problem as soon as I get the time.<br /><br />If you could try with some other usernames in the meantime that would be great. It will be much easier to track down if I know if it is the same all the time for you or if only for a few usernames.
Please ignore my point above re the hack not working on my boards. This was due to a silly mistake I made when editing the template.<br /><br />Sorry and thanks for your help.
Gardener
Addict
Registered: 05/11/99
Posts: 1954
Loc: Sweden, Uppsala
I've updated this script, it now adds a link back to the post which the PM is in reply to. The new version is attached to the first post of this thread.
with a bit of hacking, i got this to work for my 6.2/6.5 hybrid board..... but I wouldn't suggest any newB attempt it.<br /><br />I really like this idea! and took it a step further, now all the fields in the PM form are automatically filled-in with the forum info<br /><br />Thanks for the templates Gardner - awesome work!!