Jump to content

Andrei Dinca

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Andrei Dinca's Achievements

Newbie

Newbie (1/14)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

0

Reputation

  1. Hi, I have the same problem, so I created this simple script for testing purpose. You should put this script into your_prestashop_install/modules/ and change the $rootPath = './azon'; with your module folder path. Thanks, Andrei D. <?php function scanDirRecursive($directory, $regex=null, $get="file", $useFullPath=false, &$dirs=[], &$files=[]) { $iterator = new DirectoryIterator ($directory); foreach($iterator as $info) { $fileDirName = $info->getFilename(); if ($info->isFile () && !preg_match("#^\..*?#", $fileDirName)) { if($get == 'file' || $get == 'both'){ if($regex) { if(preg_match($regex, $fileDirName)) { if ($useFullPath) { $files[] = $directory . DIRECTORY_SEPARATOR . $fileDirName; } else { $files[] = $fileDirName; } } }else{ if($useFullPath){ $files[] = $directory . DIRECTORY_SEPARATOR . $fileDirName; }else{ $files[] = $fileDirName; } } } }else if ($info->isDir() && !$info->isDot()) { $fullPathName = $directory . DIRECTORY_SEPARATOR . $fileDirName; if($get == 'dir' || $get == 'both') { $dirs[] = ($useFullPath) ? $fullPathName : $fileDirName; } scanDirRecursive($fullPathName, $regex, $get, $useFullPath, $dirs, $files); } } if($get == 'dir') { return $dirs; }else if($get == 'file'){ return $files; } return ['dirs' => $dirs, 'files' => $files]; } $rootPath = './azon'; $regex = "#(\.php$)#"; $php_files = scanDirRecursive($rootPath, $regex, 'file', true); $html_tags = array( "a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr" ); foreach( $php_files as $file ){ $file_content = file_get_contents( $file ); if( trim($file_content) != "" ){ echo "<h2>" . ( $file ) . "</h2>"; foreach( $html_tags as $html_tag ){ $pos = strpos( $file_content, "<" . $html_tag ); if( $pos != false ){ var_dump( "<pre>", htmlspecialchars( substr($file_content, $pos, ( strpos($file_content, PHP_EOL, $pos) ) - $pos) ) , "</pre>" ) ; } } } }
  2. Hi, I need to modify the "fields_value" from products edit page. How can I use: action<AdminControllerName>FormModifier on my custom module for doing this? I've tried to use the hook like: "actionAdminProductsFormModifier" or "actionProductControllerFormModifier" but with no luck. Any help? Thanks.
  3. I implemented an override of the function getThumbnailForListing from ImageManager Class. Nothing happens this override doesn't work. Does anyone know if this override is allowed in PS 1.7, and if yes why it doesn't work ? Thanks in advance for your help.
×
×
  • Create New...