Competitions for XenForo [Deleted]

Is it some way of setting more than winners and runner ups? If I want to have 1st, 2nd, 3rd, 4th, 5th price and then runner ups?
 
I struggle to get in touch with a winner of one competition! Is there a way of pick a new winner in the same competition? And remove the old winner?
 
Hi @Chris Deeming,

I took a look and it looks like you generated the thumbnail URL (haven't checked for other images) using AVForums_Competitions_Model_Competition::getCompetitionImageUrl, I also noticed the method getCompetitionImagePath which is very similar to XenForo_Model_Attachment::getAttachmentDataFilePath. I have modified them like this

PHP:
public function getCompetitionImageUrl(array $data, $type)
{
return XenForo_Link::buildPublicLink('attachments', $data);
}

Which seems to work but I'm not sure it will work well when you resize the image and thumbnail in AVForums_Competitions_DataWriter_Competition...

I can confirm this to be the case - i've made @xfrocks' suggested edit, so images can now be uploaded, but the thumbnail resizing doesn't work leading to fairly nasty display issues

https://thumped.com/bbs/competitions/

An obvious workaround would be to use a standard pre-cropped thumbnail I suppose, but that's... also nasty.

edit: not sure even that works; certainly doesn't seem to for the existing competitions with existing un-cropped thumbnail images that need fixing.
 
Last edited:
I think i'm running into a bug, i had 2 competitions open, i'm trying to open the third, it does correctly, etc... But the Open Competitions counter on the menu won't go over to 3! Still shows 2 competitions with inside, 3 competitions open.

The sidebar competition widget also refuses to show more than 2 competitions, even with the admin option set to 4. o_O

What can i do to fix it?

EDIT: It will show 2 competitions open if there is 3, however, it will show all of them, if i have 4 Competitions. After i just set the 4rd competition to not be published, the count shows 3 correctly once again.
 
Last edited:
@Chris D - a bug with v1.2.0.

With the add-on disabled, new user registrations fail and the following is within ACP error log.

Code:
Server Error Log
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Field 'competition_entries' doesn't have a default value - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Unknown Account, 6 minutes ago
Stack Trace
#0 library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#3 library/XenForo/DataWriter.php(1624): Zend_Db_Adapter_Abstract->insert('xf_user', Array)
#4 library/XenForo/DataWriter.php(1613): XenForo_DataWriter->_insert()
#5 library/XenForo/DataWriter.php(1405): XenForo_DataWriter->_save()
#6 library/XenForo/ControllerPublic/Register.php(416): XenForo_DataWriter->save()
#7 library/Waindigo/JoinUserGroup/Extend/XenForo/ControllerPublic/Register.php(64): XenForo_ControllerPublic_Register->actionRegister()
#8 library/UserEss/ControllerPublic/Register.php(68): Waindigo_JoinUserGroup_Extend_XenForo_ControllerPublic_Register->actionRegister()
#9 library/Tac/DeDos/ControllerPublic/Register.php(51): UserEss_ControllerPublic_Register->actionRegister()
#10 library/XenForo/FrontController.php(347): Tac_DeDos_ControllerPublic_Register->actionRegister()
#11 library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#12 index.php(13): XenForo_FrontController->run()
#13 {main}
Request State
array(3) {
  ["url"] => string(41) "/register/register"
  ["_GET"] => array(1) {
    ["/register/register"] => string(0) ""
  }
  ["_POST"] => array(19) {

<redacted>

  }
}
 
Yeah, there is a fix in the installer so not sure at first glance why that didn't happen.

Anyway, the fix is this:
Code:
ALTER TABLE xf_user CHANGE COLUMN competition_entries competition_entries BLOB NULL
That should be the fix, IIRC.
 
That should be the fix, IIRC.
Thanks, but that is already the case prior to error ...
Code:
mysql> describe xf_user;
+----------------------------+-------------------------------------------------------------------------------+------+-----+---------+----------------+
| Field                      | Type                                                                          | Null | Key | Default | Extra          |
+----------------------------+-------------------------------------------------------------------------------+------+-----+---------+----------------+
| user_id                    | int(10) unsigned                                                              | NO   | PRI | NULL    | auto_increment |
| username                   | varchar(50)                                                                   | NO   | UNI | NULL    |                |
[...]
| competition_entries        | blob                                                                          | NO   |     | NULL    |                |
[...]
+----------------------------+-------------------------------------------------------------------------------+------+-----+---------+----------------+

Is it because NULL is default, but NULL is not allowed as a value on the column?
 
The column definition in your output is not correct, therefore use my query to make it correct. Correct, it currently doesn't allow a NULL value.
 
bugger I bought this thinking it would work for running photo competitions.... question and answers are not what we are looking for... what are the chances of getting this feature which after reading 23 pages of comments quite a lot of people are requesting.......
 
I have a long list of outstanding work and things to do, somewhere on there is feature requests for existing add-ons. Though I don't think that's going to help you in the short term.

Happy to provide a refund if it's not what you need. Just drop me a PM with the PayPal address you paid with.

I do have to say, though, I'm somewhat surprised you got as far as purchasing it before realising it wasn't what you needed. I don't think there's any ambiguity in the resource description or video :)
 
I have a long list of outstanding work and things to do, somewhere on there is feature requests for existing add-ons. Though I don't think that's going to help you in the short term.

Happy to provide a refund if it's not what you need. Just drop me a PM with the PayPal address you paid with.

I do have to say, though, I'm somewhat surprised you got as far as purchasing it before realising it wasn't what you needed. I don't think there's any ambiguity in the resource description or video :)


Hiya dropped a pm a little while ago now :-\

There must have been a bit of ambiguity it was only when I started trawling the 23 pages of questions and what not that it clicked...

A photo competition would be the ideal way to go and from reading a lot of people would be wanting that as well..
 
Top Bottom