76

Re: Automatic Image Upload with Thumbnails

dude07 wrote:

Would it be unnecessarily difficult to mod this so the thumbnails link to an html page with the full sized image in it? With a common template that the images would display in?

You can do a slideshow type effect with Lightbox or Greybox, which would only need a rel tag adding to the code.

77

Re: Automatic Image Upload with Thumbnails

MattF wrote:
dude07 wrote:

Would it be unnecessarily difficult to mod this so the thumbnails link to an html page with the full sized image in it? With a common template that the images would display in?

You can do a slideshow type effect with Lightbox or Greybox, which would only need a rel tag adding to the code.

That would be pretty cool and web2.0 ish, but I'm stuck on dialup so lightboxes make me nuts..

Re: Automatic Image Upload with Thumbnails

The column with " User ID " in statistics seems to me is not necessary, and it should be cleaned.


Than use of such long address is caused. And the variable in the address meets two times.
/uploadimg_view.php?id=2&username=maximum&view=gallery

Can simplify the address up to.
/uploadimg_view.php?id=2

79

Re: Automatic Image Upload with Thumbnails

sirena wrote:

Just a possibly dumb basic question.

Without trying out the app in detail myself...

If this mod were installed on a punBB forum, could someone upload a php or perl file (or other executable file), rename it beforehand with a JPG extension perhaps, and then once it is on the server rename it and execute it?.

I am presuming that this can't happen (or anything similar) and that this app wouldn't let someone upload a malicious file onto a punBB web server. But some confirmation would be nice smile

I am curious because there seems to be a lot of file inclusion problems going around with PHP apps at the moment...

I don't think this is possible. Just to test this, I renamed a .exe and .php file to .jpg and tried to upload. The true filetype of both these files were recognized and they could not be uploaded.


thesaint wrote:

Try now to put a watermark thing in it....so every big version pic have a watermark.

im to stupid 4 it smile maybe something 4 you koos
http://www.litewebsite.com/SOURCECODE/L … class.phps

Thanks. I will check it out.


dude07 wrote:

Would it be unnecessarily difficult to mod this so the thumbnails link to an html page with the full sized image in it? With a common template that the images would display in?

This would be quite easy to do. Have you already got a template you want to use?


maximum wrote:

The column with " User ID " in statistics seems to me is not necessary, and it should be cleaned.

The User ID column was actually more useful in the previous versions - but now with the delete feature in this version, it might now be redundant. In previous versions the only way to delete files was through ftp - one then needed to see the userid, since your userid is used as the prefix of filenames.

maximum wrote:

Than use of such long address is caused. And the variable in the address meets two times.
/uploadimg_view.php?id=2&username=maximum&view=gallery

Can simplify the address up to.
/uploadimg_view.php?id=2

You're right - the reason I did it like this is I didn't want to access the database in the uploadimg_view.php file. The only place I access the database with this mod is in the statistics page. Maybe I'll change it in the next version.

80

Re: Automatic Image Upload with Thumbnails

Koos wrote:

dude07 wrote:
Would it be unnecessarily difficult to mod this so the thumbnails link to an html page with the full sized image in it? With a common template that the images would display in?

This would be quite easy to do. Have you already got a template you want to use?

Sure, just a basic html tamplate that I could mod later..

<html>
<head>
<title>forum</title>
</head>

<body>

<center>
<image>
<p><a href="">Back to Forum</a></p>
</center>

</body>
</html>

81

Re: Automatic Image Upload with Thumbnails

dude07 wrote:

Sure, just a basic html tamplate that I could mod later..

Must the thumbnail in the 'gallery view' of my mod link to a html page? Or the posted thumbnail in the forum?

82

Re: Automatic Image Upload with Thumbnails

So kind of you for taking the time, but both would be desirable, as I could control how they appear through css, etc..

83

Re: Automatic Image Upload with Thumbnails

Thanks for checking out those security issues Koos.

That makes me a [little] bit more confident in installing your script.

With forum spam already a big problem, I don't want extra [perhaps more serious] security headaches in running punBB associated with your script.

Trust no one. Online.

84

Re: Automatic Image Upload with Thumbnails

Koos wrote:
dude07 wrote:

Sure, just a basic html tamplate that I could mod later..

Must the thumbnail in the 'gallery view' of my mod link to a html page? Or the posted thumbnail in the forum?

Actually, only the forum thumbnail would matter, of course. Where is my brain again?

85 (edited by Koos 2007-05-01 22:04)

Re: Automatic Image Upload with Thumbnails

Koos wrote:
dude07 wrote:

Would it be unnecessarily difficult to mod this so the thumbnails link to an html page with the full sized image in it? With a common template that the images would display in?

This would be quite easy to do. Have you already got a template you want to use?

Hi - Here is an easy solution (for v1.3.1 of my mod) with which you don't have to edit any punbb files (just mod edit):

Note: This modification allows you to choose the name of the template file in the config. In my example I called it 'uploadimg_template.php'

#
#---------[ 1. OPEN ]-----------------------------------------------------------
#

uploadimg_config.php


#
#---------[ 2. FIND (line: 8) ]-----------------------------------------------
#

$tdir = "uploads/thumbs/";   // Path To Thumbnails Directory


#
#---------[ 3. AFTER, ADD ]--------------------------------------------------
#

$template_filename = "uploadimg_template.php";


#
#---------[ 4. CREATE NEW FILE 'uploadimg_template.php' WITH THE FOLLOWING CONTENTS ]-----
#

<?php

include "uploadimg_config.php";

$getfile = $_GET['filename'];

  //find forumurl:
  $domain = $_SERVER['HTTP_HOST']; // find out the domain:
  $path = $_SERVER['SCRIPT_NAME']; // find out the path to the current file:
  $urltemp = "http://" . $domain . $path ; // put it all together:
  $parts = Explode('/', $path);
  $currentFile = end($parts);
  $forumurl = substr($urltemp, 0, strpos($urltemp, "$currentFile"));
  
  $location = "$forumurl$idir$getfile";

?>

<html>
<head>
<title>forum</title>
</head>

<body>

<center>
<img src="<?php echo $location; ?>">

<p>
<a href="javascript: history.go(-1)">Back to forum</a></p>
</center>

</body>
</html>


#
#---------[ 5. OPEN ]-----------------------------------------------------------
#

uploadimg.php


#
#---------[ 6. FIND (line: 513) ]-----------------------------------------------
#

      echo "<br>".$lang_uploadimg['Copy and paste'].": <br>
       <textarea name='select' rows='6' cols='100'>
[url=.$forumurl.$idir.$file_prefix.$imagefilename.][img]".$forumurl.$tdir.$file_prefix.$imagefilename."[/img][/url]
</textarea>
</p>";


#
#---------[ 7. REPLACE WITH ]--------------------------------------------------
#

      echo "<br>".$lang_uploadimg['Copy and paste'].": <br>
       <textarea name='select' rows='6' cols='120'>
[url=".$forumurl.$template_filename."?filename=$file_prefix$imagefilename][img]".$forumurl.$tdir.$file_prefix.$imagefilename."[/img][/url]
</textarea>
</p>";


#
#---------[ 8. FIND (line: 255) ]-----------------------------------------------
#

       echo "<br>".$lang_uploadimg['Copy and paste'].": <br>
       <textarea name='select' rows='6' cols='100'>
[url=.$forumurl.$idir.$file_prefix.$imagefilename.][img]".$forumurl.$tdir.$file_prefix.$imagefilename."[/img][/url]
</textarea>
</p>";


#
#---------[ 9. REPLACE WITH ]--------------------------------------------------
#

       echo "<br>".$lang_uploadimg['Copy and paste'].": <br>
       <textarea name='select' rows='6' cols='120'>
[url=".$forumurl.$template_filename."?filename=$file_prefix$imagefilename][img]".$forumurl.$tdir.$file_prefix.$imagefilename."[/img][/url]
</textarea>
</p>";


#
#---------[ 10. OPEN ]-----------------------------------------------------------
#

uploadimg_view.php


#
#---------[ 11. FIND (line: 860) ]-----------------------------------------------
#

echo "<br>
       <textarea name='select' rows='6' cols='100'>
[url=.$forumurl.$idir.$_GET['filename'].][img]".$forumurl.$tdir.$_GET['filename']."[/img][/url]
</textarea>
  ";


#
#---------[ 12. REPLACE WITH ]--------------------------------------------------
#

echo "<br>
       <textarea name='select' rows='6' cols='120'>
[url=".$forumurl.$template_filename."?filename=$filename][img]"."$forumurl$tdir$filename"."[/img][/url]
</textarea>
  ";
  

#
#---------[ 13. FIND (line: 714) ]-----------------------------------------------
#

$getcode = "[url=.$forumurl.$idir.$filenm.][img]".$forumurl.$tdir.$filenm."[/img][/url]";


#
#---------[ 14. REPLACE WITH ]--------------------------------------------------
#

$getcode = "[url=".$forumurl.$template_filename."?filename=$filenm][img]".$forumurl.$tdir.$filenm."[/img][/url]";


#
#---------[ 15. SAVE/UPLOAD ]-------------------------------------------------
#

Upload all files to forum root.

Just make sure that every
[img]... and[/img]...
start on a seperate line in the code (hit Enter) - except in step 14. For some reason the punbb code tags put them all on the same line.

86

Re: Automatic Image Upload with Thumbnails

Re koos, i have a little probleme wich is not really a big probleme but looks strange:

Since last modifications we have make on your code (see previous post) my thumbtails images have an insanely crap quality, like theres only 256 color, exemple:

original:

http://www.flemflemflem.com/forums/uploads/2_1327207830__dsc7382p.jpg

http://www.flemflemflem.com/forums/uploads/thumbs/2_1327207830__dsc7382p.jpg

The fact is that i use mostly resized images cause this way they fit good on my website.

Can it be possible to generate one tumb, one resize (ie 500px large) and the original?

Thx lot'

87 (edited by dude07 2007-05-01 17:55)

Re: Automatic Image Upload with Thumbnails

thanks. It's done a little way we like to call "the right way."

now I can theme the output. very neat.


[edit]

I applied your image dither update that has now disappeared. hope I'm not in trouble, lol. (it's working fine tho)

88 (edited by Koos 2007-05-01 18:38)

Re: Automatic Image Upload with Thumbnails

onecut wrote:

Re koos, i have a little probleme wich is not really a big probleme but looks strange:

Since last modifications we have make on your code (see previous post) my thumbtails images have an insanely crap quality, like theres only 256 color, exemple:

New release available - v1.3.1.

Made some important improvements - including better image thumbnail and resize quality (true color)

See the changelog for the rest of the changes.

Re: Automatic Image Upload with Thumbnails

The community that I provide with a forum, is very lazy, so would it be possible to make a plugin to post.php and edit.php so that you could somehow click on a picture and it would automatically paste the code, kind of like the easy bbcode mod?

FluxBB - v1.4.8

Re: Automatic Image Upload with Thumbnails

Also, you should try to make a connection to the gallery mod. The upload and thumbnailing abilities of this mod combined with the gallery would be AAAAAmazing!!!

FluxBB - v1.4.8

91

Re: Automatic Image Upload with Thumbnails

I don't know about the name 'Image Hosting,' as that might denote that users are allowed to hotlink the images on other sites. Here's an image host that allows hotlinking as an example..

Glad to see this killer mod is quite active. Brilliant job you're doing.

92

Re: Automatic Image Upload with Thumbnails

dude07 wrote:

I don't know about the name 'Image Hosting,' as that might denote that users are allowed to hotlink the images on other sites. Here's an image host that allows hotlinking as an example..

Glad to see this killer mod is quite active. Brilliant job you're doing.

You're right. I changed it back. I was also feeling little bit uneasy about the name 'Image Hosting'.

Re: Automatic Image Upload with Thumbnails

I wrote:

Also, you should try to make a connection to the gallery mod.

So, how do you guys like that idea?

FluxBB - v1.4.8

94 (edited by Koos 2007-05-01 22:04)

Re: Automatic Image Upload with Thumbnails

lie2815 wrote:
I wrote:

Also, you should try to make a connection to the gallery mod.

So, how do you guys like that idea?

I haven't actually used the gallery mod myself - will try to look at it when I get a chance.

lie2815 wrote:

The community that I provide with a forum, is very lazy, so would it be possible to make a plugin to post.php and edit.php so that you could somehow click on a picture and it would automatically paste the code, kind of like the easy bbcode mod?

This would be quite handy, but most posted messages don't include images - so with this feature you will have to download images every time you post a message, which can become quite irritating.

dude07 - I have updated the template modification to work with v1.3.1.

Re: Automatic Image Upload with Thumbnails

koos wrote:

but most posted messages don't include images - so with this feature you will have to download images every time you post a message, which can become quite irritating

I didn't get that. Could you explain that again, please? I mean couldn't it just insert the bbcode img tag in the post that is provided under the picture? Kind of like the image upload mod. You could throw a look at that and try. Your other features are really good, just keep them. I would just say that that mod should be accessible from post.php and edit.php to insert pictures that have been uploaded before (or also offer an extra upload slot)...

FluxBB - v1.4.8

96

Re: Automatic Image Upload with Thumbnails

lie2815 wrote:

I mean couldn't it just insert the bbcode img tag in the post that is provided under the picture? Kind of like the image upload mod. You could throw a look at that and try. Your other features are really good, just keep them. I would just say that that mod should be accessible from post.php and edit.php to insert pictures that have been uploaded before (or also offer an extra upload slot)...

Thanks for the ideas. Will have a look at this.

Re: Automatic Image Upload with Thumbnails

Koos
I made a translation into Russian language. get

I have thought, and have decided to suggest you to add to the mod function of replacement "not latin" characters.

Table matches for the Russian language is attached. get

Just propose to change the structure of such:

Name | Size | Type | Date Modified | Code | Edit
user | 1KB | PNG | 25.04.07 17:06:39 | Get | Delete

98

Re: Automatic Image Upload with Thumbnails

maximum wrote:

Koos
I made a translation into Russian language. get

Thanks for the translation. Can you perhaps rename the file to .txt so that I can read it?


maximum wrote:

I have thought, and have decided to suggest you to add to the mod function of replacement "not latin" characters.

Table matches for the Russian language is attached. get

Do you really think this is necessary? Where will it be used?

Re: Automatic Image Upload with Thumbnails

It is very exact. Indeed, there is no latin characters in the file name will be replaced by "-" or "_". This applies not only to Russian language, but also in German, French etc.

100

Re: Automatic Image Upload with Thumbnails

Made another update - version 1.3.2 now available.

What's new in this version:

1. I added the following statement for allocating all necessary memory for image processing:

ini_set('memory_limit', '-1');

On some servers this will allow you to upload and resize almost any size image.

For example: I have 16MB of php memory - this allowed me to upload images of up to about 2000x1500pixels.
Bigger images would cause php memory max-out.

Now with this improved version I can upload and resize really massive images. I have even tried to upload a
4500x3375 pixel image and it worked perfectly! Perfect thumbnail creation and resize.

2. Added dimensions column to list of uploaded images. Now you can sort the list of uploaded image based on image size (area).

3. Transliterates filenames with umlauts, accents, ligatures and runes.
Instead of purging characters with umlauts and accents - they are now transliterated. For example:
löschen.jpg will save as loeschen.jpg
and
été.jpg as ete.jpg
etc.

4. Fixed bug resulting in interrupted uploads being saved.

5. Some other minor changes

The lang files have also been updated.