Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

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
  #792  
Old 10-11-2017, 08:26 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 VCCN View Post
Update: seems like PB has blocked this now. Alot of PB-pictures is not changed according to log, when i check the actual post, and add ~ behind the .jpg the picture works fine :-(

Edit: checked the table and many PB-pictures is downloaded, and some is not. hmm
If some images do not download, it may be that some PB accounts are simply moved elsewhere.
Reply With Quote
  #793  
Old 10-11-2017, 08:40 AM
VCCN VCCN is offline
 
Join Date: Jan 2015
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by y2ksw View Post
If some images do not download, it may be that some PB accounts are simply moved elsewhere.
Don't think so.
If i check a post that is "Not changed" according to log - i find the "you must upgrade your PB" picture. If i copy the URL and open it up in a browser, picture is showing up.
Not sure why, maybe because of the time out?
Anyway, how can i rerun this plugin on the whole forum? Let's say the plugin has scanned and downloaded all pictures and i want to start over - how do i do it?
Reply With Quote
  #794  
Old 10-12-2017, 07:05 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 VCCN View Post
Don't think so.
If i check a post that is "Not changed" according to log - i find the "you must upgrade your PB" picture. If i copy the URL and open it up in a browser, picture is showing up.
Not sure why, maybe because of the time out?
Anyway, how can i rerun this plugin on the whole forum? Let's say the plugin has scanned and downloaded all pictures and i want to start over - how do i do it?
The point is, in any case, a server is not a browser. When simple attempts to fake a browser fail, then you have two options: you develop a software which handles that specific case and repair it every time something changes, or you say: impossible.

I do not have time to watch PB developers, so to me it's the second option
Reply With Quote
Благодарность от:
scottkoz20
  #795  
Old 10-23-2017, 02:53 PM
BGObsession's Avatar
BGObsession BGObsession is offline
 
Join Date: Apr 2009
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The_Hawk View Post
So I've had a few messages back and forth with y2ksw, which has been brilliant.

The latest advice was the PHP might be silently crashing and wanted more memory. I've been slowly upping the max_memory (as I didn't want to go unlimited just yet) and it's running again. I'm somewhere north of 40,000 images checked so far (excluding photobucket) and I'm currently running at only about 40% of links being found. To be fair this is
2005 - 2011 so it's less of a surprise but really does ram home the need to run a script like this one if possible.
I believe I am experiencing this as well. I installed this mod in order to overcome the 'mixed content' warnings and so far it is not working for me. I see a few images have been added to the 'imported' image folder, but just a few, and I also get the 'Done' (and only 'Done') message when I manually run the cron.job.

When you say you are 'upping the max_memory' (or to set it to 'unlimited') - where are those adjustments done - is that within the vB admin panel somewhere, or are you talking about a server setting. How can I adjust this in order to get the cron job to completely run. And I'm assuming if this is working 100% correctly, that I should see the mixed content warnings disappear immediately - is that right?
Reply With Quote
  #796  
Old 10-24-2017, 09:03 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 BGObsession View Post
I believe I am experiencing this as well. I installed this mod in order to overcome the 'mixed content' warnings and so far it is not working for me. I see a few images have been added to the 'imported' image folder, but just a few, and I also get the 'Done' (and only 'Done') message when I manually run the cron.job.

When you say you are 'upping the max_memory' (or to set it to 'unlimited') - where are those adjustments done - is that within the vB admin panel somewhere, or are you talking about a server setting. How can I adjust this in order to get the cron job to completely run. And I'm assuming if this is working 100% correctly, that I should see the mixed content warnings disappear immediately - is that right?
As far as I know the only place to lay hands on, is the php.ini file and physical memory.
Code:
# cat /etc/php5/apache2/php.ini | grep memory_limit
Reply With Quote
  #797  
Old 10-25-2017, 01:24 PM
Emad ELsayed's Avatar
Emad ELsayed Emad ELsayed is offline
 
Join Date: Feb 2013
Posts: 173
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my dear
Does not work on 4.2.5
php 5.6.31
mysql 5.6.37
any help ..
Best Regards
Reply With Quote
  #798  
Old 10-26-2017, 06:20 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 Emad ELsayed View Post
my dear
Does not work on 4.2.5
php 5.6.31
mysql 5.6.37
any help ..
Best Regards
for me it works
Reply With Quote
  #799  
Old 11-14-2017, 08:55 AM
Afrika Afrika is offline
 
Join Date: Aug 2004
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to import images from a specific path from the own forum? The own forum is not imported by default
Reply With Quote
  #800  
Old 11-15-2017, 03:45 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 Afrika View Post
Is it possible to import images from a specific path from the own forum? The own forum is not imported by default
Not without changing the code base.

But in reality, you may move the files directly and then change their path with a simple query in all of your posts. This is much more effective than importing and storing the images elsewhere.

Code:
UPDATE post SET pagetext=REPLACE(pagetext, 'old_url', 'new_url');
where old_url is the path as found in one in you posts now, and new_url the path as you wish to have as the new destination.

Keep in mind that the db connection may time out, but you can repeat as often as needed, since UPDATE is smart enough not to change the records which already have been changed. Best of course is to call mysql from the shell.
Reply With Quote
  #801  
Old 11-17-2017, 02:33 PM
gerryvz gerryvz is offline
 
Join Date: Aug 2011
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Giovanni,

Great mod, and thank you so much for creating it. I am running 4.2.4 and installed the mod yesterday. I have around 7,300 users and 150,000 total posts, with a relatively small number of overall posts that would require images to be downloaded (I would say the majority of images on my forum are directly attached and residing already in the file system).

Server - Linux + Apache
vbulletin - 4.2.4
php - 5.6.31
php max post size - 64MB
php max upload size - 64MB
php memory limit - 256MB
mySQL - 5.5.7
mySQL packet size - 10MB

The mod started downloading and it got through about 4 of the 9 years of posts on my forum. Now it has frozen since last night. I turned on the logging this morning and only came across this single entry in the log since I turned it on, which is attached. The offending post has some images attached to it, using the external host home.btconnect.com

The images seem to be small in size and pixels, and I downloaded them manually and attached them to the post to see if I could have the mod continue downloading other posts. So far, I haven't been able to get it started again.

Attached is the error, as well as my settings screens.

Also, I have now received two times the mySQL error as attached, which I read appears to be the database server "timing out."

The mod is definitely enabled and running, download folder and sub-folders are 777 permissions, etc.

Does it look to you that there is an image that is too large, or do you have other ideas as to what is causing the mod to stop indexing and downloading?

EDIT: A new post that was made by one of my users today was indexed and the external images were replaced, so I know the code is working. However, it seems stalled and won't continue indexing beyond a certain point in the past. It must be hanging up on something that is keeping it from continuing past indexing. Please advise

SECOND EDIT: I emptied the table in the database (it has a few more than 3,000 records in it) and the code executed again, but then stopped, and it had seven new records in the database. I emptied the table again and it sent through one more cycle of downloading a few more images, and putting seven new records in the database again.

So, something related to the database and/or php memory seems to be preventing the code from executing correctly.

Any thoughts?

Thanks
Gerry





Attached Images
File Type: jpg Screenshot 2017-11-17 11.09.31.jpg (31.5 KB, 0 views)
File Type: jpg Screenshot 2017-11-17 11.29.35.jpg (34.1 KB, 0 views)
File Type: jpg Screenshot 2017-11-17 11.29.49.jpg (32.8 KB, 0 views)
File Type: jpg Screenshot 2017-11-17 11.32.11.jpg (119.9 KB, 0 views)
File Type: jpg Screenshot 2017-11-17 11.32.26.jpg (125.9 KB, 0 views)
Reply With Quote
Reply


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 07:38 PM.


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.05482 seconds
  • Memory Usage 2,381KB
  • 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_code
  • (7)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
  • (10)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