[ABD] Upload Image

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: [DEV] Upload Image

Post by John P » Mon Jan 05, 2015 10:37 am

Thanks Holger, merged
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign

User avatar
spaceace
Registered User
Posts: 1857
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [DEV] Upload Image

Post by spaceace » Wed Jan 07, 2015 12:31 am

just for anyone that wants to know...

John P did a great job trying to figure out the issue i had with this extension. but ultimately, i can not use it as i would have to change my server configuration as this extension works entirely separate from phpBB and runs solely from the server side php. the script is not able to set file permissions to what is required to view the images. we worked on this without the SEO extension being active so it might not be an issue for others ;)

even though i can't use it, it's a great extension :D

User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: [DEV] Upload Image

Post by John P » Wed Jan 07, 2015 7:42 pm

It is said in a wrong way, the extension uses phpbb function for uploading but the user running php at his website isn't his webserver and therefore the webserver doesn't have access to the uploaded images and can't serve them. Beside of that is chmod the image file not possible by his php user.
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign

User avatar
spaceace
Registered User
Posts: 1857
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [DEV] Upload Image

Post by spaceace » Wed Jan 07, 2015 8:41 pm

i have a small php script to chmod all the files and recursive directories within and it works like a charm :D

Code: Select all

<?

  header('Content-Type: text/plain');

  /**
  * Changes permissions on files and directories within $dir and dives recursively
  * into found subdirectories.
  */
  function chmod_r($dir, $dirPermissions, $filePermissions) {
      $dp = opendir($dir);
       while($file = readdir($dp)) {
         if (($file == ".") || ($file == ".."))
            continue;

        $fullPath = $dir."/".$file;

         if(is_dir($fullPath)) {
            echo('DIR:' . $fullPath . "\n");
            chmod($fullPath, $dirPermissions);
            chmod_r($fullPath, $dirPermissions, $filePermissions);
         } else {
            echo('FILE:' . $fullPath . "\n");
            chmod($fullPath, $filePermissions);
         }

       }
     closedir($dp);
  }

  chmod_r(dirname(__FILE__), 0755, 0755);
?>
it changes any and all files in the directory to the set permissions. my fix is to upload the files using the extension, then run the script... simple solution to my problem :D

User avatar
FoFa
Registered User
Posts: 200
Joined: Wed Dec 03, 2008 9:21 am
Name: Daniel L.
Contact:

Re: [DEV] Upload Image

Post by FoFa » Wed Jan 07, 2015 8:55 pm

There is a simple way to chmod every image when uploading it. I did it on my board will post when possible.
Formly ForumsFaciles :wink:

User avatar
Mauron
Registered User
Posts: 342
Joined: Wed Jul 16, 2014 11:25 am

PR

Post by Mauron » Wed Jan 14, 2015 5:00 am

PR for Italian translation.

User avatar
spaceace
Registered User
Posts: 1857
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [DEV] Upload Image

Post by spaceace » Sun Jan 18, 2015 2:33 am

ForumsFaciles wrote:There is a simple way to chmod every image when uploading it. I did it on my board will post when possible.
still very interested in seeing how you've done it ;)

User avatar
FoFa
Registered User
Posts: 200
Joined: Wed Dec 03, 2008 9:21 am
Name: Daniel L.
Contact:

Re: [DEV] Upload Image

Post by FoFa » Sun Jan 18, 2015 11:17 am

Sorry, forgot it...

Open: ext/forumhulp/uploadimage/controller/admin_controller.php

Find:

Code: Select all

        $download_url = $upload_dir . $file->realname; 
REPLACE with:

Code: Select all

        $download_url = chmod($upload_dir . $file->realname, 0775); 
That's all.
Formly ForumsFaciles :wink:

User avatar
spaceace
Registered User
Posts: 1857
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [DEV] Upload Image

Post by spaceace » Sun Jan 18, 2015 1:19 pm

ForumsFaciles wrote:Sorry, forgot it...

Open: ext/forumhulp/uploadimage/controller/admin_controller.php

Find:

Code: Select all

        $download_url = $upload_dir . $file->realname;
REPLACE with:

Code: Select all

        $download_url = chmod($upload_dir . $file->realname, 0775);
That's all.
works perfect. thank you :D

User avatar
aurquiel
Registered User
Posts: 243
Joined: Fri May 15, 2009 1:45 am

Re: [DEV] Upload Image

Post by aurquiel » Wed Feb 25, 2015 3:23 am

Debug on

Code: Select all

[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file

User avatar
spaceace
Registered User
Posts: 1857
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [DEV] Upload Image

Post by spaceace » Wed Feb 25, 2015 11:45 am

aurquiel wrote:Debug on

Code: Select all

[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
[phpBB Debug] PHP Notice: in file [ROOT]/ext/forumhulp/uploadimage/controller/admin_controller.php on line 205: Undefined index: file
i fixed that one when i first installed it and forgot about it :lol:

open forumhulp/uploadimage/controller/admin_controller.php
find

Code: Select all

'DELLURL'	=> $this->u_action . '&action=delete&image_id=' . rawurldecode($image_list[$i]['file'])
inline find

Code: Select all

'file'
replace with

Code: Select all

'filename'
that fixed it for me ;)

User avatar
John P
Registered User
Posts: 1237
Joined: Mon Jan 21, 2008 3:55 pm
Location: Netherlands
Name: John
Contact:

Re: [DEV] Upload Image

Post by John P » Sat Aug 08, 2015 7:02 pm

Just released RC7
Sorting added
Image
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign

User avatar
Fast_Eddie
Registered User
Posts: 206
Joined: Tue Jun 09, 2015 8:32 pm
Name: Ed

Re: [DEV] Upload Image

Post by Fast_Eddie » Tue Jan 19, 2016 12:01 pm

I have not seen anyone in this topic with this issue, so here goes. I downloaded the extension through the d/l link. UN-zipped it, made the needed directory's and uploaded. When i went to enable the extension it bombs out saying it's missing the helper.php and can not enable. It gives a link to the file on gethub. But no way to d/l it. I can copy and paste into a new file but i have no idea how to save it php format. I tried to d/l the whole zip file again. And once again the file helper.php is not included in zip file to d/l

User avatar
dmzx
Registered User
Posts: 774
Joined: Fri Sep 05, 2014 6:48 am
Location: The Netherlands
Contact:

Re: [DEV] Upload Image

Post by dmzx » Tue Jan 19, 2016 6:46 pm

Fast_Eddie wrote:I have not seen anyone in this topic with this issue, so here goes. I downloaded the extension through the d/l link. UN-zipped it, made the needed directory's and uploaded. When i went to enable the extension it bombs out saying it's missing the helper.php and can not enable. It gives a link to the file on gethub. But no way to d/l it. I can copy and paste into a new file but i have no idea how to save it php format. I tried to d/l the whole zip file again. And once again the file helper.php is not included in zip file to d/l
https://github.com/ForumHulp/helper and click on download zip.
Install it as en extension in forumhulp/helper
Contact me on dmzx-web.net
 Need a Host or buy me a beer Donate and try binance.com

User avatar
spaceace
Registered User
Posts: 1857
Joined: Wed Jan 30, 2008 8:50 pm
Contact:

Re: [DEV] Upload Image

Post by spaceace » Tue Jan 19, 2016 10:37 pm

dmzx wrote:https://github.com/ForumHulp/helper and click on download zip.
Install it as en extension in forumhulp/helper
so you have to install an extra extension to use this one now?

edit: so why not just include it with the extensions?

Locked

Return to “Abandoned Extensions”