Advanced search  

News:

cpg1.5.30 maintenance release - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix several minor issues. All fixes are not security critical, so if your gallery is running fine with cpg1.5.28 you don't need to upgrade. If you are running an older version than cpg1.5.28, you must update to this latest version as soon as possible because of the security impact!
[more]

Pages: [1] 2   Go Down

Author Topic: Private Messaging System for CPG 1.5  (Read 7567 times)

0 Members and 1 Guest are viewing this topic.

cmfa

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 213
Private Messaging System for CPG 1.5
« on: February 22, 2011, 11:04:35 PM »

Hi@all

would like to set the port of the PMS plugin from Stramm. The plugin has been ported by me with a good conscience.

Where I need personally help with the implementation of a notification of new messages on login.

I see another two point action, is absolutely necessary for the function of the plugin.
1. Theme customization so that you are back in a number button. (see screenshot =>pms.jpg)
2. Transfer of the subject and link to the image when PM about an image is called. (see screenshot =>pms_II.jpg)

I hope you can use the plugin

tested in IE8 and FF 3.6 +

VG
CMFA


This plugin allows you to send private messages to other registered users.
Actually this plugin works for an unbridged coppermine. It'll add a send pm functionality and one to view PMs. Also there is bridge support built in. For now the smf10 works too. It's not that easy to add other bridges cause the bridge files aren't written in the same style. Therefore the way to go would be to hardcode some routines.

In bridged mode the plugin uses the forums PM functions and just adds 'send PM' links in thumbnail view, above the intermediate image and if you copy/ paste the contents of theme_changes.txt to your theme.php another 'send PM' link next to commenter names.

In the admin menu a 'PMS' button will appeare. You can make some settings here
 - enable/ disable pm
 - a bunch of other stuff like smilies etc... some are not yet implemented
important is
Display pm status info when logged in - this will add some statistics (Private Messages:  2 unread, total 9)
Display login form - will show a login box if a user isn't logged in, the above stats at that place when logged in

An english lang file is added. You can add new lang files... the sheme is similar to the other cpg lang files.

Installation:
- unzip and upload to your plugins folder, use the plugin manager to install it
- have a look into the folder images_to_move
   -> copy all images within this folder to your themes images folder (eg themes/classic/images)
   -> copy/ paste the contents from css_changes.txt to your themes css file (eg themes/classic/style.css)
   -> copy/ paste the contents of theme_changes.txt to your theme.php (eg themes/classic/theme.php)
       [no biggie if you don't do that, however the 'send PM' link won't then display next to the username within comments]
   -> if you want to display a 'send PM' link in the user profile, you'll have to manually edit profile.php. Version 1.1 of the plugin introduces a plugin hook in profile.php to reduce the editing amount.

in profile.php find (at the end of the code)
Code: [Select]
       make_form($display_profile_form_param, $form_data);
and replace with
Code: [Select]
       //added for plugin support - PMS
$profile_data = CPGPluginAPI::filter('profile_add_data', array ( 0 => $display_profile_form_param, 1 => $form_data ));
        make_form($profile_data[0], $profile_data[1]);

that's it with editing

The login form by default is placed after the sub  menu. If you want it to appeare somewhere else, then add
Code: [Select]
{LOGIN_FORM}to your template.html.

New version (1.1 uploaded on 11/02/2007)
 - added plugin hook in profile.php and changed code in codebase.php to make use of that hook to add data to the profile (send PM link)
Logged

valdemar777

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Private Messaging System for CPG 1.5
« Reply #1 on: February 25, 2011, 08:48:01 PM »

Thanks for the plug-in. problems after installation. Icons are not displayed, either in profile or page with messages. Added all the images from a folder  'pms'  to  folder 'images' used themes. If i add the proposed code to the file theme.php then appears at the top of this text, and icons are not visible. Link http://parijankagallery.ru/index.html

Help please.

Sorry for my bad english. Google translation
Logged

cmfa

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 213
Re: Private Messaging System for CPG 1.5
« Reply #2 on: February 25, 2011, 09:15:22 PM »

hi,
take the entire folder and copy / images / PMS, the images displayed. In the Theme.php the transfer is not absolutely necessary. The other problem I have, I am in problem-solving.

cmfa
Logged

valdemar777

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Private Messaging System for CPG 1.5
« Reply #3 on: February 25, 2011, 09:37:24 PM »

oops, I have a folder was pms, changed it to PMS, now it Ok . Thank's
Logged

EC

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
    • Fotonicamente
Re: Private Messaging System for CPG 1.5
« Reply #4 on: March 03, 2011, 06:19:52 PM »

Does it work also for bridged gallery?
Thanks
Elena
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 331
Re: Private Messaging System for CPG 1.5
« Reply #5 on: March 04, 2011, 05:33:57 PM »

Does it work also for bridged gallery?
Thanks
Elena

You won't need this plugin in bridged installs.
Quote
When bridging is turned on, Coppermine drops the user management it comes with and uses the user management of the app you bridge with (i.e. your BBS app). Subsequently, your users will register and log in on your bridge app (BBS). After they do, they may be redirected to coppermine (if they came from coppermine's login page in the first place and your bridge app allows redirects).
(from docs)

Logged

pilgrim13

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Private Messaging System for CPG 1.5
« Reply #6 on: July 03, 2011, 07:10:21 PM »

Hello! Can you help me?
After install PMS plugin an error occured. Coppermine stopped to use theme tamplate, and content of page load as it is. But no {ADMIN_MENU}, {USER_MENU}, header and footer loaded, only {GALERY}.

Sorry for ma bad english. Thank you
Logged

cmfa

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 213
Re: Private Messaging System for CPG 1.5
« Reply #7 on: July 04, 2011, 07:47:18 PM »

hi,
what exactly have you done? What is a template for what you are using?

cmfa
Logged

pilgrim13

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Private Messaging System for CPG 1.5
« Reply #8 on: July 07, 2011, 06:04:43 AM »

Good day! Thank you for your response. The error occurs on a clean and standard Coppermine themes
Logged

pilgrim13

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Private Messaging System for CPG 1.5
« Reply #9 on: July 23, 2011, 06:30:47 AM »

Hello, is any way to solv this problem? :(

The plugins work, but page load not in template, and only {GALERY} block

Thanks
Logged

kodif

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Private Messaging System for CPG 1.5
« Reply #10 on: September 09, 2011, 12:25:04 AM »

I have the same problem, only {GALERY} block without css is displayed.
Logged

cmfa

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 213
Re: Private Messaging System for CPG 1.5
« Reply #11 on: September 09, 2011, 02:21:17 PM »

Hello,

what theme do you use? Are all the steps described in the first post processed?
Currently, I've tried water_drop with the theme and it works all as expected.

CMFA
Logged

kodif

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Private Messaging System for CPG 1.5
« Reply #12 on: September 09, 2011, 04:46:13 PM »

Hello,

I tried on copy of my live gallery on localhost and on fresh instalation (+curve) also on localhost
All steps were processed.
In both cases I get the same error regardless of choosen theme
Logged

kodif

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Private Messaging System for CPG 1.5
« Reply #13 on: September 09, 2011, 06:21:32 PM »

Aditional info:

In codebase.php it looks like this
Code: [Select]
// User menus
//        $thisplugin->add_filter('template_html','pms_user_menu');

// Some filters
$thisplugin->add_filter('thumb_caption','pms_add_link_thumb');
$thisplugin->add_filter('file_data','pms_add_link_normal');
$thisplugin->add_filter('template_html','pms_loginform_start');
// new filter for profile
$thisplugin->add_filter('profile_add_data','pms_profile_edit');

I changed to
Code: [Select]
// User menus
        $thisplugin->add_filter('template_html','pms_user_menu');

// Some filters
$thisplugin->add_filter('thumb_caption','pms_add_link_thumb');
$thisplugin->add_filter('file_data','pms_add_link_normal');
$thisplugin->add_filter('template_html','pms_loginform_start');
// new filter for profile
$thisplugin->add_filter('profile_add_data','pms_profile_edit');

After I uncommented this line, plugin seems to work fine .....


Logged

Alkonautti

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Private Messaging System for CPG 1.5
« Reply #14 on: May 25, 2012, 07:01:19 PM »

Hi,

i have a problem with this plugin. i have installed pms as in instructions. now my whole gallery crashes saying "critical error: There was an error while processing a database query" and nothing works, just a blank white page with the error message. if i remove the plugin files my gallery works fine again.

can anyone help me with this problem?

thanks!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 13609
Re: Private Messaging System for CPG 1.5
« Reply #15 on: May 29, 2012, 11:23:57 AM »

Please enable debug mode and then install the plugin again to get an extended error message (post it here).
Logged

Alkonautti

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Private Messaging System for CPG 1.5
« Reply #16 on: May 29, 2012, 07:19:15 PM »

While executing query 'SELECT 1 FROM cpg15x_pms WHERE owner=1' in plugins\cpg_pms\include\init.inc.php on line 38

mySQL error: Table 'galleria.cpg15x_pms' doesn't exist

Logged

Alkonautti

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Private Messaging System for CPG 1.5
« Reply #17 on: May 29, 2012, 11:49:26 PM »

Hi,

i have a problem with this plugin. i have installed pms as in instructions. now my whole gallery crashes saying "critical error: There was an error while processing a database query" and nothing works, just a blank white page with the error message. if i remove the plugin files my gallery works fine again.

can anyone help me with this problem?

thanks!

Ok i solved this. Had to manually add table in mysql cos the basic.sql had wrong parametres.
In basic.sql file was:

CREATE TABLE CPG_pms (
               id INT(10) NOT NULL AUTO_INCREMENT,
               owner int(10) NOT NULL DEFAULT '0',
               subject VARCHAR(120) NOT NULL DEFAULT '',
               message TEXT,
               sender VARCHAR(120) NOT NULL DEFAULT '',
               sender_id int(10) NOT NULL DEFAULT '0',
               posted INT(10) NOT NULL DEFAULT '0',
               sender_ip VARCHAR(120),
               smileys TINYINT DEFAULT '1',
               status TINYINT DEFAULT '0',
               showed TINYINT DEFAULT '0',
               replied TINYINT DEFAULT '0',
               PRIMARY KEY (id)
               ) TYPE=myISAM;


i used this:

CREATE TABLE cpg15x_pms (
               id INT(10) NOT NULL AUTO_INCREMENT,
               owner int(10) NOT NULL DEFAULT '0',
               subject VARCHAR(120) NOT NULL DEFAULT '',
               message TEXT,
               sender VARCHAR(120) NOT NULL DEFAULT '',
               sender_id int(10) NOT NULL DEFAULT '0',
               posted INT(10) NOT NULL DEFAULT '0',
               sender_ip VARCHAR(120),
               smileys TINYINT DEFAULT '1',
               status TINYINT DEFAULT '0',
               showed TINYINT DEFAULT '0',
               replied TINYINT DEFAULT '0',
               PRIMARY KEY (id)
               );

hope this helps if someone else has this problem :)
Logged

allvip

  • Contributor
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 584
    • allvip.us Post anything from anywhere!
Re: Private Messaging System for CPG 1.5
« Reply #18 on: May 29, 2013, 12:40:23 AM »

I did all the steps.
all I have is send pm but I  don't know where is the box to read my messages.

I sent a message to users test(from all vip to test)

How can I delete the file name above the image.
I want to show "from allvip pm" not "file title from allvip pm"

ex:http://allvip.us/gallery/displayimage.php?pid=19710#im=0

you can login with:

test pass 123456

test profile:

http://allvip.us/gallery/profile.php?uid=128

allvip

  • Contributor
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 584
    • allvip.us Post anything from anywhere!
Re: Private Messaging System for CPG 1.5
« Reply #19 on: May 29, 2013, 12:54:48 AM »

1.where do I add

{LOGIN_FORM} in template.html?


Pages: [1] 2   Go Up
 

Page created in 0.118 seconds with 19 queries.