read out phpbb_users[user_new_privmsg] read out phpbb_users[user_new_privmsg]
 

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]

Main Menu

read out phpbb_users[user_new_privmsg]

Started by m-a-b, September 12, 2004, 12:41:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

m-a-b

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

Joachim Müller

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

m-a-b

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:


<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 :
<?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

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

m-a-b

Quote from: GauGau 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

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

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

Joachim

m-a-b

Quote from: GauGau on September 12, 2004, 10:37:18 AM
the array $USER_DATA should have everything you need, add print_r($USER_DATA);into coppermine's code anywhere to check (remove it after the check).

Joachim

thanks

patstar

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