Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pathinfo_filename
#1
Hello,
Another problem with this fonction :

admin\inc\plugin_function.php line 156

In php > 5.2 :

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

Code:
$pathName= pathinfo_filename($caller['file']);
echo $pathName;  -> exemple with plugin GSgallery 2.0 : mnt/101/sda/5/d/madvic/plugins/squareit-gallery
Reply
#2
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!
Reply
#3
GetSimple minimal requirement is PHP 5.2, should we work on supporting earlier PHP versions?
Reply
#4
@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'.
Reply
#5
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!
Reply
#6
@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!
Reply
#7
ok, no problem.
Reply
#8
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
Reply
#9
@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!
Reply
#10
yes earned
general system is improved
simply super
Reply
#11
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 :
Code:
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'];
    }
}
Reply




Users browsing this thread: 1 Guest(s)