I found a module that will be extremely helpful to me with a project im working on. The problem is that its for xoops and not PN. The module is called xdirectory and is a very good yellow pages type module. I think porting the module over to PN would be a little to difficult considering the linking structures of the two different CMS's. Im thinking that maybe just running them independently, but bridging the session/cookies and user tables might be easier.
Anyone have any advice for bridging in general or even more specific if possible for briding xoops and PN.
-MACscr
P.S.
Postnuke's awesome permissioning system and the Xanthia engine is the reason i cant just use xoops. Its not even close as powerful.
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Bridge or Port?
-
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
-
- Rank: Legend
- Registered: Dec 11, 2002
- Last visit: Oct 21, 2009
- Posts: 11674
When I wanted to do this, I wrote a little intermediate script. Whenever I wanted to send someone to the third party script, I sent them to my intermediate first. This first checked if the user was a member of the third party script, and if not added them. Then it logged them in, and forwarded them on to whatever page had been requested.
--
itbegins.co.uk - Zikula Consulting
birtwistle.me.uk - Personal Blog
Please read the Support Guide -
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
Mind sharing the script with me to see if i can learn anything from it? -
- Rank: Legend
- Registered: Dec 11, 2002
- Last visit: Oct 21, 2009
- Posts: 11674
Sure, it's not very complicated. It did rely a little on the API of the other program, vwar (did it for a friend's clan site).
I'm not entirely certain this is the working version, but you get the idea
Code
<?php
require 'includes/pnAPI.php';
pnInit();
$vwar_root = "modules/vwar/";
require 'modules/vwar/includes/functions_common.php';
$dbconn =& pnDBGetConn(true);
$pntable =& pnDBGetTables();
// Get user information
$userscolumn = &$pntable['users_column'];
$userstable = $pntable['users'];
$uid = pnUserGetVar('uid');
$uname = pnUserGetVar('uname');
$query = "SELECT $userscolumn[pass]
FROM $userstable
WHERE $userscolumn[uid] = '" . pnVarPrepForStore($uid) ."'";
$result =& $dbconn->Execute($query);
if ($result->EOF) {
return false;
}
list($pass) = $result->fields;
$result->Close();
// Get a list of groups
// First load Groups API (need .760 for this)
if (!pnModAPILoad('Groups', 'user')) {
return pnVarPrepHTMLDisplay(_LOADFAILED);
}
$groups = pnModAPIFunc('Groups', 'user', 'getusergroups', array('uid' => $uid));
foreach($groups as $group)
{
// group contains an array of group id and group name
if($group['name'] == 'Administrators' OR $group['name'] == 'YM Members')
{
$ismember = 1;
}
}
if($ismember == 1)
{
// User is a member, so lets try to log them in...
$row = $vwardb->query_first("
SELECT memberid,ismember
FROM vwar".$n."_member
WHERE name = '".$uname."'
AND password = '".$pass."'
AND status <> '0'
");
if ($row['memberid'] == 1)
{
SetVWarCookie("vwarid", $row['memberid']);
SetVWarCookie("vwarpassword", $pass);
}
else
{
// They don't exist, so lets create...
$vwardb->query_first("
INSERT INTO vwar".$n."_member
SET
memberid = $uid,
name = $uname,
ismember = 1,
accessgroupid = 4,
password = $pass
");
}
}
switch($action)
{
case 'admin':
$url = 'modules.php?op=modload&name=vwar&file=admin';
break;
case 'roster':
$url = 'modules.php?op=modload&name=vwar&file=member';
break;
case 'calendar':
$url = 'modules.php?op=modload&name=vwar&file=calendar';
break;
case 'futmatch':
$url = 'modules.php?op=modload&name=vwar&file=index&action=nextaction';
break;
case 'pastmatch':
$url = 'modules.php?op=modload&name=vwar&file=index';
break;
case 'challenge':
$url = 'modules.php?op=modload&name=vwar&file=challenge';
break;
case 'stats':
$url = 'modules.php?op=modload&name=vwar&file=stats';
break;
default:
$url = 'modules.php?op=modload&name=vwar&file=index';
break;
}
pnRedirect($url);
exit;
?>
--
itbegins.co.uk - Zikula Consulting
birtwistle.me.uk - Personal Blog
Please read the Support Guide -
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
Thanks, i might actually be able to use this script for a different project for a buddy of mine. He wants to use vwar for his PN site too. -
- Rank: Legend
- Registered: Dec 11, 2002
- Last visit: Oct 21, 2009
- Posts: 11674
well, that isn't the working version, so you might need to change it a little ;)
--
itbegins.co.uk - Zikula Consulting
birtwistle.me.uk - Personal Blog
Please read the Support Guide -
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
-
- Rank: Legend
- Registered: Dec 11, 2002
- Last visit: Oct 21, 2009
- Posts: 11674
can't even remember if I ever got it working ;) Should I, then I'll give you a working version!
--
itbegins.co.uk - Zikula Consulting
birtwistle.me.uk - Personal Blog
Please read the Support Guide -
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
