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

0 Members and 1 Guest are viewing this topic.

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Redirect phpbb mod
« Reply #330 on: September 05, 2005, 01:38:50 AM »
All credits to thoul http://darkmods.sourceforge.net
##############################################################
# Title: Redirect Outside phpBB After Log In/Out
# Author: Thoul  thoul@users.sourceforge.net  http://darkmods.sourceforge.net
# Description: Guide that allows redirecting outside phpBB for log in or out.
# Version: 1.1.1
# Installation Level: Easy
# Installation Time: 3 Minutes
# Files To Edit: login.php
# Included Files: n/a
##############################################################
# Author's Notes:
# This file is intended to be a guide to redirecting users to files outside of the
# phpBB directories when they log in or log out on a case-by-case basis (that is to
# say, so that you can have some log ins/outs redirect like this and have some
# not). This file deals only with login.php, logging in, and logging out, but
# similar ideas can also be applied to redirecting outside of the phpBB
# directories in other files.
#
# If you are redirecting users to pages outside of your phpBB directories (aka
# folders), be sure to read the file function_change.txt also. It contains other
# modifications and instructions that you will need to read.
#
# Once all these modifications have been applied, you can use log in forms to
# redirect users outside the phpBB directories by adding two hidden form inputs
# like these:
# <input type="hidden" name="outside" value="1" />
# <input type="hidden" name="redirect" value="index.htm" />
# You can also create log in links like this one:
# <a href="login.php?redirect=/index.html&outside=1">Log In</a>
# And you can create log out links like this one:
# <a href="login.php?logout=true&redirect=/index.phtml&outside=1">Log Out</a>
#
#
# Thanks to RyanThaDude29 for developing some of the concepts presented in the mod
# on the FetchAll forums. :)
##############################################################
# BEFORE ADDING THIS TO YOUR FORUM, YOU SHOULD BACK UP ALL RELATED FILES.
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
forum/login.php

#
#-----[ FIND ]------------------------------------------
#

               
Code: [Select]
if( $session_id )
{
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";
redirect(append_sid($url, true));
}

#
#-----[ REPLACE WITH ]------------------------------------------
#

Code: [Select]
/*  Original phpBB code - commented out for Redirect Outside phpBB After Log In/Out
if( $session_id )
{
$url = ( !empty($HTTP_POST_VARS['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars($HTTP_POST_VARS['redirect'])) : "index.$phpEx";
redirect(append_sid($url, true));
}
*/
//---------------------------------------------------------------------------------
// Redirect Outside phpBB After Log In/Out - Begin Code Addition
//
if( $session_id )
{
$url = ( !empty($_REQUEST['redirect']) ) ? str_replace('&amp;', '&', htmlspecialchars(addslashes($_REQUEST['redirect']))) : 'index.' . $phpEx;

$outside = ( !empty($_REQUEST['outside']) ) ? true : false;
redirect(append_sid($url, true), $outside);
}
//
// Redirect Outside phpBB After Log In/Out - End Code Addition
//---------------------------------------------------------------------------------

#
#-----[ FIND ]------------------------------------------
#

      
Code: [Select]
if (!empty($HTTP_POST_VARS['redirect']) || !empty($HTTP_GET_VARS['redirect']))
{
$url = (!empty($HTTP_POST_VARS['redirect'])) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : htmlspecialchars($HTTP_GET_VARS['redirect']);
$url = str_replace('&amp;', '&', $url);
redirect(append_sid($url, true));
}

#
#-----[ REPLACE WITH ]------------------------------------------
#

Code: [Select]
/*  Original phpBB code - commented out for Redirect Outside phpBB After Log In/Out
if (!empty($HTTP_POST_VARS['redirect']) || !empty($HTTP_GET_VARS['redirect']))
{
$url = (!empty($HTTP_POST_VARS['redirect'])) ? htmlspecialchars($HTTP_POST_VARS['redirect']) : htmlspecialchars($HTTP_GET_VARS['redirect']);
$url = str_replace('&amp;', '&', $url);
redirect(append_sid($url, true));
}
*/
//---------------------------------------------------------------------------------
// Redirect Outside phpBB After Log In/Out - Begin Code Addition
//
if (!empty($_REQUEST['redirect']) )
{
$url = htmlspecialchars(addslashes($_REQUEST['redirect']));
$url = str_replace('&amp;', '&', $url);
$outside = ( !empty($_REQUEST['outside']) ) ? true : false;
redirect(append_sid($url, true), $outside);
}
//
// Redirect Outside phpBB After Log In/Out - End Code Addition
//---------------------------------------------------------------------------------


#
#-----[ FIND ]------------------------------------------
#
Code: [Select]
$s_hidden_fields = '<input type="hidden" name="redirect" value="' . $forward_page . '" />';

#
#-----[ AFTER, ADD ]------------------------------------------
#
Code: [Select]
//---------------------------------------------------------------------------------
// Redirect Outside phpBB After Log In/Out - Begin Code Addition
//
if( isset($_REQUEST['outside']) )
{
$outside = ( !empty($_REQUEST['outside']) ) ? true: false;
$s_hidden_fields .= '<input type="hidden" name="outside" value="' . $outside . '" />';
}
//
// Redirect Outside phpBB After Log In/Out - End Code Addition
//---------------------------------------------------------------------------------

Open 4images/includes/sessions.php
#
#-----[ FIND ]------------------------------------------
Code: [Select]
$url_logout        = $url_app."login.php?logout=true";
#
#-----[REPLACE WITH]------------------------------------------
Code: [Select]
$url_logout        = $url_app."login.php?logout=true&redirect=../index.php&outside=1";note you will have to edit ../index.php so it points to the site you want.

#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#

Offline Zyperntom

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: Integration 4images 1.7 / phpBB
« Reply #331 on: September 06, 2005, 11:25:15 AM »
Hi zusammen,
wer kann mir mal helfen, leider bin ich des Englischen nicht so mächtig,
sonst hätte ich bestimmt eine Lösung gefunden hier.

Hier mein problem:
http://zypern-forum.de/4images/index.php

Gruss
Tom

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: Integration 4images 1.7 / phpBB
« Reply #332 on: September 06, 2005, 02:17:23 PM »
Kanst du das problem nicht beschreiben?

Hi zusammen,
wer kann mir mal helfen, leider bin ich des Englischen nicht so mächtig,
sonst hätte ich bestimmt eine Lösung gefunden hier.

Hier mein problem:
http://zypern-forum.de/4images/index.php

Gruss
Tom

Offline Zyperntom

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: Integration 4images 1.7 / phpBB
« Reply #333 on: September 06, 2005, 06:51:32 PM »
@BartAfterDark

Sorry ich hatte mich nach meinen Post noch mal durch alle 22 Seiten gearbeitet und
alles das gemacht das hier so an Lösungen vorgeschlagen wurde.

Jetzt gehts und ich bin mehr als Glücklich ;)

Gruss
Tom

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
move 4image users to phpbb
« Reply #334 on: September 09, 2005, 06:12:50 PM »
BACKUP YOUR DATABASE.
This should be known as work in progress. You have been warned

Download and install this mod: http://www.phpbb.com/phpBB/viewtopic.php?t=285945
Go to phpmyadmin and sellect: 4images_users
Sellect export as CSV.
Change
Change ; to , in  Fields terminated by
and remove " from  Fields enclosed by

Save as file and click go.


Download CSVed from http://home.hccnet.nl/s.j.francke/t2t/text2table.htm
Open your CSV file with CSVed
Delete the columns you don't need
move the email comumn so it's Column 2
mine looks like this:
Column 1 = Username
Column 2 = Email
Column 3 = Password
Column 4 = Show email
Column 5 = Join Date
Column 6 = Webpage
Column 7 = ICQ

You will have to edit admin_import_members.php If you want to parse the extra columns

Find:
Code: [Select]
$user = new user($username, $user_password, $email);Add after:
Code: [Select]
$user->set_field('user_viewemail', $member_data[3]);
$user->set_field('user_regdate', $member_data[4]);
$user->set_field('user_website', $member_data[5]);
$user->set_field('user_icq', $member_data[6]);
As you can see the 3,4,5... Doesn't match the columns, that's because the mod starts at 0. So do not change the numbers :)

NOTE: You should probely delete the Guest and the admin form the CSV file.

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: Integration 4images 1.7 / phpBB
« Reply #335 on: September 09, 2005, 08:34:35 PM »
I want to see the stats again, under the admin page. So I can see what users are looking at :)

Offline d@tenmaulwurf

  • Pre-Newbie
  • Posts: 4
    • View Profile
Re: Integration 4images 1.7 / phpBB
« Reply #336 on: September 10, 2005, 03:52:58 PM »
There exists a problem with the Session-IP-Variable.

If someone writes a comment - there will be some clumsy things instead of a ip-adress.

After the mod there something like this in the ip-cell: "IP: 54bf3396"

I think it's a problem with the session, because the IP-address will be find out of the session-variables.

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: Integration 4images 1.7 / phpBB
« Reply #337 on: September 14, 2005, 02:46:13 PM »
I had the same problem
just got it fixed today ;D

Open details.php
Find:
Code: [Select]
$comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";Replace with:
Code: [Select]
$comment_user_ip = ($user_info['user_level'] == ADMIN) ? decode_ip($comment_row[$i]['comment_ip']) : "";Find:
Code: [Select]
include(ROOT_PATH.'includes/page_header.php');Add after:
Code: [Select]
include(ROOT_PATH.'PATH_TO_PHPBB/includes/functions.php');replace path_to_phpbb with the path to your phpbb folder


There exists a problem with the Session-IP-Variable.

If someone writes a comment - there will be some clumsy things instead of a ip-adress.

After the mod there something like this in the ip-cell: "IP: 54bf3396"

I think it's a problem with the session, because the IP-address will be find out of the session-variables.

Offline dosensteck

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: Integration 4images 1.7 / phpBB
« Reply #338 on: September 21, 2005, 08:17:45 AM »
kleine erweiterungzu diesem mod
öffne includes/usercp_viewprofile.php (PHPBB)

finde
Code: [Select]
//
// Generate page
//

darüber einfügen

Code: [Select]
// <!-- last image -->
   $sql = "SELECT image_id, image_name, image_thumb_file, image_date, cat_id, image_description
           FROM  4images_images WHERE user_id='".$profiledata['user_id']."'
ORDER BY image_date DESC
LIMIT 1";
   if ( !($query_result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, 'geht nicht', '', __LINE__, __FILE__, $sql);
   }
   $result = $db->sql_query($sql);
   $last_image_id = '';
   $last_image_title = '';
   while ($row = mysql_fetch_array($result))
   {
   $last_image_id = $row['image_id'];
   $last_image_thumb_file = $row['image_thumb_file'];
   $last_image_name = $row['image_name'];
   $last_image_description = $row['image_description'];
     $last_cat_id = $row['cat_id'];
   $last_image_date = $row['image_date'];
       
         
   }

   If ( $last_image_id )
   {
   $last_image = '<a href="http://www.example.com/details.php?image_id=';
   $last_image .= $last_image_id;
   $last_image .= '" target="_blank" class="postlink"><img src="http://www.example.com/data/thumbnails/';
   $last_image .= $last_cat_id;
   $last_image .= '/';
       $last_image .= $last_image_thumb_file;
   $last_image .= '" alt="'.$last_image_description.'" title="'.$last_image_name.'" border="0" /></a>';
   $last_image .= '<br>';
   $last_image .= $last_image_name;
   $last_image .= '<br>';
   }
   else
   {
   $last_image = '';
   }
// <!-- END last image -->

ändere www.example.com zu deinem 4 image pfad!

finde
Code: [Select]
'USER_ID' => $profiledata['user_id'],
danach einfügen
Code: [Select]
'LAST_IMAGE' => $last_image,

in templates/subSilver/profile_view_body.tpl kann jetzt {last_image} an belibiger position eingefügt werden

ist sicherlich nicht perfekt geschrieben, funktioniert aber :D

Offline 4faster

  • Pre-Newbie
  • Posts: 7
    • View Profile
1.71. Integration von phpBB 2.0.17
« Reply #339 on: October 02, 2005, 05:08:56 PM »
Hallo Leute und schönen Sonntag  :D

also ich hab ja neulich das 4 images installiert, heute die ersten Ordner eingerichtet. Nun habe ich auch ein phpBB installiert. Gibt es hier eine aktuelle Insatllationsanleitung, wie ich die beiden zusammenführe?

Ich habe dazu hier im Board den Beitrag aus 2002 (gestartet) mit 22 Seiten Kommentaren gefunden. Ist die Anleitung noch aktuell oder gibts hier irgendwas einfaches woanders für mich  :roll:

viele grüße :)

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Integration 4images 1.7 / phpBB
« Reply #340 on: October 02, 2005, 05:14:24 PM »
@4faster,
hab dein beitrag hier ge-moved.. da andere kategorie nicht die richtige war..
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline 4faster

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Integration 4images 1.7 / phpBB
« Reply #341 on: October 02, 2005, 05:15:24 PM »
sorry  :roll: und danke  :wink:

Offline 4faster

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Integration 4images 1.7 / phpBB
« Reply #342 on: October 02, 2005, 05:37:34 PM »
So, ich will ja nicht untätig sein und hab hier mal in ruhe gelesen jetzt. ich muss doch wahrscheinlich nur nachfolgendes machen:

1. Diese Änderung vornehmen:

Code: [Select]
Hinweis für Entwickler und Benutzer von "Integrationen" (phpBB, vBulletin):
In der Datei sessions.php wurden einige Änderungen vorgenommen. Um "Integrationen" mit der Version 1.7.1 kompatibel zu machen, muss aber lediglich die Zeile


Code:
"user_online_list" => $user_online_list

durch


Code:
"user_online_list" => $user_online_list,
"lang_user_online" => str_replace('{num_total_online}', $num_total_online, $lang['user_online']),
"lang_user_online_detail" => str_replace(array('{num_registered_online}','{num_invisible_online}','{num_guests_online}'), array($num_registered_online,$num_invisible_online,$num_guests_online), $lang['user_online_detail']),

ersetzt werden.

und dann

2. gemäß Anleitung hier auf Seite 1 fortfahren:

Hier sind nun die angekündigten Dateien für die Integration von 4images 1.7 und phpBB. Eine Installationsanleitung ist im Zip enthalten (Wichtig: Die Installations-Hinweise lesen!).
Die Integration ist experimentell. Bugs bitte hier posten.
-----
Here are the files for the integration of 4images 1.7 and phpBB. Instructions for installation are included (Important: Please read the installation notes!).
The integration experimental. Please post Bugs here.

Download: integration_phpbb.zip

----

If you have problems with redirecting back to the gallery after login (404 Error), try this:
http://www.4homepages.de/forum/index.php?topic=1658.msg31328#msg31328

kann das jemand bestätigen ?  :)

Offline 4faster

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: Integration 4images 1.7 / phpBB
« Reply #343 on: October 02, 2005, 07:04:24 PM »
oh leute. ich hoffe ich nerve nicht... aber umso genauer ich mir das anschaue, desto verwirrter werde ich  :?

in den vorigen beiträgen steht auch, dass phpbb und 4images die gleiche datenbank nutzen. ich hab die scripte jeweils mit einer datenbank installiert. 4images löschen und neu installieren und den namen der bereits installierten phpBB datenbank angeben?

In der Installationsanleitung steht auch, man muss in der sessions.php am deiteianfang änderungen vornehmen. wie, was, wo - das sind römische dörfer für mich newbie:

Code: [Select]
phpBB is released under the GNU General Public License              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die("Security violation");
}

//-----------------------------------------------------
//--- Start Configuration -----------------------------
//-----------------------------------------------------

// Define here the name of the session. Default of phpBB is "sid".
define('SESSION_NAME', 'sid');

// Define here the name of the banlist and config database tables.
// Maybe you only need to change the table prefix if you another
// than the phpBB default "phpbb_".
define('PHPBB_BANLIST_TABLE', 'phpbb_banlist');
define('PHPBB_CONFIG_TABLE', 'phpbb_config');

// Set her the corresponding database fields of the user table.
// If there is no corresponding field in the new user table,
// leave the value blank. Normally no need to change.
$user_table_fields = array(
  "user_id" => "user_id",
  "user_level" => "user_level",
  "user_name" => "username",
  "user_password" => "user_password",
  "user_email" => "user_email",
  "user_showemail" => "user_viewemail",
  "user_allowemails" => "",
  "user_invisible" => "user_allow_viewonline",
  "user_joindate" => "user_regdate",
  "user_activationkey" => "user_actkey",
  "user_lastaction" => "user_session_time",
  "user_location" => "user_session_page",
  "user_lastvisit" => "user_lastvisit",
  "user_comments" => "",
  "user_homepage" => "user_website",
  "user_icq" => "user_icq"
);

// Set here the URL to your phpBB forum. WITH trailing slash!
$url_app           = "http://www.4homepages.de/forum/";

// Set here different URL's to your phpBB forum.
// Normally no need to change.
$url_register      = $url_app."profile.php?mode=register";
$url_lost_password = $url_app."profile.php?mode=sendpassword";
$url_control_panel = $url_app."profile.php?mode=editprofile";
$url_mailform      = $url_app."profile.php?mode=email&u={user_id}";
$url_show_profile  = $url_app."profile.php?mode=viewprofile&u={user_id}";
$url_login         = $url_app."login.php";
$url_logout        = $url_app."login.php?logout=true";

//-----------------------------------------------------
//--- End Configuration ---

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: Integration 4images 1.7 / phpBB
« Reply #344 on: October 04, 2005, 05:12:04 PM »
Eigtnlich musst Du nur diese Zeile anpassen:

Code: [Select]
$url_app           = "http://www.4homepages.de/forum/";
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search