My plugin breaks the plugin page in admincp?
#11
(2018-01-28, 02:35 AM)RateU Wrote: You can try to join users table with userfields table inside a query so you can filter the results based on usergroup and profile fields value. Store the results inside an array. shuffle it. Do an iteration after it is shuffled. Inside the iteration, use the API to check the user. If he/she is "Live", then break. Output the result.

Yea Right now I'm just basing it off of me and one other person. I have it checking the user group and it is working. I need to join in the ability to search non empty profile field. I also have it picking a random number between 0 (first index of an array) and the count of the array of users to promote - 1 so it does not get an empty field.

Though now my problem is the variable {$streamer} is being displayed above the header of the portal and I have no idea where or how that is happening...
Reply
#12
(2018-01-28, 02:40 AM)TheCrzyDoctor Wrote: Though now my problem is the variable {$streamer} is being displayed above the header of the portal and I have no idea where or how that is happening...

If you still using echo, then you need to change it.
If you already have the output inside a variable, just make it global (similar to how you globalize the $db). If you already make it global, just put the variable inside your portal template.
XThreads App For MyBB: Link Directory, YouTube Gallery & etc - Full List
My Demo Site
Reply
#13
(2018-01-28, 03:08 AM)RateU Wrote: If you already have the output inside a variable, just make it global (similar to how you globalize the $db). If you already make it global, just put the variable inside your portal template.

That worked. Thank you so much for all the help. Now I need to pull from the custom profilefield, create custom profile field and add in the ability to use the twitch api. Thanks so much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)