Home arrow Forum User Sync SQL Query
  Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 07:44:32 PM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Joomla-SMF 2.0.x (Moderators: -Wolverine, kai920)
| | | |-+  User Sync SQL Query
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: User Sync SQL Query  (Read 1226 times)
prodigal
Joomla Newbie
*

Karma: +0/-1
Offline Offline

Posts: 8


View Profile
User Sync SQL Query
« on: January 20, 2007, 03:44:07 PM »

Hi There ,

First of ... great hack works like a charm Smiley

One question though what’s the sql query used to sync SMF / Joomla users? The query keep timing out on my forums I have 10654 users and it keeps stopping around the 10 000 mark. I want to run this command locally on the machine if possible.

Also my forum has for years been at mydomain.com/forums , so people hit the forum index directly circumventing the bridge. Is there a way I can stop them doing this?

Thanks Smiley
Logged
Livebox
Guest
Re: User Sync SQL Query
« Reply #1 on: January 20, 2007, 03:55:51 PM »

Put this in your index.php of your forum. Now user can not access directly your forum dir.

Code:
// Redirect users who try to access /forum directly
if (strpos($_SERVER['QUERY_STRING'], 'dlattach') === false)
{
        if(!defined('_VALID_MOS')){ header("Location: /index.php");}
}

/index.php <---you can change this to the link you want
Logged
lindsey
Joomla Newbie
*

Karma: +2/-3
Offline Offline

Posts: 25


At Least Nixon Resigned


View Profile WWW
Re: User Sync SQL Query
« Reply #2 on: January 21, 2007, 09:30:05 PM »

Put this in your index.php of your forum. Now user can not access directly your forum dir.

Code:
// Redirect users who try to access /forum directly
if (strpos($_SERVER['QUERY_STRING'], 'dlattach') === false)
{
        if(!defined('_VALID_MOS')){ header("Location: /index.php");}
}

/index.php <---you can change this to the link you want

thankyouthankyouthankyou... been needing this, even though it's a new install, google searches keep bringing up the forum yet the links are unwrapped. I don't have a link in my forums to direct to the main site, it's included in the template which has my top menu in it to go back and forth between the two Cheesy  you're a life saver Wolverine!
Logged


Livebox
Guest
Re: User Sync SQL Query
« Reply #3 on: January 23, 2007, 12:18:20 AM »

No thanks Wink
Logged
Robert
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


View Profile
Re: User Sync SQL Query
« Reply #4 on: January 29, 2007, 08:11:12 AM »

Manymany thanks from me also. This was the main problem for forum links to topics inside my forum not working correctly, since the unbridged forum url was used in some cases. You'd never want users to link directly to /forum/ etc..., but always using the portal link 'index.php?option=com_smf&...'

One additional problem though. SMF session cookie lifetime 'forever', portal cookie lifetime '1 hour'., when users log in I see them appearing in the portal Online List as well in the Forum Online list.

When a user just shuts down the browser, the Forum no longer displays the user as beeing 'online', which is correct.

However: the portal still displays the user as beeing online, which is incorrect. Can this be solved one way or another? I saw there is a Joomla table jos_sessions where all the previously logged in users are still shown... Maybe on browser shutdown the user session should be ended somehow?
Logged
prodigal
Joomla Newbie
*

Karma: +0/-1
Offline Offline

Posts: 8


View Profile
Re: User Sync SQL Query
« Reply #5 on: January 30, 2007, 09:38:56 PM »

Thanks for the answer , can anyone help with the SQL query that runs to sync users? I want to run this on my test machine so it dosent cripple the server Smiley
Logged
prodigal
Joomla Newbie
*

Karma: +0/-1
Offline Offline

Posts: 8


View Profile
Re: User Sync SQL Query
« Reply #6 on: January 30, 2007, 10:17:08 PM »

is this it? ( assuming I have the default smf and joomla table prefixes.

Code:
SELECT name, username, password, email, registerDate, block, activation FROM jos_users,
LEFT JOIN smf_members ON smf_ members.memberName = jos_users.username WHERE smf_members.memberName IS NULL;
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Search Contact About Advertise Blogs Topsites Submit News Register Login