Author
Message
Donovan Client Joined: Oct 07, 2003 Posts: 675 Location: Ohio
Posted:
Mon Mar 31, 2008 9:17 am
Anybody have any experience with modules made for Dragonfly? Anybody ever "port" a Dragonfly module over to PHPNuke?
Donovan Client Joined: Oct 07, 2003 Posts: 675 Location: Ohio
Posted:
Mon Mar 31, 2008 10:45 am
Could I add this to include/functions.php and save myself the headache of trying to change this everywhere in the Dragonfly module.
Reason being the way Dragonfly handles linking:
Code: Nuke: echo "<a href=\"index.php\">Return</a> to the main page.<br>";
Dragonfly: echo "<a href=\"" . getlink() . \">Return</a> to the main page.<br>";
Nuke: echo "<a href=\"admin.php\">Return</a> to the admin section.<br />";
Dragonfly: echo "<a href=\"" . adminlink() . \">Return</a> to the admin section.<br />";
Nuke: echo "<a href=\"modules.php?name=Your_Account&op=userinfo\">Your Account</a><br />";
Dragonfly: echo "<a href=\"".getlink("Your_Account&op=userinfo)."\">Your Account</a><br />";
Here is the function from the Dragonfly CMS
Code: function getlink($url='', $UseLEO=true, $full=false)
{
global $module_name, $mainindex, $MAIN_CFG, $BASEHREF;
if (empty($url) || $url[0] == '&') $url = $module_name.$url;
if ($MAIN_CFG['global']['GoogleTap'] && $UseLEO) {
$url = ereg_replace('&', '/', $url);
$url = ereg_replace('&', '/', $url);
$url = str_replace('?', '/', $url);
if (ereg('/file=', $url)) {
$url = ereg_replace('/file=', '/', $url);
}
if (ereg('#', $url)) {
$url = ereg_replace('#', '.html#', $url);
} else $url .= '.html';
} else {
$url = "$mainindex?name=".$url;
}
if ($full) $url = $BASEHREF.$url;
return $url;
}
function adminlink($url='', $full=false)
{
global $adminindex, $op, $module_name, $MAIN_CFG;
if (empty($op) && !empty($module_name)) $op = $module_name;
if (empty($url)) { $url = $op; }
if ($url[0] == '&') { $url = "$adminindex?op=$op".$url; }
else { $url = "$adminindex?op=".$url; }
if ($full) $url = 'http://'.$MAIN_CFG['server']['domain'].$MAIN_CFG['server']['path'].$url;
return $url;
}
Donovan Client Joined: Oct 07, 2003 Posts: 675 Location: Ohio
Posted:
Mon Mar 31, 2008 5:40 pm
So an example of the code I would change is:
Code: echo '
<div align="right">[
<a href="'.getlink('&event='.$edata['event'].'&screen=0').'">'._MRC_TABLES.'</a> |
<a href="'.getlink('&event='.$edata['event'].'&screen=1').'">'._MRC_FIXTURES.'</a> |
<a href="'.getlink('&event='.$edata['event'].'&screen=2').'">'._MRC_CALENDAR.'</a> |
Would much rather just add the function modified for Nuke. Anybody have any input on changing these functions to work with Nuke?
gregexp The Mouse Is Extension Of Arm Joined: Feb 21, 2006 Posts: 1465 Location: In front of a screen....HELP! lol
Posted:
Mon Mar 31, 2008 9:21 pm
I would change only the function, as the output should be the same.
The only thing you should have to do, is recode the way it defines certain variables within it, and how it outputs them.
It wouldnt be too hard, I cant think of each one of the variables off hand, but it should be fairly simple to determine what should go where.
montego Site Admin Joined: Aug 29, 2004 Posts: 7236 Location: Arizona
Posted:
Thu Apr 03, 2008 5:38 am
Donovan , I see no reason why not to change those too functions. You can strip out all the "GoogleTap" stuff as RavenNuke already has ShortLinks or you can install ShortLinks and just use that instead (as it will work for all the other true nuke modules).
View next topic
View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum