vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Competitions (https://vborg.vbsupport.ru/showthread.php?t=100150)

husain 11-04-2005 10:00 PM

Competitions
 
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.

D|ver 11-05-2005 12:53 PM

great thank you for this hack :)
i will definately test this out :D

Mastar 11-05-2005 01:05 PM

I don't see it on the forum only in the admincp.

When I run the ./competitions.php I get this error:

Warning: Division by zero in /includes/functions.php(4259) : eval()'d code on line 10

This is probably because I'm running vb 3.50?

If so is there a competition for Vb 3.50?

D|ver 11-05-2005 01:08 PM

i can't access competitins.php (userid=1)

jellybaby 11-05-2005 01:16 PM

Edited because I found out why I couldnt access it, had to go into usergroups and right to the bottom to select allow to enter

BoYagoob 11-05-2005 01:18 PM

Quote:

Originally Posted by D|ver
i can't access competitins.php (userid=1)

Quote:

Originally Posted by jellybaby
I get a you do not have permission page when I do competitions.php


Me too :(


BoYagoob, you do not have permission to access this page. This could be due to one of several reasons:

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.
Log Out Home

jellybaby 11-05-2005 01:22 PM

I have this working ok on my site now thank you:nervous:

D|ver 11-05-2005 01:26 PM

ah thanks, now its also working for me
great addon :)

SnowBot 11-05-2005 01:34 PM

Looks very interesting, i will check this out later

michaelbenson 11-05-2005 02:02 PM

Quote:

Originally Posted by SnowBot
Looks very interesting, i will check this out later

Ditto, good job :nervous:

stonyarc 11-05-2005 02:09 PM

Looks like a great addition to me.

Will definately try it out

MaTraX 11-05-2005 02:15 PM

Quote:

Originally Posted by BoYagoob
Me too :(


BoYagoob, you do not have permission to access this page. This could be due to one of several reasons:

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.
Log Out Home

Same here.. what`s wrong? What to do to make it work properly?

Snake 11-05-2005 02:46 PM

Oh sweet. I was hoping to see a competition hack but I thought that it's not possible but were we go, you have just made it!

Thank you VERY much! :D

D|ver 11-05-2005 03:11 PM

Quote:

Originally Posted by MaTraX
Same here.. what`s wrong? What to do to make it work properly?

edit the permissions for each usergroup in the acp

MaTraX 11-05-2005 03:33 PM

@D|ver -thank you :)
It`s working fine now.

husain 11-05-2005 03:47 PM

Thank you all for your feedback. It is apparent that I forgot to mention very important post-installation steps and left you all to do some detective work. Sorry -- this is the first time I am publishing something here. I have added instructions on how to install the extension.

Quote:

Originally Posted by Mastar
This is probably because I'm running vb 3.50?

If so is there a competition for Vb 3.50?

This extension was developed for vBulletin 3.5 and I am running it on my forums (v 3.5.1) without any problems.

yinyang 11-05-2005 04:20 PM

is there a referral competition hack for 3.5.x? if not, can this be modified to do that?

Kurisu 11-05-2005 04:56 PM

Nice hack, installed.

Yet I think the hack is quite useless if you can only specify one question...

husain 11-05-2005 05:10 PM

Quote:

Originally Posted by Kurisu
Nice hack, installed.

Yet I think the hack is quite useless if you can only specify one question...

Agree. I meant to add multiple-question functionality for quite some time now. Unfortunately I haven't been able to dedicate enough time for it's development. Maybe if enough people show interest, I may be motivated to set aside a couple of hours everyday to add this functionality :)

C.Birch 11-05-2005 05:13 PM

I really need multiple-question functionality so if you could add it that be great :)

JsnakeJ 11-05-2005 05:42 PM

Any chance of a working demo? Thank you.

Snake 11-05-2005 05:47 PM

<a href="http://forums.mgszone.com/competitions.php" target="_blank">http://forums.mgszone.com/competitions.php</a>

You'll need to register inorder to view the competition page.

concepts 11-05-2005 05:50 PM

is there any way to delete entries? per the admincp?
and how do you change the thankyou PM?

Snake 11-05-2005 06:08 PM

Yes you can delete entries via the ACP.

You'll need to edit the phrase using Phrase Manager.

JsnakeJ 11-05-2005 06:30 PM

Nice forum man. Thanks for this hack.

Snake 11-05-2005 06:33 PM

Hehe thank you for your compliment. Wait to see the new skin. :p

husain 11-05-2005 06:34 PM

For those who would like to customize this hack, all phrases and templates begin with hkc_

SnowBot 11-05-2005 08:39 PM

Quote:

Originally Posted by husain
Agree. I meant to add multiple-question functionality for quite some time now. Unfortunately I haven't been able to dedicate enough time for it's development. Maybe if enough people show interest, I may be motivated to set aside a couple of hours everyday to add this functionality :)

Multiple questions is the way to go so yer i second the motion to do it mate :)

Hoffi 11-05-2005 09:26 PM

What about to build in a start date? I want to build a Advent Calendar, and every Day only one Question should be displayed.

DJ XtAzY 11-06-2005 03:31 AM

yay i hope i can use this as a contest thing

Lea Verou 11-06-2005 06:17 AM

How is this different from the inferno quiz apart from the number of questions? :)

D|ver 11-06-2005 10:20 AM

hmm i got an error message after picking winners



Datenbankfehler in vBulletin 3.5.1:

Invalid SQL:

SELECT profilefieldid, title
FROM profilefield
WHERE profilefieldid IN ();

MySQL-Fehler : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3
Fehler-Nr. : 1064
Datum : Sunday, November 6th 2005 @ 01:18:13 PM
Skript : http://www.xxx.com/forums/admincp/co...ionmanager.php
Referrer : http://www.xxx.com/forums/admincp/co...ompetitionid=1
Benutzername : xxx
Klassenname : vb_database

husain 11-06-2005 12:28 PM

Quote:

Originally Posted by D|ver
hmm i got an error message after picking winners



Datenbankfehler in vBulletin 3.5.1:

Invalid SQL:

SELECT profilefieldid, title
FROM profilefield
WHERE profilefieldid IN ();

MySQL-Fehler : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3
Fehler-Nr. : 1064
Datum : Sunday, November 6th 2005 @ 01:18:13 PM
Skript : http://www.xxx.com/forums/admincp/co...ionmanager.php
Referrer : http://www.xxx.com/forums/admincp/co...ompetitionid=1
Benutzername : xxx
Klassenname : vb_database

Fixed. You can download the zip file and only replace the old competitionmanager.php file (in admincp) with the new one.

husain 11-06-2005 12:48 PM

Quote:

Originally Posted by Loukrhtia
How is this different from the inferno quiz apart from the number of questions? :)

Oh dear! I didn't realize there was another hack that could do the same things that my hack does :)

tidy_boy 11-06-2005 01:04 PM

husain you are awesome been wanting something like this :D

Just one thing is there away you can make a module for my cmps to show open competitions please

Here is my site www.harddanceaddict.net

Thanks

husain 11-06-2005 04:04 PM

I am afraid not: due to time constraints. However, it shouldn't be too difficult and I can offer my help should you wish to code it yourself.

tidy_boy 11-06-2005 04:32 PM

I do not know anything about coding :-(

Snake 11-06-2005 05:11 PM

Quote:

Originally Posted by husain
Oh dear! I didn't realize there was another hack that could do the same things that my hack does :)

What are you talking about? This is a competition hack. The other one is a quiz hack.

C.Birch 11-06-2005 06:19 PM

the quiz hack is not anything like this hack husain :)

peterska2 11-06-2005 10:13 PM

Well it took me about 3 dozen attempts to install including having to re-write the XML and manually do the queries, but eventually we got there and it now works.

On the whole, a nice little hack, but a complete ball ache to get working. I recommend you revisit your XML and check it over again.


All times are GMT. The time now is 05:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01451 seconds
  • Memory Usage 1,819KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete