@Quaker: Why would you promote them to the moderator group?

Add the following to base.css:

.tclcon p {display: none; visibility: hidden}

Oops, I missed that. Nevermind then tongue

The topic subject says it all. Doing so would make troubleshooting "blank pages" (i.e. pages with hidden fatal errors) easier.

Did you intend the form to look like this?

http://xs122.xs.to/xs122/07510/Screenshot.png

The most straightforward thing to do would be either to place the code in main.tpl (if you want a search box on every page) or to place it in the new page template (if you want a search box on its own page).

32

(2 replies, posted in PunBB 1.2 troubleshooting)

SOLIJA wrote:

Im having the same problem

Remove the following from register.php:

82         // Check that someone from this IP didn't register a user within the last hour (DoS prevention)
83         $result = $db->query('SELECT 1 FROM '.$db->prefix.'users WHERE registration_ip=\''.get_remote_address().'\' AND registered>'.(time() - 3600)) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
84     
85         if ($db->num_rows($result))
86             message('A new user was registered with the same IP address as you within the last hour. To prevent registration flooding, at least an hour has to pass between registrations from the same IP. Sorry for the inconvenience.');

http://punbb.org/forums/viewtopic.php?id=10518

PhishShticks wrote:

Any word as to making this work without altering or adding additional code/files in 1.2.16?

It should probably work, as long as you modify install_mod.php as per the instructions on the sticky in this forum.

Moved to integration

To automatically log users into PunBB when they log into your main site, the most straightforward thing to do would be to examine the code in login.php and include/functions.php that sets PunBB's cookies, and adapt it so that it runs when a user successfully logs into your main site.

Since you're interested in removing accounts that have not been activated you might be interested in knowing that unactivated accounts have a group ID of 3200 and as such "(registered = last_visit)" works but may perform extremely slightly worse than "g_id = 3200".

I'm not quite sure what you intend with "(registered > '.(time()-(60*60*24)).') AND (registered < '.(time()-(60*60)).')". If you wish to remove users that have not activated themselves after an hour, would not simply using ".time() - 3600.' > registered" work?

Finally, from a purely stylistic perspective, you don't need parentheses around each portion of the WHERE clause. You only need to use them if you're grouping multiple restrictions together. For instance, "(foo = bar OR alpha = beta) AND (a < b OR b > c)".

37

(12 replies, posted in PunBB 1.2 troubleshooting)

I'm sorry but I'm not quite sure what you're trying to ask. The accelerator isn't an option that you enable or disable within PunBB, it's an extension to PHP (more specifially, an opcode cache). It's either installed on your server or it isn't.

38

(17 replies, posted in PunBB 1.2 show off)

Smartys wrote:
elbekko wrote:

sirena: That captcha is illogical... if you're 'helping' to decypher old books, how the hell can the software know that what you say is in the picture is actually correct?

It compares the translations of multiple people.

To add to what Smartys said, reCaptcha presents a user with one known word and one unknown word, the assumption being that if you can read and type the known word correctly you should be able to do the same for the second. The unknown word will be considered "deciphered" once a certain number of users (three? -- it seems like their docs said that but I can't remember) type identical results.

gleb wrote:

...I´m really lost here.

I´m using this line:

include('http://****/extern3.php?action=news&fid=2,8,9&summary=yes&show=3')

The line works but I want the first post in forums 2,8,9 to be displayed, not the last post in the selected forums. Do I have to change the code in my extern3.php or is there another incude for this?

Cheerrs!!

Yes, you'll have to edit the code. This mod behaves similarly to the news generator plugin.

At least for it to viewable on viewtopic.php, move

251                 if ($cur_post['admin_note'] != '')
252                     $user_info[] = '<dd>'.$lang_topic['Note'].': <strong>'.pun_htmlspecialchars($cur_post['admin_note']).'</strong>';

so that it's directly below

243                 if ($cur_post['url'] != '')
244                     $user_contacts[] = '<a href="'.pun_htmlspecialchars($cur_post['url']).'">'.$lang_topic['Website'].'</a>';

for an end result of

243                 if ($cur_post['url'] != '')
244                     $user_contacts[] = '<a href="'.pun_htmlspecialchars($cur_post['url']).'">'.$lang_topic['Website'].'</a>';
251                 if ($cur_post['admin_note'] != '')
252                     $user_info[] = '<dd>'.$lang_topic['Note'].': <strong>'.pun_htmlspecialchars($cur_post['admin_note']).'</strong>';

(ignore the line number in the last block; I was just too lazy to delete them)

Doing so will display the admin note next to each post no matter what the viewers user group is, as long as the setting to show user info in topics is enabled.

Neither exists as far as I know, and if they are ever developed it will likely not be before a beta of PunBB 1.3 is released.

Gotipe wrote:

Hard. Have always wondered what to do in case some situation resultated in an erase of your admin account and it is the only one there is. Maybe there is a way to restore the database?

If that happened you'd probably either a) restore a recent database backup or b) register a new, normal member account and manually make it an administrator account through database editing software such as PHPMyAdmin.

43

(1 replies, posted in PunBB 1.2 troubleshooting)

Please report this bug to the reputation mod's author, either via email or a post in the mod's topic. Thanks!

You'd probably just change

$result = $db->query('
    SELECT t.* 
    FROM '.$db->prefix.'topics AS t 
    INNER JOIN '.$db->prefix.'forums AS f 
    ON f.id=t.forum_id 
    LEFT JOIN '.$db->prefix.'forum_perms AS fp 
    ON (
        fp.forum_id=f.id 
        AND fp.group_id='.$pun_user['g_id'].'
    ) 
    WHERE (
        fp.read_forum IS NULL 
        OR fp.read_forum=1
    ) 
    ORDER BY t.last_post DESC
    LIMIT '.$ak_limit
) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

to

$result = $db->query('
    SELECT t.* 
    FROM '.$db->prefix.'topics AS t 
    INNER JOIN '.$db->prefix.'forums AS f 
    ON f.id=t.forum_id 
    LEFT JOIN '.$db->prefix.'forum_perms AS fp 
    ON (
        fp.forum_id=f.id 
        AND fp.group_id='.$pun_user['g_id'].'
    ) 
    WHERE (
        fp.read_forum IS NULL 
        OR fp.read_forum=1
    ) AND f.id != 1
    ORDER BY t.last_post DESC
    LIMIT '.$ak_limit
) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

45

(7 replies, posted in PunBB 1.2 troubleshooting)

@Smartys: it sounds like he's saying that they actually do all have the same IP address (e.g. they're all connecting from the same school, office, etc.), not that PunBB is mistakenly showing users with different IP addresses as having identical ones.

If that's the case, then simply comment out or delete the following few lines of code in register.php:

82         // Check that someone from this IP didn't register a user within the last hour (DoS prevention)
83         $result = $db->query('SELECT 1 FROM '.$db->prefix.'users WHERE registration_ip=\''.get_remote_address().'\' AND registered>'.(time() - 3600)) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
84     
85         if ($db->num_rows($result))
86             message('A new user was registered with the same IP address as you within the last hour. To prevent registration flooding, at least an hour has to pass between registrations from the same IP. Sorry for the inconvenience.');

46

(2 replies, posted in PunBB 1.2 discussion)

Moved to PunBB discussions

1. PunBB will work fine without .htaccess support

2. There's been ample discussion about displaying the title of the most recently active topic; check the linked pages and do a couple searches through the forums. Feel free to ask questions if you require assistance.

47

(2 replies, posted in PunBB 1.2 troubleshooting)

Moved to troubleshooting

Unfortunately I don't have the time to write code for you, but if you start with this chunk I posted

// Fetch BBlone Stats
require("bbclone/var/access.php");
$totalvisits   = $access["stat"]["totalvisits"];
$totalcount    = $access["stat"]["totalcount"];
$visitorsmonth = $access["time"]["month"][date("n")-1];
$visitorstoday = $access["time"]["wday"][date("w")];

you should be able to echo() the variables wherever you'd like them to show up.

Just FYI I posted this quite some time ago and I no longer use BBClone.

matt1298 wrote:
ChgoWriter wrote:

Thanks for responding.
If I only download one copy of PunBB, and then create multiple boards, let's say one for each of 10 cities with 20 categories under each city, wouldn't I end up with a extremely long page - Chicago Forum, 2o topic categories, New York, 20 categories ect.
I would love to do it this way if I could just have visitors click on Chicago and then see the different categories, then click New York ect.
Any thoughts?

well you could create one section and then install sub catorgrays like:

General (the catagory)
   -New York( The forum)
      -housing (the sub catagory)
      -dinner
   -Chicago
      -housing
      -dinner

You'd need the subforum mod to do that.

P.S. moved to modifications

50

(7 replies, posted in General discussion)

grudon66 wrote:

okey thankes
Edit: O_o http://csnorway.x10hosting.com/forum/install.php see now what has happened it stays nothing.

I see the install page. smile