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: read out phpbb_users[user_new_privmsg]  (Read 5934 times)

0 Members and 1 Guest are viewing this topic.

m-a-b

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
  • augs-burg.de
    • augs-burg.de
read out phpbb_users[user_new_privmsg]
« on: September 12, 2004, 12:41:29 am »

hello!

how can i read out the table phpbb_users[user_new_privmsg] and how can i give it out as theme-variable {PHPBBPM}

i hope you can help me...

Markus  :o
« Last Edit: September 12, 2004, 10:39:45 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: read out phpbb_users[user_new_privmsg]
« Reply #1 on: September 12, 2004, 08:45:35 am »

without you posting further details, I can give just a general advice: you will have to run a mySQL query. The stuff in curly brackets in your themes are just placeholders for more complex stuff (some php functionality) that is done elsewhere in the theme file and is being replaced when the theme file gets parsed. You will have to post more details what you want to achieve.

Joachim
Logged

m-a-b

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
  • augs-burg.de
    • augs-burg.de
Re: read out phpbb_users[user_new_privmsg]
« Reply #2 on: September 12, 2004, 09:14:32 am »

hi GauGau!

thanks for your fast answer!

i want to integrate the Phpbb Private Message Popup into Coppermine.

therefore i have to integrate the following code into head-area of the templates:


Code: [Select]
<script language="Javascript" type="text/javascript">
<!--
   if ( <?php if ($userdata['user_new_privmsg']) { echo $userdata['user_new_privmsg']; } else { echo '0'; } ?> )
   {
      window.open('/forum/privmsg.php?mode=newpm', '', 'HEIGHT=225,resizable=yes,WIDTH=400');;
   }
//-->
</script>

and this part should be replaced :
Code: [Select]
<?php if ($userdata['user_new_privmsg']) { echo $userdata['user_new_privmsg']; } else { echo '0'; } ?>
with {PHPBBPMPOPUP} (or something else)


i hope now you understand my question in first posting!

Markus  8)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: read out phpbb_users[user_new_privmsg]
« Reply #3 on: September 12, 2004, 10:15:49 am »

you can not just put some phpbb code into coppermine and expect it works, as the var $userdata['user_new_privmsg'] is being populated with some complex scripting within phpbb's core code.
Bottom line is: unless you're ready to find all the stuff from phpbb's core code that populates above mentioned variable, you can not accomplish this; it's not only a means of putting some placeholder in curly braces into coppermine's theme file.

Joachim
Logged

m-a-b

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
  • augs-burg.de
    • augs-burg.de
Re: read out phpbb_users[user_new_privmsg]
« Reply #4 on: September 12, 2004, 10:25:45 am »

you can not just put some phpbb code into coppermine and expect it works, as the var $userdata['user_new_privmsg'] is being populated with some complex scripting within phpbb's core code.
Bottom line is: unless you're ready to find all the stuff from phpbb's core code that populates above mentioned variable, you can not accomplish this; it's not only a means of putting some placeholder in curly braces into coppermine's theme file.

Joachim

can you tell me if there is a variable with which i can read out for example the username?
for example: $data[username] ????

then i will look for the rest!

Markus

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: read out phpbb_users[user_new_privmsg]
« Reply #5 on: September 12, 2004, 10:37:18 am »

the array $USER_DATA should have everything you need, add
Code: [Select]
print_r($USER_DATA);into coppermine's code anywhere to check (remove it after the check).

Joachim
Logged

m-a-b

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 14
  • augs-burg.de
    • augs-burg.de
Re: read out phpbb_users[user_new_privmsg]
« Reply #6 on: September 12, 2004, 10:38:41 am »

the array $USER_DATA should have everything you need, add
Code: [Select]
print_r($USER_DATA);into coppermine's code anywhere to check (remove it after the check).

Joachim

thanks

patstar

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: read out phpbb_users[user_new_privmsg]
« Reply #7 on: September 15, 2004, 04:26:16 am »

hey... if you have find out what is exactly to do to integrate the pm and in which files could you tell me please????

thanks
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 15 queries.