I have install 4.7.4 and the module from new. Tried both CVS and 4.7. versions, none works. When going to admin/fetchgals 4.7.4 version gives an error:

Fatal error: Call to undefined function: file_put_contents() in /home/sexez/public_html/modules/fetchgals/fetchgals.module on line 1026

Can you please consult on how to avoid this?

Comments

pobster’s picture

I believe that function only works on php5.0+...

After a quick bit of googling, I found this;

  if(!function_exists('file_put_contents')) {
    function file_put_contents($filename, $data, $file_append = false) {
      $fp = fopen($filename, (!$file_append ? 'w+' : 'a+'));
        if(!$fp) {
          trigger_error('file_put_contents cannot write in file.', E_USER_ERROR);
          return;
        }
      fputs($fp, $data);
      fclose($fp);
    }
  }

Just stick in the module right at the bottom and it should fix your problem.

Thanks

Pobster

yngens’s picture

Thank you, it fixed the problem. I have the module working. But another request if possible. I don't want to go to browse other sites. I thought module makes it possible to view pictures on your own site. I have checked the image directories and they are full of pictures, so why not to make html files to view only those files without going somewhere else. Is it possible?

pobster’s picture

The module already allows you to do this, if you just go to admin->menu you can enable the 'fetchgals pics' menu item which will allow you to view all your downloaded stuff.

I didn't set it to allow you to view this by default, because I felt that not many people would use it? You'll see why after you use it... The interface is awful... Sorry about that... I've no clue as to how to cache it and so it gets rebuilt *every* time you view a page, this makes it amazingly slow and clunky. Still you can turn off the 'view pictures' in the settings and just have it rebuild text links to make it quicker.

Pobster

pobster’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)