Jump to content
MakeWebGames

[mccode] Simple user rating system v2


Raid

Recommended Posts

This is my first every mod, its a simple rating system allowing you to give users a good or bad rating.

ratingbr7.png

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Open viewusers.php

Find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Add after:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Execute these sql querys:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Add to day cron

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Please reply with any bugs or suggestions :-)

Yea and replace the images with your own :roll:

Link to comment
Share on other sites

  • Replies 69
  • Created
  • Last Reply

Top Posters In This Topic

Re: Simple user rating system v2

Updated it a bit seen a few problems with it here's my version of it for V1.

rating.php:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Edit viewuser.php

find:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Add under:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

SQL:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

day cron:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

UPDATED: Font color changes red when minus rating normal on 0 rating and green on plus rating.

Link to comment
Share on other sites

Re: Simple user rating system v2

Warning: include(mysql.php) [function.include]: failed to open stream: No such file or directory in /home/eyers/public_html/rating.php on line 10

Warning: include(mysql.php) [function.include]: failed to open stream: No such file or directory in /home/eyers/public_html/rating.php on line 10

Warning: include() [function.include]: Failed opening 'mysql.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/eyers/public_html/rating.php on line 10

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/eyers/public_html/rating.php on line 12

Link to comment
Share on other sites

Re: Simple user rating system v2

 

i converted this to v2 but get error

Fatal error: Call to undefined method database::real_escape_string() in /home/eyers/public_html/rating.php on line 5

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

wats wrong with it

Replace all the $db->real_escape_string with mysql_real_escape_string.

Link to comment
Share on other sites

Re: Simple user rating system v2

 

another error

Fatal error: Call to a member function query() on a non-object in /home/eyers/public_html/rating.php on line 39

$result = $db->query("SELECT * FROM users WHERE userid='{$ID}'");

Try replacing that with:

$result = mysql_query("SELECT * FROM users WHERE userid='{$ID}'");

You dont need to change ever single mysql_ to $db->

Link to comment
Share on other sites

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