Author Topic: Integration 4images 1.7.x / phpBB  (Read 647411 times)

0 Members and 3 Guests are viewing this topic.

Offline Term

  • Newbie
  • *
  • Posts: 31
    • View Profile
Integration 4images 1.7 / phpBB
« Reply #60 on: October 17, 2002, 06:03:32 PM »
Yep... just installed 4images like 2 weeks ago.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Integration 4images 1.7 / phpBB
« Reply #61 on: October 17, 2002, 06:12:32 PM »
Thats because you use now the user table of the phpBB. That's why we recommend to use intagration onyl with fresh new installations.

It's a little hard to explain on english for me. Just simple: the image table contains now wron user id's.
The only way is to update the user table with on user id, for example your admin id you have in phpBB. Most times the user id is 2, but check this.

Run this query with phpMyAdmin:
Code: [Select]
UPDATE 4images_images SET user_id = <admin_user_id_of_phpbb>;
Replace <admin_user_id_of_phpbb> with id of the admin.

Now all images are owned by the admin of phpBB.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Term

  • Newbie
  • *
  • Posts: 31
    • View Profile
Integration 4images 1.7 / phpBB
« Reply #62 on: October 17, 2002, 06:13:19 PM »
OK... I figured out its just the images.. it won't let me add or edit images.. im not positive about add because i havent tried but when i try to edit an image it says 0 entries found when i have 70 images.

Offline Thierry

  • Pre-Newbie
  • Posts: 8
    • View Profile
    • http://www.fcbfans.be
Integration 4images 1.7 / phpBB
« Reply #63 on: November 03, 2002, 12:18:43 AM »
I cannot login through 4images. Whenever I enter my details and hit login, I just keep getting back to the same page.

However, when I'm logged in at my forum and I return to the gallery, I am logged in.

Offline claw

  • Pre-Newbie
  • Posts: 2
    • View Profile
Here is another integration mod...
« Reply #64 on: November 06, 2002, 06:36:31 PM »
I think that is is somewhat troublesome to modify the 4images to use phpbb users db. And I find a lot of trouble to use the group in 4images after I use the previous mod.
Here is my modification that I make my phpbb to create the same user id in 4images.

Below is the patch to make the phpbb2 that will insert the account into 4images. Also, when phpbb activate the account, it will also activate the 4images account.

Code: [Select]

Index: includes/constants.php
===================================================================
diff -Naur includes/constants.php
--- includes/constants.php 2002-07-29 06:04:04.000000000 +0800
+++ includes/constants.php 2002-10-19 02:46:37.000000000 +0800
@@ -178,4 +178,16 @@
 define('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');
 define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
 
+// Album integration
+$album_table_prefix = '4images_';
+//define('ALBUM_INTEGRATED', 0); // Integrated album off
+define('ALBUM_INTEGRATED', 1); // Integrated album on
+define('ALBUM_USERS_TABLE', $album_table_prefix.'users');
+
+// Album User levels
+define('ALBUM_GUEST', -1);
+define('ALBUM_USER_AWAITING', 1);
+define('ALBUM_USER', 2);
+define('ALBUM_ADMIN', 9);
+
 ?>
Index: includes/usercp_activate.php
===================================================================
diff -Naur includes/usercp_activate.php
--- includes/usercp_activate.php 2002-05-20 01:21:38.000000000 +0800
+++ includes/usercp_activate.php 2002-10-19 03:25:49.000000000 +0800
@@ -56,6 +56,19 @@
  {
  message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql_update);
  }
+ if ( defined('ALBUM_INTEGRATED') )
+ {
+ if (ALBUM_INTEGRATED == 1)
+ {
+ $album_sql = "UPDATE " . ALBUM_USERS_TABLE . "
+ SET user_level = " . ALBUM_USER . "
+ WHERE user_id = " . $row['user_id'] . " AND user_activationkey = '" . $HTTP_GET_VARS['act_key'] . "'";
+ if ( !($result = $db->sql_query($album_sql)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not update album users table', '', __LINE__, __FILE__, $sql_update);
+ }
+ }
+ }
 
  if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN && $sql_update_pass == '' )
  {
Index: includes/usercp_register.php
===================================================================
diff -Naur includes/usercp_register.php
--- includes/usercp_register.php 2002-09-28 12:21:18.000000000 +0800
+++ includes/usercp_register.php 2002-10-18 02:57:36.000000000 +0800
@@ -440,6 +440,13 @@
  {
  message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql);
  }
+ $album_sql = "UPDATE " . ALBUM_USERS_TABLE . "
+ SET " . $album_username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_homepage = '" . str_replace("\'", "''", $website) . "', user_showemail = $viewemail, user_invisible = " . (1 - $allowviewonline) . "
+ WHERE user_id = $user_id";
+ if ( !($result = $db->sql_query($album_sql)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not update album users table', '', __LINE__, __FILE__, $sql);
+ }
 
  if ( !$user_active )
  {
@@ -499,6 +506,8 @@
  //
  $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
  VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
+ $album_sql = "INSERT INTO " . ALBUM_USERS_TABLE . " (user_id, user_name, user_password, user_email, user_showemail, user_allowemails, user_invisible, user_joindate, user_lastaction, user_lastvisit, user_comments, user_homepage, user_icq, user_level, user_activationkey)
+ VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', $viewemail, 1, " . (1 - $allowviewonline) . ", " . time() . ", " . time() . ", " . time() . ", 0, '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $icq) . "', ";
  if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )
  {
  $user_actkey = gen_rand_string(true);
@@ -506,10 +515,14 @@
  $key_len = ( $key_len > 6 ) ? $key_len : 6;
  $user_actkey = substr($user_actkey, 0, $key_len);
  $sql .= "0, '" . str_replace("\'", "''", $user_actkey) . "')";
+ $user_level = ALBUM_USER_AWAITING;
+ $album_sql .= $user_level . ", '" . str_replace("\'", "''", $user_actkey) . "')";
  }
  else
  {
  $sql .= "1, '')";
+ $user_level = ALBUM_USER;
+ $album_sql .= $user_level . ", '')";
  }
 
  if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
@@ -517,6 +530,11 @@
  message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql);
  }
 
+ if ( !($result = $db->sql_query($album_sql, BEGIN_TRANSACTION)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not insert data into photo album users table', '', __LINE__, __FILE__, $album_sql);
+ }
+
  $sql = "INSERT INTO " . GROUPS_TABLE . " (group_name, group_description, group_single_user, group_moderator)
  VALUES ('', 'Personal User', 1, 0)";
  if ( !($result = $db->sql_query($sql)) )


Offline dninness

  • Pre-Newbie
  • Posts: 5
    • View Profile
Integration 4images 1.7 / phpBB
« Reply #65 on: November 09, 2002, 05:55:14 AM »
Quote from: Thierry
I cannot login through 4images. Whenever I enter my details and hit login, I just keep getting back to the same page.

However, when I'm logged in at my forum and I return to the gallery, I am logged in.


Look out for duplicate cookies or the wrong cookies.  It kept goofing me up.

Offline dninness

  • Pre-Newbie
  • Posts: 5
    • View Profile
Integration 4images 1.7 / phpBB
« Reply #66 on: November 09, 2002, 05:57:26 AM »
Any way to use a phpBB user group as an administrative "level" within 4images after you integrate the two together?  I'd really rather not give my image gallery admins full control of my forums, too...  8O

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Integration 4images 1.7 / phpBB
« Reply #67 on: November 09, 2002, 09:06:56 AM »
Try to change in "includes/constants.php"
Code: [Select]
define('ADMIN', 1);
back to
Code: [Select]
define('ADMIN', 9);
If you have already installed 4images, you have to go to the database and change the field "user_level" in the user table back to 9 for all current 4images admins. Hope this will work.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline dninness

  • Pre-Newbie
  • Posts: 5
    • View Profile
Integration 4images 1.7 / phpBB
« Reply #68 on: November 09, 2002, 07:18:54 PM »
Quote from: Jan
(snip)
If you have already installed 4images, you have to go to the database and change the field "user_level" in the user table back to 9 for all current 4images admins. Hope this will work.


Jan

 Sehr güt.  That works partly.

 However, now all my 4Images admins have to be "user_level 9", which is nice for the couple of guys who are ONLY 4Images admins, but not good for my folks who are also forum admins, "user_level 0", and cannot have both "user_level 0" and "user_level 9" assigned.

 I suppose I could do it with multiple IDs, but at that point, why did I bother to integrate the forums?  :wink:

 I'm think the more accurate description of what I'm wanting is more like a 4Images "moderator" status, based on the assignent to a specific phpBB user group.

Darin

Offline jtraf

  • Pre-Newbie
  • Posts: 1
    • View Profile
Integration 4images/phpbb
« Reply #69 on: November 10, 2002, 06:32:00 PM »
What exactly does the integration do?

 Does the integration only share the user base?

Warhead

  • Guest
Integration 4images 1.7 / phpBB
« Reply #70 on: November 11, 2002, 11:20:57 AM »
Ich hab ein Problem, meine Moderatoren können sich nicht die Details der Photos ansehen!
Aber die normalen Benutzer und die Administratoren schon, wie kann ich es hinkriegen, dass die Moderatoren auch erkannt werden, wenigstens als normale Benutzer! :roll:

thx in advance

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Integration 4images 1.7 / phpBB
« Reply #71 on: November 11, 2002, 11:35:13 AM »
@jtraf:
After integration 4imahes will work with the user table of phpBB.

@Warhead:
Probiere mal folgendes. In "includes/sessions.php" vor dieser Zeile
Code: [Select]
return $user_info;
das hier einfügen
Code: [Select]
if ($user_info['user_level'] != GUEST && $user_info['user_level'] != USER_AWAITING && $user_info['user_level'] != ADMIN) {
    $user_info['user_level'] = USER;
}

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline boxerbay

  • Newbie
  • *
  • Posts: 18
    • View Profile
4images 1.7 integration w/ phpbb on a PostNuke site?
« Reply #72 on: November 12, 2002, 04:54:13 AM »
Jan the man!
Ok first they are all fresh installs.  I have a postnuke site with phpbb integrated on it.  see sourceforge.com phpbb2postnuke mod. Question: Can I now add 4 images to the same database then edit the files as shown in the install notes and it will work?  Please advise if possible before I go insane attempting this.  I am a newbie but so far so good I got postnuke and phpbb to work together but now I want to add 4images to it also.  Please help.
Thanks.
 :lol:
Thanks Alex.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Integration 4images 1.7 / phpBB
« Reply #73 on: November 12, 2002, 07:26:57 AM »
Sorry, i don't know if this will work because i'm not experienced with postnuke. Maybe other users have tried this and can help you.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Philmax

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • Fotos-zeigen.de
Integration 4images 1.7 / phpBB
« Reply #74 on: November 12, 2002, 09:40:31 PM »
Kann ich 4 images komplett fertig (mit phpbb login) irgendwo runterladen?

Ich kann den ganzen PHP Kram leider noch nicht so gut, das ich es selbst alles anpassen kann.

Vielleicht kann mir jemand helfen?

MFG Philmax
Fotos-zeigen.de
Zeig deine schönsten Fotos!