Re:Link to username (1 viewing) (1) Guest
Favoured: 0
|
|
|
TOPIC: Re:Link to username
|
Alcor (User)
Fresh Boarder
Posts: 12
|
|
Re:Link to username 2 Years, 2 Months ago
|
Karma: 0
|
The smf userid does not match joomla userid, neither in sessions. If you change information in the joomla profile there aren't changes in smf database, and vice versa. I have rewritten it
| Code: |
function showSMFProfile($bc_time, $row, $currentitemid, $Itemid, $bc_itemid, $tooltip) {
$request = mysql_query("SELECT ID_MEMBER FROM smfdb.smf_members WHERE memberName = '$row->username'"«»);
$reqemail = mysql_query("SELECT email FROM joomladb.jos_users WHERE username = '$row->username'"«»);
$email = mysql_result($reqemail, 0);
if (mysql_num_rows($request) == 0) {
$request2 = mysql_query("SELECT ID_MEMBER FROM smfdb.smf_members WHERE emailAddress = '$email'"«»);
if (mysql_num_rows($request2) == 0) {
$result = $row->id;
}
else $result = mysql_result($request, 0);
}
else $result = mysql_result($request, 0);
$chatlink = getItemid($currentitemid, $Itemid, $bc_itemid);
$usertext = getUserText($row, $bc_time);
$content = mosToolTip( $usertext, _BC_SMFLINK, $tooltip, "../../../components/com_blastchatc/images/profiles.gif", "", $mosConfig_live_site."/index.php?option=com_smf&action=profile".$chatlink."&u=" .$result);
return $content;
}
|
If username doesn't exist then look for email, and if email doesn't exist either, then returns the joomla userid.
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
|
Re:Link to username 2 Years, 2 Months ago
|
Karma: 52
|
|
Well, this is hardcoded and will work only if smfdb and joomladb exists, which is very unlikely that every user will have same db names.
About Joomla-SMF component:
"A component that integrates SMF forum to Joomla. Just download and install SMF from simplemachines.org, then install this component. Works with Joomla default login and Community Builder login module. Installation is easy and integration is more secure."
BlastChat is integrated with joomla user table, not smf user table. If smf is not providing bridge/integration with joomla, then blastchat would need ajustment which goes out of usual scope of the project. (it wuold need integraiton with smf, not joomla)<br><br>Post edited by: Prutkar, at: 2006/10/22 12:53
|
|
|
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
Alcor (User)
Fresh Boarder
Posts: 12
|
|
Re:Link to username 2 Years, 2 Months ago
|
Karma: 0
|
|
Thanks Prutkar for your answers and your help.
The smfdb and joomladb would be database names editable when the user installs the module.
The tests and code modification I did in localhost with SMF forum and the bridge SMF/Joomla installed.
I will choose to set the WhoIsOnline username display in text mode because the links to SMF do not work correctly. I liked very much the option to link the SMF profile user.
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
|
Re:Link to username 2 Years, 2 Months ago
|
Karma: 52
|
|
You wrote you have SMF/Joomla bridge installed, this bridge must link joonla userid to smf userid, does it? if yes, how?
|
|
|
|
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
|
|