Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 13 Apr 2017, 18:49
incursio incursio is offline
 
Join Date: Nov 2001
Bulk photo/gallery import script

Hey guys, I am trying to import thousands of existing photos into VB5. The images exist in folders/subfolders on the server. Anyone have a basic script to programmatically create a new gallery folder for a user and import a photo into it? I can probably figure it out from there if I had a sample to look at. Thanks in advance!

--------------- Added 13 Apr 2017 at 19:22 ---------------

A little more info as I keep trying to figure this out on my own - when I do this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I get the humanverify_missing error. It would seem to me that by using the API this would be disabled for the purpose of the request being made, but nevertheless ... so I disabled the Human Verification Manager in the admin panel, and now I get a "permission denied" error coming back from the API call.
Reply With Quote
  #2  
Old 13 Apr 2017, 22:41
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
How are you executing the api? You should be logged in to create gallery post unless you enable permissions for guests which I assume you don't want.
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
  #3  
Old 14 Apr 2017, 01:06
incursio incursio is offline
 
Join Date: Nov 2001
Thanks! That helped me get past that issue. Now, I am getting this response when trying to add the image:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

My test code looks like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Any ideas?

--------------- Added 14 Apr 2017 at 01:18 ---------------

Ok, I got past that problem. I needed to just pass 'file' => $fileInfo and do away with the $photos bit I was trying.

At any rate, it does "upload" the image, but now I need to somehow get it to show up in the gallery. I'm thinking I need to do something like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Just not sure what to pass to it.

--------------- Added 14 Apr 2017 at 01:21 ---------------

Tried this, but to no avail:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I get this error:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

--------------- Added 14 Apr 2017 at 01:25 ---------------

Also, I noticed that in the vb_filedata table, that it had resized my test image (scaled it down). Is there some way to prevent that? These need to stay in their native 1920x1080 resolution. Thanks!

Last edited by incursio; 14 Apr 2017 at 01:15.
Reply With Quote
  #4  
Old 14 Apr 2017, 21:32
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
Originally Posted by incursio View Post
Also, I noticed that in the vb_filedata table, that it had resized my test image (scaled it down). Is there some way to prevent that? These need to stay in their native 1920x1080 resolution. Thanks!
In the Attachment Type Manager, you can configure the maximum width and height and filesize for each file extension.
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
  #5  
Old 17 Apr 2017, 14:52
incursio incursio is offline
 
Join Date: Nov 2001
Any ideas on the actual call to "$api->callApi('content_photo' ...."? Is that the right call to use? If so, not sure what the arguments need to be.

I've also tried this, but to no avail:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #6  
Old 22 Apr 2017, 23:42
incursio incursio is offline
 
Join Date: Nov 2001
Anyone?
Reply With Quote
  #7  
Old 23 Apr 2017, 04:45
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
Take a look at the actionGallery() function in /includes/vb5/frontend/controller/createcontent.php. That's the function called when you submit a gallery content type post.
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
  #8  
Old 23 Apr 2017, 17:32
incursio incursio is offline
 
Join Date: Nov 2001
Thanks, mate! I'll take a peek.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Addon for vb Photo Upload 1.1 and Member's Photo Gallery ! bommelchen vBulletin 2.x Full Releases 5 22 Oct 2007 19:36



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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


New To Site? Need Help?

All times are GMT. The time now is 04:20.

Layout Options | Width: Wide Color: