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)

BirdOPrey5 07-21-2012 02:10 PM

I'm not using this mod on my 4.2.0 site but honestly being familiar with the code I can't see any reason this shouldn't work in 4.2.0.

y2ksw 07-21-2012 03:47 PM

Quote:

Originally Posted by Old-Git (Post 2349988)
Tried in on VB4.2.0 PL 2 this evening and couldn't get it to work at all. The code seemed to run but the Cron job did not. I tried to run it manually and it just hung on a grey screen which said, on upper left corner, VB External Image Importer (or words to that effect). Turned on logging and there was nothing in the logs, tried again, same thing nothing in the logs. FTP to server and looked at the Images/imported folder and seen that it had created 2011 folder and two folders under that one named 01 and the other named 11. Nothing in either folder.

I uninstalled and re-installed, making sure to overwrite, and still the same problem. I tried to uninstall again and this time the uninstall routine hung on a grey screen. Disabled and tried to unisntall and still hung on the grey screen. Diasbled all plugins globally and tried to uninstall, still hung on grey screen. Disabled cron job and tried to unistall and still hung on grey screen. Re-enabled global plugins and then disabled all individual plugins and tried to uninstall. Still hung on grey screen. Finally, re-installed and overwrote (again) and immediately went to uninstall and finally removed it from site. It sounds lovely and now that I can choose which forums I want to include in the import process it would be brilliant if it would work for me.

Incidentally fopen on URL's is on and there's no firewall blocking downloads (I tried your test.php file for google from way back in the middle of this thread....yeah I read the whole thread looking for answers).

Thankfully I was running this on my test rig here in my office and not on my live server so I was'nt worried about all the issues. I'm off to bed now, it's 2:00 am here in the UK, and I'll have another run at this tomorrow.

Rgds

Pete

PS anyone have any success in running it on a 4.2.0 Pl2 install?

Quote:

Originally Posted by Old-Git (Post 2350142)
Has no-one go this working on 4.2.0 PL2? Are there any plans to release an upgrade for this hack?

Have you checked the permissions? Please check that the newly created folders have the right to modify (chmod 755 at least) for the server process. If the server can create the folders, but can't assign the rights to change contents, all effords are in vain.

There are currently no plans to upgrade.

Old-Git 07-21-2012 04:42 PM

Just tried it again with 1.0.4. The cron job still doesn't seem to want to run on it's own but when I run it manually it now completes. However, it's not even creating the sub-directories in Images/Imported and obviously it's not touching any of the images at all.

permissions on the folders have been set to both 755 and 777. It simply doesn't seem to want to work on 4.2.0. PL2. I've wasted enough time on it so I've uninstalled it and will come back to it after others have tried and confirmed it works on 4.2.0 PL2.

warlord0 07-26-2012 10:13 AM

Hmm, just working on this and can't see it doing anything. Using 1.0.5 on vb4.2.0 PL2

# ls -l /var/www/forum/images/
drwxrwxrwx 2 nginx nginx 4096 Jul 26 11:46 imported

# ls -l /var/www/forum/includes/cron/
-rwxrwxrwx 1 nginx nginx 16607 Jul 26 11:43 iei_cron.php

Nothing getting created in the imported folder.

I have set it so it only includes forum ID 121 in the options and left the exclude empty.

warlord0 07-26-2012 10:16 AM

Actually it IS doing something.

I query the iei_img table I see it has the newurl and old url, but it isn't fetching the image. If I try the newurl I get a 404.

phpinfo:
Code:

cURL support        enabled
cURL Information        7.21.0
Age        3
Features
AsynchDNS        No
Debug        No
GSS-Negotiate        Yes
IDN        Yes
IPv6        Yes
Largefile        Yes
NTLM        Yes
SPNEGO        No
SSL        Yes
SSPI        No
krb4        No
libz        Yes
CharConv        No
Protocols        dict, file, ftp, ftps, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp
Host        x86_64-pc-linux-gnu
SSL Version        OpenSSL/0.9.8o
ZLib Version        1.2.3.4
libSSH Version        libssh2/1.2.6


warlord0 07-26-2012 10:40 AM

All sorted forget I was even here.

I think it all came down to it running the scheduled task before the permissions were correct. Then it wouldn't refetch the image.

After I got a new post with new image up it worked fine.

BadgerDog 07-26-2012 11:34 AM

1 Attachment(s)
Donated PayPal to author and been using this terrific mod for a year or so now and it's great !!!

Running 4.1.3pl5 ...

We've come across something weird with it I can't figure out. A member referenced 5 JPG pics (all under 100k in size) using IMG bbcode and pointing to PhotoBucket.

y2ksw's excellent import mod executed it's scheduled task and imported 3 of them just fine ...

FR8002 imported as FR8002-1
FR8003 imported as FR8003-1
FR8004 imported as FR8004-1

It refused to import 2 of them titled:

FR-8001
FR-8005

With the first 3, a typical edit post showed links like this, as they are stored on our own server:

http://www.xxxx.com/images/imported/2012/07/FR8002-1.jpg
http://www.xxxx.com/images/imported/2012/07/FR8003-1.jpg
http://www.xxxx.com/images/imported/2012/07/FR8004-1.jpg

The same edited post shows links to where the two that didn't post as:

http://www.xxxx.com/ (Note: no reference to a pic at all)

There's nothing abnormal about the two pics that this mod fails to process, except they have a "-" dash character as the second character of the filename.

In order to get the pics to show for our member, I had to manually upload for the two of them from PhotoBucket into the imported directory and they display properly in vBulletin doing that. However, all testing I've done with test posts, consistently causes the import mod to fail on these two pics.

Anyone have any idea what's happening? :confused:

Is it possible that the "-" in the filename is causing a problem with this mod?

Thanks for any feedback ... :)

Regards,
Doug

imported_dfmafia 07-26-2012 07:38 PM

Just tested this on my vB 4.2.0 PL2 suite. It's a no-go for all 3 versions.

The cron job never runs. It says it does complete. No scheduled task is run for Import Export Images. Directories have correct permissions.

nothing imported, no scheduled task in the log even if ran manually and it says DONE like it performed its task successfully

y2ksw 07-27-2012 05:43 AM

Quote:

Originally Posted by warlord0 (Post 2351553)
All sorted forget I was even here.

I think it all came down to it running the scheduled task before the permissions were correct. Then it wouldn't refetch the image.

After I got a new post with new image up it worked fine.

I'm glad you have fixed it yourself; all I could have suggested, was to check the permissions :)

y2ksw 07-27-2012 05:57 AM

Quote:

Originally Posted by imported_df+++++ (Post 2351694)
Just tested this on my vB 4.2.0 PL2 suite. It's a no-go for all 3 versions.

The cron job never runs. It says it does complete. No scheduled task is run for Import Export Images. Directories have correct permissions.

nothing imported, no scheduled task in the log even if ran manually and it says DONE like it performed its task successfully

It surely did compete successfully. The "done" stands for: non syntax errors, no halt, non technical problem. There can be many other issues though, beginning with CURL, fopen & URL's, wrong settings. Many things.

The product is designed to work with most configurations without blocking the board. If nothing happens, please re-check the permissions. Most of the times the problems are permission problems (even though everything seemed ok), but we have had also memory related problems with huge images ... but then it wouldn't arrive at Done ;)

As told so many times before, if Apache (or any other server) can't access the folders for rwx it may however be able to create, nothing will happen. On a Linux environment, Apache should run as www-data (33:33) and jail PHP into a web space. FTP should then have the same access rights as Apache (33:33) and then magically all server problems disappear.

Whenever you have a situation where FTP has different rights than the web server, and the web server rights are not enough, and the rights propagation is not working properly, then nothing will work very well and this plugin fails. Specially in a SAFE_MODE on situation (deprecated for PHP 6+ I believe, thus really should not exist any more on PHP 5.x setups).

y2ksw 07-27-2012 06:11 AM

Quote:

Originally Posted by BadgerDog (Post 2351560)
Donated PayPal to author and been using this terrific mod for a year or so now and it's great !!!

Running 4.1.3pl5 ...

We've come across something weird with it I can't figure out. A member referenced 5 JPG pics (all under 100k in size) using IMG bbcode and pointing to PhotoBucket.

y2ksw's excellent import mod executed it's scheduled task and imported 3 of them just fine ...

FR8002 imported as FR8002-1
FR8003 imported as FR8003-1
FR8004 imported as FR8004-1

It refused to import 2 of them titled:

FR-8001
FR-8005

With the first 3, a typical edit post showed links like this, as they are stored on our own server:

http://www.xxxx.com/images/imported/2012/07/FR8002-1.jpg
http://www.xxxx.com/images/imported/2012/07/FR8003-1.jpg
http://www.xxxx.com/images/imported/2012/07/FR8004-1.jpg

The same edited post shows links to where the two that didn't post as:

http://www.xxxx.com/ (Note: no reference to a pic at all)

There's nothing abnormal about the two pics that this mod fails to process, except they have a "-" dash character as the second character of the filename.

In order to get the pics to show for our member, I had to manually upload for the two of them from PhotoBucket into the imported directory and they display properly in vBulletin doing that. However, all testing I've done with test posts, consistently causes the import mod to fail on these two pics.

Anyone have any idea what's happening? :confused:

Is it possible that the "-" in the filename is causing a problem with this mod?

Thanks for any feedback ... :)

Regards,
Doug

The hyphen may cause problems with redirects on mod_rewrite, or maybe also with vbSEO which allows a final "-123" as a thread or forum indicator. Images should be excluded though.

Depending on the remote server, "-" may have all sorts of problems at their end, last not least an invalid image, which simply will never import because not conforming to the image standards. If it was for example a spoofed image (image is a script), it will not contain some tags in order to identify it self and thus will fail to load. It is a sort of inbuilt antivirus.

warlord0 07-27-2012 09:28 AM

One of the things I did to help a bit of debugging was to query the database directly to see if things were happening as they should.

Here's a few pointers that might help. Tweak them as you see fit like is the iei_parsed set or not. Based on the queries in the actual code.

Code:

select * from iei_img;
Code:

SELECT t.threadid, postid, p.dateline FROM post p INNER JOIN thread t ON p.threadid = t.threadid WHERE iei_parsed=1 and pagetext LIKE '%[/IMG]%' order by postid limit 0,100;

warlord0 07-30-2012 06:12 PM

Really, really liking this addon.

We have a forum that has been around 10 years. In that time people move on and some have now removed or edited photobucket and flickr accounts causing a few 404's for some images that were very useful.

This addon stops that from happening. Very pleased with it.

Rated accordingly.

warlord0 08-01-2012 12:57 PM

Actually, just thought of something that would make this a killer app for us.

If as an admin there was a button on a post/thread that initiated an immediate backup or added it as a priority to the schedule.

That way when I find a thread that I really need to be sure I have copies of I just click and it gets copied.

y2ksw 08-01-2012 01:49 PM

Quote:

Originally Posted by warlord0 (Post 2353309)
Actually, just thought of something that would make this a killer app for us.

If as an admin there was a button on a post/thread that initiated an immediate backup or added it as a priority to the schedule.

That way when I find a thread that I really need to be sure I have copies of I just click and it gets copied.

I added this suggestion to the devlog. However I'm unable to tell when I will put hands on.

SonSahne 08-04-2012 07:19 PM

For version 3.8.x will be supported? image cache is old and useless.

warlord0 08-06-2012 09:07 AM

Quote:

Originally Posted by y2ksw (Post 2353319)
I added this suggestion to the devlog. However I'm unable to tell when I will put hands on.

Many thanks.

No rush on it as I'm still doing a happy dance as it's backing stuff up for me :)

diyautoftw 08-11-2012 03:12 PM

Hello,
I'd like the images in forum posts to be uploaded to the server when they are promoted to CMS articles. Is there any way to mod this to do that? I don't want all forum post images uploaded, just the images in the CMS articles. Thanks!

y2ksw 08-16-2012 11:21 AM

Quote:

Originally Posted by diyautoftw (Post 2356227)
Hello,
I'd like the images in forum posts to be uploaded to the server when they are promoted to CMS articles. Is there any way to mod this to do that? I don't want all forum post images uploaded, just the images in the CMS articles. Thanks!

The CMS is not handled yet and maybe never will. However, if you wait for the plugin to catch up, you promote discussions which already have their image imported.

alhidaya 08-16-2012 10:59 PM

Hello,

Thanks for a great mod.

How do I add more tags into this mod ? Right now we can only use [img] tag. I do have :

[FLOAT=left] and [/FLOAT]
[FLOAT=right] and [/FLOAT]

on my forum to align images to the left or to the right of the post.

This is very IMPORTANT What should I do to install the images BB Code ?

y2ksw 08-18-2012 08:34 AM

Quote:

Originally Posted by alhidaya (Post 2357545)
Hello,

Thanks for a great mod.

How do I add more tags into this mod ? Right now we can only use [img] tag. I do have :

[FLOAT=left] and [/FLOAT]
[FLOAT=right] and [/FLOAT]

on my forum to align images to the left or to the right of the post.

This is very IMPORTANT What should I do to install the images BB Code ?

For these tags there is no automatic solution. You will have to trasform these tags manually with the MySQL REPLACE function (backup first!!!), for example:
Code:

UPDATE post SET pagetext=REPLACE(pagetext, '[FLOAT=left]', '[IMG]')
UPDATE post SET pagetext=REPLACE(pagetext, '[/FLOAT]', '[/IMG]')

I reccomend not to use image modifications in vbulletin if you want to use this product.

To enable IMG you will have to change your vbulletin options at several places: show all options and search for IMG ;)

spencerp 08-20-2012 07:36 AM

Quote:

Originally Posted by y2ksw (Post 2148352)
Theorically it can be changed in order to download the source images and the thumbnails. However, each system has different ways and changes them from time to time, in order to avoid direct downloading. Since this is freeware and I have no income with it, nor are there enough customers for asking this feature, it is unlikely it will be ever implemented.

Similarily, the file server/gallery issue has been discussed before. If there was a consistent number of users requesting to move files to another server, I may look into moving files via FTP and/or PHP's fopen and updating queries and so stuff. But until now you are only about the third person asking for this feature. Instead, you may use fsftp for Linux, which transparently links another server to a symbolic link of your forum root subfolder of your choice. There may be other solutions too. I do not support any of those solutions ;)

Basically, this is what I need though. The forums were started for when the members would go to some image hosting site like; imagevenue.com, imgbox.com, and so forth... Select and Copy the BBCode for thumbnails that link to full size images... and paste the codes into the forum threads/posts.

I'd love to be able to have this run, and automatically parse/convert all imagevenue.com and imgbox.com and etc BBCodes to default vbulletin ... or import them as attachments with thumbnails and full size images automatically. Is there anything for vbulletin (if not your plugin/modification maybe another one?) that can maybe do this? Thanks

y2ksw 08-20-2012 10:03 AM

Quote:

Originally Posted by spencerp (Post 2358382)
Basically, this is what I need though. The forums were started for when the members would go to some image hosting site like; imagevenue.com, imgbox.com, and so forth... Select and Copy the BBCode for thumbnails that link to full size images... and paste the codes into the forum threads/posts.

I'd love to be able to have this run, and automatically parse/convert all imagevenue.com and imgbox.com and etc BBCodes to default vbulletin ... or import them as attachments with thumbnails and full size images automatically. Is there anything for vbulletin (if not your plugin/modification maybe another one?) that can maybe do this? Thanks

The Linux File System FTP feature is called curlftpfs and I have briefly discussed it here. For making it work perfectly well, you will have to ask a top-techy, which may be able to tweak your system in a way that imported images are going somewhere else.

There is no inbuilt feature and software solutions would be far over the top of this, maybe any product :)

spencerp 08-20-2012 01:01 PM

Quote:

Originally Posted by y2ksw (Post 2358402)
The Linux File System FTP feature is called curlftpfs and I have briefly discussed it here. For making it work perfectly well, you will have to ask a top-techy, which may be able to tweak your system in a way that imported images are going somewhere else.

There is no inbuilt feature and software solutions would be far over the top of this, maybe any product :)

ahhh okay... Hmm, maybe I'll get one of the support techs on live chat then. but stupid me, i ran that plugin and it started parsing/importing images from THIS MONTH.. cause i made it so they go into /attachments/2012/08/ ... and alot of images were going there... but when viewing threads.. it still showed or seemed to link to imagevenue.com anyway.. so i went and deleted the 2012/08 folders.. and now alot of the threads for this month aren't showing images at all. :( and plus it made the database HUGE... its like 78MB!!! :(

is there anyway to have this plugin import the images... but just have it to filesystem automatically? I didn't want to put all that load into database in first place. the disk space i need not worry about, its the database size that's issue. and now it's STILL 78MB.. >_<. and on top of it, alot of August's threads are image-less... :(

also... when viewing threads in advanced edit.. its like
Code:

[U R L="http://img156.imagevenue.com/img.php?image=79993_12708391_122_34lo.jpg"][I M G]http://footish.xxx/attachments/2012/08/376.jpg[/I MG ][/U RL ]
of course the attachments/2012/08/blahblah.jpg arent showing anything.. but still have the imagevenue.com thumbnail preview links.. is there to remove the external thumbnail preview links when parsing from get go? or.. have those imported too, not just the full image?

y2ksw 08-20-2012 02:43 PM

This plugin doesn't add size to your database. It imports external images to the local file system. But I understood you would like to keep the images elsewhere and for this reason there is the article about curlftpfs.

Only img tags are imported unless you add other tags (and you understand what the option does). There is no such thing as capturing wrapping images, too.

Krusty1231 08-25-2012 11:21 AM

I am confused. I can run it just fine, but it gives me this when I try to enable the cron job.

Quote:

This scheduled task cannot be enabled. vB4 Import External Images, the product associated with this task, is currently disabled. It must be enabled before this task can be enabled.
What am I doing wrong? I can see the images being created in the /imported folder just fine.

It just will not enable the cron job for me.

y2ksw 08-26-2012 09:13 AM

Looks like the product is disabled ;)

Krusty1231 08-27-2012 07:20 AM

LOL - so it is..... Doh!

Thanks for the hint! I feel retarded now! :)

y2ksw 08-27-2012 11:34 AM

welcome back from holidays! :)

vvlo 09-01-2012 08:58 PM

tnk u, but this mod for my forum not work : link

y2ksw 09-03-2012 01:51 PM

Quote:

Originally Posted by vvlo (Post 2361819)
tnk u, but this mod for my forum not work : link

Have you checked that fopen for URL's is enabled? Do you have CURL or sockets available? May your server pull in external sources?

If your server does not allow to connect to and read external resources, it will not be able to import any image.

jo8jo 09-20-2012 07:02 AM

Excellent mod!

I have one question: do you think it is possible to create folders for days, too?

Quote:

...it creates folders for years and months...
Thanks in advance :up:

y2ksw 09-20-2012 03:06 PM

Quote:

Originally Posted by jo8jo (Post 2366916)
Excellent mod!

I have one question: do you think it is possible to create folders for days, too?



Thanks in advance :up:

I think this does not make much sense even for very large forums. Large forums will have a Linux Server, which has no problem at all to host tens of thousands of files in a single folder, and smaller forums with Windows servers will run into problems not before 30000 files each directory. That is about 1000 files daily, plenty to play with :)

Disco_Dave 09-26-2012 10:03 AM

Hi

Just a quick question, I have a from member that uses photobucket. And for some reason she has an extra [img] before and after her images, will this stop your hack from working?

Dave

y2ksw 09-26-2012 11:41 AM

Quote:

Originally Posted by tricksodave (Post 2368642)
Hi

Just a quick question, I have a from member that uses photobucket. And for some reason she has an extra [img] before and after her images, will this stop your hack from working?

Dave

It should not make any difference.

Manoel J?nior 09-26-2012 02:03 PM

You have plans to update this mod for vBulletin5?

y2ksw 09-26-2012 03:39 PM

Quote:

Originally Posted by Manoel J?nior (Post 2368712)
You have plans to update this mod for vBulletin5?

probably ... but not before it is really stable ... another 2 years to go :)

Disco_Dave 10-01-2012 12:07 PM

Quote:

Originally Posted by y2ksw (Post 2368666)
It should not make any difference.

I keep checking this one thread with the photobucket images, and they seem to be the only ones that have not went through your program (add-on) is there a way to force it to do so?

Dave

Krusty1231 10-03-2012 12:05 AM

Is there something I could use with this mod to watermark my images? Does anyone else use something to watermark the images, and willing to share?

Thanks in advance!

Reinhard 10-05-2012 07:24 PM

@y2ksw: Can you add the postid in the table iei_img? This makes it easier to find wrong urls in the post.


All times are GMT. The time now is 02:34 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.01969 seconds
  • Memory Usage 1,887KB
  • 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
  • (5)bbcode_code_printable
  • (19)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