OK, I've edited my code above, try that
2,351 2007-09-05 21:42
Re: Double posts and online users (38 replies, posted in PunBB 1.2 bug reports)
2,352 2007-09-05 15:06
Re: Forum languages (5 replies, posted in PunBB 1.2 discussion)
http://punbb.org/downloads.php
Language packs
2,353 2007-09-05 14:40
Re: Problem in IE6 with forum (6 replies, posted in PunBB 1.2 troubleshooting)
I don't have a copy of IE6 handy and it looks just fine in IE7, so I can't help I'm afraid
2,354 2007-09-05 14:10
Re: maybe not administration plugin (6 replies, posted in PunBB 1.2 modifications, plugins and integrations)
Moved to Modifications
2,355 2007-09-05 14:06
Re: Double posts and online users (38 replies, posted in PunBB 1.2 bug reports)
OK, I may have a solution for you, we'll have to test it out
FIND
// With MySQL/MySQLi, REPLACE INTO avoids a user having two rows in the online table
switch ($db_type)
{
case 'mysql':
case 'mysqli':
$db->query('REPLACE INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
break;
default:
$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
break;
}
REPLACE WITH
// With MySQL/MySQLi, REPLACE INTO avoids a user having two rows in the online table
switch ($db_type)
{
case 'mysql':
case 'mysqli':
$db->query('REPLACE INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
break;
case 'pgsql':
$db->query('IF EXISTS(SELECT 1 FROM '.$db->prefix.'online WHERE user_id = '.$pun_user['id'].') THEN UPDATE '.$db->prefix.'online SET logged='.$now.' WHERE user_id='.$pun_user['id'].' ELSE INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].') END IF') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
break;
default:
$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
break;
}
FIND
// With MySQL/MySQLi, REPLACE INTO avoids a user having two rows in the online table
switch ($db_type)
{
case 'mysql':
case 'mysqli':
$db->query('REPLACE INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$db->escape($remote_addr).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
break;
default:
$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$db->escape($remote_addr).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
break;
}
REPLACE WITH
// With MySQL/MySQLi, REPLACE INTO avoids a user having two rows in the online table
switch ($db_type)
{
case 'mysql':
case 'mysqli':
$db->query('REPLACE INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$db->escape($remote_addr).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
break;
case 'pgsql':
$db->query('IF EXISTS(SELECT 1 FROM '.$db->prefix.'online WHERE ident = \''.$remote_addr.'\') THEN UPDATE '.$db->prefix.'online SET logged='.time().' WHERE ident=\''.$db->escape($remote_addr).'\' ELSE INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$db->escape($remote_addr).'\', '.$pun_user['logged'].') END IF') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
break;
default:
$db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES(1, \''.$db->escape($remote_addr).'\', '.$pun_user['logged'].')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
break;
}
Edit: Thanks Bekko for pointing out my faulty logic
2,356 2007-09-05 13:28
Re: Displaying latest topics on front page of website? (14 replies, posted in PunBB 1.2 troubleshooting)
This would replace your normal include
2,357 2007-09-05 13:16
Re: Error: Unable to fetch category/forum list. (4 replies, posted in PunBB 1.2 troubleshooting)
Error 28 means MySQL is out of space. Talk to your host.
2,358 2007-09-05 13:06
Re: Displaying latest topics on front page of website? (14 replies, posted in PunBB 1.2 troubleshooting)
Mmm, lets just hack around it this way
$old_get = $_GET;
$_GET = array();
// set all the get parameters you would normally put in the URL here
include PUN_ROOT.'extern.php';
$_GET = $old_get;
2,359 2007-09-05 13:05
Re: Problem in IE6 with forum (6 replies, posted in PunBB 1.2 troubleshooting)
.conl {
FLOAT: left;
WIDTH: 55%;
OVERFLOW: hidden;
WHITE-SPACE: nowrap
}
.conr {
FLOAT: right;
TEXT-ALIGN: right;
CLEAR: right;
WIDTH: 60%
}
That's from base.css. It should not be greater than 100%
2,360 2007-09-05 13:03
Re: Error: Unable to fetch category/forum list. (4 replies, posted in PunBB 1.2 troubleshooting)
Enable debug mode, paste the full error
2,361 2007-09-05 13:01
Re: Displaying latest topics on front page of website? (14 replies, posted in PunBB 1.2 troubleshooting)
Not without modifying some code, no
2,362 2007-09-05 12:35
Re: Displaying latest topics on front page of website? (14 replies, posted in PunBB 1.2 troubleshooting)
<?php
$cp = curl_init("http://terrainland.com/forum/extern.php?action=active&show=7");
curl_exec($cp);
?>
replace the URL with the correct one for you, obviously
2,363 2007-09-05 12:34
Re: Alternate 15x15 smilie (emoticon) set (17 replies, posted in PunBB 1.2 discussion)
LVZ wrote:Can you name even one modern graphical web browser that will not properly display a GIF file even if it has the extension PNG? If you can, I would consider that to be a very poorly designed browser.
That wouldn't be bad design, that would be following standards. Which browsers don't seem to want to do (but should do).
Indeed. When you have browsers guessing what content should be in a file, you have issues like this
http://www.securiteam.com/windowsntfocu … 00EBY.html
http://xforce.iss.net/xforce/xfdb/22837
2,364 2007-09-05 12:32
Re: Problem in IE6 with forum (6 replies, posted in PunBB 1.2 troubleshooting)
According to the Developer Toolbar for IE, <p class="conr"> is set to 60% width and <dl id="searchlinks" class="conl"> is set to 55% width. That's the issue.
2,365 2007-09-05 12:29
Re: Displaying latest topics on front page of website? (14 replies, posted in PunBB 1.2 troubleshooting)
Does your host allow cURL?
2,366 2007-09-05 11:50
Re: External Hyperlinks (5 replies, posted in PunBB 1.2 troubleshooting)
Did you add http:// to the beginning of the URL?
2,367 2007-09-04 23:48
Re: MySqli problem (2 replies, posted in PunBB 1.2 troubleshooting)
I have never heard of anything like this, although I assume it has something to do with how you're integrating PunBB into cakephp.
Could you post your code?
2,368 2007-09-04 23:46
Re: Fatal error when i post a message ( not update on the index) (1 replies, posted in PunBB 1.2 troubleshooting)
Moved to Troubleshooting
Have you modified any files?
2,369 2007-09-04 19:05
Re: Text below Footer (9 replies, posted in PunBB 1.2 troubleshooting)
No, that's all the CSS
Lets say your style is Oxygen. You load:
Oxygen.css
Oxygen_cs.css
base.css
The last 2 are within the folder in style
2,370 2007-09-04 18:47
Re: Text below Footer (9 replies, posted in PunBB 1.2 troubleshooting)
In the CSS?
2,371 2007-09-04 18:46
Re: Have I been hacked? (2 replies, posted in PunBB 1.2 troubleshooting)
What database system are you using?
2,372 2007-09-04 18:24
Re: INFO: Bad HTTP_REFERER (180 replies, posted in PunBB 1.2 troubleshooting)
Aha!
My forum is located on SourceForge but that shouldn't be an issue.
That is the issue!
http://punbb.org/forums/viewtopic.php?id=13016
The cache directory is possible to set via config.php in PunBB 1.3, but that isn't much help to you. If you want to use PunBB, you'll have to keep doing what you're doing or modify PunBB to use the writable directory.
2,373 2007-09-04 18:22
Re: Users' Passwords (8 replies, posted in PunBB 1.2 troubleshooting)
Well, you have to figure out where the problem is
2,374 2007-09-04 18:22
Re: PunBB with Qcodo, cannot use codegen (1 replies, posted in PunBB 1.2 troubleshooting)
Most likely the people here aren't familiar with QCodo. You need to post the actual error message (although if it's about an index being on duplicate columns, it's a bug in QCodo: it should only be a warning at worst).
2,375 2007-09-04 18:20
Re: adding logo? (9 replies, posted in PunBB 1.2 troubleshooting)
Follow the instructions the wiki gives you