Posted on: 03/07/06 09:29am
By: Robin
I found this oldie but goldie and thought I'd give it a try.
I modified it a little, tested on GL 1.4 and looks like it does everything you'd expect a PM plugin should do.
File is waiting for you
here[*1] .
There is still a lot work to be done on it e.g. stripping all the hardcoded language, polish it, etc.
As usual waiting for your feedback
YAPM - Yet Another Private Messenger
Posted on: 03/07/06 02:55pm
By: mugen
UPDATE: Plugin cause of SQL error? See below:
YAPM - Yet Another Private Messenger
Posted on: 03/07/06 04:36pm
By: mugen
[QUOTE BY= mugen] Hi Robin, I've installed it and it works great Thanks! mugen
cedko.com[*2]
[/QUOTE]Question: how do you make it so that when a new user registers at the site, they get a welcome PM?
Thanks, mugen
YAPM - Yet Another Private Messenger
Posted on: 03/07/06 06:23pm
By: mugen
Hi, after installing the PM plugin I keep getting a SQL error everytime I log out! I think it's something to do with the php block code, because when I disable the PM block, the logout works fine.
Help?
Thanks, mugen
YAPM - Yet Another Private Messenger
Posted on: 03/07/06 11:45pm
By: Robin
[QUOTE BY= mugen] Hi, after installing the PM plugin I keep getting a SQL error everytime I log out![/QUOTE]
Quoting the error would significantly help to investigate it
YAPM - Yet Another Private Messenger
Posted on: 03/08/06 04:19am
By: mugen
[QUOTE BY= Robin] [QUOTE BY= mugen] Hi, after installing the PM plugin I keep getting a SQL error everytime I log out![/QUOTE]
Quoting the error would significantly help to investigate it [/QUOTE]
Hi Robin, it just displays a blank page with the sentence:
MySQL error returned. (additional text here, can't remember).
Thanks, mugen
YAPM - Yet Another Private Messenger
Posted on: 03/08/06 04:36am
By: Robin
Could you switch it on so I can check it myself? Also you can test it on my site.
Anyone else is having this problem?
YAPM - Yet Another Private Messenger
Posted on: 03/08/06 07:59am
By: mugen
[QUOTE BY= Robin] Could you switch it on so I can check it myself? Also you can test it on my site.
Anyone else is having this problem? [/QUOTE]
Hi Robin, it's active now you can see the error message when you logout from the website:
An SQL error has occurred. Please see error.log for details.
in error.log:
Wed 08 Mar 2006 23:04:47 GMT-8 - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and receiverdelete='' and rd=''' at line 1. SQL in question: SELECT * FROM gl_pm WHERE sentto= and receiverdelete='' and rd=''
This only happens when I activate the php block for this plugin, otherwise it works fine.
Thanks for your help, mugen
YAPM - Yet Another Private Messenger
Posted on: 03/08/06 08:25am
By: bieffe
hello,
i've tried this PM plugin. it's nice & simple but only one problem for me atm.
as what mugen posted, the problem occured when activate php block.
i'm 90% sure that the line below got problem.
$result = DB_query("SELECT * FROM {$_TABLES['pm']} WHERE sentto=" . $_USER['uid'] . " and receiverdelete='' and rd=''");
below are my error log.
Wed 08 Mar 2006 20:56:02 MYT - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and receiverdelete='' and rd=''' at line 1. SQL in question: SELECT * FROM gl_pm WHERE sentto= and receiverdelete='' and rd=''
YAPM - Yet Another Private Messenger
Posted on: 03/08/06 08:54am
By: Robin
There is one more thing that has to be done after installation of this plugin. You have to add pm.view feature to Logged-in users group.
This can be easily achieved using handy little script by Blaine called Group Access Tool.
I'll get back to you as soon as I have some answers to your issues
Glad you you like it.
YAPM - Yet Another Private Messenger
Posted on: 03/08/06 10:12am
By: mugen
[QUOTE BY= bieffe] hello,
i've tried this PM plugin. it's nice & simple but only one problem for me atm.
as what mugen posted, the problem occured when activate php block.
i'm 90% sure that the line below got problem.
$result = DB_query("SELECT * FROM {$_TABLES['pm']} WHERE sentto=" . $_USER['uid'] . " and receiverdelete='' and rd=''");
below are my error log.
Wed 08 Mar 2006 20:56:02 MYT - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and receiverdelete='' and rd=''' at line 1. SQL in question: SELECT * FROM gl_pm WHERE sentto= and receiverdelete='' and rd=''
[/QUOTE]
I think bieffe is on the right track.
YAPM - Yet Another Private Messenger
Posted on: 03/08/06 10:41am
By: Robin
[QUOTE BY= mugen]in error.log:
[08-Mar-2006 19:48:18] PHP Parse error: parse error, unexpected T_STRING in /home/cedko2/system/lib-custom.php on line 450[/QUOTE]
What does it actually write in this line 450?
YAPM - Yet Another Private Messenger
Posted on: 03/08/06 11:09am
By: mugen
[QUOTE BY= Robin] [QUOTE BY= mugen]in error.log:
[08-Mar-2006 19:48:18] PHP Parse error: parse error, unexpected T_STRING in /home/cedko2/system/lib-custom.php on line 450[/QUOTE]
What does it actually write in this line 450?[/QUOTE]
I'm sorry, I was looking at the wrong error log, the real error message is similar to bieffe's error:
Wed 08 Mar 2006 23:04:47 GMT-8 - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and receiverdelete='' and rd=''' at line 1. SQL in question: SELECT * FROM gl_pm WHERE sentto= and receiverdelete='' and rd=''
Thanks for your help Robin - mugen
YAPM - Yet Another Private Messenger
Posted on: 03/08/06 11:35am
By: kr
This plugin looks nice ... BTW: Installation performed without any error or problems on my v1.4.0sr2 site.
After installation i was also possible to send and recieve messages but does anyone now if the plugin has the possibility to inform a user about his new messages? Right now the only way i see to get informed that a new message was arrived is by manually checking the "Private Messaging" Inbox.
Any Ideas?
c'ya KR
YAPM - Yet Another Private Messenger
Posted on: 03/08/06 11:49am
By: mugen
[QUOTE BY= kr] This plugin looks nice ... BTW: Installation performed without any error or problems on my v1.4.0sr2 site.
After installation i was also possible to send and recieve messages but does anyone now if the plugin has the possibility to inform a user about his new messages? Right now the only way i see to get informed that a new message was arrived is by manually checking the "Private Messaging" Inbox.
Any Ideas?
c'ya KR[/QUOTE]
Hi KR, you need to create a special geeklog php block to inform users when they have a new message. To create a php block involves pasting some code in your /system/lib-custom.php file, then activating it in your block admin. Do a search on blocks to learn more.
To display when a new message has arrived, this is what bieffe and myself are trying to do now, but there seems to be some problem with the PM block code. Robin is helping to solve this problem.
Cheers, mugen
YAPM - Yet Another Private Messenger
Posted on: 03/09/06 04:44am
By: Robin
[QUOTE BY= bieffe]
as what mugen posted, the problem occured when activate php block.[/QUOTE]
What version of MySql are you using?
I checked it on two versions and looks like 4.0.24 returns this error and 4.1.12 doesn't.
So maybe Mysql upgrade would help
YAPM - Yet Another Private Messenger
Posted on: 03/09/06 07:21am
By: mugen
[QUOTE BY= Robin] [QUOTE BY= bieffe]
as what mugen posted, the problem occured when activate php block.[/QUOTE]
What version of MySql are you using?
I checked it on two versions and looks like 4.0.24 returns this error and 4.1.12 doesn't.
So maybe Mysql upgrade would help [/QUOTE]
Hi Robin, ISP is using 4.0.25 so can't upgrade. Thanks for your help guess have to leave out the block for now.
mugen
YAPM - Yet Another Private Messenger
Posted on: 03/09/06 07:46am
By: bieffe
[QUOTE BY= Robin] [QUOTE BY= bieffe]
as what mugen posted, the problem occured when activate php block.[/QUOTE]
What version of MySql are you using?
I checked it on two versions and looks like 4.0.24 returns this error and 4.1.12 doesn't.
So maybe Mysql upgrade would help [/QUOTE]
my mysql version 4.1.15
YAPM - Yet Another Private Messenger
Posted on: 03/09/06 09:16am
By: Robin
OK
Let's give it a try.
I modified this sql from the block code and so far so good
Test it please and let me know about the results
$result = DB_query("SELECT * FROM " . $_TABLES['pm'] . " WHERE sentto=" . $_USER['uid'] . " AND receiverdelete='' AND rd=''");
YAPM - Yet Another Private Messenger
Posted on: 03/09/06 11:15pm
By: mugen
[QUOTE BY= Robin] OK
Let's give it a try.
I modified this sql from the block code and so far so good
Test it please and let me know about the results
$result = DB_query("SELECT * FROM " . $_TABLES['pm'] . " WHERE sentto=" . $_USER['uid'] . " AND receiverdelete='' AND rd=''");
[/QUOTE]
Hi Robin, nope not working, error message:
Fri 10 Mar 2006 12:11:16 GMT-8 - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND receiverdelete='' AND rd=''' at line 1. SQL in question: SELECT * FROM gl_pm WHERE sentto= AND receiverdelete='' AND rd=''
YAPM - Yet Another Private Messenger
Posted on: 03/10/06 03:09am
By: Robin
[QUOTE BY= mugen] Hi Robin, nope not working[/QUOTE]
Yes I've noticed that later. After several tests I modified the block code and the problem on my site has gone.
Try this slightly modified code:
function phpblock_getpm()
{
global $_CONF, $_USER, $_NEWM, $_NOM, $new_pm, $_TABLES;
$uid=$_USER['uid'];
$popup = false; //comment out this line to stop popups!
$result = DB_query("SELECT * FROM " . $_TABLES['pm'] . " WHERE sentto='$uid' AND receiverdelete='' AND rd=''");
$new_pm = DB_numRows($result);
if($new_pm <= 0){
$_NOM = "";
return $_NOM;
}else{
if ($popup){
include($_CONF['path_html'] . "/pm/popupbasic.js");
//print $_CONF['site_url'];
echo "
<script language=\"javascript\">
<!--
chatAlert('" . $_CONF['site_url'] . "/pm/alert.php');
//-->
</script>";
}
$_NEWM .= '<b><u><A href="' . $_CONF['site_url'] . '/pm/index.php">You have ' .
$new_pm . ' new message' . $plural . '</a></u></b>';
return $_NEWM ;
}
}
YAPM - Yet Another Private Messenger
Posted on: 03/10/06 04:02am
By: mugen
Thx Robin, it works now! You just made my day!
You can test it at:
cedko.com[*2]
Cheers, mugen
YAPM - Yet Another Private Messenger
Posted on: 03/10/06 04:15am
By: Robin
[QUOTE BY= mugen] Thx Robin, it works now![/QUOTE]
Glad to hear that
YAPM - Yet Another Private Messenger
Posted on: 03/10/06 05:34am
By: mugen
I'm trying to add more smilies to the PM send message page. I can get the javascript to place the smiley code into the message, but the smilies don't display when I'm reading the message. Is there a setting in Geeklog I need to change to activate new smilies?
Thanks, mugen
<a href="javascript:emoticon(':shakehands:')"><img align=absmiddle src="{layout_dir}images/smilies/shakehands.gif" alt="Hand Shake" title="Hand Shake" border="0" ></a>
| <a href="javascript:emoticon(':chestslam:')"><img align=absmiddle src="{layout_dir}images/smilies/chestram2.gif" alt="Chest Slam" title="Chest Slam" border="0" ></a>
<table>
<td height="2"></td>
</table>
<a href="javascript:emoticon(':banghead:')"><img align=absmiddle src="{layout_dir}images/smilies/banghead.gif" alt="Head Banging" title="Head Banging" border="0" ></a>
| <a href="javascript:emoticon(':twocents:')"><img align=absmiddle src="{layout_dir}images/smilies/twocents.gif" alt="My 2 Cents" title="My 2 Cents" border="0" ></a>
| <a href="javascript:emoticon(':doh:')"><img align=absmiddle src="{layout_dir}images/smilies/doh.gif" alt="Doh!" title="Doh!" border="0" ></a>
YAPM - Yet Another Private Messenger
Posted on: 03/10/06 07:27am
By: Robin
[QUOTE BY= mugen]I can get the javascript to place the smiley code into the message, but the smilies don't display when I'm reading the message.[/QUOTE]
You have to update functions.inc also.
YAPM - Yet Another Private Messenger
Posted on: 03/10/06 09:12am
By: mugen
[QUOTE BY= Robin] [QUOTE BY= mugen]I can get the javascript to place the smiley code into the message, but the smilies don't display when I'm reading the message.[/QUOTE]
You have to update functions.inc also.
[/QUOTE]
Sensei! Thank You!
YAPM - Yet Another Private Messenger
Posted on: 03/10/06 12:14pm
By: mugen
Reporting back some of my findings:
There seems to be a limit to how much info you can send in a PM. I noticed that if you send a lot of smilies for example, those at the end don't appear when you read the message. Is there a text limit setting in the code or database which can be changed to allow for longer messages?
Thanks! mugen
YAPM - Yet Another Private Messenger
Posted on: 03/13/06 05:43am
By: mugen
[QUOTE BY= mugen] Reporting back some of my findings:
There seems to be a limit to how much info you can send in a PM. I noticed that if you send a lot of smilies for example, those at the end don't appear when you read the message. Is there a text limit setting in the code or database which can be changed to allow for longer messages?
Thanks! mugen[/QUOTE]
I've removed this plugin from the cedko.com site. Messages keep getting cut-off for some reason. This is not a working plugin at this time, needs further testing.
Cheers, mugen
YAPM - Yet Another Private Messenger
Posted on: 03/13/06 06:45am
By: Robin
[QUOTE BY= mugen] Is there a text limit setting in the code or database which can be changed to allow for longer messages?[/QUOTE]
It's in DB actually (255 chars)
[QUOTE BY= mugen]This is not a working plugin at this time, needs further testing.[/QUOTE]
Well it is working, however doesn't meet your expectations Yes it needs a lot of testing.
YAPM - Yet Another Private Messenger
Posted on: 03/13/06 07:10am
By: mugen
[QUOTE BY= Robin] [QUOTE BY= mugen] Is there a text limit setting in the code or database which can be changed to allow for longer messages?[/QUOTE]
It's in DB actually (255 chars)
[QUOTE BY= mugen]This is not a working plugin at this time, needs further testing.[/QUOTE]
Well it is working, however doesn't meet your expectations Yes it needs a lot of testing.[/QUOTE]
Let me rephrase, this is not a stable plugin at this time. It needs extensive testing/debugging/proper documentation before being released to the public.
YAPM - Yet Another Private Messenger
Posted on: 03/13/06 11:29am
By: Robin
[QUOTE BY= mugen] this is not a stable plugin at this time.[/QUOTE]
If you're still interested in this kind of functionality there is I believe more stable and well tested plugin, glMessenger by Blaine, available at his site portalparts.com.
In the meantime I'd better get to work on this one