Jump to content

Raffles System


Recommended Posts

  • 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
Link to comment
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.

Link to comment

@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
Link to comment
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.

Link to comment
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.  

Link to comment

@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
Link to comment

@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!

Link to comment

@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
Link to comment
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.

Link to comment

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
Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...