Quantcast

Home arrow Forum
FireBoard
Welcome, Guest
Please Login or Register.    Lost Password?
Scoreboard for PU Arcade ver2.3 (1 viewing) (1) Guest
Feature Requests
Go to bottom Post Reply Favoured: 0
TOPIC: Scoreboard for PU Arcade ver2.3
#529
Tinker (User)
Fresh Boarder
Posts: 12
graphgraph
User Online Now Click here to see the profile of this user
Props: 13
  
Scoreboard for PU Arcade ver2.3 2 Months, 1 Week ago  
Steve,
could you post and update on how to get the scoreboard installed on ver2.3?

I've got it hacked in and working on my site but it's inserting itself under the footer.
 
Report to moderator   Logged Logged  
 
Back Through The Cracks I Go
  The administrator has disabled public write access.
#530
steveometer (Admin)
Admin
Posts: 285
graph
User Online Now Click here to see the profile of this user
Props: 504
  
Re:Scoreboard for PU Arcade ver2.3 2 Months, 1 Week ago  
i have to look at the code you have

i was going to make a new leaderboard that uses the triggers and needs no hax

SoM
 
Report to moderator   Logged Logged  
 
  The administrator has disabled public write access.
#532
Tinker (User)
Fresh Boarder
Posts: 12
graphgraph
User Online Now Click here to see the profile of this user
Props: 13
  
Re:Scoreboard for PU Arcade ver2.3 2 Months, 1 Week ago  
I'm using your code for the scoreboard posted at pragmatic utopia in this thread:
Scoreboard

added main code to puarcade.html.php + created the link in the submenu section

hacked up the elseif code and placed it at the bottom of puarcade.php looks lke this now
Code:

winnersonly = mosGetParam($_REQUEST,'winnersonly'); $limitstart = mosGetParam( $_REQUEST, 'limitstart', 0); $limit = mosGetParam( $_REQUEST, 'limit', 15); if ($winnersonly != 1) { include_once( "includes/pageNavigation.php" ); $pageNav = new mosPageNav( 75, $limitstart, $limit ); } $mainframe->setPageTitle($config->title.' - Scoreboard'); // puarcade_html::WriteSpecialFolderLinks($Itemid); puarcade_html::ShowScoreboard($Itemid,$pageNav); // } } }
it works but the footer is diplaying above the table...noticed your isn't to the must be a better way to add the code to ver2.3
 
Report to moderator   Logged Logged  
 
Back Through The Cracks I Go
  The administrator has disabled public write access.
#533
steveometer (Admin)
Admin
Posts: 285
graph
User Online Now Click here to see the profile of this user
Props: 504
  
Re:Scoreboard for PU Arcade ver2.3 2 Months, 1 Week ago  
is that for the plyer list or recent score page?

SoM
 
Report to moderator   Logged Logged  
 
  The administrator has disabled public write access.
#534
Tinker (User)
Fresh Boarder
Posts: 12
graphgraph
User Online Now Click here to see the profile of this user
Props: 13
  
Re:Scoreboard for PU Arcade ver2.3 2 Months, 1 Week ago  
recent score page here's your via the scores tab http://steve-o-meter.com/component/option,com_puarcade/Itemid,276/fid,9996/
 
Report to moderator   Logged Logged  
 
Back Through The Cracks I Go
  The administrator has disabled public write access.
#535
steveometer (Admin)
Admin
Posts: 285
graph
User Online Now Click here to see the profile of this user
Props: 504
  
Re:Scoreboard for PU Arcade ver2.3 2 Months, 1 Week ago  
ok, here's the beef

in com_Puarcade\includes\core\class.puarcade.php

Code:

function processShowGameSelections( $fid, $gamesperpage, $title, $flat, $allowgview, $showpathway, $displaymax, $maxfaves ) { global $mainframe, $my, $database, $Itemid; //No game selected, show the game selections puarcade_html::WriteHead(); $tag = mosGetParam( $_REQUEST, "tag",""); $taggid = mosGetParam( $_REQUEST, "taggid",""); $limit = mosGetParam( $_REQUEST, 'limit', $gamesperpage); $limitstart = mosGetParam( $_REQUEST, 'limitstart', 0); $mainframe->setPageTitle($title); /* * If in flat mode and not a special folder... */ if ($flat==1 && $fid != 9999 && $tag=="" && $fid != 9998 && $fid!=9997){ if (($allowgview==0) && (!$my->id)){ //Can guests view the folder selection page? mosNotAuth(); }else{ if ($showpathway==1){ // No folders, but lets fake a pathway if enabled echo "<div align=\"left\"><a href=\"".sefRelToAbs('index.php?option=com_puarcade&Itemid='.$Itemid)."\"> "; echo stripslashes($config->title)."</a><br/><br/>"; } $query = "SELECT count(*) from #__puarcade_games WHERE published = '1'"; $database->setQuery( $query ); $count = $database->loadRow(); include_once( "includes/pageNavigation.php" ); $pageNav = new mosPageNav( $count[0], $limitstart, $limit ); if ($count[0] > 0){ puarcade_html::WriteSpecialFolderLinks($Itemid); puarcade_html::ShowGames($Itemid,$pageNav,$flat,$fid); } } } else { /* * nothing defined - so lets just show the folders */ if (!$tag && ($fid == "" || $fid=="0")){ if ($showpathway==1){ // writing the path way echo "<div align=\"left\">"; puarcade_html::writepathway($fid); echo "<br/><br/>"; echo "</div>"; } puarcade_html::WriteSpecialFolderLinks($Itemid); puarcade_html::ShowFolders($Itemid,0); /* * This means we are looking in the Player List folder. */ }elseif ($fid == 9995){ echo "<div align=left><a href=".sefRelToAbs('index.php?option=com_puarcade&Itemid='.$Itemid)."> ".stripslashes($title)." </a><img src='images/M_images/arrow.png' /><a href=".sefRelToAbs('index.php?option=com_puarcade&fid=9995&Itemid='.$Itemid)."> Players </a><br/><br/></div>"; $limitstart = mosGetParam( $_REQUEST, 'limitstart', 0); $limit = mosGetParam( $_REQUEST, 'limit', $gamesperpage); include_once( "includes/pageNavigation.php" ); $query = "select count(distinct userid) from jos_puarcade WHERE userid != '0'"; $database->setQuery( $query ); $res = $database->loadRow(); $pageNav = new mosPageNav( $res[0], $limitstart, $limit ); $mainframe->setPageTitle($title.' - Player List'); puarcade_html::WriteSpecialFolderLinks($Itemid); puarcade_html::ShowPlayers($Itemid,$pageNav); /* * This means we are looking in the Score List folder. */ }elseif ($fid == 9996){ echo "<div align=left><a href=".sefRelToAbs('index.php?option=com_puarcade&Itemid='.$Itemid)."> ".stripslashes($title)." </a><img src='images/M_images/arrow.png' /><a href=".sefRelToAbs('index.php?option=com_puarcade&fid=9996&Itemid='.$Itemid)."> Scores </a><br/><br/></div>"; $limitstart = mosGetParam( $_REQUEST, 'limitstart', 0); $limit = mosGetParam( $_REQUEST, 'limit', $gamesperpage); include_once( "includes/pageNavigation.php" ); $pageNav = new mosPageNav( 200, $limitstart, $limit ); $mainframe->setPageTitle($title.' - Recent Score List'); puarcade_html::WriteSpecialFolderLinks($Itemid); puarcade_html::ShowScoreboard($Itemid,$pageNav); /* * This means we are looking in the Popular Games folder. */ } elseif ($fid == 9997) { if ($showpathway==1){ echo "<div align=\"left\"><a href=\"".sefRelToAbs('index.php?option=com_puarcade&Itemid='.$Itemid)."\"> "; echo stripslashes($title)." </a><img src=\"images/M_images/arrow.png\" alt=\"\" />"; echo "<a href=\"".sefRelToAbs('index.php?option=com_puarcade&fid=9997&Itemid='.$Itemid)."\"> Popular Games </a><br/><br/></div>"; } $query = "SELECT count(*) from #__puarcade_games WHERE published = '1'"; $database->setQuery( $query ); $count = $database->loadRow(); include_once( "includes/pageNavigation.php" ); $pageNav = new mosPageNav( $count[0], $limitstart, $limit ); puarcade_html::WriteSpecialFolderLinks($Itemid); puarcade_html::ShowGames($Itemid,$pageNav,$flat,$fid); /* * This means we are looking in the Newest Games folder. */ } elseif ($fid == 9998){ if ($showpathway==1){ echo "<div align=\"left\"><a href=\"".sefRelToAbs('index.php?option=com_puarcade&Itemid='.$Itemid)."\"> "; echo stripslashes($title)." </a><img src=\"images/M_images/arrow.png\" alt=\"\" />"; echo "<a href=\"".sefRelToAbs('index.php?option=com_puarcade&fid=9998&Itemid='.$Itemid)."\"> Newest Games </a><br/><br/></div>"; } $query = "SELECT count(*) from #__puarcade_games WHERE published = '1'"; $database->setQuery( $query ); $count = $database->loadRow(); include_once( "includes/pageNavigation.php" ); $pageNav = new mosPageNav( $count[0], $limitstart, $limit ); puarcade_html::WriteSpecialFolderLinks($Itemid); puarcade_html::ShowGames($Itemid,$pageNav,$flat,$fid); /* * This means we are looking at the favourite folder */ } elseif ($fid == 9999){ if ($showpathway==1){ echo "<div align=\"left\"><a href=\"".sefRelToAbs('index.php?option=com_puarcade&Itemid='.$Itemid)."\"> "; echo stripslashes($title)." </a><img src=\"images/M_images/arrow.png\" alt=\"\" />"; echo "<a href=\"".sefRelToAbs('index.php?option=com_puarcade&fid=9999&Itemid='.$Itemid)."\"> ".PUA_FAVES_FRONT." </a>"; echo "<br/><br/></div>"; } include_once( "includes/pageNavigation.php" ); $pageNav = new mosPageNav( $maxfaves, 0, $maxfaves ); puarcade_html::WriteSpecialFolderLinks($Itemid); puarcade_html::ShowGames($Itemid,$pageNav,$flat,$fid); /* * This means we are viewing tag results */ } elseif ($tag != ""){ if ($taggid != "" ){ clsPUArcade::IncrementTagCount($tag,$taggid); } $query = "SELECT count(*) from #__puarcade_tags WHERE tag LIKE '".mysql_real_escape_string($tag)."'"; $database->setQuery( $query ); $total = $database->loadRow(); include_once( "includes/pageNavigation.php" ); $pageNav = new mosPageNav( $total[0], $limitstart, $limit ); if ($total[0] > 0){ puarcade_html::WriteSpecialFolderLinks($Itemid); puarcade_html::ShowGames($Itemid,$pageNav,$flat,"",$tag); } /* * This means we are viewing a specific folder */ } else { // writing the pathway if ($showpathway==1){ echo "<div align=\"left\">"; puarcade_html::writepathway($fid); echo "<br/><br/></div>"; } $query = "SELECT viewpermissions,permissions FROM #__puarcade_folders WHERE id = '".mysql_real_escape_string($fid)."'"; $database->setQuery( $query ); $permission = $database->loadRow(); $query = "SELECT gid FROM #__users WHERE id = '$my->id'"; $database->setQuery( $query ); $realgid = $database->loadRow(); $permission[0]=explode(",",$permission[0]); $permission[1]=explode(",",$permission[1]); if ( ($my->gid && in_array(0,$permission[0])) || (in_array(intval($realgid[0]),$permission[0]) ) || ($my->gid && !in_array(0,$permission[1])) || (in_array(intval($realgid[0]),$permission[1]) )){ puarcade_html::WriteSpecialFolderLinks($Itemid); $query = "SELECT count(*) FROM #__puarcade_games WHERE published = '1' AND folderid = '".mysql_real_escape_string($fid)."'"; $database->setQuery( $query ); $count = $database->loadRow(); include_once( "includes/pageNavigation.php" ); $pageNav = new mosPageNav( $count[0], $limitstart, $limit ); puarcade_html::ShowFolders($Itemid,$fid); if ($count[0] > 0){ puarcade_html::ShowGames($Itemid,$pageNav,$flat,$fid); } }else{ mosNotAuth(); } } } puarcade_html::footer(); }
in puarcade.html.php
Code:

function ShowGames($Itemid, $pageNav, $flat, $fid = "", $tag = "") { global $mainframe, $database; $config = new puarcade_config($database); $config->load(1); $imagepath = $mainframe->getCfg('live_site')."/components/images/"; if (($fid != 9998) && ($fid != 9997)) { ?> <script type="text/javascript"> var uplight = new Image(); uplight.src = "<?php echo $imagepath; ?>up1.gif"; var downlight = new Image(); downlight.src = "<?php echo $imagepath; ?>down1.gif"; var upoff = new Image(); upoff.src = "<?php echo $imagepath; ?>up.gif"; var downoff = new Image(); downoff.src = "<?php echo $imagepath; ?>down.gif"; </script> <div class="pu_ListContainer"> <table class="pu_ListHeader"> <tr> <th colspan="2" width="45%"> <center> <img id="up1" src="<?php echo $imagepath; ?>up.gif" onclick="getlist('title','ASC','<?php echo $fid; ?>','<?php echo $pageNav->limit; ?>','<?php echo $pageNav->limitstart; ?>');clearimgs();setupimg('up1','<?php echo $mainframe->getCfg('live_site'); ?>');" alt="" /> &nbsp;<?php echo PUA_GAME_SELECTION; ?>&nbsp; <img id="down1" src="<?php echo $imagepath; ?>down.gif" onclick="getlist('title','desc','<?php echo $fid; ?>','<?php echo $pageNav->limit; ?>','<?php echo $pageNav->limitstart; ?>');clearimgs();setdownimg('down1','<?php echo $mainframe->getCfg('live_site'); ?>');" alt="" /> </center> </th> <th width="20%"> <center> <img id="up2" src="<?php echo $imagepath; ?>up.gif" onclick="getlist('numplayed','ASC','<?php echo $fid; ?>','<?php echo $pageNav->limit; ?>','<?php echo $pageNav->limitstart; ?>');clearimgs();setupimg('up2','<?php echo $mainframe->getCfg('live_site'); ?>');" alt="" /> &nbsp;<?php echo PUA_TIMES_PLAYED; ?>&nbsp; <img id="down2" src="<?php echo $imagepath; ?>down.gif" onclick="getlist('numplayed','desc','<?php echo $fid; ?>','<?php echo $pageNav->limit; ?>','<?php echo $pageNav->limitstart; ?>');clearimgs();setdownimg('down2','<?php echo $mainframe->getCfg('live_site'); ?>');" alt="" /> </center> </th> <th width="20%"><center><?php echo PUA_HIGH_SCORE; ?></center></th> <?php if ($config->contentrating == 1) { echo "<th width=\"15%\"><center>".PUA_CONTENT."</center></th>"; } ?> </tr> </table> </div> <!-- end pu_ListContainer --> <?php } else { if ($fid == 9998) { $pageheading = PUA_NEWEST_GAMES; } elseif($fid == 9997) { $pageheading = PUA_POPULAR_GAMES; } elseif($fid == 9996) { $pageheading = "Recent Scores"; } elseif($fid == 9995) { $pageheading = "Players"; } ?> <div class = "pu_heading"> <?php echo $pageheading; ?> </div > <?php } ?> <div id="FlashTable"> <?php clsPUArcade::WriteGamesTable($fid,"title","ASC",$pageNav->limit,$pageNav->limitstart,$Itemid,$tag); ?> </div> <table class="pu_ListHeader"> <tr> <td>&nbsp;</td> </tr> </table> <?php $url = "index.php?option=com_puarcade&amp;Itemid=".$Itemid; if ($tag != "") { $url .= "&amp;tag=".$tag; } if ($fid != "") { $url .= "&amp;fid=".$fid; } if ($pageNav->limit < $pageNav->total) { puarcade_html::WritePagination($url, $pageNav); } if ($config->flat == 0) { ?> <br/> <center> <a href="<?php echo sefRelToAbs("index.php?option=com_puarcade&amp;Itemid=".$Itemid); ?>"> <?php echo PUA_CHOOSE_ANOTHER_FOLDER; ?> </a> </center> <?php } }
 
Report to moderator   Logged Logged  
 
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop