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
  #122  
Old 02-07-2006, 06:18 PM
criscokid criscokid is offline
 
Join Date: Nov 2003
Location: London, UK
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a fantastic plugin!! Thank you :-)

Constructive comment: At the moment unregistered users (or people who don't have the correct permission to enter a competition) get the standard vBulletin 'you do not have permssion' message...

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

In my opinion this is a very crude message. I'd like to suggest that this part of the plugin be re-written to show a user friendly message that says the competition is only open to registered users and include a link to the user registration page. The user friendly message and the link will definitely encourage more people to register on the forum.

A similar user friendly message should also be used for people who are in the 'user awaiting confirmation category' - maybe they're still unconfirmed because they enterred and invalid email address when they registered and not aware of the fact.

Here's an example message:
Your account has not been confirmed and is not yet active! To become a registered user on scene-OUT.com (required to access many special features) you will need to verify your email address by clicking a special link sent to you in our original welcome email. If you have lost this email, or it never arrived, please go here (/forums/register.php?do=requestemail) to request another activation email be sent to you. If you suspect your email address is set wrong, go here (/forums/sendmessage.php) and fill the form out so an administrator can fix your account. Also please be sure to disable any spam filters you may have for our website, so that this and all future messages can reach you.
Reply With Quote
  #123  
Old 02-07-2006, 06:22 PM
criscokid criscokid is offline
 
Join Date: Nov 2003
Location: London, UK
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd love to see the next version of this plugin include the following features:

* Draw the winners based on the content of a specified field. Example: It's no good giving a person who lives in Sydney the prize of free entry for a year to a club that's in London. In this case the competition should select the winner based on an entrant's city field being London or country field being United Kingdom. There needs to be the flexibity to have the winner based on at least two fields in a case where the prize is say only suited to a man or a woman that lives in a particular city.

* The ability to upload a product photo in the competiton (and set the 'alt' tag - maybe also include a hyperlink for the image that could be used to take a user to the website of the company that sponsored the prize). This will add more colour top the page and make the competition look more appealing! :-)

* If a user attempt to entered more than the allowed number of entries he get's the following message: 'You have already participated in this competition. You cannot enter more than once.' Include a linl back to the competitions page.
Reply With Quote
  #124  
Old 02-19-2006, 07:16 AM
jellybaby jellybaby is offline
 
Join Date: Jul 2005
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What happens when you have a lot of competitions running, is it possible to have a click through list to the competitions first so you can go to each individual competition and just have one comp at a time showing on a page?
Reply With Quote
  #125  
Old 02-19-2006, 08:46 AM
husain's Avatar
husain husain is offline
 
Join Date: Feb 2005
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jellybaby
What happens when you have a lot of competitions running, is it possible to have a click through list to the competitions first so you can go to each individual competition and just have one comp at a time showing on a page?
You can do that by modifying the templates.

Replace the content of hkc_COMPETITIONS with this:
HTML Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - $pagetitle</title>
</head>
<body>
$header
$navbar

<if condition="$showopencompetitions">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
	<tr>
		<td colspan="<if condition="$vboptions[hkc_show_total_entries]">3<else />2</if>" class="tcat">$vbphrase[hkc_open_competitions]</td>
	</tr>
	<tr>
		<td class="thead">$vbphrase[hkc_competitions]</td>
		<td class="thead" align="center">$vbphrase[hkc_competition_end_date]</td>
		<if condition="$vboptions[hkc_show_total_entries]"><td class="thead" align="center">$vbphrase[hkc_entries]</td></if>
	</tr>
$opencompetitionlist
</table>
</if>

<br />

<if condition="$showpendingcompetitions">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
	<tr>
		<td colspan="2" class="tcat">$vbphrase[hkc_pending_competitions]</td>
	</tr>
	<tr>
		<td width="100%" class="thead">$vbphrase[title]</td>
		<td class="thead" align="center">$vbphrase[hkc_competition_start_date]</td>
	</tr>
$pendingcompetitionlist
</table>

<br />
</if>

<if condition="$showclosedcompetitions">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
	<tr>
		<td colspan="<if condition="$vboptions[hkc_show_total_entries]">4<else />3</if>" class="tcat">$vbphrase[hkc_closed_competitions]</td>
	</tr>
	<tr>
		<td width="100%" class="thead">$vbphrase[title]</td>
		<td class="thead" align="center">$vbphrase[hkc_competition_end_date]</td>
		<if condition="$vboptions[hkc_show_total_entries]"><td class="thead" align="center">$vbphrase[hkc_entries]</td></if>
		<td class="thead" align="center">$vbphrase[hkc_winner]</td>
	</tr>
$closedcompetitionlist
</table>
</if>

$footer
</body>
</html>
and replace the content of hkc_competitions_openbit with this:
HTML Code:
<tr>
	<td class="alt2" width="100%"><a href="competitions.php?do=participate&amp;cid=$competition[competitionid]">$competition[title]</a></td>
	<td class="alt2"><nobr>$competition[enddate] $competition[endtime]</nobr></td>
	<if condition="$vboptions[hkc_show_total_entries]"><td align="center" class="alt2">$competition[entrycount]</td></if>
</tr>
Reply With Quote
  #126  
Old 02-19-2006, 12:22 PM
MorrisMcD's Avatar
MorrisMcD MorrisMcD is offline
 
Join Date: Nov 2003
Location: Cincinnati, Ohio
Posts: 415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Forgive me.. But I have this installed and I am not quite sure what it does... It seems to be like a questionair and if you answer the questions right, you win? I dont actually get it.. Can you give me an example of what you use it for?
Reply With Quote
  #127  
Old 02-19-2006, 01:02 PM
jellybaby jellybaby is offline
 
Join Date: Jul 2005
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thats brilliant Husain, thank you

Another question, when I select Get Winner, it comes up with a box asking me to put the winners ID in, is that right, and if so does that mean I have to go and look through the entries and select the winner?

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

Quote:
Originally Posted by jellybaby
Thats brilliant Husain, thank you

Another question, when I select Get Winner, it comes up with a box asking me to put the winners ID in, is that right, and if so does that mean I have to go and look through the entries and select the winner?

Thanks
Yes you would have to select the winners manually. My code is not intelligent enough at the moment to pick winners in an unbiased fashion and it is best that the owners of the website pick the winners.

If you select a single-selection radio button as the answer type and specify the correct answer, the code will automatically select the specified number of winners provided that they have answered correctly. This happens by selecting a record from the database at random though I cannot guarantee that it would be the most unbiased selection.

--

I would be happy if anyone is willing to develop some intelligent form of selecting winners for this hack. Please get in touch with me to discuss ideas.
Reply With Quote
  #129  
Old 02-20-2006, 12:27 PM
jellybaby jellybaby is offline
 
Join Date: Jul 2005
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This will make it so much easier. Will this affect performance on my board at all if I run a lot of competitions and they have a lot of entries?

Again, many thanks for this great plugin.
Reply With Quote
  #130  
Old 02-20-2006, 12:46 PM
husain's Avatar
husain husain is offline
 
Join Date: Feb 2005
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No it shouldn't affect the performace of your board.
Reply With Quote
  #131  
Old 02-20-2006, 02:02 PM
jellybaby jellybaby is offline
 
Join Date: Jul 2005
Posts: 210
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Brilliant thanks. Must admit I added this to my board when you first put it out and then forgot all about it as I was inundated on my site. This will help me out so much!
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:45 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.04440 seconds
  • Memory Usage 2,339KB
  • 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
  • (4)bbcode_html
  • (2)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