Jump to content

Raffles System

Featured Replies

  • Author

Raffles 1.1.0 Beta 1 (IPS 4.3 only) available to be tested for those who has an active purchase for this app.

Just send a PM and you will get it.

  • 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

  • Author

What's New in Version 1.1.0:

IPS 4.3 compatibility ONLY.

New Features:

  • Abilitiy to add color to Categories (just like forums)
  • Support to Rest API

New feature coming soon.

  • 5 weeks later...

@Adriano Faria

I'm not sure if this was reported beforehand, but when I go to remove a participant from the raffle, it removes all of the participants even when I select only a specific member to remove.

Also, is there a way to manually add tickets to a participant?  If not, I'd like to suggest that as a feature request.

I tried posting on your website but my credentials are incorrect based on your instructions.

Edited by GASR

  • Author
24 minutes ago, GASR said:

I'm not sure if this was reported beforehand, but when I go to remove a participant from the raffle, it removes all of the participants even when I select only a specific member to remove.

No, that never happened and nothing changed in this specific area. I’ll retest it tomorrow. 

25 minutes ago, GASR said:

Also, is there a way to manually add tickets to a participant?

Yes, there’s a moderator permission: Can manually add users to raffles.

@Adriano Faria  Alright, thanks.  I can create a test raffle and add a bunch of participants and try to record the issue if need be.  Just let me know if you're not able to recreate the issue.  I tried it twice and it happened both times, removing all members instead of just the one specific member name I typed and chose from the drop down.  

Quote

Yes, there’s a moderator permission: Can manually add users to raffles.

Yes, I see that, but when I add a user, it only gives them one ticket.  Is there some place I can go to manually add more tickets to a participant?  For example:  Participant A has 1 ticket, but I want to give them 4 more as a thank you for following a social media account.  

I tried to give tickets to participants by creating invoices in commerce for the tickets, but when I go to mark it paid without charging them, I received this error:

Quote

Error: Call to a member function add() on string (0)
#0 /home/gasrforu/public_html/applications/nexus/modules/admin/payments/invoices.php(265): IPS\nexus\_Invoice->markPaid(Object(IPS\Member))
#1 /home/gasrforu/public_html/system/Dispatcher/Controller.php(85): IPS\nexus\modules\admin\payments\_invoices->paid()
#2 /home/gasrforu/public_html/applications/nexus/modules/admin/payments/invoices.php(35): IPS\Dispatcher\_Controller->execute()
#3 /home/gasrforu/public_html/system/Dispatcher/Dispatcher.php(146): IPS\nexus\modules\admin\payments\_invoices->execute()
#4 /home/gasrforu/public_html/admin/index.php(14): IPS\_Dispatcher->run()
#5 {main}

 

Edited by GASR

  • Author
1 hour ago, GASR said:

I can create a test raffle and add a bunch of participants and try to record the issue if need be.

No problem. I’ll test it tomorrow. 

1 hour ago, GASR said:

Yes, I see that, but when I add a user, it only gives them one ticket.  Is there some place I can go to manually add more tickets to a participant?  For example:  Participant A has 1 ticket, but I want to give them 4 more as a thank you for following a social media account.  

I can add a field for number of tickets there. But it will add “freely” the member. I mean, no invoice will be generated. 

Not sure about the Commerce error. I never tried to add it there. Anyway, you will be generating invoices if you use Commerce.

1 hour ago, Adriano Faria said:

I can add a field for number of tickets there. But it will add “freely” the member. I mean, no invoice will be generated. 

That's no problem!  These manual tickets are meant to be "free" anyway, so this would actually work just fine!

1 hour ago, Adriano Faria said:

Not sure about the Commerce error. I never tried to add it there. Anyway, you will be generating invoices if you use Commerce.

No worries.  It was just something I tried to see if I could quickly add some tickets to a few participants as a thank you for doing extra steps off-site.  

  • Author

@GASR, sorry, you're right. A fuc***ing TYPO was the culprit:

if( $values['tyupe'] == 'member' )

tyupe? It should be type! ?

Will fix it.

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

Regarding number of tickets, new field will appear, obviously, only if the raffle accepts multiple tickets and it is limited to the raffles number of tickets allowed:

Mx7umno.png

Made it only to MEMBER.  I can add it in GROUP in a further version.

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

All the mod actions from now on will be logged too:

382ns6n.png

Edited by Adriano Faria

  • Author

What's New in Version 1.1.1:

IPS 4.3 compatibility ONLY.

  • Fix an error when removing a member from a raffle/giveaway
  • Added actions (add/remove members, change raffle ticket price, convert to raffle/giveaway) to moderator logs
  • Added compatibility to Automatic Moderation

@Adriano Faria  

And this is why I will always support you and your plugins/applications!  It's always one little thing that can cause a whole lot of problems, LOL.  I'm so happy you were able to find and fix the issue!  The tickets per member addition also looks great and will be PERFECT for my community!


The addition of the moderation actions is also awesome!  Now I can keep better track of who is doing what.  THANK YOU SO MUCH!!  Your support is always top tier!

@Adriano Faria  Hate tagging you again, but I've just upgraded to 1.1.1 and I've hit a snag.  (I'm using the default theme with no template or css customizations.)

The ticket field isn't showing up when I go to add a participant:

a58b3f05ee10ca93097c52b8c58b3e7e.png
 

So naturally, when I click "Add Member" anyway, it throws an error.

09d2e25061fdb70c899cdda0a517ea67.png
 

Raw Data

Quote

INSERT INTO `raffles_participants` ( `rp_raffle_id`, `rp_member_id`, `rp_date`, `rp_ipaddress`, `rp_tickets` ) VALUES ( 2, 1268, 1526679829, '104.63.37.68', NULL ) ON DUPLICATE KEY UPDATE `rp_raffle_id`=VALUES(`rp_raffle_id`), `rp_member_id`=VALUES(`rp_member_id`), `rp_date`=VALUES(`rp_date`), `rp_ipaddress`=VALUES(`rp_ipaddress`), `rp_tickets`=VALUES(`rp_tickets`)
IPS\Db\Exception: Column 'rp_tickets' cannot be null (1048)
#0 /home/gasrforu/public_html/system/Db/Db.php(807): IPS\_Db->preparedQuery('/*IPS\\raffles\\m...', Array)
#1 /home/gasrforu/public_html/applications/raffles/modules/front/raffles/view.php(1035): IPS\_Db->insert('raffles_partici...', Array, true)
#2 /home/gasrforu/public_html/system/Dispatcher/Controller.php(85): IPS\raffles\modules\front\raffles\_view->addToRaffleGiveaway()
#3 /home/gasrforu/public_html/system/Content/Controller.php(50): IPS\Dispatcher\_Controller->execute()
#4 /home/gasrforu/public_html/applications/raffles/modules/front/raffles/view.php(58): IPS\Content\_Controller->execute()
#5 /home/gasrforu/public_html/system/Dispatcher/Dispatcher.php(146): IPS\raffles\modules\front\raffles\_view->execute()
#6 /home/gasrforu/public_html/index.php(13): IPS\_Dispatcher->run()
#7 {main}

 

Edited by GASR

  • Author
51 minutes ago, GASR said:

The ticket field isn't showing up when I go to add a participant:

As I said:

11 hours ago, Adriano Faria said:

new field will appear, obviously, only if the raffle accepts multiple tickets 

I just forgot to add a checking if it isn’t. 

I’ll reupload the file soon.

Ohhh, alright.  Thanks!

  • Author

I will let it “open”, freely. So if the raffle accepts 1 ticket but you want to add 10, that’s up to you.

Just waiting for my Windows to finish updating. ?

Alright, that sounds good.  Sorry for my ignorance, but when you say "accept multiple tickets", do you mean the "Tickets per member" setting?  These are my current settings:

f434cdb4d8bb6ffc804e191ed3919080.png

fb1d6467f46f1f01a5e6c9c463a58627.png

  • Author

What's New in Version 1.1.1.1:

IPS 4.3 compatibility ONLY.

  • Fix number of tickets when manually adding members to raffles/giveaways

You are free to add how many tickets you want for a member in a Raffle. For giveaways you are able to add only one.

Just updated and tested things out.  Everything seems to be working great!

Hello @Adriano Faria

How can I hide/delete this links in the "Ranking Page".

tkce2Pq.png

Thank you in advance.

  • Author
2 hours ago, No' said:

Hello @Adriano Faria

How can I hide/delete this links in the "Ranking Page".

tkce2Pq.png

Thank you in advance.

Where is that exactly? I can't say by only viewing your image. It isn't the RAFFLE WINNERS block on raffle view. It isn't the PARTICIPANTS list in raffle view.

Oh, i'm sorry.

It is the Leaderboard Page (app=core&module=discover&controller=popular&tab=leaderboard)

Thank you

  • Author

RDb2spH.png

Oh no, this is automatically handled by the Core. If the app has COMMENTS and/or REVIEWS, it will add there.

IPS\core\modules\front\discover\popular::leaderboard()

		$areas = array();
		foreach ( $classes as $item )
		{
			$commentClass = NULL;
			$reviewClass = NULL;

			if ( \IPS\IPS::classUsesTrait( $item, 'IPS\Content\Reactable' ) )
			{
				$areas[ $item::$application . '-' . $item::reactionType() ] = array( $item, \IPS\Member::loggedIn()->language()->addToStack( "{$item::$title}_pl" ) );
			}

			if ( isset( $item::$commentClass ) )
			{
				$commentClass = $item::$commentClass;
				if ( \IPS\IPS::classUsesTrait( $commentClass, 'IPS\Content\Reactable' ) )
				{
					$areas[ $item::$application . '-' . $commentClass::reactionType() ] = array( $commentClass, \IPS\Member::loggedIn()->language()->addToStack( "{$commentClass::$title}_pl" ) );
				}
			}

			if ( isset( $item::$reviewClass ) )
			{
				$reviewClass = $item::$reviewClass;
				if ( \IPS\IPS::classUsesTrait( $reviewClass, 'IPS\Content\Reactable' ) )
				{
					$areas[ $item::$application . '-' . $reviewClass::reactionType() ] = array( $reviewClass, \IPS\Member::loggedIn()->language()->addToStack( "{$reviewClass::$title}_pl" ) );
				}
			}
		}

 

Edited by Adriano Faria

Thank you for the details ? 

Edited by No'
message on top edited

@Adriano Faria

There is a bug in your raffle system, when two raffles end at the same time it chooses the same winner on both raffles. This has happened multiple times for me and has now caused a lot of issues. 

  • Author

Lovely! I'm NOT resetting the winners array, so everytime it loops, it takes the winners from the previous raffles/giveway. Beautiful! ☠️

Working on it.

  • Author

What's New in Version 1.1.2:

  • Fix error when picking winners to multiple raffles/giveaways
  • IPS 4.3 compatibility ONLY.

Recently Browsing 0

  • No registered users viewing this page.