jcvenom Posted July 19, 2013 Posted July 19, 2013 Ok since people want more from me i have created a new mod for credits which is my biggest mod for v2 so far here it is ok add this into Mysql You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Create a new file called cctrade.php then add this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then add this in globals.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. After add this into your header or menubar(As i have my bars in my menubar) or where ever suits you You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And your finished very simple mod Note you can add more steps such as donator packs etc And you can add to credits to your donation page or wait till i make the creditdonation Quote
KyleMassacre Posted July 19, 2013 Posted July 19, 2013 so where is the option to sell donator packs at? It claims on lines 18-20 that you can but it just looks like a crystal temple to me. So where do you buy credits at? The default engine doesn't come with anything to purchase credits so its good to specify that this module is dependant on "X" module Quote
jcvenom Posted July 19, 2013 Author Posted July 19, 2013 Ok since people want more from me i have created a new mod for credits which is my biggest mod for v2 so far here it is ok add this into Mysql You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Create a new file called cctrade.php then add this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then add this in globals.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. After add this into your header or menubar(As i have my bars in my menubar) or where ever suits you You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And your finished very simple mod Note you can add more steps such as donator packs etc And you can add to your donation page credits or wait till i make the creditdonation - - - Updated - - - i will make credit donation page Quote
sniko Posted July 20, 2013 Posted July 20, 2013 This could be improved by; Not using inline styles Not using deprecated tags Referencing to a database for rewards, not hard codedAllow staff to insert rewards with criteria that match their desires Allow staff to alter rewards Possibly allow staff to change the currency, instead of credits, so the system isn't designed just for the minorityCurrencys are fetched from the users table; energy, brave, level, exp, money (any column the staff decides) Above all, you could mention that there are words in queries that need changing to suit your desires. For example, line 82. However, a nice contribution :) Quote
jcvenom Posted July 20, 2013 Author Posted July 20, 2013 This could be improved by; Not using inline styles Not using deprecated tags Referencing to a database for rewards, not hard codedAllow staff to insert rewards with criteria that match their desires Allow staff to alter rewards Possibly allow staff to change the currency, instead of credits, so the system isn't designed just for the minorityCurrencys are fetched from the users table; energy, brave, level, exp, money (any column the staff decides) Above all, you could mention that there are words in queries that need changing to suit your desires. For example, line 82. However, a nice contribution :) thanks sniko i will consider the options Quote
Djkanna Posted July 20, 2013 Posted July 20, 2013 Then add this in globals.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Why this if you're not going to use it? You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
jcvenom Posted July 20, 2013 Author Posted July 20, 2013 Why this if you're not going to use it? opps its mean to be ir Quote
rockwood Posted July 20, 2013 Posted July 20, 2013 (edited) Ok since people want more from me i have created a new mod for credits which is my biggest mod for v2 so far here it is ok add this into Mysql You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Create a new file called cctrade.php then add this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Then add this in globals.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. After add this into your header or menubar(As i have my bars in my menubar) or where ever suits you You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And your finished very simple mod Note you can add more steps such as donator packs etc And you can add to credits to your donation page or wait till i make the creditdonation if i did this so it would be like this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This is not tested Edited July 20, 2013 by rockwood Quote
jcvenom Posted July 20, 2013 Author Posted July 20, 2013 if i did this so it would be like this You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This is not tested i rather use You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. than sprinf Quote
jcvenom Posted July 20, 2013 Author Posted July 20, 2013 why would you use You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. when You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. is basically the same Quote
rockwood Posted July 20, 2013 Posted July 20, 2013 why would you use You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. when You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. is basically the same i dont think so both are very different in this sprintf("%s",!$_GET['step']) making string values from here in this if(!$_GET['step']) you are chking only like empty due to injection i advised for sprintf Quote
jcvenom Posted July 20, 2013 Author Posted July 20, 2013 i dont think so both are very different in this sprintf("%s",!$_GET['step']) making string values from here in this if(!$_GET['step']) you are chking only like empty due to injection i advised for sprintf ok i get you know but either one will work Quote
Dominion Posted July 20, 2013 Posted July 20, 2013 (edited) why would you use You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. when You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. is basically the same It's not. What he is trying to do with sprintf here is add some kind of check... one you simply don't need and is being done wrong... It's being checked already in any case. Edited July 20, 2013 by Dominion Quote
Venom Posted July 20, 2013 Posted July 20, 2013 They are two different things, but Dominion is correct in saying it's simply not needed. As said in an earlier post it can be made a lot shorter by using a database table instead of hard code - it's also easier. Quote
rockwood Posted July 20, 2013 Posted July 20, 2013 It's not. What he is trying to do with sprintf here is add some kind of check... one you simply don't need and is being done wrong... It's being checked already in any case. preventing from XSS attacks nothing else Quote
Dominion Posted July 20, 2013 Posted July 20, 2013 preventing from XSS attacks nothing else I'm sorry but what? Quote
rockwood Posted July 20, 2013 Posted July 20, 2013 I'm sorry but what? i am saying about sprintf Quote
Venom Posted July 20, 2013 Posted July 20, 2013 i am saying about sprintf I believe the way you used it wasn't entirely correct - but I don't use it much so I'm no expert on it. But the data being obtained through the GET variable isn't being printed publicly on the page is it? Correct me if I'm wrong... but that would mean there isn't a need to protect against XSS in this particular situation. Quote
jcvenom Posted July 20, 2013 Author Posted July 20, 2013 I believe the way you used it wasn't entirely correct - but I don't use it much so I'm no expert on it. But the data being obtained through the GET variable isn't being printed publicly on the page is it? Correct me if I'm wrong... but that would mean there isn't a need to protect against XSS in this particular situation. is there anything wrong with using You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. but then the sprintf is not a bad idea but as venom said i don't use it really, i usually use database($db->query instead of sprintf Quote
Venom Posted July 20, 2013 Posted July 20, 2013 There isn't anything wrong. You could improve it by doing if(!$_GET['step'] || !in_array($_GET['step'],array(...))) Unless you change it to be using a database table. Quote
jcvenom Posted July 20, 2013 Author Posted July 20, 2013 There isn't anything wrong. You could improve it by doing if(!$_GET['step'] || !in_array($_GET['step'],array(...))) Unless you change it to be using a database table. your right i could have used it Quote
jedigunz Posted July 22, 2013 Posted July 22, 2013 With the credit system ive opted out of the credit exchange system,. implemented the credits into the donator system and use credits as a way to refill your bars for training in the gym or even mass attacking, a little bonus for the paid members or winners off competitions ,.. be creative, can do alot by the way, my gym still hasnt been customized on the layout side,. but you can see the functionality off it,. :) [ATTACH=CONFIG]1074[/ATTACH] Quote
jedigunz Posted July 22, 2013 Posted July 22, 2013 Gym Layout Re-arrange [ATTACH=CONFIG]1075[/ATTACH] Gym Layout Re-arrange Quote
HauntedDawg Posted July 22, 2013 Posted July 22, 2013 Sorry to say this, but this module is broken beyond recognition. Some examples You are displaying cost of 2 credits for xanax, where when you go forward, it says 2 credits, and the sql says 1. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Displaying bad request twice? Why? Opening 2 tables without closing them? Without content either? WHY? I was initially going to re-code it, but then i thought.. Perhaps you should read some books first and then try create modules. Or expect to see me often pointing out your flaws. Quote
jcvenom Posted July 22, 2013 Author Posted July 22, 2013 (edited) lol thanks for pointing this out Edited July 22, 2013 by jcvenom Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.