vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Import External Images (https://vborg.vbsupport.ru/showthread.php?t=253309)

y2ksw 03-10-2015 01:47 PM

Well, one idea could be to attempt to download the image prior to examine its size, but then eventually you have other problems, such as streams, which could never finish.

Johnny G 03-13-2015 11:45 AM

You could always limit the size of a file to be uploaded to be <8Mb (or whatever the nominal size of the image is)?

BadgerDog 03-13-2015 11:52 AM

Quote:

Originally Posted by Johnny G (Post 2540350)
You could always limit the size of a file to be uploaded to be <8Mb (or whatever the nominal size of the image is)?

Hmm...

Where do I do that under vBulletin 4.13?

.. and how would vBulletin know the size of the file in advance of actually having to download it?

Thanks for the feedback ... appreciate it.. :)

Regards,
Doug

y2ksw 03-13-2015 08:16 PM

Quote:

Originally Posted by Johnny G (Post 2540350)
You could always limit the size of a file to be uploaded to be <8Mb (or whatever the nominal size of the image is)?

It sounds easy, but isn't.

It would require a raw socket connection and manual reading of the file, and stop reading if it has reached 8 MB. Then however, it would be possible to add a timer, too, and abort slow files as well. Also, it would allow to examine the file header before downloading the whole file and thus discard no-image files efficiently. But it would take a bunch of code and yet more options.

Then we remove the CURL code, but we'll loose the redirect features and SSL. Thus, it'll fail with Facebook, Imageshack, Google images, just to name a few.

I would say, it is a no-go.

bmwfans 07-05-2015 08:49 AM

Great idea! Do you know if this is going to work on 3.8.9?

y2ksw 07-05-2015 09:15 AM

Quote:

Originally Posted by bmwfans (Post 2549391)
Great idea! Do you know if this is going to work on 3.8.9?

This version here works for 4.x only, but you may try this:

https://vborg.vbsupport.ru/showthread.php?t=123338

Hostboard 08-17-2015 12:27 PM

How about an option to save to a cloud service such as OneDrive as a CDN and pull the images from there?

y2ksw 08-18-2015 01:03 PM

Quote:

Originally Posted by Hostboard (Post 2553047)
How about an option to save to a cloud service such as OneDrive as a CDN and pull the images from there?

You may use on Linux an external service as a mount for saving, for example curlftpfs or sshfs, and a redirect for showing those images. All other methods (such as using PHP ecc) go too far off the road, because there is never one system identical to another. I have had solutions like the above, but in the end I came up with Dropbox for some cases, and for all the rest, a larger local storage ;)

majjed2008 09-03-2015 08:20 PM

can we import the CMS image ? that it post inside articals there ?

Thank you

hivitro 09-04-2015 12:21 AM

Hi y2ksw, ty for this great mod, It has served me well these years.

I have a question before making a modification.

I am interested in taking a new .com domain and use images only, like a gallery.

My question is this. If I make a change in Forum URL replacement, and put a new domain, all new and old images will automatically move there?

Currently, my domain is http://www.nivelextremo.com the forum is inside / post / and the images are in / post / imgbackup /

If I for example, bought the domain like www.imgbackup.com or anything else and set

Forum URL replacement -> http://www.imgbackup.com/images

The old and new images, will move to the external domain? Or just new? or what would happen?


Thanks in advance

y2ksw 09-04-2015 04:58 AM

Quote:

Originally Posted by majjed2008 (Post 2554214)
can we import the CMS image ? that it post inside articals there ?

Thank you

No, it works only for forum posts.

y2ksw 09-04-2015 05:02 AM

Quote:

Originally Posted by hivitro (Post 2554233)
Hi y2ksw, ty for this great mod, It has served me well these years.

I have a question before making a modification.

I am interested in taking a new .com domain and use images only, like a gallery.

My question is this. If I make a change in Forum URL replacement, and put a new domain, all new and old images will automatically move there?

Currently, my domain is http://www.nivelextremo.com the forum is inside / post / and the images are in / post / imgbackup /

If I for example, bought the domain like www.imgbackup.com or anything else and set

Forum URL replacement -> http://www.imgbackup.com/images

The old and new images, will move to the external domain? Or just new? or what would happen?


Thanks in advance

Only the new images are moved. the old images can be moved, if you change the URL in all posts accordingly (with a REPLACE query on post.pagetext). The short term cheaper solution is a redirect, but it may add quite some load to your server, if you have a lot of images.

hivitro 09-04-2015 05:57 AM

Quote:

Originally Posted by y2ksw (Post 2554238)
Only the new images are moved. the old images can be moved, if you change the URL in all posts accordingly (with a REPLACE query on post.pagetext). The short term cheaper solution is a redirect, but it may add quite some load to your server, if you have a lot of images.

OK I understand. Time to work :D

Thank you.

Edit II > 1st Step Done:

1 - I move all images from inside my forum to another URL, i choose http://www.imageslocker.com and there put all from 2007 to 2015
2 - I Use Mysql UPDATE/REPLACE in post.pagetext and then, do al full Clear system cache.. table repairs, Forums Cache... and then all works ok.

Finally. New images, goes to the forum URL, the next year i will move in bulk again.

In the options IGNORE site i must write with/and not http and www, if not the mod copy again the images to the forum.

I just have a question.. I start to make some order/renames of files, in categories. How does this affect the table iei_img?

Becouse the old URL, will be the same, but the new URL it will not be because I moved / renamed.

majjed2008 09-06-2015 05:55 PM

Hello

after it import the image it dont show up in post I edited the post and i see the link point correctly to site./images/imported but the picture totally gone from all thread how to fix that please ?

Thank you

hivitro 09-06-2015 07:03 PM

Quote:

Originally Posted by majjed2008 (Post 2554422)
Hello

after it import the image it dont show up in post I edited the post and i see the link point correctly to site./images/imported but the picture totally gone from all thread how to fix that please ?

Thank you


Firefox dont show your images if the URL is incorrect or the image is not where you think it is.

Use Chrome or IE to check. Make a test post, and link and external image. Go Administrator panel and run scheduled tasks > vB4 Import External Images

Go again to your test and check if it load the image imported or if show a broken avatar, do a right click in there and open in another windows, check the URL and you will see the error. Fix it in config and clear Cache in your navigator (CTRL+F5) and check again.

majjed2008 09-06-2015 08:31 PM

thank you very much i am going to do that , but i fined the the picture use wrong URL how to change it please ? do i have to thread and edited it manually i have very big forum more than 300K thread ?

hivitro 09-07-2015 12:22 AM

Quote:

Originally Posted by majjed2008 (Post 2554440)
thank you very much i am going to do that , but i fined the the picture use wrong URL how to change it please ? do i have to thread and edited it manually i have very big forum more than 300K thread ?

Sure, once you run this mod, it will start to get a copy of all post/images inside your forum path.

Try to be sure when you make the config. IDK if the vbulletin cache, browser cache.. if you run the vb import, and you need to change anything, you need to clean all cache to be efective.

If you summit a mistake, like me, and write "galerry" and not, "gallery" you can fix with sql sentence inside of you db, iei_img table.

And remember to set a image for "noimage" pictures, its will reemplace a lost linked image if you want.

y2ksw 09-07-2015 08:06 AM

Quote:

Originally Posted by majjed2008 (Post 2554440)
thank you very much i am going to do that , but i fined the the picture use wrong URL how to change it please ? do i have to thread and edited it manually i have very big forum more than 300K thread ?

If you have made a mistake, or simply moved the forum or the images to another place, you may use phpmyadmin and craft a query, like:

Code:

UPDATE post SET pagetext=REPLACE(pagetext, 'old', 'new')
e.g.:
Code:

UPDATE post SET pagetext=REPLACE(pagetext, 'http://www.abc.com/', 'http://www.def.net/')
or:
Code:

UPDATE post SET pagetext=REPLACE(pagetext, '/imported/', '/images/new-site/')
It is unavoidable to make first a backup of the involved table, then a few tests, and if everything is ok, issue the final query.

Manoel J?nior 09-07-2015 03:44 PM

Quote:

Originally Posted by y2ksw (Post 2554459)
If you have made a mistake, or simply moved the forum or the images to another place, you may use phpmyadmin and craft a query, like:

Code:

UPDATE post SET pagetext=REPLACE(pagetext, 'old', 'new')
e.g.:
Code:

UPDATE post SET pagetext=REPLACE(pagetext, 'http://www.abc.com/', 'http://www.def.net/')
or:
Code:

UPDATE post SET pagetext=REPLACE(pagetext, '/imported/', '/images/new-site/')
It is unavoidable to make first a backup of the involved table, then a few tests, and if everything is ok, issue the final query.

This may be something common, it could not be implemented in the product?

y2ksw 09-08-2015 05:19 AM

Quote:

Originally Posted by Manoel J?nior (Post 2554478)
This may be something common, it could not be implemented in the product?

It is too dangerous to handle by ordinary forum owners. Who knows a little about MySQL eventually will do it with no harm, but a complete noob is capable to destroy the message base with one click. I can't be fund of such a problem.

Manoel J?nior 09-08-2015 01:14 PM

Quote:

Originally Posted by y2ksw (Post 2554533)
It is too dangerous to handle by ordinary forum owners. Who knows a little about MySQL eventually will do it with no harm, but a complete noob is capable to destroy the message base with one click. I can't be fund of such a problem.

You're right. Thank you

mescalin 09-16-2015 09:39 PM

Hello,

I installed thisplugin years ago and my imported folder size is very large and increasing. Is there a way to delete unlinked images from folder? Because many of the threats get deleted but the images remains there

RichieBoy67 09-16-2015 10:37 PM

Quote:

Originally Posted by mescalin (Post 2555171)
Hello,

I installed thisplugin years ago and my imported folder size is very large and increasing. Is there a way to delete unlinked images from folder? Because many of the threats get deleted but the images remains there

Threats?:eek:

Manoel J?nior 09-16-2015 11:27 PM

Quote:

Originally Posted by RichieBoy67 (Post 2555173)
Threats?

He meant threads

hivitro 09-24-2015 10:21 AM

Quote:

Originally Posted by mescalin (Post 2555171)
Hello,

I installed thisplugin years ago and my imported folder size is very large and increasing. Is there a way to delete unlinked images from folder? Because many of the threats get deleted but the images remains there

They would be very good options for a future release.

[X] Delete unused backup images

[X] only save images of the 1st post, not answers

y2ksw 09-25-2015 05:49 AM

Quote:

Originally Posted by hivitro (Post 2555654)
They would be very good options for a future release.

[X] Delete unused backup images

[X] only save images of the 1st post, not answers

The sense of this plugin is to keep all images and deleting threads etc is not a common practice, but only of a very few sites.

In order to efficiently delete unused images the only way is to use server side scripts and these may be crafted and used anyway only by system administrators ... there is no single system identical to another.

Ideally, you make a list of all images and search the posts, signatures and other places for those images. All of which you find, will be marked to keep. And then you delete the rest. Another approach would be to analyze the server logs over a long timespan (1 month or more) and mark all found images to keep.

friendlymela 10-06-2015 06:49 AM

This is good one

y2ksw 10-07-2015 09:25 AM

Quote:

Originally Posted by friendlymela (Post 2556401)
This is good one

I'm glad you like it :)

friendlymela 10-08-2015 06:31 AM

Quote:

Originally Posted by y2ksw (Post 2556499)
I'm glad you like it :)

would u like to share any screenshot of this mod?

y2ksw 10-08-2015 10:07 AM

Quote:

Originally Posted by friendlymela (Post 2556543)
would u like to share any screenshot of this mod?

There isn't any ... it's a background service. Besides the ACP options there is nothing to show ...

final kaoss 10-11-2015 04:18 PM

What if I want my images converted to png instead of jpg? I prefer using pnggauntlet on my images, plus I prefer png over jpeg anyday.

Also you may want to reword this. Do you mean the images are stored in a server cache and consuming ram or that the images are written out as files in the images/imported folder?

Quote:

Cache image URL's into memory. If you have a large board, a lot of imported images and limited memory, you may want to switch this option off. If disabled, images are tested by less efficient database queries.

y2ksw 10-12-2015 07:25 AM

Quote:

Originally Posted by final kaoss (Post 2556800)
What if I want my images converted to png instead of jpg? I prefer using pnggauntlet on my images, plus I prefer png over jpeg anyday.

Also you may want to reword this. Do you mean the images are stored in a server cache and consuming ram or that the images are written out as files in the images/imported folder?

- You may change the code accordingly :)
- Neither. When importing images, the paths of images, which are already imported, may be stored in memory to quicken the import process, or be queried each time. If you have limited memory for your PHP process and a large quantity of imported images, you may want to switch the memory cache off. Just in case ;)

Farsisat 12-10-2015 07:56 PM

1 Attachment(s)
Hi
This product will be worked for me but a few month dos not work about 2/26/2015 until now

anybody there help me?

Manoel J?nior 12-10-2015 08:17 PM

Quote:

Originally Posted by Farsisat (Post 2560162)
Hi
This product will be worked for me but a few month dos not work about 2/26/2015 until now

anybody there help me?

when was the last time the CRON rolled?

Farsisat 12-11-2015 05:05 AM

Quote:

Originally Posted by Manoel J?nior (Post 2560166)
when was the last time the CRON rolled?

Today
10:30 AM

but last night uninstall the plugin then reinstall this. not work!

Dragonsys 12-11-2015 01:09 PM

Quote:

Originally Posted by Farsisat (Post 2560186)
Today
10:30 AM

but last night uninstall the plugin then reinstall this. not work!

it ran at 10:30am, or will run next at 10:30am?

Farsisat 12-11-2015 03:53 PM

1 Attachment(s)
Quote:

Originally Posted by Dragonsys (Post 2560218)
it ran at 10:30am, or will run next at 10:30am?

this morning the next time is (Today10:30 AM) but now says (Today09:20 PM)

i dont know what am i doing to work well

Manoel J?nior 12-12-2015 02:25 PM

Quote:

Originally Posted by Farsisat (Post 2560162)
Hi
This product will be worked for me but a few month dos not work about 2/26/2015 until now

anybody there help me?

This has happened to me, and I realize that there were corrupt images on my server, check in date order on your server the last image and delete it and turn the CRON in hand again and see if it worked.

Manoel J?nior 12-29-2015 11:15 AM

Quote:

Originally Posted by Manoel J?nior (Post 2560274)
This has happened to me, and I realize that there were corrupt images on my server, check in date order on your server the last image and delete it and turn the CRON in hand again and see if it worked.

I wonder if my help was useful to you.

mytreehouse 12-29-2015 10:07 PM

Quote:

Originally Posted by Manoel J?nior (Post 2560274)
This has happened to me, and I realize that there were corrupt images on my server, check in date order on your server the last image and delete it and turn the CRON in hand again and see if it worked.

I did the same. I deleted the last (corrupt) picture everytime the process stopped and started the task again, untill the process was completed.


All times are GMT. The time now is 09:11 AM.

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.02025 seconds
  • Memory Usage 1,855KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (29)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete