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 01-24-2011 09:23 PM

Quote:

Originally Posted by BadgerDog (Post 2154004)
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? :confused:

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.

jimsflies 01-25-2011 01:18 AM

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?

BirdOPrey5 01-25-2011 02:01 AM

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.

y2ksw 01-25-2011 07:13 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2153975)
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

y2ksw 01-25-2011 07:19 AM

Quote:

Originally Posted by jimsflies (Post 2154154)
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 ;)

BirdOPrey5 01-25-2011 12:44 PM

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:

BadgerDog 01-26-2011 11:57 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2154316)
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

210665 01-26-2011 12:50 PM

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

y2ksw 01-26-2011 08:34 PM

Quote:

Originally Posted by BadgerDog (Post 2154826)
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 *).

OldSchoolDSL 01-27-2011 12:28 AM

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?


All times are GMT. The time now is 08:12 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.01608 seconds
  • Memory Usage 1,761KB
  • 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
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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