phpbb3 module and database change

Events happening in the community are now at Drupal community events on www.drupal.org.
demon326's picture

Hi all,
i'm a phpbb and drupal user but there is a thing that i dont like
and that is changing a database table in a live site.. i did it on my live site and my user count was going from 100 to 1000 but there are only 100 so the next user has gotten ID 1001 and i dont like when that hapens :P.

this is what arkepp sayed:

"It is not changing the database, it is changing a value in the sequence table. It is the equivalent of a spammer visiting your site, adding 100 (or 1000, as I recommend, but the value is of no importance) users and then you deleting them again.

This could easily be automated, but I want people to learn a bit about how the module works and what the pitfalls are during the installation. It also encourages the use of phpMyAdmin, which is a great tool for debugging."

okay,phpmyadmin is great but i think it maybe easy if it is auto.. cause people with no knowledge about phpmyadmin can f*ck there site ..but for the beta module no problem but i rather have it automated so we have dont have to go in phpmyadmin.

ow and arkepp,feel free to explain this al little bit beter:

" It is the equivalent of a spammer visiting your site, adding 100 (or 1000, as I recommend, but the value is of no importance) users and then you deleting them again."

what do you other webmasters thing about this?.

ps: sorry for the bad english

Greetz

Comments

Hi Personally it doesn't

jase951's picture

Hi

Personally it doesn't really make a great difference.

If I am right the sequence can be any value so long as it is greater than your last Drupal ID and also greater than the last phpBB user ID (taking care of robots).

Jason

Sequences are for the database

arkepp's picture

The point of the quote that you are asking about is that sequences are made for the database, not for aesthetic reasons or for someone to be able to say "I am user number 123".

Even if you don't install this module you are likely to get holes in your sequence table, because at some point you probably have to delete a rogue user or spammer.

hi, i just installed it and

demon326's picture

hi, i just installed it and its running great..

i only have 1 problem the "latest topics" bar wont show any topics :)

Glad to hear it. For my

arkepp's picture

Glad to hear it. For my reference, what did you set the cookie domain to in phpBB?

Check configuration.inc, it should say:
$phpbbcfg['i1'] = false;

If that's the case then there is a problem in function _phpbb_display_block_0() at the bottom of phpbb.module. More specifically, I am guessing the line

."WHERE $ag.group_id = $gid AND $ar.role_name IN ('ROLE_FORUM_POLLS', 'ROLE_FORUM_STANDARD', 'ROLE_FORUM_READONLY') "
in

 
($user->uid == 0) ? $gid = 1 : $gid = 2;

$query = "SELECT $tt.topic_id, $tt.topic_title, $tt.topic_last_post_id "
            ."FROM $tt "
        ."LEFT JOIN $ag ON $tt.forum_id = $ag.forum_id "
     ."LEFT JOIN $ar ON $ag.auth_role_id = $ar.role_id "
            ."WHERE $ag.group_id = $gid AND $ar.role_name IN ('ROLE_FORUM_POLLS', 'ROLE_FORUM_STANDARD', 'ROLE_FORUM_READONLY') "
            . $ignore_query
            ." ORDER BY $tt.topic_last_post_id DESC LIMIT {$phpbbcfg['block0_count']};";
  //echo $query;
  $res = db_query($query); //or die('Query failed: ' . db_error() . " \n" . $query . "\n");

Can you check that you have at least one forum with posts where anonymous users have at least read-only access. and one (the same is fine) where logged in users have it?

"Can you check that you have

demon326's picture

"Can you check that you have at least one forum with posts where anonymous users have at least read-only access. and one (the same is fine) where logged in users have it?"

all of oure forum have ready acces for guests :)..

have a look for youre self:
http://ashladan.be/forum/

phpbb

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: