Jump to content
MakeWebGames

Recommended Posts

Posted

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

Posted

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

Posted
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

Posted

This could be improved by;

  • Not using inline styles
  • Not using deprecated tags
  • Referencing to a database for rewards, not hard coded
    • Allow 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 minority
      • Currencys 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 :)

Posted
This could be improved by;
  • Not using inline styles
  • Not using deprecated tags
  • Referencing to a database for rewards, not hard coded
    • Allow 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 minority
      • Currencys 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
Posted

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.

Posted (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 by rockwood
Posted
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

Posted

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

Posted
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

Posted
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
Posted (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 by Dominion
Posted

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.

Posted
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

Posted
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.

Posted
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

Posted

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.

Posted
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

Posted

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]

CreditSystem.thumb.jpg.464604896e2ca085bb178dce39db5879.jpg

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...