Doesn't work with Alternative URLs

Adds complete user authorization to Roster

Moderator: mdeshane

Doesn't work with Alternative URLs

Postby zanix » Wed Nov 07, 2007 5:09 am

Topic says it all
When you click on the util-accounts button in the menu, the url isn't right

This only happens when "Alternative URLs" is enabled in Roster
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Doesn't work with Alternative URLs

Postby mdeshane » Wed Nov 07, 2007 5:18 am

I haven't been able to test with the Alternative URLs feature, cause I keep getting object not found everytime I try going to any link in roster when Alternative URLs are enabled.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 203
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Doesn't work with Alternative URLs

Postby zanix » Wed Nov 07, 2007 7:04 am

Are you on an IIS server or Apache without mod_rewrite?

In the SVN, I did replace some hard coded links to index.php, but I cannot trace why this particular button doesn't link right
Last edited by zanix on Wed Nov 07, 2007 7:04 am, edited 1 time in total.
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Doesn't work with Alternative URLs

Postby mdeshane » Wed Nov 07, 2007 7:31 am

I'm running Apache, checked my httpd.conf and mod_rewrite was disabled. It's enabled now and the Alternative URLs are working. I'll make the changes to the addon links. I hope to add the user admin in the next commit, I'll just fix the links too...
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 203
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Doesn't work with Alternative URLs

Postby mdeshane » Thu Nov 08, 2007 2:19 am

Ok, this Alternative URLs is kind of annoying. I get the addon pages to work with the Alternative URLs, but then it won't work with the Standard URLs. I think half the problem is that with the Standard URLs, using makelink() you need the scope-addonname-file. But with Alternative URLs it seems to not like having the scope if you're already in that scope, and it doesn't want the addonname if your already in that directory. What am I doing wrong? Do I have to code all links seperately for the two and use an if statement to see if Alternative URLs are on?
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 203
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Doesn't work with Alternative URLs

Postby PleegWat » Thu Nov 08, 2007 2:39 am

You need to pass makelink the get params, but for p= only show the value.

makelink('¶m=value') => index.php?p=current-page¶m=value or /current/page/param=value.html

makelink('another-page¶m=value') => index.php?p=another-page¶m=value or /another/page/param=value.html
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: Doesn't work with Alternative URLs

Postby tuigii » Tue Dec 04, 2007 6:59 am

Ok, me no get it.

This is a part of the reputation addon :
When CEO is of, all is well.
Can't get this SEO stuff to work. Some has some ideas / sugestions ?

This is a part of the guild/index.html file :
Code: Select all
// --[ Build faction select box ]--

$baseaddon = 'guild-'.$addon['basename'];

$choiceForm = "<form action=".makelink()." method='GET'>"
   .$roster->locale->act['faction_filter']
   ."   <select name='f' onchange='top.location.href=this.options[this.selectedIndex].value'>"
   ."      <option value=".makelink($baseaddon).">".$roster->locale->act['SelectFaction']."\n";

while($row_fct = $roster->db->fetch($result_fct))
{
   if( isset($_REQUEST['f']) && stripslashes($_REQUEST['f']) == ($row_fct['faction']) )
   {
      $choiceForm .=      '<option value="'.makelink($baseaddon.'&f='.$row_fct['faction'],true).'" selected="selected">'.$row_fct['faction']."</option>\n";
   }
   else
   {
      $choiceForm .=      '<option value="'.makelink($baseaddon.'&f='.$row_fct['faction'],true).'">'.$row_fct['faction']."</option>\n";
   }
}
$choiceForm .= '   </select>';
$choiceForm .= '</form><br />';

$roster->db->free_result($result_fct);
User avatar
tuigii
WR.net Master
WR.net Master
 
Posts: 891
Joined: Wed Dec 27, 2006 12:57 pm
Location: Somewhere in the South Ouest of France

Doesn't work with Alternative URLs

Postby mdeshane » Thu Dec 06, 2007 1:02 pm

I ended up dumping any usage of $_GET parameters and just started using $roster->pages[]. That command will output a given part of a makelink. Say you used makelink('guild-reputation-' . $row_fct['faction']),
if you call $roster->pages[0] it will return guild, if you called $roster->pages[2] it will return the value of $row_fct['faction'].

It's really just using a '-' seperated array to generate the URL, this just allows us to bypass using the URL and use the pages array. Does that help?
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 203
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Doesn't work with Alternative URLs

Postby PleegWat » Thu Dec 06, 2007 2:38 pm

Damn.

Did I tell you to entity_encode before passing to makelink() yet? Basically boils down to using & instead of &
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Doesn't work with Alternative URLs

Postby zanix » Thu Dec 06, 2007 3:09 pm

you mean
& amp; (without the space)
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Doesn't work with Alternative URLs

Postby PleegWat » Thu Dec 06, 2007 6:38 pm

indeed.

Apparently posts are entity_decoded. :(
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm


Return to Accounts

Who is online

Users browsing this forum: No registered users and 0 guests

cron