Latest Shouts In The Shoutbox -- View The Shoutbox · Rules
Jcink -- mmm.
Dan -- ehh not that great
card123 -- g2g ttyal =]
card123 -- Check out my latest mod, its amazing!! its in the addon section
card123 -- i dont have a problem with members logging in, i have a problem getting them to post lol
Skullmonkey -- im lucky if someone even logs in on mine tongue.gif
Corey.B -- I had a really active board that got up to about 40 active members a day. Then I kinda messed it up lol

[ Smilies | BBCodes ]

Pages: (3) 1 2 [3]  ( Go to first unread post ) Reply to this topic Start new topic Start Poll

> Game Ratings Mod
timewind
 Posted: April 18, 2009 02:01 am

Virtual Research

Group: Member

Posts: 402

Credits: 665

Joined: January 07, 2008

Age: 33
Gender: Male
Location: ohio
Status: Offline




Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /planetplayersclub.com/games/Arcade.php on line 1870

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /planetplayersclub.com/games/Arcade.php on line 1871

Warning: Division by zero in planetplayersclub.com/games/Arcade.php on line 1872


--------------------
PlanetPlayersClub - Clique Adult League & Arcade
Over 2Million Games played!... No Ads!..as of yet?¿
And Still The Largest PHP Quick Arcade Flash Site!
AiM: redworminc
user posted image
New Posts
^
ramiro
 Posted: May 11, 2009 05:41 am

Member

Group: Member

Posts: 16

Credits: 55

Joined: February 11, 2009

Age: 42
Gender: Male
Location: Portugal, Viseu
Status: Offline




Great mod.
Thanks.

It works well in my arcade.

But i want one more thing if it's possible.

I would like put ratinks in the description of the game, after playing.

When we submit the score, appears description of the game.
It´s possible put the rataing mod there?

Sorry my english, i hope you understand.
New Posts
^
timewind
 Posted: May 12, 2009 03:12 am

Virtual Research

Group: Member

Posts: 402

Credits: 665

Joined: January 07, 2008

Age: 33
Gender: Male
Location: ohio
Status: Offline




QUOTE (ramiro @ May 11, 2009 05:41 am)
Great mod.
Thanks.

It works well in my arcade.

But i want one more thing if it's possible.

I would like put ratinks in the description of the game, after playing.

When we submit the score, appears description of the game.
It´s possible put the rataing mod there?

Sorry my english, i hope you understand.

not happening for now anyways.. I get errors... Saga will even say so


--------------------
PlanetPlayersClub - Clique Adult League & Arcade
Over 2Million Games played!... No Ads!..as of yet?¿
And Still The Largest PHP Quick Arcade Flash Site!
AiM: redworminc
user posted image
New Posts
^
Architect
 Posted: May 14, 2009 08:12 pm

Quest Points: 220

Group: Member

Posts: 3058

Credits: 20

Joined: July 10, 2006

Age: >1
Gender: Male
Location: England, UK
Status: Offline




A small bug fix, for those of you have already installed it which will fix this issue:
http://forum.jcink.com/index.php?showtopic=11980

Find:
CODE
mysql_data_seek($catquer, 1);


Replace with:
CODE

if(mysql_num_rows($catquer) !== 1){
mysql_data_seek($catquer, 1);
}


For anyone downloading after this post, the main code has been updated to include this change.

Thanks.
QUOTE (ramiro @ May 11, 2009 10:41 am)
When we submit the score, appears description of the game.
It´s possible put the rataing mod there?

This has worked on my test arcade. See if it works for yours.

In Arcade.php

Find:
CODE

if (!$gameinfo) {
header("Location: index.php");
die();
}


Add after:
CODE

// Rating in highscore description code BEGIN
$f = array();
$f[0] = $gameinfo['gameid'];
$query = 'SELECT GameID, TotalScore, NoOfVoters  FROM phpqa_rating WHERE GameID = \'' . $f[0] . '\' LIMIT 1';
$result = run_query($query);

if(mysql_num_rows($result) !== 0){
$r=mysql_fetch_row($result);
$rating = round($r[1] / $r[2]);
} else {
$rating = 0;
}

$rating_html = ''; // Clear the previous entry.
$rating_html .= '<div id="rate' . $f[0] . '">';

for($x=0;$x<5;$x++){
(isset($_COOKIE['phpqa_user_c'])) ?
$javascript_bit = 'onclick="rate(' . $x . ',  \'' . $f[0] . '\')" onmouseover="rateImage(\'' . $f[0] . '\', ' . $x . ', false)" onmouseout="rateImage(\'' . $f[0] . '\', ' . $x . ', true)" ' : '';
$rating_html .=  '<img src="./ratings/rate' . (($x<$rating) ? '1' : '0') . '.gif" alt="' . ($x+1) . '" ' . $javascript_bit . '>';
}

$rating_html .= '</div>';

// Rating in highscore description code END


Then find:
CODE

<? echo "Played ".$gameinfo[times_played]." Time".($gameinfo[times_played]!=1?"s":""); ?>


and add directly after:
CODE

<br /><?PHP echo $rating_html; ?>


Save, upload and enjoy.


--------------------
user posted image

The Online PC Pitstop

Todo:
*Finish Connect4
*Figure out how to get my time machine working without screwing up the future again.
Done:
*Completed Reputation System for TFBB
*Release ratings mod for PHPQA
New Posts
^
ramiro
 Posted: May 15, 2009 11:58 am

Member

Group: Member

Posts: 16

Credits: 55

Joined: February 11, 2009

Age: 42
Gender: Male
Location: Portugal, Viseu
Status: Offline




Now i will enjoy it.

Thanks Architect, works ok.
New Posts
^
rlcarbo
 Posted: September 25, 2009 03:26 pm

Newbie

Group: Member

Posts: 2

Credits: 9

Joined: September 25, 2009

Age: 37
Gender: Male
Location: N/A
Status: Offline




I s there any way someone could upload the ratings.zip again. I have tried winzip, the zip program that comes with windows and winrar...it keeps coming up as a corrupt file.

I also saw that you uploaded a winrar file bu the link is not longer valid

Thanks for your help
New Posts
^
Jcink
 Posted: September 25, 2009 03:56 pm

The Final Boss

Group: Admin

Posts: 16248

Credits: 9600

Joined: June 26, 2006

Age: 20
Gender: Male
Location: New Jersey, USA
Status: Online




Works fine for me - perhaps you're running the one version of Windows Vista that has bugs with certain zip files?

Here is a reupload...

Attached File ( Number of downloads: 13 )
Attached File  ratings.zip


--------------------
http://jcink.com
[ JFB | phpQuickArcade | Air-Proxy.com | ircd.jcink.com #jcink.com ]
admin@jcink.com
New Posts
^
rlcarbo
 Posted: September 28, 2009 10:14 am

Newbie

Group: Member

Posts: 2

Credits: 9

Joined: September 25, 2009

Age: 37
Gender: Male
Location: N/A
Status: Offline




Very odd still getting invalid or corrupt folder when trying to open it
New Posts
^
Dooley
 Posted: September 28, 2009 01:14 pm

Advanced Member

Group: Member

Posts: 47

Credits: 80

Joined: May 16, 2009

Age: 52
Gender: Male
Location: Wales
Status: Offline




there's nothing wrong with the download itself.


--------------------
A wise man speaks when he has something to say.
A fool speaks when he has to say something.

Domealemon Arcade
New Posts
^
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

[+]Pages: (3) 1 2 [3]  Reply to this topic Start new topic Start Poll

 


 



[ Script Execution time: 0.0514 ]   [ 22 queries used ]   [ GZIP Disabled ]   [ Server Load: 0.83 ]