Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Import External Images Details »»
Import External Images
Version: 1.0.5, by y2ksw y2ksw is offline
Developer Last Online: Feb 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 4.x.x Rating:
Released: 11-06-2010 Last Update: 02-13-2011 Installs: 300
DB Changes Uses Plugins
Additional Files Translations  
No support by the author.

This vBulletin 4 product imports external images in your posts from external servers or paths into a specific path, normally your forum's image folder.

Differently than the previous product Image Cache for vBulletin 3.x., it parses the posts at regular intervals for new images and replaces the external references in the background. Also, instead of using only a single folder, it creates folders for years and months, making it much easier to handle large quantities of images. The source and destination image URL's are stored into database, too, avoiding unnecessary duplicates.

It moves and optionally converts images from one place to another. It is a handy tool in order to keep your images local to your forums.

Version 1.0.4 is temporarily in BETA stage until the users have confirmed the newly requested features.
Version 1.0.5 is still in BETA stage. It adds a new bunch of additional features, one of which allows you to test your mathematical understanding ... and a few other to fine-tune CURL and socket timeouts, and resizing on the fly of too large images. If you don't know what these options do, please leave them at their default values.

Download Now

File Type: zip 1.0.2.iei4.zip (80.0 KB, 477 views)
File Type: zip 1.0.4.iei4.zip (84.5 KB, 185 views)
File Type: zip 1.0.5.iei4.zip (87.5 KB, 2158 views)

Screenshots

File Type: jpg 08-11-2010-11.32.53.jpg (112.4 KB, 0 views)
File Type: jpg 02-02-2011-22.06.39.jpg (126.0 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #122  
Old 01-24-2011, 09:23 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BadgerDog View Post
Wouldn't it be better to process the oldest threads first, simply because users who fail to renew their off-site storage, or their free 30 day trials run out, would get those pics moved internally first so there's less chance of ending up with missing pics when that happens?

By the way, thanks for the tips ..

Regards,
Doug
The way I looked at it were older threads probably already are missing images so they don't matter as much... I'm sure it can be debated either way.
Reply With Quote
  #123  
Old 01-25-2011, 01:18 AM
jimsflies jimsflies is offline
 
Join Date: Aug 2009
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've gone back and forth with this issue (photo links being broken) and using this mod. How hard is it, if a member asks to have his or her photos removed to remove them from the server? I think the members still own the copyright to their photos and if they wish to pull it, it ultimately is their prerogative, right?
Reply With Quote
  #124  
Old 01-25-2011, 02:01 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In my terms of service (and just about every forum TOS I ever saw) the simple act of posting anything on your forum be it text or picture grants you an irrevocable lifetime license to do with the content as you please. If the user owns the copyright they grant you a license to display it forever. The issue arises when a user posts an image they don't own the copyright to... in that case what is supposed to happen is the copyright holder sends you a take down notice you must comply with or face a lawsuit in which case you should comply.

However there is one well known company skipping the take down notice and going right to the lawsuits so it is a tough call.
Reply With Quote
  #125  
Old 01-25-2011, 07:13 AM
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Location: Italy
Posts: 1,418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
I want to suggest one more change I've used successfully on my test forum that may be of use to people with established forums.

In that query change ORDER BY postid to ORDER BY postid DESC so that the newest threads are processed first since it might take days or weeks to process a large existing forum.
So the current option requests are:
  • make it possible to include and/or exclude forum sections
  • change the order
Reply With Quote
  #126  
Old 01-25-2011, 07:19 AM
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Location: Italy
Posts: 1,418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jimsflies View Post
I've gone back and forth with this issue (photo links being broken) and using this mod. How hard is it, if a member asks to have his or her photos removed to remove them from the server? I think the members still own the copyright to their photos and if they wish to pull it, it ultimately is their prerogative, right?
I think it would be very difficult to accomplish this, because how would you handle quotes?

If I do delete posts (rarely), I hide the whole thread the author has started, but will not touch any of quoted and otherwise copied posts. Including photos. As for the Terms of Service (TOS), I never will delete any post. It has been saving me several times from getting sued by forum fighters
Reply With Quote
  #127  
Old 01-25-2011, 12:44 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

y2ksw, if you're taking feature requests, here is some code I made to keep the original file names...

1) It takes only the file name, not the path-
2) It strips all non alpha-numeric characters besides underscores
3) It sets a max length and truncates any characters over the max length
4) It still appends an integer number to the end so there will never be any file name conflicts.

I added 1 new function replacing iei_getfile_index with:
PHP Code:
//Custom Code To Save Filename
function iei_get_file_index_name(&$path, &$extension$oldfilename)
{
   
//Get only the file name (no directory info)
   
$oldfilename basename ($oldfilename$extension);
   
//Strip out non alpha-numeric characters
   
$oldfilename preg_replace("#[^A-Za-z0-9_]#"""$oldfilename );
   
//Set max file name length to 40 characters
   
$oldfilename substr($oldfilename040);
   
   
//Increment number if file exists
    
for($i 1;; $i++)
    {
        
$filename "$path/$oldfilename-$i.$extension";
        if(!
file_exists($filename))
        {
            return 
$filename;
        }
    }

And then the call to the function under the //Get File Index comment I changed it to:
PHP Code:
  $filename iei_get_file_index_name($path$extension$value); 
And it's working great... brings in the files with their own (clean) names... In the off chance the file has the same name as another one, it increments the counter by 1 so they always save with a unique name.

Feel free to use some, all, or none of this as you see fit. :up:
Reply With Quote
  #128  
Old 01-26-2011, 11:57 AM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
y2ksw, if you're taking feature requests, here is some code I made to keep the original file names...
I'm an old Fortran programmer out of the 60's, so in order to save us the potential of screwing up the existing PHP file patching it, is there any chance of getting a copy of yours for testing with those changes already made? Thanks ..

Second, any idea how long you think it would take to run a 150,000 post forum through this process at 10 posts per shot?

Regards,
Doug
Reply With Quote
  #129  
Old 01-26-2011, 12:50 PM
210665 210665 is offline
 
Join Date: Feb 2009
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
If it does not work at all, probably your server cannot use sockets, CURL or is locked out for retrieving web content by a firewall.

PS: Have you enabled the product after installing?
Yes I have activated after the installation
curl but I really should be enabled
Reply With Quote
  #130  
Old 01-26-2011, 08:34 PM
y2ksw's Avatar
y2ksw y2ksw is offline
 
Join Date: Aug 2003
Location: Italy
Posts: 1,418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BadgerDog View Post
I'm an old Fortran programmer out of the 60's, so in order to save us the potential of screwing up the existing PHP file patching it, is there any chance of getting a copy of yours for testing with those changes already made? Thanks ..

Second, any idea how long you think it would take to run a 150,000 post forum through this process at 10 posts per shot?

Regards,
Doug
This depends on the posts with images, external servers, script timeout, computing power of servers. On one of my customers site with a top class server, it took 1 week to catch up the latest post, out of about 900.000 posts with about 15% posts with images and a cronjob every one minute (all *).
Reply With Quote
  #131  
Old 01-27-2011, 12:28 AM
OldSchoolDSL OldSchoolDSL is offline
 
Join Date: Oct 2010
Posts: 1,196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Question:

Wouldn't this eat bandwidth? I mean technically speaking, the more photos on your site that have to load... The slower things become, right?

I'm sure this helps in some way... I just lack the vision at this moment to see it.

Not to add the idea that it would add to your file system?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05997 seconds
  • Memory Usage 2,376KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (20)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete