coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 (BBS) Integration / Bridging => Topic started by: m-a-b on September 12, 2004, 12:41:29 AM

Title: read out phpbb_users[user_new_privmsg]
Post by: m-a-b 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
Title: Re: read out phpbb_users[user_new_privmsg]
Post by: Joachim Müller 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
Title: Re: read out phpbb_users[user_new_privmsg]
Post by: m-a-b 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:


<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)
Title: Re: read out phpbb_users[user_new_privmsg]
Post by: Joachim Müller 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
Title: Re: read out phpbb_users[user_new_privmsg]
Post by: m-a-b on September 12, 2004, 10:25:45 AM
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
Title: Re: read out phpbb_users[user_new_privmsg]
Post by: Joachim Müller 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
Title: Re: read out phpbb_users[user_new_privmsg]
Post by: m-a-b on September 12, 2004, 10:38:41 AM
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
Title: Re: read out phpbb_users[user_new_privmsg]
Post by: patstar 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