It's a custom CMS that me and a friend made together, I have access to all of the source code. I designed it, he did most of the coding. I really don't matter which way it goes, as long as there is a way to enter the user into both databases, so that they are symetrical.

Any help?

Hey there, I currently use two different users tables on my site, the forums is one and then there's a separate one for my CMS. I was wondering how I could modify PunBB so that when a user registers, it automatically posts the information into both the tables. Username/Password. Thanks!

Uh oh, now it's all pretty messed up with the exception of the media file. Here's the list of variables I need to replace:

$download_id = $_GET['download'];
$id = $_GET['id'];
$total_rw += $row['half1_rw']+$row['half2_rw'];
$total_rl += $row['half1_rl']+$row['half2_rl'];

And what about this code

  $query1 = "SELECT * FROM demos WHERE id='$download_id'";
  $result1 = mysql_query($query1) or die(mysql_error());
  $download = mysql_fetch_array($result1);
  $dl_url = $demo_path.$download['name'];
  $download_count = $download['dl_count'];
  $download_count = $download_count+1;
  $query2 = "UPDATE demos SET dl_count='$download_count' WHERE id='$download_id'";
  mysql_query($query2) or die(mysql_error());

Does that look OK? And in the rest of the file, should I be looking for other lines that need to be fixed? Man, I'm so confused...

And the value is defined by the MySQL table, I'm not very good at PHP or MySQL, and I didn't make the Content Management System I use, but by looking at the code thats how it's working. the $download_id is just a definition I think.

Well, commenting out that line certainly helped, but it still gives me the same errors. The only difference now is that the PunBB functions work.

Hey everyone, I have a pretty serious problem. Right now I use PunBB as the forums (of course), news, and user system on my site. I use my own scripts for everything else (content management, etc). The problem is, whenever I declare the required PunBB variables in my page:

<?php
define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);
define('PUN_ROOT', './forums/');
require PUN_ROOT.'include/common.php';
?>

I get Undefined Index errors in my other scripts. It never tells me that it has anything to do with PunBB, but I know for a fact that it does because when I take out this code it works perfectly, like it always has before I started using PunBB. The errors look like this:

Notice: Undefined index: media_download in /xxx/xxx/public_html/media.php on line 4

Line for of media.php is this:

$download_id = $_GET['media_download']

It's always something like this, a variable being defined (like $var1 = $_GET['something']) on every page. How can I fix this?

Got it, thanks for the help.

I'm afraid that doens't work for me, Connorhd, I get an undefined index error.

Notice: Undefined index: g_5

Also, I'm not able to display latest forum posts/topics on the main page that are taken from a protected forum (one that denies permissions to everyone except a certain group). I want these posts to be shown only to this group, and I really need a way to check their group on the main page so I can display different information for different groups.

Come on, I know there's got to be a way to do this. Something like "$pun_usergroup['is_member2']" for example is what I'm looking for.

Hello everyone, I have the following working code:

<?php if ($pun_user['is_guest'])
 echo "Guest";
           else echo "Member" ?>

Obviously I stripped it down to the basics to show what it does, but what I want it to do now is only echo "Member" if the currently logged in user is in a certain group. Let's call it "Member2".

How can I do this? I looked in extern.php and found the following block of code:

// Define a few commonly used constants
define('PUN_UNVERIFIED', 32000);
define('PUN_ADMIN', 1);
define('PUN_MOD', 2);
define('PUN_GUEST', 3);
define('PUN_MEMBER', 4);

And added this to the end of it:

define('PUN_MEMBER2', 5);

But I don't know what that did! Lol. Anyway, any help would be GREATLY appreciated.

13

(2 replies, posted in PunBB 1.2 show off)

I created this with PunBB in mind, it fit in very nicely, I think: http://bs.siys.com

I have done both those things, and still no luck hmm

I have followed the instructions and everything in this topic the best I could, but I still get the "DB gallery" error. Does anyone know why?

I have created the MySQL table, but I don't have my boared installed to "pun_x" I have it installed to "punbb_x" (so I just renamed "pun_gallery" to "punbb_gallery"). Then I searched gallery.php for "pun_gallery" and just renamed it, but this still didn't fix the problem.