Working on a "private messages" plugin

Postby evens83 on Tue Apr 24, 2007 9:36 am

phunkphorce wrote:How complete is it? Are there many features still to be implemente?


It's starting to take form at this point. And the features that I have managed to incorporate is:
* Read incoming messages.
* Read your outbox.
* Unread messages are shown in read, until it's been read.
* Reply to incoming messages.
* Search trough all the users, and send a message to one of them.
* Delete one or more messages.

mello wrote:Should we try this out and give feedback on it? Or is it not ready for that yet?


Yes, I think it's ready for some feedback now! :)
http://stud.aitel.hist.no/~evens/privatemessage/
evens83
 
Posts: 15
Joined: Mon Feb 12, 2007 11:12 am

Postby Nomad on Tue Apr 24, 2007 12:45 pm

hmm just been testing this - as I'm an administrator when I click on 'Send Message' I get a list of name come up - defaulting to 'ALL' I then need to choose only active members. and the active list only comes up. If I then click on a username I'm getting the admin edit option instead of the messaging service.

I haven't tested as a user - I'll do that now and see how it functions. Though as an admin it's not functioning as I think you intended...

ok just tried sending a message from a user account to my own account - no message. Also that admin bug - it's ok on the first list but if I goto another page (I.E. I have so many users that it lists as 4 pages) - thats when the user bug appears...
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Postby phunkphorce on Tue Apr 24, 2007 3:05 pm

I only wanted to add that if this works ok and people like it, it could end up being part of the core in Lifetype 1.3 (complementing the friends list we're going to have)
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby Nomad on Tue Apr 24, 2007 5:31 pm

phunkphorce wrote:I only wanted to add that if this works ok and people like it, it could end up being part of the core in Lifetype 1.3 (complementing the friends list we're going to have)


Would be an amazing extra feature but it would need those bugs ironed out.. Will keep an eye on this for testing etc.

First thing is to stop it acting up when your logged in as an admin. I suspect this is because of how it is getting the user list. As it is - it is drawing on 'All' i.e. Disabled, unconfirmed and active. My thought is that it should only draw on the 'Active' users list or be restricted to active users only.

I've looked at my db and there is a message table now in there - so that part is functioning - the message and id's are correct for sender/receiver.

hmm I've just reloaded this plugin (i.e. Removed it/wiped the table in the db etc) it shows in the manage inbox/outbox/send message if however I go to control center/private messages/settings I get these errors when clicking on settings - tried loading/unloading the plugin..but error still there..

Code: Select all
Warning: main(public_html/class/action/admin/blogowneradminaction.class.php) [function.main]: failed to open stream: No such file or directory in /public_html/plugins/privatemessage/class/action/adminmessagespluginsettings.class.php on line 3

Warning: main() [function.include]: Failed opening 'public_html/class/action/admin/blogowneradminaction.class.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in public_html/plugins/privatemessage/class/action/adminmessagespluginsettings.class.php on line 3

Fatal error: Class 'BlogOwnerAdminAction' not found in /public_html/plugins/privatemessage/class/action/adminmessagespluginsettings.class.php on line 6


something I may have done - I'll try a full cleanout and see if I can get it running again...

hmm actually just looked for this

class/action/admin/blogowneradminaction.class.php - the file isn't there so maybe thats part of the problem? or why is it looking for that?
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Postby phunkphorce on Tue Apr 24, 2007 5:38 pm

These errors about missing classes are because the plugin is being developed for 1.1.x.
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby Nomad on Tue Apr 24, 2007 5:42 pm

Ah right - I thought they were working on a 1.2 developement? Will it be updated for the current version?

btw - when is 1.3 out? any timeline yet? (Sorry I know how much those type of questions are bad ;) )

BTW Will be re-installing the submissions plugin tomorrow - will give it a good testing hopefully... especially with the new rally Blog system I'm working on (Thats the windows server setup btw) :)
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Postby phunkphorce on Wed Apr 25, 2007 1:49 am

LT 1.3 will be out when it's ready :) It's really hard to even give a rough estimation, I've had very little time to work on anything lately... But at least one of the new features that I wanted to integrate in 1.3 (integration with google maps) is already in place, and markwu promised to merge his friends list code at some point. Those are the two major features we had in mind for 1.3, although the private messaging thingie would also be very interesting.
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Bugs

Postby evens83 on Wed Apr 25, 2007 8:21 am

Nomad wrote:hmm just been testing this - as I'm an administrator
when I click on 'Send Message' I get a list of name come up - defaulting to 'ALL' I then need to choose only active members. and the active list only comes up. If I then click on a username I'm getting the admin edit option instead of the messaging service.


Yes, the reason I haven't seen this bug until you pointed it out is because all my users did fit on just one pager-screen. I have now added a number of test-users, and managed to regenerate the bug you pointed out! The reason for this bug, was these lines:

Code: Select all
{adminpager style=list}
  {check_perms adminperm=update_user}
  {/check_perms}


which I have now changed to:

Code: Select all
{adminpager style=list}
  {check_perms adminperm=sendMessage}
  {/check_perms}


It's fixed in my latest release.

Nomad wrote:ok just tried sending a message from a user account to my own account - no message. Also that admin bug - it's ok on the first list but if I goto another page (I.E. I have so many users that it lists as 4 pages) - thats when the user bug appears...


The admin-another-page-bug should be fixed in the new release of my plugin.

And the reason you could not see your message sent from the admin-user to your user-account, is because of the $pluginEnabled-tag. This tag has false as the default value for new user-account. And was causing the inbox-site to not show any messages. But it should be working in my new release.

I'm speculating whether it's necessary or not to have the enable/disable plugin-option in the Control Centre-panel? What do you think?


phunkphorce wrote:I only wanted to add that if this works ok and people like it, it could end up being part of the core in Lifetype 1.3 (complementing the friends list we're going to have)


I would love if that is going to happen! Because it's nice to contribute to the community :)

I have actually also worked on the friend-plugin. But I have put it a bit on ice, since the messages-plugin is taking my time for now.


Nomad wrote:First thing is to stop it acting up when your logged in as an admin. I suspect this is because of how it is getting the user list. As it is - it is drawing on 'All' i.e. Disabled, unconfirmed and active. My thought is that it should only draw on the 'Active' users list or be restricted to active users only.


Yes, I agree with you at this point. There is no point in sending messages to unconfirmed or disabled users. Because these users can not read their messages anyway!

I'm currently working on this issue. And I'm trying to lock the userlist to only include active users.

EDIT: Fixed now. It's now locked to only show active users. Fixed in new release, version 1.04

http://stud.aitel.hist.no/~evens/privatemessage/
evens83
 
Posts: 15
Joined: Mon Feb 12, 2007 11:12 am

Postby Nomad on Wed Apr 25, 2007 8:58 am

Ah right - I forgot that your developing this on a 1.1.x release not the 1.2 release

Do you intend to implement it as a 1.2 release? In fact why not upgrade your system to 1.2 and develop it from there?


I can't test this for you now as I'm on 1.2 - though for some strange reason the copy I had yesterday worked to some extent i.e. I could enable it via control center/settings... I get the errors above at the moment...

Ok just ported this for Lifetype 1.2 and tested it. Seems to be working fine. Will try getting a production test over the next week with my users but no issues as far as I can tell...


LT 1.2 ported version available here http://www.blogireland.ie/privatemessage1-05.zip

Full attributation given to the original makers in the readme file :)

edit: now to try getting that pesky audio plugin working lol ;)
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Postby evens83 on Wed Apr 25, 2007 9:47 am

Nomad wrote:
hmm I've just reloaded this plugin (i.e. Removed it/wiped the table in the db etc) it shows in the manage inbox/outbox/send message if however I go to control center/private messages/settings I get these errors when clicking on settings - tried loading/unloading the plugin..but error still there..

Code: Select all
Warning: main(public_html/class/action/admin/blogowneradminaction.class.php) [function.main]: failed to open stream: No such file or directory in /public_html/plugins/privatemessage/class/action/adminmessagespluginsettings.class.php on line 3

Warning: main() [function.include]: Failed opening 'public_html/class/action/admin/blogowneradminaction.class.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in public_html/plugins/privatemessage/class/action/adminmessagespluginsettings.class.php on line 3

Fatal error: Class 'BlogOwnerAdminAction' not found in /public_html/plugins/privatemessage/class/action/adminmessagespluginsettings.class.php on line 6


something I may have done - I'll try a full cleanout and see if I can get it running again...

hmm actually just looked for this

class/action/admin/blogowneradminaction.class.php - the file isn't there so maybe thats part of the problem? or why is it looking for that?


I'm not able to reproduce this error. And have currently no idea about what is causing this problem. What I tried is to delete the plugin, and see what happens when I go to the admin-console. I then got this error-message:

Code: Select all
Exception message: lt_include(/home/stud/evens/public_html/lifetype1/plugins/privatemessage/class/dao/messagestatus.class.php): failed to open stream: No such file or directory
Error code: 2
-- Backtrace --
/home/stud/evens/public_html/lifetype1/class/object/loader.class.php(6): lt_include
/home/stud/evens/public_html/lifetype1/plugins/friends/class/dao/friendinfo.class.php(4): lt_include
/home/stud/evens/public_html/lifetype1/plugins/friends/class/dao/friends.class.php(4): include_once
/home/stud/evens/public_html/lifetype1/plugins/favouriteblogs/pluginfavouriteblogs.class.php(13): include_once
/home/stud/evens/public_html/lifetype1/class/object/loader.class.php(6): include_once
/home/stud/evens/public_html/lifetype1/class/plugin/pluginmanager.class.php(246): lt_include
/home/stud/evens/public_html/lifetype1/class/plugin/pluginmanager.class.php(177): pluginmanager._createplugininstance
/home/stud/evens/public_html/lifetype1/admin.php(40): pluginmanager.loadplugins


I think that maby I should use 'include_once' instead of 'lt_include' in my plugins. But I'm currently trying to work out a solution to this problem.

phunkphorce wrote:These errors about missing classes are because the plugin is being developed for 1.1.x.


I'm trying to implement the plugin to work against LifeType 1.2.x (currently using snapshot 20070411). So what makes you think that I'm building it towards the 1.1x version? Maby it's because I'm (by a mistake) using code from a 1.1.x-plugin? But anyway, my intention is to make it work in your latest lifetype-version.

phunkphorce wrote:LT 1.3 will be out when it's ready :) It's really hard to even give a rough estimation, I've had very little time to work on anything lately... But at least one of the new features that I wanted to integrate in 1.3 (integration with google maps) is already in place, and markwu promised to merge his friends list code at some point. Those are the two major features we had in mind for 1.3, although the private messaging thingie would also be very interesting.


Is Mark Wu going to implement the friends-functionality to LifeType? How complete is his code?
evens83
 
Posts: 15
Joined: Mon Feb 12, 2007 11:12 am

Postby evens83 on Wed Apr 25, 2007 9:57 am

Nomad wrote:Ah right - I forgot that your developing this on a 1.1.x release not the 1.2 release

Do you intend to implement it as a 1.2 release? In fact why not upgrade your system to 1.2 and develop it from there?


I can't test this for you now as I'm on 1.2 - though for some strange reason the copy I had yesterday worked to some extent i.e. I could enable it via control center/settings... I get the errors above at the moment...

Ok just ported this for Lifetype 1.2 and tested it. Seems to be working fine. Will try getting a production test over the next week with my users but no issues as far as I can tell...


LT 1.2 ported version available here http://www.blogireland.ie/privatemessage1-05.zip

Full attributation given to the original makers in the readme file :)

edit: now to try getting that pesky audio plugin working lol ;)


My intention is to make the plugin work on LifeType's latest snapshot, since that is what I'm using. So it has to be a misunderstanding that I'm coding it towards the 1.1.x-version.

Great work! But what changes did you make to the code?
evens83
 
Posts: 15
Joined: Mon Feb 12, 2007 11:12 am

Postby Nomad on Wed Apr 25, 2007 9:58 am

Ok just ported this for Lifetype 1.2 and tested it. Seems to be working fine. Will try getting a production test over the next week with my users but no issues as far as I can tell...


LT 1.2 ported version available here http://www.blogireland.ie/privatemessage1-05.zip

Full attributation given to the original makers in the readme file Smile



evens83? I've ported it to work on LT1.2 - the reason I was getting those errors was because the plugin was using the old BlogOwnerAdminAction instead of just AdminAction (In class/action and class/view) - changing BlogOwnerAdminAction to just AdminAction sovled the problem for it to work in 1.2

I'm just looking through the template - because when you goto enable the plugin it is showing 'karma_enable_plugin instead of Private_message_enable_plugin' - this could be because it is calling the wrong message from the locales/en file?

Other than that it seems to be working fine and the Active User only choice is working ok :)

edit -

ah it seems you have the template reading 'karma' in templates/pluginsettings.template

it's in line 12 - karma_plugin_enabled changed to private_message_plugin_enabled

will upload the edit now :)
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Postby evens83 on Wed Apr 25, 2007 10:17 am

Nomad wrote:
Ok just ported this for Lifetype 1.2 and tested it. Seems to be working fine. Will try getting a production test over the next week with my users but no issues as far as I can tell...


LT 1.2 ported version available here http://www.blogireland.ie/privatemessage1-05.zip

Full attributation given to the original makers in the readme file Smile



evens83? I've ported it to work on LT1.2 - the reason I was getting those errors was because the plugin was using the old BlogOwnerAdminAction instead of just AdminAction (In class/action and class/view) - changing BlogOwnerAdminAction to just AdminAction sovled the problem for it to work in 1.2

I'm just looking through the template - because when you goto enable the plugin it is showing 'karma_enable_plugin instead of Private_message_enable_plugin' - this could be because it is calling the wrong message from the locales/en file?

Other than that it seems to be working fine and the Active User only choice is working ok :)

edit -

ah it seems you have the template reading 'karma' in templates/pluginsettings.template

it's in line 12 - karma_plugin_enabled changed to private_message_plugin_enabled

will upload the edit now :)


Thanks for this info! Because I realize now that I had actually used the old 1.1.x function BlogOwnerAdminAction, instead of the new AdminAction. According to the info in this wiki: http://wiki.lifetype.net/index.php/Porting_Plugins

I have to admit that the enable/disable-function for the plugin is a bit unfinished, since it is only copy+pasted from the karma plugin :P So it wouldn't surprise me if you find some bugs on this part :D
evens83
 
Posts: 15
Joined: Mon Feb 12, 2007 11:12 am

Postby Nomad on Wed Apr 25, 2007 10:40 am

Like I say - edited all of that
so updated plugin

ported to LT 1.2
enable message updated

everything seems fine so far to me :)
Blog Ireland - now with video posting
Normally most write something meaningful here so many to choose from yet most oft ignored.
Nomad
Lifetype Expert
 
Posts: 645
Joined: Sat Feb 05, 2005 8:40 pm
Location: Eire

Postby evens83 on Wed Apr 25, 2007 10:55 am

Nomad wrote:Like I say - edited all of that
so updated plugin

ported to LT 1.2
enable message updated

everything seems fine so far to me :)


Good! :)

One issue is that if you send a message, and right after delete it from your outbox. The message will also be deleted from the receivers inbox. But I don't know if this is a problem or not?

The problem is that if users is starting to "clean up" their outbox, then the corresponding inbox-message to the receiver will be lost in the same time.

I have compared my implementation against the PM-function in PHPBB. And in PHPBB, the message stays in the receivers inbox, even trough you just deleted it from your own outbox.
evens83
 
Posts: 15
Joined: Mon Feb 12, 2007 11:12 am

PreviousNext

Return to LifeType 2.0 Development

cron