|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
|
URL notes/thoughts
Posted: Wed Feb 11, 2004 11:46 am
|
SMS Power - URL notes 2004/02/11 Index: http://www.smspower.org Listing/Searching: http://www.smspower.org/search.php?system=sms http://www.smspower.org/search.php?system=sms&peripherals=paddle http://www.smspower.org/search.php?keywords=alex%20kidd http://www.smspower.org/search.php?keywords=alex%20kidd&start=20&size=20 http://www.smspower.org/search.php?players=2+ For a given game, should we use integer ID or strings? How should the string be computed? wonder_boy_3 wonder_boy_iii wonder_boy_3_the_dragon's_trap wonderboy3 WonderBoy3 WonderBoyIII WonderBoyIIITheDragon'sTrap wb3 etc... ? We should reuse this string as a base for all filenames: sms_alexkiddinmiracleworld_box_usa.jpg (instead of something like "box.jpg" which is confusing for the downloader) etc. so it's important to know how to compute it Main game page: http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld or maybe "game.php" instead of "view.php" ? Other sections for a given game: http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld#rele... http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld#scre... http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld#roms http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld#link... http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld&... http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld&... http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld&... http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld&... http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld&... http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld&... http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld&... http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld&... http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld&... http://www.smspower.org/view.php?system=sms&name=alexkiddinmiracleworld&... etc. http://www.smspower.org/view.php?system=sg1000&name=ninjaprincess (sg1000 or sg?) Non-game documents could be archived in a custom tree. They should be general purpose documents, to add any kind of content without relying on the complex game specific database. Of course, they will be listed in the database, but their inner content (like with games: screenshots, tips, etc...) will be raw documents. http://www.smspower.org/view.php?document=catalogs http://www.smspower.org/view.php?document=catalogs/gg/fr/gg1993 http://www.smspower.org/view.php?document=catalogs/sms/jp/joyjoy13 http://www.smspower.org/view.php?document=goodies http://www.smspower.org/view.php?document=goodies/alexkidd/pencase http://www.smspower.org/view.php?document=goodies/pins Can HTTP support '/' character in query ? I'd like to think about this "document tree" more in depth, to arrange documents in the best ways. This tree should contains: magazines, sega club letters and documents, catalogs, advertisements, goodies, etc... Do we need to work out on "databasing" those documents? I'm not sure. |
|
|
Posted: Wed Feb 11, 2004 12:36 pm |
I'd go with integer ID. Names are nicer for getting at links but they're not so nice for database lookups and subject to change from time to time.
With a defined server-side scheme; perhaps a hidden database field (in case of name changes). /scans/ does something like this but without a hidden field (so a name change forces me to rename files). Also... I think you can dynamically change the name of a file in PHP, so imgs/9463.jpg can come out as "Wonder Boy III - box front.jpg" via some database lookups for image ID 9463 and the game ID it would be linked to.
I don't think it matters much. It could even be index.php allowing things like http://www.smspower.org/games/?system=sms&name=...
"media" not "medias".
I think it supports anything by using %nn escaping. How well it works with Apache might be a different matter - I expect it first splits on the first '?'. Maxim (really should be finishing his CVS synchronising) |
|
|
Posted: Wed Feb 11, 2004 1:50 pm |
There will be definitively an integer ID stored for the database, I was referring to using a name for URL. A simple name->ID table could be probably optimized out to a hash table within the database. This is fairly light on lookup. Still, I don't know what to choose. Names are cool but can we afford this additionnal computing? As for the risk of changing from time to time, it should not be very difficult to add a redirection database to be used by PHP scripts. Even a new 404 page could take advantage of it, so that an old url: http://www.smspower.org/db/castle.shtml Will automatically return a 301 code and redirect to the new address.
Sorry - The question was: which scheme should we adopt ? :)
Seems a bit complicated. I hope that we won't have to change many games names anyway. When inserting the game, I'll take the time to check out real boxes and fix most names inconsistancies.
The idea was to allow easy URL remembering, and even in some case one could guess the url. %nn make them a bit difficult to remember.
? |
|
|
Posted: Thu Feb 12, 2004 8:48 am |
Well, whatever works :P Mine is: Convert to lowercase Strip spaces and punctuation Convert >7bit ASCII to normal ASCII I do the conversion in a fairly hacky way :/ return longname.replace(/(.)(.*)/g,"$+").replace(/^The|^Les/,'').replace(/[ $+.'":-?!]/g,'').replace(/^(.+)/,'').replace(///g,'&').replace(/é|ê/g,'e').replace(/ô/g,'o').replace(/ã/g,'a').replace(/í/g,'i').toLowerCase(); This is also removing all sections in brackets - which in /scans/ is subtitles and Japanese names.
http://www.sf.net/projects/petri-net Maxim |
|
|
Posted: Fri Feb 13, 2004 5:40 pm |
So WB3 will be 'wonderboyiii' ... those iii doesn't look very good. :( (Note that it wouldn't be a problem hand converting then, since we'll add games manually on the base anyway.)
Are you involved with that? Your name is not listed. It's so technical that it makes me feel dumb. |
|