Competitions for XenForo [Deleted]

This was going to be demonstrated later in the video that Stuart is creating... but this should answer most of the questions:

upload_2013-9-15_14-1-52.webp

The Winners link opens:

upload_2013-9-15_14-2-59.webp

The download winners button produces a CSV (might be useful for sponsors):

entry_id,competition_id,user_id,username,email,entry_state
12,8,1,Stuart Wright,stuart@email.com,winner
14,8,349691,Minx,vicki@email.co.uk,runner_up

The link in the Opt ins column downloads a CSV similar to the above of those users who opted in to receive marketing communications.

This is controlled by permissions.
 
Chris Deeming updated AVForums.com - Competitions with a new update entry:

Change to the navigation tab count function and more...

This version was actually released this morning so any one who has purchased will already have this version (1.0.1).
  • The count above the navigation tab now displays the number of open competitions that have not yet been entered by the currently logged in user.
  • There is a new Admin CP option to disable the item count completely.
  • There is a new Admin CP option to change the number of competitions displayed per page in the Archive section.
  • Fixed error on phrase in Admin CP...

Read the rest of this update entry...
 
Nice stuff Chris, always loved your work. Can I change the phrase "Competitions" to "Contests" easily? How are the competition winners decided? Might be a great way to do cool stuff for my gaming community.
 
Purchased :-)

Just a note that with fetchapp, when you're forwarded from paypal, the first message is that it could not find your order. If you then click "find order" it does find it the second time.
 
Purchased :)

Just a note that with fetchapp, when you're forwarded from paypal, the first message is that it could not find your order. If you then click "find order" it does find it the second time.


Seems to happen with xenforo purchase I have made that uses fetchapp
 
Nice stuff Chris, always loved your work. Can I change the phrase "Competitions" to "Contests" easily? How are the competition winners decided? Might be a great way to do cool stuff for my gaming community.
Thanks John.

Yes it's heavily phrased so just find and change the phrases in the normal way.

The downside is, there's a lot of references to the term "competition".

If you purchase the add-on, it actually might be easier to edit the phrases in the XML file before installing but these would get overwritten during upgrades.

Making the changes in your default language (not Master Language) would ensure they are retained across upgrades.
 
Thanks John.

Yes it's heavily phrased so just find and change the phrases in the normal way.

The downside is, there's a lot of references to the term "competition".

If you purchase the add-on, it actually might be easier to edit the phrases in the XML file before installing but these would get overwritten during upgrades.

Making the changes in your default language (not Master Language) would ensure they are retained across upgrades.
Boy that stinks. I thought it might have been an option, that's what we are doing for one of our plugins so it's easier to change. One plural and singular field under options.
 
It's not really practical for sites that are multi-lingual. Because then you have an option hardcoded in one language in the Admin CP that cannot be translated. Stinks even more if you ask me.
 
Actually there is something already that helps.

By default when creating a competition you can choose between two types of competition, competition or prize draw.

Some of the phrases are like this:

{xen:phrase avforums_competitions_competitiontype_status, 'type={$competitionType}'}

And $competitionType is passed to the template in PHP as new XenForo_Phrase('avforums_competitions_competition') or new XenForo_Phrase('avforums_competitions_prizedraw')

S0, what I'm saying is, there should actually be a lot less work involved in changing the phrase. Just change the phrase avforums_competitions_competition from "Competition" to "Contest" and that should handle the bulk of the front end phrases.

A lot of back end phrases will refer to Competitions but if they're back end that shouldn't matter.

There's then not too many other front end phrases that would need adjusting.
 
Another great addon chris i have been keeping eye on another addon raffle but this seems to be great as well . Is is possible to have option like I agree with the term of contest etc etc before entering it ?

Also would like to know if we can add like banner on top of contest of our sponsors .

Thanks
 
I just tried creating a competition and got the following error:


imagecopyresampled() expects parameter 5 to be long, string given
  1. XenForo_Application::handlePhpError()
  2. imagecopyresampled() in AVForums/Competitions/Helper/Image.php at line 223
  3. AVForums_Competitions_Helper_Image->resizeCrop() in AVForums/Competitions/DataWriter/Competition.php at line 400
  4. AVForums_Competitions_DataWriter_Competition->_associateAttachments() in AVForums/Competitions/DataWriter/Competition.php at line 163
  5. AVForums_Competitions_DataWriter_Competition->_postSave() in XenForo/DataWriter.php at line 1397
  6. XenForo_DataWriter->save() in AVForums/Competitions/ControllerPublic/Competition.php at line 936
  7. AVForums_Competitions_ControllerPublic_Competition->actionSave() in XenForo/FrontController.php at line 337
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  9. XenForo_FrontController->run() in /home/sites/xf.spurscommunity.co.uk/public_html/index.php at line 13
 
Did you define a crop area for the thumbnail?

That's what triggered the error I think.

Was just able to replicate it by uploading a thumbnail and not clicking on it... need a better way of handling that...
 
That makes sense. I didn't define a crop area (as I didn't realise that's what it was at first). On the second image that worked I did define a crop area.

Another slight issue is that I used a PNG with a white background but it turned the background black for some reason.
 
Something else I've noticed (if you'd rather have these somewhere else let me know), the competitions archive page is not responsive (because of the table listing entries, etc).
 
Ok, the first issue is fixed.

Defining a thumb without a crop area no longer throws an error, but for best results you should always define a crop area.

The second issue I will look into... could you upload the PNG with the white background you mention? I'll do some testing with it.

And it is deliberately not responsive (I've used the noResponsive parameter to turn it off in the template) as there's just too much data really for it to be responsive.

I'll tweak it as time goes on. But right now it's more readable if we just disable responsive completely.
 
The second issue I will look into... could you upload the PNG with the white background you mention? I'll do some testing with it.

Sorry, it's actually a transparent background. I'm not sure if uploading it here has done anything to it. I can email it directly if needed.

goat.webp

This comes out as having a black background when used as the thumbnail.
 
HenrikHansen, no. Because the data is available in the XenForo cache so actually you can include the template in any location you like.

<xen:include template="avforums_competitions_sidebar" />

Just edit the desired template to add the above code and it will work absolutely fine (there could be some styling issues to resolve).
 
Sorry, it's actually a transparent background. I'm not sure if uploading it here has done anything to it. I can email it directly if needed.

View attachment 56692

This comes out as having a black background when used as the thumbnail.
Yeah... it saves it as a jpeg...

Hmm... I'm pretty sure we had this during development but I did at one point tear up most of the code relating to image manipulation and started again.

Will look into it, thanks.
 
Top Bottom