Hallo Team,
Frage: Gibt es von seiten von Coppermine eine zusammenarbeit mit WBB 3 Board?? das Board ist ja mom zu testzwecken frei verfügbar.
Wenn ja wäre das echt super da die Coppermine Galeri eifach die beste wäre !!!
Lies "Photogalerie ins Wbb 2.3 integrieren. (http://forum.coppermine-gallery.net/index.php?topic=29224.0)" (bitte wirklich den ganzen Thread lesen). Nein, es gibt keine Zusammenarbeit zwischen woltlab und uns - die haben uns einen Korb gegeben, als wir um eine kostenlose Entwicklerlizenz gefragt haben, was meine Lust auf die Erzeugung einer bridge-Datei für eine proprietäre Software nicht unbedingt erhöht hat. Auch wenn es jetzt eine kostenlose Entwickler-Lizenz gibt wird meine Lust nicht nennenswert grösser. Ich verlasse mich da ganz auf Beiträge der WBB-Community - wenn die mit einer Bridge "aus der Hüfte kommt", dann fein. Ansonsten: kein Interesse von meiner Seite aus erkennbar, Zeit und Energie in die Erstellung einer Bridge zu verwenden, die dann nicht jeder kostenlos benutzen kann und für die wir nur eingeschränkten oder gar keinen Support leisten können.
Joachim
@GauGau,
Nun das ist wirklich schade.
@GauGau,
eine Frage vieleicht kanst du mir oder jemand anderer weiterhelfen:
Was brauche ich für eine Funktionierende Bridge im Bridge ordner bzw. wie weit beinflust die datei:
udb_base.inc.php
die Bridge? Muss diese Datei auch angepast werden??
anbei mal eine Bridge fürs wbb3 die aber leider nicht so wirklich funzt. FEHLER bei der datenbankabfrage
<?php
/*************************
Coppermine Photo Gallery WBB Bridge
************************
Copyright (c) 2006 Cyberspectrum
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Comaptible for Coppermine version: 1.4.3
Author: DrachenKaiser
Date: 2007-05-27
**********************************************/
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
require_once 'bridge/udb_base.inc.php';
class cpg_udb extends core_udb {
var $admins=array();
function cpg_udb()
{
global $BRIDGE, $boardurl, $boardconfig;
$this->boardurl = 'http://www.eure-url.de/forum';
//require_once('../forum/acp/lib/config.inc.php');
//require_once("../forum/acp/lib/options.inc.php");
$this->use_post_based_groups =1;# $BRIDGE['use_post_based_groups'];
$this->multigroups = 0;
// Database connection settings
$this->db = array(
'name' => 'dbname',
'host' => 'localhost',
'user' => 'username',
'password' => 'passwort',
'prefix' => 'wcf_'
);
// Board table names
$this->table = array(
'users' => 'user',
'groups' => 'group',
'sessions' => 'session',
'usergroups' => 'user_to_groups'
);
// Derived full table names
$this->usertable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['users'];
$this->groupstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['groups'];
$this->sessionstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['sessions'];
$this->usergroupstable= '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['usergroups'];
// Table field names
$this->field = array(
'username' => 'username', // name of 'username' field in users table
'user_id' => 'userID', // name of 'id' field in users table
'password' => 'password', // name of 'password' field in users table
'email' => 'email', // name of 'email' field in users table
'regdate' => 'registrationDate', // name of 'registered' field in users table
'location' => "''", // name of 'location' field in users table
'website' => "''", // name of 'website' field in users table
'usertbl_group_id' => "groupID", // name of 'group id' field in users table
'grouptbl_group_id' => "groupID", // name of 'group id' field in groups table
'grouptbl_group_name' => "groupName" // name of 'group name' field in groups table
);
// Pages to redirect to
$this->page = array(
'register' => '/register.php',
'editusers' => '/memberslist.php',
'edituserprofile' => "/profile.php?userid=",
);
// Group ids - admin and guest only.
$this->admingroups = array(4);
$this->guestgroup =2;
// Use a special function to collect groups for cpg groups table
$this->group_overrride = 0;
// Cookie settings - used in following functions only
// get cookieprefix from vb3.0.x
$this->cookie_name = "wcf_";
// Connect to db
$this->connect();
$this->admins=array(1); // Ids der Admins hier druch Komma getrennt eintragen
}
function load_user_data($row)
{
global $USER_DATA;
$USER_DATA['user_id'] = $row['id'];
$USER_DATA['user_name'] = $row['username'];
//changed to "row['group_id']" $group_id = $row[($this->usergroupstable)?$this->field['usertbl_group_id']:$this->field['grouptbl_group_id']];
if ($this->multigroups){
$USER_DATA['groups'] = $this->get_groups($row);
} else {
if ($this->use_post_based_groups){
if(in_array($row['id']))$USER_DATA['groups'] = array(0 => 104);
else $USER_DATA['groups'] = array(0 => 103);
} else {
$USER_DATA['groups'] = array(0 => (in_array($row['group_id'] - 100, $this->admingroups)) ? 1 : 2);
}
}
}
// definition of how to extract id, name, group from a session cookie
function session_extraction()
{
if (isset($_COOKIE[$this->cookie_name . 'cookieHash'])) {
$session_id = addslashes($_COOKIE[$this->cookie_name . 'cookieHash']);
$sql = "SELECT u.".$this->field['user_id'].", u.".$this->field['password'].
" FROM ".$this->usertable." AS u, ".$this->sessionstable." AS s".
" WHERE s.".$this->field['user_id']."=u.".$this->field['user_id']." AND s.sessionID='".$session_id."'";
$result = cpg_db_query($sql, $this->link_id);
if (mysql_num_rows($result)){
$row = mysql_fetch_array($result);
return array($row[$this->field['user_id']], $row[$this->field['password']]);
} else {
return false;
}
}
}
function cookie_extraction()
{
return false;
}
function get_groups($row)
{
$int_pref='`'.$this->db['name'].'`.'.$this->db['prefix'];
$id=$row['id'];
$sql="SELECT groupID FROM ".$this->db['prefix']."user_to_groups userID='$id'";
$result = cpg_db_query($sql);
while($groups = mysql_fetch_array($result))
{
$groupids[]=$groups['groupID']+100;
}
return $groupids;
}
// definition of actions required to convert a password from user database form to cookie form
function udb_hash_db($password)
{
return $password; // unused
}
function login_page()
{
$this->redirect("/index.php");
}
function logout_page()
{
$this->redirect("/index.php?action=UserLogout&u=".USER_ID);
}
}
// and go !
$cpg_udb = new cpg_udb;
?>
Was ist fals an der Bridge??
Entschuldigung FALSCHER Code im oberen Beitrag
Hier der Richtige:
<?php
/*************************
Coppermine Photo Gallery WBB Bridge
************************
Copyright (c) 2006 Cyberspectrum
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
********************************************
Comaptible for Coppermine version: 1.4.3
Author: DrachenKaiser
Date: 2007-05-27
**********************************************/
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
require_once 'bridge/udb_base.inc.php';
class cpg_udb extends core_udb {
var $admins=array();
function cpg_udb()
{
global $BRIDGE, $boardurl, $boardconfig;
$this->boardurl = 'http://www.eureurl.at/forum';
//require_once('../forum/acp/lib/config.inc.php');
//require_once("../forum/acp/lib/options.inc.php");
$this->use_post_based_groups =1;# $BRIDGE['use_post_based_groups'];
$this->multigroups = 0;
// Database connection settings
$this->db = array(
'name' => 'db_name',
'host' => 'localhost',
'user' => 'name',
'password' => 'Passwort',
'prefix' => 'wcf1_'
);
// Board table names
$this->table = array(
'users' => 'user',
'groups' => 'group',
'sessions' => 'session',
'usergroups' => 'user_to_groups'
);
// Derived full table names
$this->usertable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['user'];
$this->groupstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['group'];
$this->sessionstable = '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['session'];
$this->usergroupstable= '`' . $this->db['name'] . '`.' . $this->db['prefix'] . $this->table['user_to_groups'];
// Table field names
$this->field = array(
'username' => 'username', // name of 'username' field in users table
'user_id' => 'userID', // name of 'id' field in users table
'password' => 'password', // name of 'password' field in users table
'email' => 'email', // name of 'email' field in users table
'regdate' => 'registrationDate', // name of 'registered' field in users table
'location' => "''", // name of 'location' field in users table
'website' => "''", // name of 'website' field in users table
'usertbl_group_id' => "groupID", // name of 'group id' field in users table
'grouptbl_group_id' => "groupID", // name of 'group id' field in groups table
'grouptbl_group_name' => "groupName" // name of 'group name' field in groups table
);
// Pages to redirect to
$this->page = array(
'register' => '/register.php',
'editusers' => '/memberslist.php',
'edituserprofile' => "/profile.php?userid=",
);
// Group ids - admin and guest only.
$this->admingroups = array(4);
$this->guestgroup =2;
// Use a special function to collect groups for cpg groups table
$this->group_overrride = 0;
// Cookie settings - used in following functions only
// get cookieprefix from vb3.0.x
$this->cookie_name = "wcf_";
// Connect to db
$this->connect();
$this->admins=array(1); // Ids der Admins hier druch Komma getrennt eintragen
}
function load_user_data($row)
{
global $USER_DATA;
$USER_DATA['user_id'] = $row['id'];
$USER_DATA['user_name'] = $row['username'];
//changed to "row['group_id']" $group_id = $row[($this->usergroupstable)?$this->field['usertbl_group_id']:$this->field['grouptbl_group_id']];
if ($this->multigroups){
$USER_DATA['groups'] = $this->get_groups($row);
} else {
if ($this->use_post_based_groups){
if(in_array($row['id']))$USER_DATA['groups'] = array(0 => 104);
else $USER_DATA['groups'] = array(0 => 103);
} else {
$USER_DATA['groups'] = array(0 => (in_array($row['group_id'] - 100, $this->admingroups)) ? 1 : 2);
}
}
}
// definition of how to extract id, name, group from a session cookie
function session_extraction()
{
if (isset($_COOKIE[$this->cookie_name . 'cookieHash'])) {
$session_id = addslashes($_COOKIE[$this->cookie_name . 'cookieHash']);
$sql = "SELECT u.".$this->field['user_id'].", u.".$this->field['password'].
" FROM ".$this->usertable." AS u, ".$this->sessionstable." AS s".
" WHERE s.".$this->field['user_id']."=u.".$this->field['user_id']." AND s.sessionID='".$session_id."'";
$result = cpg_db_query($sql, $this->link_id);
if (mysql_num_rows($result)){
$row = mysql_fetch_array($result);
return array($row[$this->field['user_id']], $row[$this->field['password']]);
} else {
return false;
}
}
}
function cookie_extraction()
{
return false;
}
function get_groups($row)
{
$int_pref='`'.$this->db['name'].'`.'.$this->db['prefix'];
$id=$row['id'];
$sql="SELECT groupID FROM ".$this->db['prefix']."user_to_groups userID='$id'";
$result = cpg_db_query($sql);
while($groups = mysql_fetch_array($result))
{
$groupids[]=$groups['groupID']+100;
}
return $groupids;
}
// definition of actions required to convert a password from user database form to cookie form
function udb_hash_db($password)
{
return $password; // unused
}
function login_page()
{
$this->redirect("/index.php");
}
function logout_page()
{
$this->redirect("/index.php?action=UserLogout&u=".USER_ID);
}
}
// and go !
$cpg_udb = new cpg_udb;
?>
Hallo,
Also die Bridge funkt nun soweit so gut ... dh:
Die Bridge läst sich Aktivieren.
ABER wenn man im Forum angemeldet ist wird man in der Galeri nicht erkannt dh. mann müste sich anmelden aber wenn man auf anmelden geht kommt man auf die Startseite vom Forum wo man schon angemeldet ist.
Was braucht die Bridge von der Datenbank des Forums um zu erkennen das man angemeldet ist im Forum??
Bitte um hilfe (gilt auch für Gau Gau weil der kennt ja die Galeri und weis was nötig ist-- von meiner seite kommt dann was das Forum zu verfügung stellt an daten)
BITTE BITTE es wäre echt schade wenn das nicht zu verwirklichen wärde das hinzubekommen.
hy,
Danke, auf grund des ignorierens gehe ich davon aus das es hier keine Interresiert.
Schade darum....
mfg
Könnte aber auch daran liegen, dass Beiträge im Deutschen Board nur von zweien der Entwickler gelesen werden.
Unser Bridging-Experte Nibbler spricht nur Englisch.
Wie schon im anderen Thread erwähnt besteht kein Interesse von meiner Seite, so etwas zu entwickeln - das heisst aber nicht, dass es andere nicht interessiert. Um ine nicht-funktionierende Bridge lauffähig zu bekommen müsste ich den gleichen Aufwand betreiben wie beim Neu-Erstellen: ich müsste mir WBB herunterladen, installieren, mich in die Struktur des Programms einarbeiten und dann eine Bridge schreiben. Dazu bin ich nicht bereit. Andere möglicherweise schon.
Joachim
@GauGau,
Danke für deine Antwort.
Weist du ich wäre schon zufrieden wenn mir wer erklären könnte was die Bridge braucht bzw. was sie in der Datenbank abfrägt summasumarum wie eine Bridge eigentlich funktioniert. Das würde mir schon weiter helfen.
Ich weis das DU keinen Bock darauf hast und nicht gut auf WBB zu sprechen bist aber ich bin einfach nur ein User der eure Galeri super finden und sie mit dem WBB zusammenfügen möchte, ich erwarte mir auch nicht eine endlösung sondern einfach nur hilfe in die richtung.
Danke