Skip to Content
It is currently February 28th, 2024, 3:54 am

All times are UTC - 6 hours [ DST ]




 [ 4 posts ] 
Author Message
 Post subject: AMG Searches
PostPosted: February 22nd, 2006, 7:27 pm 
Offline
Senior User
Senior User

Joined: October 5th, 2003, 12:32 am
Posts: 123
For an “artist more info” link I’m pointing listeners to AMG with a local SQL query in the _config.html like so—

<!--DEF(song.website,"http://www.allmusic.com/cg/amg.dll?p=amg&opt1=1&uid=SEARCH&P=amg&sql=#song.artist#")-->

It follows if $song.website$ is used for my page link it generates the appropriate link syntax. If say, Evanescence is the band in question/clicked on it produces

http://www.allmusic.com/cg/amg.dll?p=am ... vanescence

This works like a charm until the artist name contains spaces. Any spaces cause the url to contain the infamous “%20” html space parameter.

Hence, the url built for Snow Patrol produces—
http://www.allmusic.com/cg/amg.dll?p=am ... w%20Patrol

This breaks the search text input pushed to the AMG db as the '%20' in the url inteprets to &20. The equivalent of entering Snow&20Patrol in the search box. While it does take you to AMG, if defaults to their “best guess” results or worse searches for "20".

To fix this I need to somehow auto-code the local query to insert a “pipette” ala | instead of &20.

Any suggestions as to how to pull that task off via a script or tweaked sql code in the _config.html?


Top
 Profile  
 
 Post subject:
PostPosted: February 23rd, 2006, 5:35 pm 
Offline
Senior User
Senior User

Joined: October 5th, 2003, 12:32 am
Posts: 123
Okay. I now realize that the grunt work for this operation is most likely handled by audio realm's infamous findcd.html page. A forum search on this particualr page did produce a few results however no one was able to reveal it's source code or the magic it performs. I'm guessing that it contains the solution to my "spaces" dilema with some kind of script that prepares the url for an external search correctly. I realize that a php site would cure many of my ills as this is just one that's easily fixed... if I were using php.

Does anyone know or care to divulge the source code for this ghost page?

I'm dyin' here.


Last edited by Pearhead on February 25th, 2006, 7:51 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: February 24th, 2006, 4:49 pm 
Offline
Alumni
Alumni

Joined: September 3rd, 2004, 7:03 pm
Posts: 2137
Location: Nashville, TN
PHP or HTML?

_________________
- Scott Giles
- Spacial Volunteer Support

Image


Top
 Profile  
 
 Post subject:
PostPosted: February 25th, 2006, 7:48 am 
Offline
Senior User
Senior User

Joined: October 5th, 2003, 12:32 am
Posts: 123
Musiclover11 (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))):
PHP or HTML?


html


Top
 Profile  
 
Display posts from previous:  Sort by  
 [ 4 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 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:  
cron
Powered by phpBB® Forum Software © phpBB Group