Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Private messages not comming through to CPG  (Read 4659 times)

0 Members and 1 Guest are viewing this topic.

Halfhidden

  • Guest
Private messages not comming through to CPG
« on: May 11, 2008, 09:50:52 pm »

I've installed Stramm mod pack on a fresh install (1.4.18) of Coppermine with a bridge to SMF 1.5. It seems that everything works, buddies, sending PM, watermarks. But although you can send pm's and the recipient gets them they don't show in CPG at all. So you'll have to go to the smf forum to get your private message. I've checked the settings in config>Private messaging. I've broken and rebridged the forum.
I'm a little lost as to why this might be, any ideas please?

Regards,
Steff
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Private messages not comming through to CPG
« Reply #1 on: May 12, 2008, 01:13:36 pm »

from the docs...
Quote
Additional info when logged in (default off)
Config -> Performance settings -> Display buddy status info when logged in, Display pm status info when logged in
displays additional info when a user's logged in, PM info only when you don't use a bridged coppermine

You'd need to edit the mysql query to grab the data from your forums pm table. How that can be done isn't to hard at all. Copy function loginForm from include/themes.inc.php to the theme.php of the theme you're actually using (eg. themse/calssic/theme.php) and modify it to your needs.

Right below
Code: [Select]
if ($CONFIG['display_pms_status']){ are the relevant queries

Halfhidden

  • Guest
Re: Private messages not comming through to CPG
« Reply #2 on: May 12, 2008, 01:41:09 pm »

Thanks Stramm. My mistake, I can clearly see that PM notification is only supported when not bridged. OK, I'll give it a bash... I've been meaning to get under the hood. it should only take me a month  ;)
seriously I have started to learn php so perhaps in future I can give something back?

Thanks for your help.
Regards,
Steff
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Private messages not comming through to CPG
« Reply #3 on: May 12, 2008, 02:00:20 pm »

you also can download the PM plugin. Here I've tried to add smf within the class. Lil bit more complicated. However you can se e the queries.

Halfhidden

  • Guest
Re: Private messages not comming through to CPG
« Reply #4 on: May 12, 2008, 02:05:53 pm »

Thanks.....Stramm
I'll do that. It will be a great reference.  ;D

Regards,
Steff
Logged

Halfhidden

  • Guest
Re: Private messages not comming through to CPG
« Reply #5 on: May 15, 2008, 01:18:34 am »

just a bit puzzled. I copied the entire liginform to the theme that I was using (classic at the moment) then altered the query to:
$loginFormHtml = "<div align=\"right\" class=\"smallfont\">".$lang_loginform['welcome']."

<strong>".(USER_NAME)."</strong><br />";

   if ($CONFIG['display_PERSONAL_MESSAGES_status']){
      $result = smf_db_query("SELECT count(*) FROM  {$CONFIG['TABLE_PERSONAL_MESSAGES']} WHERE

owner=".(USER_ID_PM));
      list($tot_all_messages) = @mysql_fetch_array($result);
      mysql_free_result($result);
      $result = smf_db_query("SELECT count(*) FROM  {$CONFIG['TABLE_PERSONAL_MESSAGES']} WHERE

owner=".(USER_ID_PM)." AND showed='0'");
      list($tot_new_messages) = @mysql_fetch_array($result);
      mysql_free_result($result);

      if ($CONFIG['pms_enabled']) {
         $loginFormHtml .= "<a href='pms.php'>".$lang_loginform['pms']."</a>

".$tot_new_messages.$lang_loginform['unread_total'].$tot_all_messages."</div>";

but the pms displays no longer on as it did.... I'm not looking for a lesson on php, just clarification that I don't need to alter other php files such as pms.php

Regards,
Steff
Logged

Stramm

  • Moderator
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Private messages not comming through to CPG
« Reply #6 on: May 15, 2008, 02:47:41 pm »

It's enough to copy the mentioned function to the theme.php you'Re actually using and to modify it accordingly.

Unless you have coded a function smf_db_query() it's made up code and won't work at all. Same for $CONFIG['TABLE_PERSONAL_MESSAGES']. If you do not have it defined anywhere, it contains nothing. Hmm.. Nearly all looks like wishful thinking and is not likely to work at all.

Have you looked at the plugin I mentioned?? Here you at least get an idea of the query you have to use.

Halfhidden

  • Guest
Re: Private messages not comming through to CPG
« Reply #7 on: May 16, 2008, 03:46:03 pm »

Your right... enough of the sellotape. It was a wing on a prayer indeed and explains the results. I have just enrolled on a study of php, so I'll hang on until I understand the code before attempt to mash your code again ! ;D
Thanks for the reply.
Regards,
Steff
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.