Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 04:48:15 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149621 Posts in 21098 Topics by 7537 Members
Latest Member: lotte2
* Home Help Search Login Register
Pages: 1 [2]   Go Down
Print
Author Topic: Module Version Checker  (Read 6338 times)
sporrencense

Offline Offline

Posts: 34


« Reply #25 on: February 19, 2008, 07:01:25 PM »

Thanks
Logged
sstvmaster1

Offline Offline

Posts: 7


« Reply #26 on: April 17, 2008, 06:31:47 PM »

Hi,

!!! PLEASE UPDATE !!!

replaces:

$server -> $server_version
$lokal -> $lokal_version



I have tried to improve the Version Checker module.

Please replace the code from line 152 to 161 in tool.php.

German:

da mich schon seit längerem die Anzeige im Version Checker stört, habe ich mal versucht das zu verbessern.

Bitte dazu in der tool.php zeile 152 - 161 durch folgendes ersetzen:

Code:
                   $server_version = preg_replace('/([a-zA-Z]*)/i', '', trim($servermods[$localmods['directory']]));
                    $lokal_version = preg_replace('/([a-zA-Z]*)/i', '', trim($module_version));
                    if($lokal_version < $server_version) {
                        echo '<img src="'.WB_URL.'/modules/modcheck/nocheck.png">';
                    } elseif (trim($servermods[$localmods['directory']]) == '') {
                        echo '<img src="'.WB_URL.'/modules/modcheck/unknown.png">';
                    } else {
                        echo '<img src="'.WB_URL.'/modules/modcheck/check.png">';
                    }
                } else {
                    echo '<img src="'.WB_URL.'/modules/modcheck/unknown.png">';
                }


Maik
« Last Edit: April 18, 2008, 08:02:47 PM by sstvmaster1 » Logged
elChaka

Offline Offline

Posts: 2


« Reply #27 on: May 07, 2008, 11:12:10 PM »

Hello "sstvmaster1",

this is realy nice!
I've installed version 0.71 and how they mark, if the server and local version is the same is, realy terrible.

I hope they will use your "improvement" in version 0.72 Smiley

btw: After the changes, newer local versions as the one on the remote server will not anymore marked with an RED "X" (for all who don't know what happens after the changes)

Thx,
i've done your changes!
« Last Edit: May 07, 2008, 11:15:52 PM by elChaka » Logged
sstvmaster1

Offline Offline

Posts: 7


« Reply #28 on: May 08, 2008, 12:15:17 PM »

Hi,

I've improved my script, now it does also checks the letter of the version number.

Please replace the code from line 152 to 161 in tool.php into this new code:
Code:
$server_version_num = preg_replace('/([a-zA-Z]*)/i', '', trim($servermods[$localmods['directory']]) );
$lokal_version_num = preg_replace('/([a-zA-Z]*)/i', '', trim($module_version));
$server_version_alpha = preg_replace('/([0-9]\.*)/i', '', trim($servermods[$localmods['directory']]) );
$lokal_version_alpha = preg_replace('/([0-9]\.*)/i', '', trim($module_version));

    if ("$lokal_version_num" < "$server_version_num" || "$lokal_version_alpha" < "$server_version_alpha") {
        echo '<img src="'.WB_URL.'/modules/modcheck/nocheck.png">';
    } elseif (trim($servermods[$localmods['directory']]) == '') {
        echo '<img src="'.WB_URL.'/modules/modcheck/unknown.png">';
    } else {
        echo '<img src="'.WB_URL.'/modules/modcheck/check.png">';
    }
} else {
    echo '<img src="'.WB_URL.'/modules/modcheck/unknown.png">';
}

Maik
Logged
elChaka

Offline Offline

Posts: 2


« Reply #29 on: May 08, 2008, 10:49:23 PM »

thx again Wink ive modified my tool.php

but if someone copy the code above, he or she have to replace from line 152 to 166 Wink in tool.php. (that was in my tool.php!)

actually i don't see any changes, but i suppose thats because my plugins don't use a letter in the version number...
Logged
Pages: 1 [2]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!