I have my server set so that archive? goes to archive.php?.

For yours, change
           echo '<a href="archive?date='.$file.'">'.$file.'</a><br />';

so that "archive" is the name of the php file, ie archive.php?date=....

try changing

$date = $_GET['date'];
$date = strip_tags($date);
$date.= '.html';

to

if (isset($_GET['date'])) {
$date = $_GET['date'];
$date = strip_tags($date);
$date.= '.html';
}

<?

$date = $_GET['date'];
$date = strip_tags($date);
$date.= '.html';

?>
<h1>Archives</h1>
<!-- -->
<? if (!empty($date) && file_exists('/home/bjork/domains/armyofbjork.info/public_html/x/bbs/plugins/AP_News_Generator/archive/'.$date)) {
include('/home/bjork/domains/armyofbjork.info/public_html/x/bbs/plugins/AP_News_Generator/archive/'.$date);
} else {
?>
<div id="newshead"><span class="style3">Select an archive date </span></div>
  <div id="box"><p>
  <?php
if ($handle = opendir('/home/bjork/domains/armyofbjork.info/public_html/x/bbs/plugins/AP_News_Generator/archive/')) {
   while (false !== ($file = readdir($handle))) {
       if ($file != "." && $file != "..") {
       $file = $newphrase = str_replace(".html", "", $file);
           echo '<a href="archive?date='.$file.'">'.$file.'</a><br />';
       }
   }
   closedir($handle);
}
?> 
  </p>
</div> 
<? } ?>

It looks like a simple directory listing and including of the proper html file to me, like what I have at http://www.armyofbjork.info/x/archive

bradleyb wrote:
Nibbler(cpg) wrote:

How about......now ?

Try me

(Use save as)

Thanks for this, Nibbler.  I found a couple of glitches:

It seems like the Group definitions are wrong: PUNBB_MOD_GROUP should be 2.  PUNBB_MEMBERS_GROUP should probably be removed, since there isn't anything special about it.  You can have as many "members" groups as you want in punbb.

// Group definitions
define('PUNBB_ADMIN_GROUP', 1);
define('PUNBB_MOD_GROUP', 2);
define('PUNBB_GUEST_GROUP', 3);

In udb_synchronize_groups, The groups should be read from the database (since the names can be changed, and you can have as many as you want):

//    $PUNBB_groups = array(
//        PUNBB_GUEST_GROUP => 'Guests',
//        PUNBB_MEMBERS_GROUP => 'Members',
//        PUNBB_ADMIN_GROUP => 'Administrators',
//        PUNBB_MOD_GROUP => 'Moderators'
//        );

    $result = db_query("SELECT g_id, g_title FROM " . $UDB_DB_NAME_PREFIX . PUNBB_TABLE_PREFIX . PUNBB_GROUPS_TABLE);
    while ($row = mysql_fetch_array($result))
        $PUNBB_groups[$row['g_id']] = $row['g_title'];

My installation doesn't use passwords, so I'm not sure, but I think you might not be checking them correctly.  The password set in the cookie should be md5($cookie_seed.$password_hash) so you need something like this at the top of the file:

define('PUNBB_COOKIE_SEED', $cookie_seed); // Seed for md5 hash

and this goes in the WHERE clause in udb_authenticate():

... AND MD5(CONCAT('".addslashes(PUNBB_COOKIE_SEED)."', password)) = '" . addslashes($cookie['password_hash']) . "'"

is it working for you? and if so, can you post the full modifyed file?

Nibbler(cpg) wrote:

Enable debug mode and post the full sql error message you get and I'll have a look at it over the weekend.

Fatal error :

There was an error while processing a database query.

While executing query "SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg132_usergroups WHERE group_id in ()" on 0

mySQL error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

7

(11 replies, posted in PunBB 1.2 show off)

Your website shows badly in firefox: http://img105.exs.cx/my.php?loc=img105& … fox8hr.png
and doesnt Validate

8

(4 replies, posted in PunBB 1.2 troubleshooting)

there is an option in the options section of the admin control panel.

any ideas on this?

10

(1 replies, posted in PunBB 1.2 show off)

Im working on a site for finding a shell provider, like acky, but with more user interaction and more details, as well as less dead links wink.

Since ive only got the forum done, im showing it as an image. Ive made some changes to how punbb looks on the front and the profile section, which I renamed to 'Controls' smile

The whole site will run off of the punbb user database, so that only one login is needed.

http://img64.exs.cx/my.php?loc=img64&am … iew2bu.png

11

(65 replies, posted in PunBB 1.2 discussion)

Connorhd wrote:

yeh and it varies alot between $0.02 and about $2.00 per click for me

I have gotten $5 per click before, but they suspended my account for 'invalid clicks' and I didnt feel like fighting with them over it. Im all for it, as long as it stays the text version.

it is also in one of the docs files included when you download.

Im getting
"Fatal error :
There was an error while processing a database query"
when Im logged into punbb and view the gallery page, and the main page if I log out.

14

(5 replies, posted in PunBB 1.2 troubleshooting)

I had a little messup in the header where it was printing <pun navlinks> so that might have been the problem. if not I dont know what could be causing the cpu usage.

Connorhd: thanks smile

15

(5 replies, posted in PunBB 1.2 troubleshooting)

nevermind, found it smile postfootright

Im trying to figure out what I missed in the css, but theres a black bar in between the online thing and the avatar section on user posts, ie: http://www.armyofbjork.info/x/bbs/viewtopic.php?id=7

Can anyone point me to what I need to change to make it the same colour as the rest of the left row?

I run an irc network and my services use mysql. I want to have punbb keep the users and what not in its database, but I want it to use the nick and pass from services to log in, and if they login sucessfully, and they dont exist in punbb, create them in punbb's db. To get if th person logged in correctly on my site I use "SELECT * FROM anope_ns_core WHERE display = '$user' AND pass = MD5('$pass') " which will return one row if it is correct.
What I cant figure out is which files I should edit and where, and how to make it do the table creation if its needed.

-- Chris

ah worked that time, thanks

I would like to remove the style section of the profile page for my board, since I only have one choice there anyways (the style to match my site). I tried just removing the <tr>...</tr> part for the styles from profile.php but when I uploaded it I got "Unable to fetch user data". Uploaded the original and it was fine again. Is there any way I can get rid of it?