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

Reply
 
Thread Tools
Competitions Details »»
Competitions
Version: 1.0.3, by husain husain is offline
Developer Last Online: Mar 2020 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 11-04-2005 Last Update: 04-10-2006 Installs: 181
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

Description
Adds a competition module to your forums. You can create as many competitions and allow members to participate in them.

Features
  • Ability to force participants to fill certain custom profile fields
  • Send Private Message to members who participate in the competitions
  • Ability to allow more than one entry from a participant
  • Input field for answers can be either a textbox, a textarea, radio buttons or a drop-down menu
  • If the input type is radio buttons or a drop-down menu, the system can filter out wrong answers and generate a list of winners by picking random participants
  • Schedule competitions by setting the starting date (user contributed)
  • Very customizable

Installation
  1. Upload all necessary files to their respective directories.
  2. Install the product XML file.
  3. Edit the navbar template to add a link to competitions.php page. (see below)
  4. Set necessary permissions for each usergroup to access and/or participate in competitions.
  5. Edit the "hkc_nopermission_loggedin" and "hkc_winner_congratulate_message" phrase to customize to your taste.

Upgrade
  1. Upload all necessary files to their respective directories.
  2. Install the product XML file. Be sure to set "Allow Overwrite" to Yes.

Editing the navbar template

1. Open the navbar template

2. Find:
HTML Code:
<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
3. Add after:
HTML Code:
<td class="vbmenu_control"><a href="competitions.php$session[sessionurl_q]">$vbphrase[hkc_competitions]</a></td>
4. Save template

Author Notes
This extension was developed specifically for my website but I am releasing the code since a few members here have have shown interest. I cannot state that it is totally free of bugs. I would appreciate your feedback in making this extension better.

Maybe in Future
At the moment, the question is only restricted to one per competition. I would like to have the ability to add more than one question per competition.

Supporters / CoAuthors

Show Your Support

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

Comments
  #112  
Old 01-16-2006, 12:33 PM
tris tris is offline
 
Join Date: Jun 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have made a hack which includes more information about the winners in the PM to the competition admin. (e.g. Name, Surname, Street, City etc.)

You only need to modify the custom profile fields to your needs.

E.g. if your customprofile field9 contains the user surname, field10 contains the lastname etc.

Just replace the competitionmanager.php with the attached and modify the customfields on line 590 and 592.
Reply With Quote
  #113  
Old 01-17-2006, 07:55 AM
kadafi_alive kadafi_alive is offline
 
Join Date: Dec 2004
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any update on the more-than-1-question development?
Reply With Quote
  #114  
Old 01-18-2006, 06:24 AM
husain's Avatar
husain husain is offline
 
Join Date: Feb 2005
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kadafi_alive
Any update on the more-than-1-question development?
Nope. Multiple-question feature will essentially take this hack back to the drawing board stage as it requires a huge database and code change. While I am working on this, I am not making any commitments to deliver it.
Reply With Quote
  #115  
Old 01-18-2006, 06:32 AM
husain's Avatar
husain husain is offline
 
Join Date: Feb 2005
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have updated the hack to add some new features that were requested here.
  • Ability to schedule competitions. You can now set a starting date for competitions. This feature was contributed by Hoffi so all credit goes to him.
  • You can now delete entries.
  • Competitions can be disabled. This is useful if you want to preserve the competition information and entries but do not want it to appear on the live website.
  • Some other minor changes.
As always suggestions, criticism, and feedback is welcome.
Reply With Quote
  #116  
Old 01-18-2006, 12:22 PM
tris tris is offline
 
Join Date: Jun 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Many thanks for the update.

I have already integrated the "Include profilefields in Winnerlist PM"

You must edit line 656 and line 658 to include your profile field numbers.

$userinfo .= "Username: {$row['username']}\nEmail: {$row['email']}\n {$userfields['field9']} {$userfields['field10']} {$userfields['field11']} {$userfields['field12']}\n";

unset($row['username'], $row['email'], $userfields['field9'], $userfields['field10'], $userfields['field11'], $userfields['field12']);
Reply With Quote
  #117  
Old 01-18-2006, 12:48 PM
kadafi_alive kadafi_alive is offline
 
Join Date: Dec 2004
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by husain
Nope. Multiple-question feature will essentially take this hack back to the drawing board stage as it requires a huge database and code change. While I am working on this, I am not making any commitments to deliver it.
Alright.

Can you also tell me why End Date says:
1 Minute Ago 12:00 AM

instead of showing the actual end date?

Thanks
Reply With Quote
  #118  
Old 01-18-2006, 03:33 PM
husain's Avatar
husain husain is offline
 
Join Date: Feb 2005
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kadafi_alive
Alright.

Can you also tell me why End Date says:
1 Minute Ago 12:00 AM

instead of showing the actual end date?

Thanks
I haven't been able to reproduce this error on my installation. Does it show you for any competition you create?
Reply With Quote
  #119  
Old 01-18-2006, 06:11 PM
kadafi_alive kadafi_alive is offline
 
Join Date: Dec 2004
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by husain
I haven't been able to reproduce this error on my installation. Does it show you for any competition you create?
Yes and it stays at that. It doesn't change at all.

In fact, 4number8 has also the same problem:
Quote:

I was needing something similar to this, but for my questions the answer would be unknown untill the event was over, can I still use this and add the event date a day later, than update the answer? would doing it this way still work correctly with the PM's? I have installed it and been playing around with it, but it always states that the event end date has ended... like this: End Date: 1 Minute Ago 06:00 PM
anyone have idea's why this is doing this? thanks for a great hack btw
Reply With Quote
  #120  
Old 01-19-2006, 05:54 AM
Hoffi's Avatar
Hoffi Hoffi is offline
 
Join Date: Nov 2001
Location: Germany
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kadafi_alive
Can you also tell me why End Date says:
1 Minute Ago 12:00 AM
This depends onb your local Settings. You display the detailed Versin for the Date. This also happens to this Hack.
Reply With Quote
  #121  
Old 01-19-2006, 06:16 AM
kadafi_alive kadafi_alive is offline
 
Join Date: Dec 2004
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hoffi
This depends onb your local Settings. You display the detailed Versin for the Date. This also happens to this Hack.
Yes, I use the detailed time on my forum. Are you saying that it's not compatible with the detailed time function?
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 01:51 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.05376 seconds
  • Memory Usage 2,323KB
  • Queries Executed 26 (?)
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_html
  • (7)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
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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