Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
Donovan
Client


Joined: Oct 07, 2003
Posts: 735
Location: Ohio

PostPosted: Mon Mar 31, 2008 9:17 am Reply with quote

Anybody have any experience with modules made for Dragonfly? Anybody ever "port" a Dragonfly module over to PHPNuke?
 
View user's profile Send private message Visit poster's website ICQ Number
Donovan
PostPosted: Mon Mar 31, 2008 10:45 am Reply with quote

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&amp;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('&amp;', '/', $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
PostPosted: Mon Mar 31, 2008 5:40 pm Reply with quote

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: 1497
Location: In front of a screen....HELP! lol

PostPosted: Mon Mar 31, 2008 9:21 pm Reply with quote

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.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9456
Location: Arizona

PostPosted: Thu Apr 03, 2008 5:38 am Reply with quote

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).

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©