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
  #772  
Old 07-20-2017, 08:01 AM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kane@airrifle View Post
A work around for the PB issue. edit /includes/cron/iei_cron; after line 268 add:

Code:
if (is_numeric(stripos($url, 'photobucket')))
    {
        curl_setopt($ch, CURLOPT_REFERER, 'http://www.photobucket.com/');
    }
I have tested it on a few known blocked PB images and it imports them just fine.

*not my code, was posted elsewhere by "IA1"
For my clarity ...

I donated via PayPal and have run y2ksw's for many many years. It's been fantastic and one of the most popular add-ons our members comment on.

My question ... since it's been running for so long and we already have thousands of PB pics imported onto our server, am I correct in assuming that this code change permits members to continue IMG'ing PB pics and they will still import?

In other words, this code fix works around PB's block and returns us to the status quo of what it used to be?

Thanks for any feedback?

Regards,
Doug

Edit: I don't have a line counter in my editor, so what does the code that appears before this look like so I'm sure to put this in the right place, if I do i... thanks ..
Reply With Quote
  #773  
Old 07-20-2017, 12:12 PM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doug, the PB fix will work until such time as they find a means to obfusticate it again.

In the iei_cron.php file look for the following code and add the PB code directly after it:

Code:
@curl_setopt($ch, CURLOPT_REFERER, IEI_BBURL);
In the long run it would assist you greatly if you used something like Notepad++ to edit your files with: https://notepad-plus-plus.org/
Reply With Quote
  #774  
Old 07-20-2017, 12:16 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kane@airrifle View Post
Doug, the PB fix will work until such time as they find a means to obfusticate it again.

In the iei_cron.php file look for the following code and add the PB code directly after it:

Code:
@curl_setopt($ch, CURLOPT_REFERER, IEI_BBURL);
In the long run it would assist you greatly if you used something like Notepad++ to edit your files with: https://notepad-plus-plus.org/
Thank you partner....

Appreciate the quick response .. :up:

Regards,
Doug

ps: I'm on a MacBook Pro OSX operating system ..

pss: Ok, I've now inserted it for testing and it looks like this... seem like the right place?

Code:
  if(USE_CURL)
    {
        $ch = @curl_init($url);
        @curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
        @curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        @curl_setopt($ch, CURLOPT_FAILONERROR, 1);
        @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
        @curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, IEI_CONNECTTIMEOUT);
        @curl_setopt($ch, CURLOPT_TIMEOUT, IEI_CURL_TIMEOUT);
        @curl_setopt($ch, CURLOPT_REFERER, IEI_BBURL);
if (is_numeric(stripos($url, 'photobucket')))
    {
        curl_setopt($ch, CURLOPT_REFERER, 'http://www.photobucket.com/');
    }
        //@curl_setopt($ch, CURLOPT_USERAGENT, IEI_FORUMDOMAIN);
        $contents = @curl_exec($ch);
        @curl_close($ch);
    }
psss: Well I ran it anyway and it didn't crash (see pic), so I guess I have to wait now until I can get someone to try a PB pic, as I don't use their service...
Attached Images
File Type: png Screen Shot 2017-07-20 at 10.33.10 AM.png (25.7 KB, 0 views)
Reply With Quote
  #775  
Old 07-20-2017, 12:24 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
For my clarity ...

I donated via PayPal and have run y2ksw's for many many years. It's been fantastic and one of the most popular add-ons our members comment on.

My question ... since it's been running for so long and we already have thousands of PB pics imported onto our server, am I correct in assuming that this code change permits members to continue IMG'ing PB pics and they will still import?

In other words, this code fix works around PB's block and returns us to the status quo of what it used to be?

Thanks for any feedback?

Regards,
Doug

Edit: I don't have a line counter in my editor, so what does the code that appears before this look like so I'm sure to put this in the right place, if I do i... thanks ..
Sooner or later they will elaborate more and will not accept only their base url as a referrer. Until then, this code modification should work.
Reply With Quote
  #776  
Old 07-20-2017, 12:25 PM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
ps: I'm on a MacBook Pro OSX operating system ..
Try something like Atom then: https://atom.io/
Reply With Quote
  #777  
Old 07-20-2017, 12:27 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kane@airrifle View Post
Try something like Atom then: https://atom.io/
Thanks again .. :up:

Regards,
Doug
Reply With Quote
  #778  
Old 07-21-2017, 05:41 AM
The_Hawk The_Hawk is offline
 
Join Date: Aug 2009
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kane@airrifle View Post
A work around for the PB issue. edit /includes/cron/iei_cron; after line 268 add:

Code:
if (is_numeric(stripos($url, 'photobucket')))
    {
        curl_setopt($ch, CURLOPT_REFERER, 'http://www.photobucket.com/');
    }
I have tested it on a few known blocked PB images and it imports them just fine.

*not my code, was posted elsewhere by "IA1"
You Sir, are a legend! (and so is IA1 for this remarkably simple fix!!)

It's ticking away nicely pulling images as we speak! I'm sitting on the edge of my seat watching it and testing images as they pull down to make sure they are continuing to work... LOVE IT!!

Quote:
Originally Posted by Kane@airrifle View Post
Try something like Atom then: https://atom.io/
I like BBEdit on the Mac and Notepad++ on Windows. My old job used to use EM Editor which was great for very large files (1M+ lines files dumped from finance systems), but Notepad++ works fine for my coding needs.

BBEdit:
http://www.barebones.com/

EM Editor:
https://www.emeditor.com/
Reply With Quote
Благодарность от:
Kane@airrifle
  #779  
Old 07-25-2017, 09:22 AM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kane@airrifle View Post
A work around for the PB issue. edit /includes/cron/iei_cron; after line 268 add:

Code:
if (is_numeric(stripos($url, 'photobucket')))
    {
        curl_setopt($ch, CURLOPT_REFERER, 'http://www.photobucket.com/');
    }
I have tested it on a few known blocked PB images and it imports them just fine.

*not my code, was posted elsewhere by "IA1"
Just a follow up and again, a huge thank you for this quick fix (for now)... :up:

It's working beautifully and being a research site for over 29,000 retired veterans, is extremely valuable to our members... much appreciated...

We've been using y2ksw's outstanding add-on for over 7 years and the accumulated amount of important Photo Bucket research pics that have been preserved (saved) by his mod over the years is measured in the 10's of thousands.

Your temporary fix allows that to continue with new pics, at least until Photo Bucket catches up with it.

Regards,
Doug
Reply With Quote
  #780  
Old 07-25-2017, 12:34 PM
rkrenicki rkrenicki is offline
 
Join Date: Dec 2014
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think I am missing something real simple here.. but I am not finding a log entry for this mod. Does this not have logging functions, or am I missing where to enable it?

EDIT: Nevermind, i found it and it is logging now.
Reply With Quote
  #781  
Old 07-25-2017, 01:10 PM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not set to log the cron action by default but it does write the imports (old_url - new_url) to a DB table called "iei_img"
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 01:16 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05665 seconds
  • Memory Usage 2,378KB
  • 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
  • (6)bbcode_code
  • (8)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
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (21)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (6)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