Online since 2002. Over 3300 puzzles, 2600 worldwide members, and 270,000 messages.

TwistyPuzzles.com Forum

It is currently Wed Jul 23, 2014 1:56 am

All times are UTC - 5 hours



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: puzzle.cgi parameter/variable
PostPosted: Mon Mar 09, 2009 1:54 pm 
Offline
User avatar

Joined: Wed Jan 21, 2009 12:58 pm
Hello,

I don't know if this has been already pointed out, I made a search and didn't find anything. So, here it is:

There is a tiny problem with the database CGI code, it is not backwards compatible. Often, in the forum, users refer to the database with a link and I've notice there are two kinds of links...

1. Right now, we often find this kind of link, this link works: http://twistypuzzles.com/cgi-bin/puzzle.cgi?pkey=651

2. But, in older posts, I see this kind of link that doesn't work: http://twistypuzzles.com/cgi-bin/puzzle.cgi?pid=651

So I have to go up to the address bar and change the parameter from pid to pkey. No problem, but it is just a little bit annoying.

I have a simple solution (in pseudo code)... at the beginning of puzzle.cgi, we need to verify if pid exists as a parameter, if that's the case, then pkey gets the value from pid and both parameters/variables work.

Let me know what you think.

Peace,

Skarabajo.

_________________
My collection | My first mod | Making of first mod | Items for sale


Top
 Profile  
 
 Post subject: Re: puzzle.cgi parameter/variable
PostPosted: Wed Mar 11, 2009 2:43 pm 
Offline
User avatar

Joined: Fri Feb 06, 2009 2:57 pm
Location: Pittsburgh
I've actually NEVER been linked to a correct page before! Thanks! If it doesn't get implemented, I'll write a quick greasemonkey script to do it.

_________________
3x3x3 PB: 00:48.10
"Study gravitation, it's a field with a lot of potential."
Image


Top
 Profile  
 
 Post subject: Re: puzzle.cgi parameter/variable
PostPosted: Thu Mar 12, 2009 9:02 am 
Offline
User avatar

Joined: Thu Jan 24, 2002 1:10 am
Location: Toronto, Canada
Yeah, I mentioned that one here. This "id" to "key" conversion happened when I recently changed the database schema, and it affected most scripts. I agree that I could (should?) make the scripts backwards compatible... at least for a while. Backwards compatibility on the internet is of questionable value for the amount of effort it takes, so it's definitely not something I would want to maintain indefinitely (heh!).

I should do SOMETHING though (which I planned to do but haven't yet), so thanks for the reminder. I'll come up with a temporary solution for a few months, perhaps with an "update your link to the following..." message appearing when the backwards compatible situation is detected.
And clearly I need to improve the page displays when "errors" like this occur. That blank puzzle page looks pretty silly!

Sandy


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Forum powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group