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.
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?
Offline
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
Offline
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.
Offline
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
Offline
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