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)

criscokid 02-07-2006 06:18 PM

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.

criscokid 02-07-2006 06:22 PM

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.

jellybaby 02-19-2006 07:16 AM

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?

husain 02-19-2006 08:46 AM

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>


MorrisMcD 02-19-2006 12:22 PM

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?

jellybaby 02-19-2006 01:02 PM

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

husain 02-19-2006 04:29 PM

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.

jellybaby 02-20-2006 12:27 PM

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.

husain 02-20-2006 12:46 PM

No it shouldn't affect the performace of your board.

jellybaby 02-20-2006 02:02 PM

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!

3dsoft 03-04-2006 07:27 PM

Is there a hook for ebux available?

So that the winners get points.

criscokid 03-10-2006 08:45 AM

Here's another suggestion for the the next version of this fantastic plugin:

The ability to capture personal details of the winner like name and address. I run competitions on my site with tangable items as prizes like DVDs theatre tickets, etc. The prizes need to be posted to the winners. WHen the site admin tells the plugin who the winners are it would be great if the plugin fired off an email to the winner congratulting them and asking them to reply to the email by filling in their name and address so ther prize can be sent out in the post.

jellybaby 03-25-2006 02:43 PM

I have a problem with this in that when the competition ends it puts me (Admin) as the winner. Dont seem to be showing the section for me to pick a winner, any ideas please?

bada_bing 03-25-2006 03:54 PM

Would love to see this hack progress as my site host many contests per year and this hack would be a better way to do them. I would like to see many of the brillant ideas suggested by other in the next version before I install

D|ver 03-27-2006 04:02 PM

Quote:

Originally Posted by 3dsoft
Is there a hook for ebux available?

So that the winners get points.

yeah a vbbux integration would be so great :)

joining a competition should also cost eg. 100 bucks oder something, that would be really nice :)

Oddjob 03-27-2006 04:20 PM

Quote:

Originally Posted by D|ver
yeah a vbbux integration would be so great :)

joining a competition should also cost eg. 100 bucks oder something, that would be really nice :)


Thats why i dont have this installed...no vbbux integration.

criscokid 03-28-2006 07:22 AM

Another idea to further enhance this great plugin:

Create a competitions block for the front page of a portal (like vbPortal) that lists the title of the current competitions. This would help draw people's attention so a site's competitions section.

Tommm 04-11-2006 05:09 PM

Hi!

This is a great plugin - I find it very useful!

I've just closed a competition which I set to have 3 winners. When I click Get Winners and enter the winning user IDs as: 789,16,81 or 79, 16, 81 I'm presented with the following message:

Quote:

vBulletin Message


Please enter a custom message.

GO BACK
Any ideas how to get around this? Thanks!

husain 04-11-2006 08:22 PM

You get this error message if you have set not to send Private Messages to winners. This was a bug which I fixed in the original file. Here is how to fix it:

admincp/competitionmanager.php

Find:
Code:

        if ($vbulletin->options['hkc_send_pm_to_winners'])
        {
                print_textarea_row($vbphrase['hkc_custom_pm_message'], 'custom_message', $vbphrase['hkc_pm_custom_message'], 4, 40, false);
        }

Replace with:
Code:

        if ($vbulletin->options['hkc_send_pm_to_winners'])
        {
                print_textarea_row($vbphrase['hkc_custom_pm_message'], 'custom_message', $vbphrase['hkc_pm_custom_message'], 4, 40, false);
        }
        else
        {
                construct_hidden_code('custom_message', 'nothing');
        }


Tommm 04-12-2006 07:11 PM

Perfect - thank you!

lawahdy 04-17-2006 05:03 PM

husain .. ma man..

i'm getting an sql error.. when i try to manage comps and or enter new ones..

Quote:

Unknown column 'startdate' in 'field list'
i've upgraded my hack from the old version "that was working fine" to the new one.. hmmm

lawahdy 04-17-2006 05:30 PM

Quote:

Originally Posted by lawahdy
husain .. ma man..

i'm getting an sql error.. when i try to manage comps and or enter new ones..



i've upgraded my hack from the old version "that was working fine" to the new one.. hmmm


okay now it is working fine.. i had to uninstall the plugin and reinstall it again..

i lost some data .. but that is okay... nothing important..

hope this doesn't happen when i have a bigger competition database.. looll

swantonio 04-17-2006 08:42 PM

problem vbulletin 3,.5.4

Database error in vBulletin 3.5.4:

Invalid SQL:

SELECT competitionid, title, startdate, enddate, winnercount, is_enabled
FROM vb3_hkc_competitions
ORDER BY startdate DESC, enddate DESC;

MySQL Error : Unknown column 'startdate' in 'field list'
Error Number : 1054
Date : Monday, April 17th 2006 @ 11:38:41 PM
Script : http://www.clubx360.it/forum/admincp....php?do=modify
Referrer : http://www.clubx360.it/forum/admincp/index.php?do=nav
IP Address :
Username :
Classname : vb_database

swantonio 04-18-2006 07:33 AM

-- phpMyAdmin SQL Dump
-- version 2.6.3-pl1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generato il: 18 Apr, 2006 at 10:16 AM
-- Versione MySQL: 3.23.58
-- Versione PHP: 5.0.4
--
-- Database: `IPB`
--

-- --------------------------------------------------------

--
-- Struttura della tabella `vb3_hkc_competitions`
--

CREATE TABLE `vb3_hkc_competitions` (
`competitionid` smallint(5) unsigned NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`description` mediumtext NOT NULL,
`type` enum('input','select','radio','textarea','checkbox ','select_multiple') NOT NULL default 'input',
`data` mediumtext NOT NULL,
`maxlength` smallint(6) NOT NULL default '250',
`size` smallint(6) NOT NULL default '25',
`height` smallint(6) NOT NULL default '0',
`optional` smallint(5) unsigned NOT NULL default '0',
`def` smallint(6) NOT NULL default '0',
`regex` varchar(255) NOT NULL default '',
`enddate` int(10) unsigned NOT NULL default '0',
`datestamp` int(10) unsigned NOT NULL default '0',
`correctanswer` mediumtext NOT NULL,
`entrycount` mediumint(8) unsigned NOT NULL default '0',
`maxentries` smallint(5) unsigned NOT NULL default '1',
`maxwinners` smallint(5) unsigned NOT NULL default '1',
`winnercount` smallint(5) unsigned NOT NULL default '0',
`enableguidelines` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`competitionid`),
KEY `enddate` (`enddate`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `vb3_hkc_competitions`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `vb3_hkc_entries`
--

CREATE TABLE `vb3_hkc_entries` (
`entryid` int(10) unsigned NOT NULL auto_increment,
`competitionid` smallint(5) unsigned NOT NULL default '0',
`userid` int(10) unsigned NOT NULL default '0',
`answer` mediumtext NOT NULL,
`entrydate` int(11) NOT NULL default '0',
PRIMARY KEY (`entryid`),
KEY `competitionid_userid` (`competitionid`,`userid`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

--
-- Dump dei dati per la tabella `vb3_hkc_entries`
--


-- --------------------------------------------------------

--
-- Struttura della tabella `vb3_hkc_winners`
--

CREATE TABLE `vb3_hkc_winners` (
`competitionid` smallint(5) unsigned NOT NULL default '0',
`userid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`competitionid`,`userid`)
) TYPE=MyISAM;

--
-- Dump dei dati per la tabella `vb3_hkc_winners`
--

swantonio 04-18-2006 07:33 AM

the querry non funzionano !!!!

SLGR 04-18-2006 07:55 AM

I'm currently on vB version 3.5.2 (patched)
Do i need to upgrade to use this hack?

husain 04-18-2006 09:36 AM

Quote:

Originally Posted by SLGR
I'm currently on vB version 3.5.2 (patched)
Do i need to upgrade to use this hack?

There is no need to upgrade for this hack to work.

husain 04-18-2006 09:40 AM

Quote:

Originally Posted by swantonio
problem vbulletin 3,.5.4

Database error in vBulletin 3.5.4:

Invalid SQL:

SELECT competitionid, title, startdate, enddate, winnercount, is_enabled
FROM vb3_hkc_competitions
ORDER BY startdate DESC, enddate DESC;

MySQL Error : Unknown column 'startdate' in 'field list'
Error Number : 1054
Date : Monday, April 17th 2006 @ 11:38:41 PM
Script : http://www.clubx360.it/forum/admincp....php?do=modify
Referrer : http://www.clubx360.it/forum/admincp/index.php?do=nav
IP Address :
Username :
Classname : vb_database

I think you have an older version of the hack with new PHP files. If your products page shows any version less than 1.0.2, please download the ZIP file again, and reinstall the hack. Make sure you check the box that says "Allow Overwrite".

swantonio 04-18-2006 10:32 AM

Database error in vBulletin 3.5.4:

Invalid SQL:

SELECT competitionid, title, startdate, enddate, winnercount, is_enabled
FROM vb3_hkc_competitions
ORDER BY startdate DESC, enddate DESC;

MySQL Error : Unknown column 'startdate' in 'field list'
Error Number : 1054
Date : Tuesday, April 18th 2006 @ 01:30:54 PM
Script : http://www.clubx360.it/forum/admincp....php?do=modify
Referrer : http://www.clubx360.it/forum/admincp/index.php?do=nav
IP Address : 213.xxx.xxx.xxx
Username : SWANTONIO
Classname : vb_database

no non funziona :ermm:

SLGR 04-20-2006 07:24 AM

I set up a test competition.
I, myself, participated in it... as soon as i voted i received a pm informing me of my competition. Now, is sais: (in the main forum page)

Welcome, {Nickname}.
You last visited: Today at 11:20
Private Messages: Unread 29, Total 635.
No pop-up for them, i logged out and logged in again, no change, i still have 29 unread pms which i can't find.

Any thought?

Edit:
I just found them, the oldest 29 was marked as unread.
But why? For sure, this happened after i received the "thank you" pm and send the report back (ok, the report came to me).

also, one question.
As soon as the Competitions comes to an end, what happens then?
:)

husain 04-20-2006 09:11 AM

Can you reproduce the unread PM error again? Has anyone else had this problem too?

--

When a competition ends, nothing happens really other than the competition being shown in the Closed Competitions list. It is up to you to remember when competitions close and select winners.

I am working on setting up a cron job to notify the administrator when a competition ends. Other than that, what would you want the hack to do when a competition ends?

criscokid 04-20-2006 11:48 AM

Husain: are you planning on any new versions of this great mod anytime soon? Just curious as I've previously submitted some suggestions to this thread.

Smiry Kin's 04-29-2006 10:26 AM

possible to make it work on posts..

it selects a X amount of people from a X group( the top X people who posted the most ), and randomly choose who will win??

cat4m 05-01-2006 09:01 PM

Argggh ! I still get the following message in the amin cp

Start Date End Date Controls
1 Minute Ago 01:00 AM 1 Minute Ago 01:00 AM

Also I uploaded the 2nd XML file and disabled the first one and dont have anything showing on my forums now. I have put all the files to their original settings and still have no Competition showing on the forum page. ??

The dates and times still remain the same. Can someone help please.

criscokid 05-04-2006 12:32 PM

Another useful addition for the next feature: a text block or something that site admins can use to write something like "Are you a company looking to promote your product? Why not offer some of your products as prizes for a competition? Click here to find out more..."

I've already had a few companies discover my competitions section - they've gone on to email me asking how they can get involved. If there was a link there I'd probably get even more enquiries and prizes being donated. The link could open a new page telling them the low down and what they need to do to get the ball rolling or maybe the link could just open a page asking for more deatils like company name, what they have in mind as prizes, etc and that info can then get sent as an email to the site admin.

funinthesun 05-12-2006 07:59 PM

I've just installed this and I get this error:
Code:

Database error in vBulletin 3.5.3:

Invalid SQL:
SELECT competitionid, title, description, startdate, enddate, entrycount
                FROM hkc_competitions
                WHERE is_enabled = 1 AND startdate < 1147467286 AND enddate > 1147467286
                ORDER BY enddate ASC, startdate DESC, datestamp DESC;

MySQL Error  : Table '*****db.hkc_competitions' doesn't exist
Error Number : 1146
Date        : Friday, May 12th 2006 @ 09:54:46 PM
Script      : http://www.*******.com/competitions.php
Referrer    : http://www.******.com/competitions.php
IP Address  : **.*.***.**
Username    : ******
Classname    : vb_database

Any idea what's wrong?

Jaymee 05-31-2006 04:10 PM

Thanks ALOT dude!. Really helpfull

SimonVlc 06-04-2006 08:44 PM

Hi all,

I´m having one trouble using this mod with one line answer. The system didn´t recognize any winners.

Ex. I create a dummy competition with answer "anything". I´ve enter the comp with a user, write the correct answer, close the comp, and pushed on get winners, but the system ask me to enter the id of the winners.

If I do the same with radio buttons, the system identifies correctly the winners.

Is this the normal behaviour? Thanks in advance, Simon.

peterska2 06-04-2006 09:00 PM

I've never used the free text answers, just the radio buttons and it has worked every time for me.

Using free text requires exact capitalization and spelling so it could be difficult for the system to match it.

SimonVlc 06-10-2006 12:55 AM

Thx for the answer peterska, but I´m still unnable to get it working.

Copy pasting the answer didn´t work... anyone else did notice this behaviour?

Thanks in advance, Simon.


All times are GMT. The time now is 08:00 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.02147 seconds
  • Memory Usage 1,880KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_html_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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