1 (edited by madvic 2011-03-17 11:33:26)

Topic: pathinfo_filename

Hello,
Another problem with this fonction :

admin\inc\plugin_function.php line 156

In php > 5.2 :

$pathName= pathinfo_filename($caller['file']); 
echo $pathName;  -> exemple with plugin GSgallery 2.0 : squareit-gallery

In php 5.1.3 :

$pathName= pathinfo_filename($caller['file']); 
echo $pathName;  -> exemple with plugin GSgallery 2.0 : mnt/101/sda/5/d/madvic/plugins/squareit-gallery

Re: pathinfo_filename

ok, so 5.1.3, the filename is the full path instead of just the name?

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!

Re: pathinfo_filename

GetSimple minimal requirement is PHP 5.2, should we work on supporting earlier PHP versions?

Re: pathinfo_filename

@ccagle8 : Yes, and the plugin don't work.

@Joshas: I know, but 'pathinfo' is just the only problem I encountered and the problem is solve by a function 'pathinfo_filename'.

Re: pathinfo_filename

Joshas wrote:

GetSimple minimal requirement is PHP 5.2, should we work on supporting earlier PHP versions?

I feel like if it's not too much work, then we should make an attempt. PHP4 = NO, but anything above 5.1 i think we should try.

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!

Re: pathinfo_filename

@madvic - if you have php 5.1.3, can you try and fix that function so it returns only the filename? I don't have that version - and cant easily find a fix for it that works (not that i could test it anyway)

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!

Re: pathinfo_filename

ok, no problem.

8 (edited by Oleg06 2011-03-18 16:54:10)

Re: pathinfo_filename

why when I turn in gsconfig.php 55 line define ('GSEDITORLANG', 'ru');, I can not edit a page?
I copied the file ru.js from version 2.03 py

Re: pathinfo_filename

@Oleg: http://code.google.com/p/get-simple-cms … tail?r=407

- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!

10 (edited by Oleg06 2011-03-18 17:05:36)

Re: pathinfo_filename

yes earned
general system is improved
simply super

Re: pathinfo_filename

ccagle8 wrote:

@madvic - if you have php 5.1.3, can you try and fix that function so it returns only the filename? I don't have that version - and cant easily find a fix for it that works (not that i could test it anyway)


and here :

function pathinfo_filename($file) {
   if (defined('PATHINFO_FILENAME')) return pathinfo($file,PATHINFO_FILENAME);
   $path_parts = pathinfo($file);

   if(isset($path_parts['extension']) && ($file!='..')){
        return substr($path_parts['basename'],0 ,strlen($path_parts['basename'])-strlen($path_parts['extension'])-1);
    }
    else{
        return $path_parts['basename'];
    }
}