Author Topic: 4Images & PHPBB Integration  (Read 17263 times)

0 Members and 1 Guest are viewing this topic.

Offline Taps

  • Newbie
  • *
  • Posts: 10
    • View Profile
4Images & PHPBB Integration
« on: July 14, 2002, 07:47:18 PM »
I am in the process of working on this as well.  I saw that some people were attempting to do this with VBulletin, but when I realized that VB wasnt free, and PHPBB was, I figured it would have more of a draw if I tried it with PHPBB.

Also, it appears that the DB structure on 4I is modeled after PHPBB.  So the transition was a lot easier.  So far it is going fairly well.  If you would like to see it, then I must warn you that the site is an adult oriented site.  I will place the URL at the end of this mesage after I vaguely outline the steps I used to do this.

1 - Install PHPBB with defaults. Leaving PHPBB_ as the prefix to all the database names.

2 - Install 4Images with defaults to the same database.  Leaving 4IMAGES_ as the prefix to all the database names.

3 - Export structure and data of 4IMAGES_USERS to a file with PHPMYADMIN with COMPLETE INSERTS and EXTENDED INSERTS both checked.

4 - Export structure and data of PHPBB_USERS to a file with PHPMYADMIN in the same fashion.

5 - Manually duplicate the data fields of the 4IMAGES db into the PHPBB db, changing the DB so that it creates a new DB named USERS (with no Prefix).  Also, make sure the field of USER_NAME is not used.  PHPBB uses USERNAME (no underscore).

6 - Using PHPMYADMIN again, run the new SQL script that you just created and allow it to create a new DB Table called users.

7 - Using PHPMYADMIN again, change the DB field in 4IMAGES_COMMENTS called USER_NAME to USERNAME as well.

8 - I use HomeSite 4.52 for HTML/ASP/CGI/PHP/Etc editing.  One of my favorite features is a global search and replace in a directory structure.  You may have to find another program to do this, or actually go through all files and do this by hand.  If by hand, then this is the longest step of the whole process.  Do a global replace of all instances of the phrase USER_NAME with USERNAME.

9 - Do another search and replace for USERNAME_LINK and change it back to USER_NAME_LINK.

10 - In both CONSTANTS.PHP files (for 4I and BB) remove the prefix for both of the USERS tables. so it looks like define('USERS_TABLE', 'users'); in both.  This will let both of them use the same userbase.

11 - Also in both CONSTANTS.PHP files, make sure that the user settings match each other.  I made USER = 2 and ADMIN = 9.

12 - in the FORUM/INCLUDES/USERCP_REGISTER.PHP, look for $user_style, 0, 1, at the end of a strign of values and replace it with $user_style, 2, 1,.  This will set it so users have access to the GALLERY after registering.  (Note: this is one of the problems I am working on.  See end for list of them.)

13 - In your templae files, change the LOST PASSSWORD and REGISTRATION links, to point to the corresponding links in the FORUM.  I have hard coded these in the templates I am using.

14 - Turn off the need for activation in the GALLERY.  Since all registration is going through the forum, this message for activation will never get sent or even created.

--------------------------------------------

And thats pretty much it.   Ther are probably a fewlittle things that you might need.  Like I said above, this is very vague.  I was doing this in the wee hours of the morning.

Here are a few things I am still trying to fix:

- A single login.  As I have it now, once you register an account, you still have to login twice.  Once to the forum, and then once to the gallery.
- Using the same sessions/cookies.
- Changing 4IMAGES to use the ACTIVATED field instead of the USER_LEVEL field.  PHPBB has a seperate field that denotes whether or not the accoutn has been activated.  4IMAGES actually changes the USER_LEVEL.
- Combining the WHO'S ONLINE entries so that they cross over.  Letting people on the gallery see who is on the forum and vice-versa.
- Changing the templates in the forum to show a Random image like the gallery does.  I have found the code that was used in the RANDOM.PHP, but I am having trouble incorporating it into a HTML document.

I am not sure how hard these will be, but I also know next to nothing about PHP.  Ihave messed with CGI and ASP in the past, so I am fumbling around through this entire thing.  If anyone would like to take this start and run with it, I would be more than willing to help out what little I can.

Offline Taps

  • Newbie
  • *
  • Posts: 10
    • View Profile
forgot URL
« Reply #1 on: July 14, 2002, 07:50:35 PM »
I mentioned that I had this running on a site, but forgot to add the URL.

Again, be warned that this is an adult site.  So if you would like to test out the script, I would appreciate it you were over 18.  Also, if you are just coming to view the integration, then send me a PM afterwards to let me know, and I will delete your account when you are done with it.

But the URL is http://Www.PYSN.Org

Offline giffy007

  • Full Member
  • ***
  • Posts: 119
    • View Profile
4Images & PHPBB Integration
« Reply #2 on: July 14, 2002, 09:40:07 PM »
Not bad as it goes , got it working but a little confusing i thought but nearly what i wanted needs some work but not bad. Have you got any files we could take a look at because i dont know anything about php .
All i need really is that members can log on and use both without loging in another time , thats really what i wanted.

Giffy :wink:

Offline Taps

  • Newbie
  • *
  • Posts: 10
    • View Profile
4Images & PHPBB Integration
« Reply #3 on: July 14, 2002, 09:46:02 PM »
What part about it was confusing?

Offline giffy007

  • Full Member
  • ***
  • Posts: 119
    • View Profile
4Images & PHPBB Integration
« Reply #4 on: July 14, 2002, 09:54:33 PM »
I think hopping backwards into the forum , i myself would like to keep them separate but intergrated so members can use them with there members login and the main working area would still be the same, but thats my thoughts , the templates is no problem just getting that members login the same is on my most wanted list .
But its a good job  :!:

giffy :wink:

Offline Arunan

  • Newbie
  • *
  • Posts: 16
    • View Profile
4Images & PHPBB Integration
« Reply #5 on: July 15, 2002, 03:52:06 AM »
Möglicherweise, wenn jemand dieses in sehr gutes Englisch übersetzen kann?  Ich kann nicht Deutsches sprechen :(

Offline Taps

  • Newbie
  • *
  • Posts: 10
    • View Profile
English to German Translation
« Reply #6 on: July 15, 2002, 06:01:13 AM »
This was run through http://babelfish.altavista.com/

Dieses wurde laufen gelassen durch http://babelfish.altavista.com /


Ich bin bei auf diesem außerdem arbeiten. Ich sah, daß einige Leute versuchten, dies mit VBulletin zu tun, aber, als ich feststellte, daß VB wasnt frei und PHPBB waren, stellte ich es würde haben mehr eines abgehobenen Betrages dar, wenn ich ihn mit PHPBB versuchte.

Auch es scheint, daß die DB Struktur auf Î nach PHPBB modelliert wird. So war der Übergang viel einfacher. Bis jetzt geht er ziemlich gut. Wenn Sie ihn sehen möchten, dann muß ich Sie warnen, daß der Aufstellungsort ein Erwachsener orientierter Aufstellungsort ist. Ich setze das URL am Ende dieses mesage, nachdem ich vage die Schritte umreiße, die ich pflegte, dies zu tun.

1 - Bringen Sie PHPBB mit Rückstellungen an. PHPBB _ als das Präfix alle Datenbanknamen überlassen.

2 - Bringen Sie Îmages mit Rückstellungen zur gleichen Datenbank an. ÎMAGES _ als das Präfix alle Datenbanknamen überlassen.

3 - Exportstruktur und Daten von ÎMAGES_USERS zu einer Akte mit PHPMYADMIN mit KOMPLETTEN EINSÄTZEN und VERLÄNGERTEN EINSÄTZEN beide überprüften.

4 - Exportieren Sie Struktur und Daten von PHPBB_USERS in eine Akte mit PHPMYADMIN auf die gleiche Art und Weise.

5 - Kopieren Sie manuell die Datenfelder des DBS ÎMAGES in das PHPBB DB und das DB ändern, damit es neuen DB genannten USERS herstellt (ohne Präfix). Auch überprüfen das Feld von USER_NAME wird verwendet nicht. PHPBB benutzt username (kein Unterstreichen).

6 - Mit PHPMYADMIN wieder, lassen Sie den neuen SQL Index, den Sie gerade verursachten laufen und lassen Sie ihn eine neue DB Tabelle herstellen, die Benutzer genannt wird.

7 - Mit PHPMYADMIN wieder, ändern Sie das DB Feld in ÎMAGES_COMMENTS angerufenem USER_NAME zu username außerdem.

8 - Ich verwende HomeSite 4,52 für HTML/ASP/CGI/PHP/Etc das Redigieren. Eine meiner Lieblingseigenschaften ist eine globale Suche und ersetzt in einer Verzeichnisstruktur. Sie können ein anderes Programm finden müssen, um dies zu tun, oder wirklich laufen Sie alle Akten durch und tun Sie dies eigenhändig. Wenn eigenhändig, dann dieses der längste Schritt des vollständigen Prozesses ist. Tun Sie ein globales ersetzen von allen Fällen der Phrase USER_NAME mit username .

9 - Tun Sie eine andere Suche und ersetzen Sie für USERNAME_LINK und ändern Sie es zurück zu USER_NAME_LINK .

10 - In beiden CONSTANTS.PHP Akten (für Î und BB) entfernen Sie das Präfix für beide der Anwendertabellen. so sieht es wie define('USERS_TABLE ', ' Benutzer ') aus; in beiden. Dieses läßt all das gleiche userbase verwenden.

11 - Auch in beiden CONSTANTS.PHP Akten, überprüfen Sie, ob die Benutzereinstellungen sich zusammenbringen. Ich bildete BENUTZER = 2 und ADMIN = 9.

12 - im FORUM/INCLUDES/USERCP_REGISTER.PHP, suchen $$user_style, 0, 1, am Ende eines strign von Werten und ersetzen es durch $$user_style, 2, 1, . Dieses stellt es ein, also haben Benutzer Zugang zur GALERIE, nachdem sie registriert haben. (Anmerkung: dieses ist eins der Probleme, die ich an bearbeite. Sehen Sie Ende für Liste von ihnen.)

13 - In Ihren templae Akten ändern Sie die VERLORENEN PASSSWORD und AUSRICHTUNG Verbindungen, zum Punkt zu den entsprechenden Verbindungen im FORUM. Ich habe stark diese in den Schablonen kodiert, die ich benutze.

14 - Drehen Sie weg die Notwendigkeit an der Aktivierung in der GALERIE. Da alle Ausrichtung das Forum durchläuft, erhält diese Anzeige für Aktivierung nie gesendet oder sogar verursacht.

--------------------------------------------

Und thats recht viel es. Ther sind vermutlich ein fewlittle Sachen, die Sie benötigen konnten. Wie ich oben sagte, ist dieses sehr vage. Ich tat dies in den kleinen Stunden des Morgens.

Sind hier einige Sachen, die ich noch versuche zu regeln:

- ein einzelner LOGON. Da ich ihn jetzt habe, sobald Sie ein Konto registrieren, müssen Sie noch LOGON zweimal. Einmal zum Forum und dann einmal zur Galerie.
- Verwenden des gleichen sessions/cookies.
- änderndes ÎMAGES, zum des AKTIVIERTEN Feldes anstelle vom USER_LEVEL Feld zu benutzen. PHPBB hat ein seperate Feld, das bezeichnet, ob oder nicht das accoutn aktiviert worden ist. ÎMAGES ändert wirklich das USER_LEVEL.
- den WHO zu kombinieren ist ON-line-Eintragungen, damit sie rüber kreuzen. Lassend sehen Leute auf der Galerie, wem auf dem Forum und umgekehrt ist.
- das Ändern der Schablonen im Forum, um ein gelegentliches Bild wie die Galerie zu zeigen. Ich habe den Code gefunden, der im RANDOM.PHP verwendet wurde, aber ich habe Mühe, sie in ein HTML Dokument zu enthalten.

Ich bin nicht sicher, wie hart diese sind, aber ich weiß auch nahe bei nichts über PHP. Ihave verwirrte mit cgi und Asp in der Vergangenheit, also fumbling ich herum durch diese gesamte Sache. Wenn jedermann diesen Anfang nehmen und mit ihm laufen möchte, würde ich mehr als willend, heraus zu helfen sein, was wenig ich kann.

Offline Taps

  • Newbie
  • *
  • Posts: 10
    • View Profile
4Images & PHPBB Integration
« Reply #7 on: July 16, 2002, 01:13:47 AM »
Quote from: giffy007
Not bad as it goes , got it working but a little confusing i thought but nearly what i wanted needs some work but not bad. Have you got any files we could take a look at because i dont know anything about php .
All i need really is that members can log on and use both without loging in another time , thats really what i wanted.


I just realized that I totally forgot to refer to the rest of the post.

No, I dont have any files for people to look at.  I hesitated even writing down the list of instructions to begin with.  Just because I am a big fan of "If You Release It, You Support It.".  And to tell the truth, I dont knwo what I am doing with PHP either.  So me supporting it would be a major case of th blind leading the blind.  I mainly offered it as a beginning for anyone else that would liek to do a full integration.

As for the single login option, that is the part I am working on right now.  And it looks like it is going to be the hardest.  I am I think if I can just get the cookies to match, then it should be fine.  We will see.  I still want to keep the groups and stuff seperate.  That way you can have one group of permissions when it comes to the forums, and a totally seperate group of permissions for th gallery.

Offline whistler81

  • Newbie
  • *
  • Posts: 30
    • View Profile
4Images & PHPBB Integration
« Reply #8 on: July 22, 2002, 06:05:36 PM »
i made with your example and i think it works!
but,
when i register a  new user, then i want to activate it, i get an error message
Quote

phpBB : Critical Error

Could not obtain lastvisit data from user table


what is wrong?

Clemens

Offline Taps

  • Newbie
  • *
  • Posts: 10
    • View Profile
4Images & PHPBB Integration
« Reply #9 on: July 22, 2002, 07:53:43 PM »
Did you make sure all the fields from both user area were inthe new one you created?

Offline whistler81

  • Newbie
  • *
  • Posts: 30
    • View Profile
4Images & PHPBB Integration
« Reply #10 on: July 22, 2002, 09:06:55 PM »
yes all fields are in the new table!?

but i can log in in 4images, although the username isn't activatet yet?! very strange:)

Clemens