Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
Dino
Newbie
Newbie



Joined: Aug 11, 2007
Posts: 2

PostPosted: Sun Aug 03, 2008 8:34 am Reply with quote

I have an old version of phpnuke: 6.9.
I have served only 2 or 3 modules in html.
After a long search I opted for GT_Nextgens: installing everything ok.
"But I have a problem: modules Monitor does not count more visits to the modules in html (example: Encyclopedia.html) Crying or Very sad Crying or Very sad Crying or Very sad
I have checked the code, but I can not make the change.
Help.

Monitor.php Code be amended:

Code:
//Analiza la URL para saber si es un Modulo o otro tipo de pagina
function analiURL($url){
   if ($url == "/")  $pagina = "Home";
   else if (ereg ("index.php", $url)) $pagina = "Home";
   else if (ereg ("modules.php", $url)) $pagina = analiMod($url);
....
return $pagina;
}

function analiMod($url){
   $modulo = stristr ($url, 'name=');
   $modulo = substr ($modulo, 5);
   $tok = strtok ($modulo,"&");
   $modulo = $tok;
   if ($modulo == ""){
       $modulo = "???";
   }
return $modulo;
}


How can I change these codes?
Someone can help me?
Thank you very much.
Dino.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sun Aug 03, 2008 10:49 am Reply with quote

Dino,

First of all, welcome to Montego Scripts! Second, why use such an old script which hasn't been updated and/or supported in over three years? Why not use my ShortLinks, which was based up GT-NExtGEn, but I have enhanced and fixed some things.

Anyways, I do not believe the version of hack to have anything to do with this issue. So, sorry for the shameless plug. Embarassed

The way these rewrite rules work, there should be little to no impact to your module code. In fact, in 99% of the cases, your core module code does not change at all.... the beauty of this method.

However, what I suspect is happening is that you have a URL that has been re-written, but it is in error. You will need to check the full link URL that you are clicking on (where you expect to get the page counts to increase). I suspect after the ".html" there is something like this: ".html&somevar=somevalue" and there could be multiple variables... This implies that you are missing a rule or rules in your GT file for the module.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Dino
Newbie
Newbie



Joined: Aug 11, 2007
Posts: 2

PostPosted: Sun Aug 03, 2008 1:27 pm Reply with quote

Hi Montego.
Thank you for the speed of your reply.
The problem is present in all 4 modules with GT-NExtGeN_Beta_0.4: work properly and I think that there are no errors.
Monitor is a module of statistics similar to MS-Analysis.
For MS-Analysis is used "GT-NExtGEn Conversion Pack for MS_Analysis 2.0" (GT-NExtGEn_CP_MS_Analysis_20); readme is present in this change:
Code:
#
#-----[ OPEN ]------------------------------------------
#
  /modules/MS_Analysis/mstrack.php
#
#-----[ FIND ]------------------------------------------
#

// Get Module Name
$MSAdata[module] = substr( stristr( $_SERVER['REQUEST_URI'], 'name='), 5 );
$tok = strtok( $MSAdata[module], "&" );
$MSAdata[module] = trim( eregi_replace( "_", " ", $tok ) );
$MSAarray = explode( "%", $MSAdata[module] );
$MSAdata[module] = $MSAarray[ 0 ];

#
#-----[ REPLACE WITH ]----------------------------------
#

//Start GT-NExtGEn mod
// Get Module Name
$MSAdata[module] = substr( stristr( $_SERVER['REQUEST_URI'], 'name='), 5 );
$tok = strtok( $MSAdata[module], "&" );
$MSAdata[module] = trim( eregi_replace( "_", " ", $tok ) );
if ( $MSAdata[module] == "" ) {
           $istapped = substr( stristr( $_SERVER['REQUEST_URI'], '.'), 1 );
           if ( $istapped == "html" OR $istapped == "php" ) {
           $MSAdata[module] = substr( stristr( $_SERVER['REQUEST_URI'], '/'), 1 );
           }
       }
$MSAarray = explode( "%", $MSAdata[module] );
$MSAdata[module] = $MSAarray[ 0 ];
//End GT-NExtGEn mod

I think that such an change should also be made in the file includes / monitor.php code written in previous posts. But I am not capable

Noon I used Shortlinks (THE EDITS MENTIONED IN THIS FILE ARE FOR CHATSERV 3.3 PATCHSET ONLY!) Because I had problems. I chose GT_Nextgens because as old as my phpnuke 6.9.

Hoping you can help me, thanks again for your availability.
Hello, Thank you very much. Dino.
 
View user's profile Send private message
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 397

PostPosted: Sun Aug 03, 2008 1:43 pm Reply with quote

I cannot help you with this specific issue but I just wanted to say that you should not be using an none patched version of nuke in a production environment, it is just not safe.
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunchlinear-bunchlinear-bunch