Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2014-11-23 23:14:54

dereklro
Member
Registered: 2014-08-08
Posts: 37

Where to edit php for the Mass Embed video importer?

I want to add a "random thumb" php code into the mass embed script in order to select my thumbs randomly as they are imported. It is too time consuming to manually select a thumbnail for each video that is imported (which is needed). Right now, the video thumbs are imported with the images displaying consecutively through the video and the first thumb for the beginning of each video is always automatically selected. It leaves me with a lot of black images, and thumbs that do not look good as the main thumbnail. I just want to automate the process of choosing a thumb in the middle of the video at random.

Does anyone know of an easy way to implement this? (what code to use?)

What file(s) would I need to edit in order to do this?


logo.png

Offline

#2 2014-11-24 07:28:16

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Where to edit php for the Mass Embed video importer?

admin/modules/grab/components/grab.php and find:

                    $this->db->query("UPDATE #__video 
                                      SET status = ".$this->status.",
                                          thumbs = ".$valid."
                                      WHERE video_id = ".$video_id."
                                      LIMIT 1");

replace with:

                    $this->db->query("UPDATE #__video 
                                      SET status = ".$this->status.",
                                          thumb = ".rand(1, $valid).",
                                          thumbs = ".$valid."
                                      WHERE video_id = ".$video_id."
                                      LIMIT 1");

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2014-11-24 07:55:32

dereklro
Member
Registered: 2014-08-08
Posts: 37

Re: Where to edit php for the Mass Embed video importer?

Works like a charm! Thank you so much!


logo.png

Offline

#4 2014-11-30 18:42:26

dereklro
Member
Registered: 2014-08-08
Posts: 37

Re: Where to edit php for the Mass Embed video importer?

Another question about this. Is it possible (while choosing random images) to not include or not consider the first image? Is there a way to tell it to choose only the middle images (excluding first and last images) for the videos? Just trying to fine tune my importing a bit.


logo.png

Offline

#5 2014-12-01 06:50:09

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Where to edit php for the Mass Embed video importer?

Not possible, but i can include this feature in the next version.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#6 2014-12-01 13:14:50

Eri
Member
Registered: 2011-03-18
Posts: 977

Re: Where to edit php for the Mass Embed video importer?


Best Adult Affilitate Network:
ExoClick
Best Deals on Dedicated Servers - CDN
INXY

Offline

#7 2014-12-01 15:43:35

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Where to edit php for the Mass Embed video importer?

Yeah, or even a feature to define which thumb to use.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB