Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vbGallery Addon: Photo of the Day Details »»
vbGallery Addon: Photo of the Day
Version: 1.00, by 0ptima 0ptima is offline
Developer Last Online: Jul 2015 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.4 Rating:
Released: 10-21-2007 Last Update: 10-23-2007 Installs: 31
Additional Files  
No support by the author.

This script will randomly select a photo from vbGallery and create a new thread in a specific forum with the photo and it's description. The script is run as a scheduled task in Vbulletin's Scheduled Tasks Manager.

Before uploading the script, you need to set which categories you want the photos to be selected from, the minimum width of the photo and the minimum amount of views that the photo has received.

Installation is easy, simply upload this script to the forums/includes/cron/ directory and create a new scheduled task. (See screen shot for suggested scheduled task parameters)

Tested on Vbulletin 3.6.4 and vbGallery 2.2
Confirmed to work on Vbulletin 3.6.8 and vbGallery 2.3
Confirmed to work on Vbulletin 3.7.0 and vbGallery 2.4.3
Confirmed to work on Vbulletin 3.8.2 and vbGallery 2.4.3
Confirmed to work on Vbulletin 3.8.3 and vbGallery 2.5

Please click install if you use this script.

This hack has been ported to PhotoPlog by TCooper.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 10-22-2007, 04:44 PM
Zorck Zorck is offline
 
Join Date: Jan 2003
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trancetopia View Post
Hi, are you planning to release a photopost pro version of this? Pretty please!

That well be nice!
Reply With Quote
  #13  
Old 10-22-2007, 10:56 PM
goblues goblues is offline
 
Join Date: Aug 2004
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GrendelKhan{TSU View Post
now all we need is a vbCMPS add-on for this and its perfect!!
If one isn't made by this weekend, I will take a look at it.
Reply With Quote
  #14  
Old 10-23-2007, 12:28 AM
0ptima 0ptima is offline
 
Join Date: Feb 2002
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trancetopia View Post
Hi, are you planning to release a photopost pro version of this? Pretty please!
Quote:
Originally Posted by goblues View Post
If one isn't made by this weekend, I will take a look at it.
I dont have access to photo post pro, so go ahead and port the hack.
Reply With Quote
  #15  
Old 10-23-2007, 12:35 AM
0ptima 0ptima is offline
 
Join Date: Feb 2002
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GrendelKhan{TSU View Post
that said, I got a ton of categories... and its a pain to list em all. Can you add an "all categories" default or something? like 0 = all categories. or however that works. and make it so you EXCLUDE certain ones?
I'll try to add that option this weekend. In the mean time, you can replace this SQL

PHP Code:
// select the random image from the photo gallery
$result$vbulletin->db->query_read("SELECT imageid, userid, username, filename, title, description
       FROM " 
TABLE_PREFIX "ppgal_images 
       WHERE catid IN (
$includecatids)
       AND width  > 
$width
       AND views > 
$views      
       ORDER BY RAND(NOW()) 
       LIMIT 1"
); 
with this


PHP Code:
// select the random image from the photo gallery
$result$vbulletin->db->query_read("SELECT imageid, userid, username, filename, title, description
       FROM " 
TABLE_PREFIX "ppgal_images 
       WHERE  width  > 
$width
       AND views > 
$views      
       ORDER BY RAND(NOW()) 
       LIMIT 1"
); 

The only problem is that it will select from private categories as well. Once I update the hack, ill have it exclude the private categories.
Reply With Quote
  #16  
Old 10-23-2007, 01:00 AM
goblues goblues is offline
 
Join Date: Aug 2004
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 0ptima View Post
I dont have access to photo post pro, so go ahead and port the hack.
Me neither. I was referring to the CMPS module. I wish I had photopost pro.
Reply With Quote
  #17  
Old 10-23-2007, 09:15 PM
0ptima 0ptima is offline
 
Join Date: Feb 2002
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by goblues View Post
Me neither. I was referring to the CMPS module. I wish I had photopost pro.
oops! I dont use CMPS, please go ahead and create a module.
Reply With Quote
  #18  
Old 10-23-2007, 09:51 PM
993ti 993ti is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It creates a topic every minute after midnight, lol.
Not sure what causes it but i've set it to execute at 00.01 now.
Will check what it does with that setting
Reply With Quote
  #19  
Old 10-23-2007, 10:02 PM
goblues goblues is offline
 
Join Date: Aug 2004
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mine did the same thing the first night, however the second night went fine.
Reply With Quote
  #20  
Old 10-23-2007, 10:37 PM
0ptima 0ptima is offline
 
Join Date: Feb 2002
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 993ti View Post
It creates a topic every minute after midnight, lol.
Not sure what causes it but i've set it to execute at 00.01 now.
Will check what it does with that setting
Sorry about posting a screen shot of the cron with an incorrect setting. I updated the screen shot in this thread and in the zip file.
Reply With Quote
  #21  
Old 10-24-2007, 12:48 AM
TRR TRR is offline
 
Join Date: Jan 2005
Location: San Antonio, TX
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

0ptoma, would you ever consider doing this same exact thing from vbclassifieds, and zoints profiles? I really like this feature.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 09:06 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06226 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete