Problem with PvP stats

phpNuke integration forum

Problem with PvP stats

Postby t_rob76 » Wed Aug 09, 2006 9:29 am

on my site the PvP stats will show, however when I click the link for some reason it is trying to go to www.kotlr.com/indexpvp.php instead of http://kotlr.com/modules.php?name=Roster&op=indexpvp&type=guildlosses.
If I actually type the url in it works fine. I cannot find the code to change and all of the other links work, only the pvp is not working. any help would be appreciated
t_rob76
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Sat Jul 22, 2006 8:47 am

Re: Problem with PvP stats

Postby t_rob76 » Thu Aug 10, 2006 5:53 am

I have fixed the problem by going into the pvplist.php file and changing the line that has <a href="indexpvp.php?type=guildwins"> to
<a href="' . $roster_conf['roster_dir'] . '&op=indexpvp&s=guildwins"> I also did this for guildlosses and so on. Now I just need to see how I can do in the indexpvp.php file for the drop down list, because that has a similar problem. I will i9nsert a copy of the file here for anyone else that is having troubles with this.
Attachments
pvplist.zip
This will fix 404 errors when clicking on links on the pvp portion of the main page
(1.66 KiB) Downloaded 68 times
t_rob76
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Sat Jul 22, 2006 8:47 am

Problem with PvP stats

Postby Vlorn » Sat Aug 19, 2006 1:06 am

t_rob76,

The fix for the dropdown menu was pretty simple as well, the file guildpvp.php needed two changes to correct the dropdown form bug.

1. add the full url to the form action on line 56 (if you have an older copy of this file you'll also need to change the method from "get" to "post")
2. On lines 36 and 37 replace the $_GET with $_REQUEST

I'll include the first 60 lines of code here with the changes made;
Code: Select all
<?php
/******************************
 * WoWRoster.net  Roster
 * Copyright 2002-2006
 * Licensed under the Creative Commons
 * "Attribution-NonCommercial-ShareAlike 2.5" license
 *
 * Short summary
 *  http://creativecommons.org/licenses/by-nc-sa/2.5/
 *
 * Full license information
 *  http://creativecommons.org/licenses/by-nc-sa/2.5/legalcode
 * -----------------------------
 *
 * $Id: guildpvp.php 62 2006-06-14 22:26:47Z mathos $
 *
 ******************************/

if ( !defined('ROSTER_INSTALLED') )
{
    exit('Detected invalid access to this file!');
}

//---[ Check for Guild Info ]------------
$guild_info = $wowdb->get_guild_info($roster_conf['server_name'],$roster_conf['guild_name']);
if( empty($guild_info) )
{
   die_quietly( $wordings[$roster_conf['roster_lang']]['nodata'] );
}
// Get guild_id from guild info check above
$guildId = $guild_info['guild_id'];

include_once (ROSTER_BASE.'lib'.DIR_SEP.'menu.php');


if (isset($_REQUEST['type']))
   $type = $_REQUEST['type'];
else
   $type = 'guildwins';


$choiceArray = array(
   'guildwins' => 'Wins by Guild',
   'guildlosses' => 'Losses by Guild',
   'enemywins' => 'Wins by Enemy',
   'enemylosses' => 'Losses by Enemy',
   'purgewins' => 'Guild Member Kills',
   'purgelosses' => 'Guild Member Deaths',
   'purgeavewins' => 'Best Win/Level-Diff Average',
   'purgeavelosses' => 'Best Loss/Level-Diff Average',
   'pvpratio' => 'Solo Win/Loss Ratios',
   'playerinfo' => 'Player Info',
   'guildinfo' => 'Guild Info',
);

$choiceForm = '<form action="' . $roster_conf['roster_dir'] . '&op=indexpvp" method="post" >
'.$wordings[$roster_conf['roster_lang']]['pvplist'].':
<select name="type">
';



As well as attaching the entire guildpvp.php file

Vlorn
Attachments
guildpvp.zip
(3.06 KiB) Downloaded 67 times
User avatar
Vlorn
WR.net Apprentice
WR.net Apprentice
 
Posts: 29
Joined: Tue Jul 04, 2006 7:57 pm


Return to phpNuke

Who is online

Users browsing this forum: No registered users and 0 guests