Jump to content

Raffles System

Featured Replies

  • Author

What's New in Version 1.0.2:

  • New feature: raffles submitter and moderator with proper permission are now able to change the ticket price
  • Fix: all bugs reported in the Tracker
  • Replies 717
  • Views 50.9k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • That's a bug in your app... The extensions class name is Image and you're using Images  in view.php \IPS\Output::i()->metaTags['og:image'] = \IPS\File::get( 'raffles_Images', $this->raf

  • Adriano Faria
    Adriano Faria

    I've made a change today.. probably will fix it because it handles currencies (default or member language/currency). Try it yourself. Open applications\raffles\modules\front\raffles\view.php and find:

  • Adriano Faria
    Adriano Faria

    No, that doesn't work like that and I can't reproduce. In images:       If you haven't filled the price in one specific currency, user won't be able t

Posted Images

@Adriano Faria

Hey quick question.  Is there ANY WAY I can change the currency type when showing ticket prices.  I know I could add a fake currency to commerce but I don't want to do that.  For example I have raffle items that cost 200 POINTS, but users are scarred a bit when they see $200.00 >> USD <<  So I want to be able to edit USD for the raffles system to read PTS.  I couldn't find anything in translations.  I'm open to try anything, I just need an idea of where to look and what I could do.

 

 

  • Author

Anything related to CURRENCIES, PAYMENTS, etc., are handled by Commerce, not by my app.

Ok - Could you possibly add an option that would allow someone creating a raffle to display the price in POINTS from Points Economy??  

 

  • Author
Just now, pilotguy said:

Ok - Could you possibly add an option that would allow someone creating a raffle to display the price in POINTS from Points Economy?? 

No! Again:

 

2 minutes ago, Adriano Faria said:

Anything related to CURRENCIES, PAYMENTS, etc., are handled by Commerce, not by my app.

 

Just now, Adriano Faria said:

No!

Sorry I was just asking...

  • Author
Just now, pilotguy said:

Sorry I was just asking...

You have the right to ask. I just replied. My app do not handle currencies or payment, etc. This is handled by Commerce. I can't "create" a currency in my app!

I don;t want a currency created.  I guess what I'm asking is how to format the output when someone goes to "buy" a ticket..  That is all.  Not create a currency.  I just want $200.00 to turn into "200 points" in the buy ticket window.  

Sorry for the misunderstanding.  Anyway I understand.  Not possible.  

  • Author

The price comes formatted from Commerce, as I said:

	/**
	 * Get Price
	 *
	 * @param	float	$cost				The cost
	 * @param	string	$nexusPackageIds	Comma-delimited list of associated package IDs
	 * @return	\IPS\nexus\Money|NULL
	 */
	public static function _price( $cost )
	{
		if ( $cost )
		{
			$currency = ( isset( $_SESSION['currency'] ) and in_array( $_SESSION['currency'], \IPS\nexus\Money::currencies() ) ) ? $_SESSION['currency'] : \IPS\nexus\Customer::loggedIn()->defaultCurrency();
			
			/* If $cost is an empty JSON array, the conditional will evaluate false thus resulting in [] being passed to \IPS\nexus\Money (which will fail). */
			$costs = json_decode( $cost, TRUE );
			if ( is_array( $costs ) )
			{
				if ( isset( $costs[ $currency ]['amount'] ) and $costs[ $currency ]['amount'] )
				{
					return new \IPS\nexus\Money( $costs[ $currency ]['amount'], $currency );
				}
			}
			else
			{
				return new \IPS\nexus\Money( $cost, $currency );
			}
		}
		
		return NULL;
	}

File: applications\raffles\sources\Raffle\Raffle.php:

So 200, will return 200 USD, because it's bought in USD! $currency is who's in charge here.

If you want to change it, feel free but you're on your own; I don't support code changes.

  • Author

What's New in Version 1.0.2.1:

  • New feature: Added Clubs to + Create Menu, so you can start a raffle in a faster way.
  • Fix: Club template post screen
  • Fix: bug reported in the Tracker

@Adriano Faria - So again thanks for the code.  Played around a bit with it.  I finally opted to leave it as is and apply an exchange rate for points - usd.  So, members have options to pay with two forms of payment instead of just points.

I want to sell raffle tickets with the prize being a file in downloads gets featured for a week.

Is this something I can do using this?

  • Author

No. A prize is record you enter in a form, with description and image. Not a file. No integration with Downloads, Gallery, etc.

I don't think I explained it correctly.
 

"Winner of this raffle will get to have 1 file of their choice featured in the downloads marketplace" (this part I would do manually for the winner)

What would be needed to support this are

  • Can I use Raffle settings to make it visible only to specified group? (because I only want download contributor group having access or visibility to raffle)
  • Can credit be used to purchase a raffle ticket?
  • Author
1 minute ago, superj707 said:

Can I use Raffle settings to make it visible only to specified group? (because I only want download contributor group having access or visibility to raffle)

You can either:

  • Allow specific groups to view and use the Raffle app
  • Restricat a raffle/giveway per group. When you create a raffle/giveaway, you can choose which user groups can buy tickets.
2 minutes ago, superj707 said:

Can credit be used to purchase a raffle ticket?

It will use any payment gateway set up in the Commerce. It must be a setting from the payment gateway.

You can also choose to use a specific payment gateway for Raffles app.

Can I limit raffle ticket purchase to exclusively site credit? (even if I have other gateways available for my site)

trying to avoid the strict rules from paypal

Edited by superj707

  • Author

You can choose one specific payment gateway to be used exclusively in the Rafffle, if that's what you're asking:

raffles.png

All the payment stuff is handled by Commerce, so it is required.

  • 3 weeks later...
  • Author

What's New in Version 1.0.2.2:

  • Fix error when merging members
  • 3 weeks later...

Question: is there support to limiting participation in raffles and giveaways to just members with a minimum number of posts to the forum? I'd like to not give away swag to people who walk in off the internet.

  • Author
21 minutes ago, Northeast Mountain Sports said:

Question: is there support to limiting participation in raffles and giveaways to just members with a minimum number of posts to the forum? I'd like to not give away swag to people who walk in off the internet.

Sure. You can see all restrictions options at the right side of raffle posting screen:

5954e9b6570df_3-Submit.png.68a523cb93849

  • 3 weeks later...

There's a bug in the winners task

Only subclasses of Dispatcher can be instantiated

#0 /home/ing/public_html/forum/system/Theme/Theme.php(727): IPS\_Dispatcher::i()
#1 /home/ing/public_html/forum/system/Theme/Theme.php(824) : eval()'d code(886): IPS\_Theme->getTemplate('global', 'core')
#2 /home/ing/public_html/forum/system/Theme/SandboxedTemplate.php(56): IPS\Theme\class_raffles_front_view->memberRow(Object(IPS\raffles\Raffle), Object(IPS\Member), Array, 1)
#3 /home/ing/public_html/forum/system/Theme/Theme.php(824) : eval()'d code(1730): IPS\Theme\_SandboxedTemplate->__call('memberRow', Array)
#4 /home/ing/public_html/forum/system/Theme/SandboxedTemplate.php(56): IPS\Theme\class_raffles_front_view->raffleWinners(22, Array)
#5 /home/ing/public_html/forum/system/Theme/Theme.php(824) : eval()'d code(720): IPS\Theme\_SandboxedTemplate->__call('raffleWinners', Array)
#6 /home/ing/public_html/forum/system/Theme/SandboxedTemplate.php(56): IPS\Theme\class_raffles_front_submit->updateTopicWithWinners(22, 'giveaway', Array)
#7 /home/ing/public_html/forum/applications/raffles/tasks/Winners.php(160): IPS\Theme\_SandboxedTemplate->__call('updateTopicWith...', Array)
#8 /home/ing/public_html/forum/applications/raffles/tasks/Winners.php(104): IPS\raffles\tasks\_Winners->updateTopicWithResult(Object(IPS\raffles\Raffle), Array)
#9 /home/ing/public_html/forum/system/Task/Task.php(248): IPS\raffles\tasks\_Winners->execute()
#10 /home/ing/public_html/forum/system/Task/Task.php(217): IPS\_Task->run()
#11 /home/ing/public_html/forum/applications/core/interface/task/task.php(60): IPS\_Task->runAndLog()
#12 {main}

 

  • Author
2 hours ago, Daniel F said:

There's a bug in the winners task


Only subclasses of Dispatcher can be instantiated

#0 /home/ing/public_html/forum/system/Theme/Theme.php(727): IPS\_Dispatcher::i()
#1 /home/ing/public_html/forum/system/Theme/Theme.php(824) : eval()'d code(886): IPS\_Theme->getTemplate('global', 'core')
#2 /home/ing/public_html/forum/system/Theme/SandboxedTemplate.php(56): IPS\Theme\class_raffles_front_view->memberRow(Object(IPS\raffles\Raffle), Object(IPS\Member), Array, 1)
#3 /home/ing/public_html/forum/system/Theme/Theme.php(824) : eval()'d code(1730): IPS\Theme\_SandboxedTemplate->__call('memberRow', Array)
#4 /home/ing/public_html/forum/system/Theme/SandboxedTemplate.php(56): IPS\Theme\class_raffles_front_view->raffleWinners(22, Array)
#5 /home/ing/public_html/forum/system/Theme/Theme.php(824) : eval()'d code(720): IPS\Theme\_SandboxedTemplate->__call('raffleWinners', Array)
#6 /home/ing/public_html/forum/system/Theme/SandboxedTemplate.php(56): IPS\Theme\class_raffles_front_submit->updateTopicWithWinners(22, 'giveaway', Array)
#7 /home/ing/public_html/forum/applications/raffles/tasks/Winners.php(160): IPS\Theme\_SandboxedTemplate->__call('updateTopicWith...', Array)
#8 /home/ing/public_html/forum/applications/raffles/tasks/Winners.php(104): IPS\raffles\tasks\_Winners->updateTopicWithResult(Object(IPS\raffles\Raffle), Array)
#9 /home/ing/public_html/forum/system/Task/Task.php(248): IPS\raffles\tasks\_Winners->execute()
#10 /home/ing/public_html/forum/system/Task/Task.php(217): IPS\_Task->run()
#11 /home/ing/public_html/forum/applications/core/interface/task/task.php(60): IPS\_Task->runAndLog()
#12 {main}

 

Ok, probably the hasInstance() Will take a look. 

What about this, probably from same user?

Error: Call to undefined method stdClass::language() (0)
#0 /home/kzgaming/public_html/forum/system/Dispatcher/Front.php(93): IPS\Dispatcher\_Standard->init()
#1 /home/kzgaming/public_html/forum/init.php(448) : eval()'d code(15): IPS\Dispatcher\_Front->init()
#2 /home/kzgaming/public_html/forum/system/Dispatcher/Dispatcher.php(103): IPS\Dispatcher\raffles_hook_rafflesCSS->init()
#3 /home/kzgaming/public_html/forum/index.php(12): IPS\_Dispatcher::i()
#4 {main}

He keeps saying that this appears in logs. It also appears for other resources and I don’t see this in other installs I’Ve checked. 

  • 2 weeks later...
  • Author

What's New in Version 1.0.3:

New Feature:

  • Raffle main image and prizes images in PROMOTE feature

Fixes:

  • UPLOAD extra field type
  • Error when using Cron job to run Raffle task
  • 2 weeks later...

On a new location, I tried to newly install raffles.

But I got an error message:

1. you have no permissions to do this.... any database column already exists... (unfortunately didn't remember the name, but had raffles in it...)

Thats impossible! I never used raffles before on this installation... Never ever.

The app didn't install completely, so now I have an entry _app_raffles.... in ACP -> Applications

After that I tried to just "update" the uncomplete version with the same version again.

2. And there is the next error message:

'raffle_description_brief'; check that column/key exists

I've done nothing wrong ;) But anything is wrong.

What should I do next?

  • Author
50 minutes ago, Cyboman said:

On a new location, I tried to newly install raffles.

But I got an error message:

1. you have no permissions to do this.... any database column already exists... (unfortunately didn't remember the name, but had raffles in it...)

Thats impossible! I never used raffles before on this installation... Never ever.

The app didn't install completely, so now I have an entry _app_raffles.... in ACP -> Applications

After that I tried to just "update" the uncomplete version with the same version again.

2. And there is the next error message:

'raffle_description_brief'; check that column/key exists

I've done nothing wrong ;) But anything is wrong.

What should I do next?

Did you read the Manual.pdf as requested in file description? You probably used the old version. 

Leave a PM with ACP access. I’ll take a look tomorrow (if I’m able to) or monday morning. 

Edited by Adriano Faria

Recently Browsing 0

  • No registered users viewing this page.