Statistik |
Beiträge: 144.533 (Täglich: 19,19 )
Themen: 16.700
Mitglieder: 13.209
Neuestes Mitglied: zitronentee.
Ausl. d. letzten Minute: 418%
Ausl. d. letzten 5 Minuten: 416%
Ausl. d. letzten 15 Minuten: 372%
Aktulle Uhrzeit: 00:53
Freier Webspace: 4.04 TB
PHP-Version: 7.4.33
|
|
|
|
|
FLashChat ver.5 (tufat) -> wbb lite |
|
FLashChat ver.5 (tufat) -> wbb lite |
|
Hallo und guten Abend,
ich wollte fragen, ob es ein Addon gibt, von wo man als
registrierter FlashChat(tufat) ins wbb lite board kommen kann, ohne sich fürs board neu anzumelden.
Ich wollte es so aufbauen, daß sich user im chat einloggen können. Im Chat soll sich ein button vom board befinden. wenn man da drauf klickt, öffnet sich ein extra fenster und man ist mit den Userdaten vom Chat im boad eingeloggt.
|
|
02.08.2008 22:19 |
|
|
Viktor
Administrator
Zeige Viktor auf Karte
Dabei seit: 15.08.2003
Beiträge: 31.570
363 Filebase-Einträge
Alter: 66 Jahre
Herkunft: NRW wBB-Version: wBB2.3 PHP-Version: 7.4.33 MySQL-Version: 10.5.19-MariaDB Wo bist du gehostet?: eigener Server
Bewertung:
Level: 71 [?]
Erfahrungspunkte: 237.762.350
Nächster Level: 266.777.854
|
|
|
02.08.2008 22:25 |
|
|
|
Dann dürftest Du Deine SQL Daten sehen weiter mit Continue. Den Ordner install_files und die Datei install.php auf dem Rootordner chat entfernen. - Chat läuft.
Ich sehe zwar meine Daten aber das passwort zeigt er nicht an.
Ich nutze wbb 2.3.6
Und habe den Chat 4.52
Schreibrechte sid alle gesetzt
Ich versuche es gerade nochmal ohne deine PHP die du hochgeladen hast mal sehn ob das was bringt.
Vielleicht weisst du ja was zu tun ist ;-)
__________________
|
|
29.12.2008 11:30 |
|
|
|
Hier mal der code wie er sein sollte für 2.3.6
php: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
|
<?php
/************************************************************************/
//!!! IMPORTANT NOTE
//!!! FlashChat 4.4.0 and higher support a new user role: ROLE_MODERATOR
//!!! Please edit the getUser and getRoles function if you need use of
//!!! the new moderator role. This change has not yet been applied.
/************************************************************************/
// integration class for WotLab Burning Board
// chdir hack for allowing wotlab global.php to include files
$curdir = getcwd();
$wbb_root_path = realpath(dirname(__FILE__) . '/../../../') . '/';
chdir($wbb_root_path);
require_once($wbb_root_path . 'global.php');
include($wbb_root_path . 'acp/lib/config.inc.php');
require_once($wbb_root_path . 'acp/lib/options.inc.php');
chdir($curdir);
// endofhack
$pu = parse_url($GLOBALS['url2board']);
$GLOBALS['cookiepath'] = $pu['path'] . '/';
class WBBCMS {
function WBBCMS() {
$this->userid = isset($_COOKIE['wbb2_userid']) ? $_COOKIE['wbb2_userid'] : null;
}
function isLoggedIn() {
return $this->userid;
}
function getUserProfile($userid) {
global $CFG;
if ($userid == SPY_USERID) $rv = NULL;
elseif ($this->userid == $userid) $rv = $GLOBALS['url2board']."/usercp.php?sid={$_COOKIE[$GLOBALS['cookieprefix'].'cookiehash']}";
else $rv = $GLOBALS['url2board'] . "/profile.php?userid={$userid}";
return $rv;
}
function getUser($userid) {
$rv = NULL;
$u = getwbbuserdata($userid);
if ($u) {
$rv['id'] = $u['userid'];
$rv['login'] = $u['username'];
$rv['roles'] = $this->getRoles($u);
$rv['gender'] = $u['gender'];
}
return $rv;
}
function getRoles($userdata) {
$rv = ROLE_USER;
if ($userdata['groupcombinationid'] == 1 ) $rv = ROLE_ADMIN;
if ($userdata['groupcombinationid'] == 3 ) $rv = ROLE_MODERATOR;
return $rv;
}
function login($login, $password) {
global $db, $session, $sid, $n;
$rv = NULL;
$result = getwbbuserdata($login, "username");
$wbbuserpassword = $result['password'];
if ($result['userid'] && $wbbuserpassword == md5($password)) {
if ($result['usecookies'] == 1) {
setcookie($GLOBALS['cookieprefix']."userid", $result['userid'], time() + 3600 * 24 * 365, $GLOBALS['cookiepath']);
setcookie($GLOBALS['cookieprefix']."userpassword", $wbbuserpassword, time() + 3600 * 24 * 365, $GLOBALS['cookiepath']);
}
$db->unbuffered_query("DELETE FROM bb".$n."_sessions WHERE userid = '$result[userid]'", 1);
$db->unbuffered_query("UPDATE bb".$n."_sessions SET userid = '$result[userid]', authentificationcode='', styleid='".$result['styleid']."' WHERE sessionhash = '$sid'", 1);
unset($session['authentificationcode']);
$rv = $result['userid'];
}
return $rv;
}
function userInRole($userid, $role) {
if($user = $this->getUser($userid)) {
return ($user['roles'] == $role);
}
return false;
}
function logout() {
}
function getUsers() {
global $db, $n;
$rv = array();
$result = $db->query("SELECT * FROM bb".$n."_users WHERE userid= '$this->userid'");
$row = mysql_fetch_array($result);
$t['roles'] = $this->getRoles($row);
$t['login'] = $row['username'];
$t['id'] = $row['userid'];
$rv[] = $t;
return $rv;
}
function getGender($userid){
// 'M' for Male, 'F' for Female, NULL for undefined
$rv = NULL;
if($user = $this->getUser($userid)) {
if ($user['gender'] == "1") { $rv = "M"; }
if ($user['gender'] == "2") { $rv = "F"; }
if ($user['gender'] == "0") { $rv = NULL ; }
}
return $rv;
}
}
$GLOBALS['fc_config']['db'] = array(
'host' => $GLOBALS['sqlhost'],
'user' => $GLOBALS['sqluser'],
'pass' => $GLOBALS['sqlpassword'],
'base' => $GLOBALS['sqldb'],
'pref' => 'bb'.$GLOBALS['n']."_fc_",
);
$GLOBALS['fc_config']['cms'] = new WBBCMS();
foreach($GLOBALS['fc_config']['languages'] as $k => $v) {
$GLOBALS['fc_config']['languages'][$k]['dialog']['login']['moderator'] = '';
}
?> |
|
NACHTRAG von keine_Ahnung:
Bitte den oder den Button für Quellcode benutzen.
Danke.
__________________
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von keine_Ahnung: 29.12.2008 17:12.
|
|
29.12.2008 12:31 |
|
|
|
Hallo,
ich hab das jetzt mal mit diesen Angaben installiert:
code: |
1:
2:
|
if ($userdata['groupcombinationid'] == 1 ) $rv = ROLE_ADMIN;
if ($userdata['groupcombinationid'] == 3 ) $rv = ROLE_MODERATOR; |
|
Das funktioniert auch einwandfrei. Nur habe ich in meinem WBB-Forum einmal Supermoderatoren und einmal Moderatoren. Ich möchte beiden Gruppen Moderatorenrechte im Chat geben.
Kann man nachträglich noch eine weitere Usergruppe anlegen, die Moderatorenrechte im Chat hat? Wenn ja, wie und wo kann ich das einstellen.
Oder muß ich das neu installieren?
Vielen Dank schon mal im Voraus.
Liebe Grüße Andi
|
|
11.01.2009 16:06 |
|
|
|
dann mache daraaus
code: |
1:
|
$userdata['groupcombinationid'] == 3 ) |
|
mal
code: |
1:
|
$userdata['groupcombinationid'] == 2 || 3 ) |
|
__________________ MFG
......Silvio......
|
|
11.01.2009 16:48 |
|
|
|
Hallo Luzifer,
danke für die schnelle Antwort. Aber so zeigts mir bei den Administratoren auch an, daß diese im Chat nur Moderatoren sind. Usergruppe 2 und 3 werden so wie gehofft richtig angezeigt im Chat. Nur die Admins auch als Moderator im Chat.
Ich hab danach einfach folgendes versucht:
php: |
1:
2:
3:
|
if ($userdata['groupcombinationid'] == 1 ) $rv = ROLE_ADMIN;
if ($userdata['groupcombinationid'] == 2 ) $rv = ROLE_MODERATOR;
if ($userdata['groupcombinationid'] == 3 ) $rv = ROLE_MODERATOR; |
|
Einfach eine neue Zeile eingeschoben und die Usergruppe da eingegeben, welcher ich die Moderatorenrechte im Chat verleihen wollte. Das hat dann so geklappt wie ich es gerne hätte.
Vielen Dank für Deine schnelle Hilfe
Liebe Grüße Andi
|
|
11.01.2009 17:09 |
|
|
|
Hi!
Ich bekomme nur ne weisse Seite angezeigt, wenn ich das WBB 2 auswähle und auf weiter klicke. Hat jemand hierzu einen Tip?
|
|
18.03.2010 14:26 |
|
|
|
|
|
|