 | Re: [Solved] Music Search Mod |  |
Posted: 08/21/2007 3:08 AM |
|
|
|
|
|
| Sparrow |
| Posts |
21 |
| Word Cnt. |
2,213 |
| BDay |
N/A |
| Sign |
N/A |
|
|
|
|
|
Joined: Dec 11, 2005
Local time: 1:51 PM
|

|
|
|
|
 |
Thanks for helping out in solving this issue!
I've always had the same problem and finally thanks to you it is solved.
I would like to ask you if its possible to change this "song search" feature to allow the search of just one word of the search title or singer because as it is now if you don't search for the exact complete title or singer name and last name, it won't bring any results. So for example to search a song named "Touch from the heart" ppl would just search for "Touch" and not the whole title... I see that here in this forum you can already search keywords, but in mine not Maybe you already implemented that in this site? Is it hard to do?
Also, I would like to take this chance to put another request still related to this mod. Would it be possible to parse bbcodes or forum smilies inside the Lyric text description? Some users use that field to put their own description and feelings about the song and often they use smilie codes cause they are used to do that in the forum... but I can see only smilies bbcodes.
Thanks! |
|
Last edited by cavallino on 08/21/2007 6:12 AM; edited 1 time in total |
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Music Search Mod |  |
Posted: 08/21/2007 3:31 AM |
|
|
|
|
|
| Site Admin |
| Posts |
49593 |
| Word Cnt. |
2,756,445 |
| BDay |
Apr 22 |
| Sign |
Taurus |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 12:51 PM
Location: Texas
|

|
|
|
|
 |
Hi cavallino! I want to acknowledge your post and welcome you to RCF. Nightrider is off line for several hours but he will respond when he comes back online. In the mean time look around.
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Music Search Mod |  |
Posted: 08/21/2007 3:46 AM |
|
|
|
|
|
| Sparrow |
| Posts |
21 |
| Word Cnt. |
2,213 |
| BDay |
N/A |
| Sign |
N/A |
|
|
|
|
|
Joined: Dec 11, 2005
Local time: 1:51 PM
|

|
|
|
|
 |
wow!! that was very nice ....
Have a great day so far  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Music Search Mod |  |
Posted: 08/22/2007 4:55 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 2:51 PM
Location: St Pete, FL
|

|
|
|
|
 |
Welcome to RCF cavallino!!!
I'm sorry it took so long to respond to your message. My health hasn't been cooperating lately, so I keep getting swamped and it seems like it takes longer and longer to catch up. Hopefully things will improve soon...
Yes, it would be possible to adjust the Search to look for part of a match rather than an exact match simply by using a LIKE % command in the SQL query. This is what you can do to correct the problem:
OPEN
music_list.php
FIND
| Code:
|
|
WHERE s.song_title LIKE '" . str_replace("\'", "''", $search) . "'
|
REPLACE WITH
| Code:
|
|
WHERE s.song_title LIKE '%" . str_replace("\'", "''", $search) . "%'
|
FIND
| Code:
|
|
WHERE s.song_singer LIKE '" . str_replace("\'", "''", $search) . "'
|
REPLACE WITH
| Code:
|
|
WHERE s.song_singer LIKE '%" . str_replace("\'", "''", $search) . "%'
|
FIND
| Code:
|
|
WHERE s.song_username LIKE '" . str_replace("\'", "''", $search) . "'
|
REPLACE WITH
| Code:
|
|
WHERE s.song_username LIKE '%" . str_replace("\'", "''", $search) . "%'
|
Welcome to RCF cavallino!!!
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Music Search Mod |  |
Posted: 08/23/2007 11:08 AM |
|
|
|
|
|
| Sparrow |
| Posts |
21 |
| Word Cnt. |
2,213 |
| BDay |
N/A |
| Sign |
N/A |
|
|
|
|
|
Joined: Dec 11, 2005
Local time: 1:51 PM
|

|
|
|
|
 |
Nightrider, health is very important and I hope its not anything serious so you get well very very soon! My best wishes for you.
Thank you so much about this snippet for the music online search, now everything's okay.
And about the smilies parsing in the lyrics txt field? Would be possible in a simple way?
Thanks again and take your time. |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Music Search Mod |  |
Posted: 08/23/2007 3:59 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 2:51 PM
Location: St Pete, FL
|

|
|
|
|
 |
You could probably do this:
OPEN
music_page.php
FIND
| Code:
|
|
$template->assign_vars(array(
|
BEFORE, ADD
| Code:
|
|
$music_desc = ( trim(nl2br($thissong['song_desc'])) != '' ) ? smilies_pass($thissong['song_desc']) : '';
|
FIND
| Code:
|
|
'SONG_DESC' => nl2br($thissong['song_desc']),
|
REPLACE WITH
| Code:
|
|
'SONG_DESC' => $music_desc,
|
Make sure to create good backups of all files that you plan to modify, just in case...
This has not been tested, so let me know if it doesn't work as expected...
 |
|
Last edited by Nightrider on 08/25/2007 1:07 AM; edited 1 time in total |
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Music Search Mod |  |
Posted: 08/24/2007 1:16 PM |
|
|
|
|
|
| Sparrow |
| Posts |
21 |
| Word Cnt. |
2,213 |
| BDay |
N/A |
| Sign |
N/A |
|
|
|
|
|
Joined: Dec 11, 2005
Local time: 1:51 PM
|

|
|
|
|
 |
Hi Nightrider,
thanks for your reply, but I can't find the part of code related to 'SONG_DESC', i searched it also in the other files like music_upload.php etc... but I just can't find it. Maybe you're using a modified version of the hack? |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Music Search Mod |  |
Posted: 08/25/2007 1:06 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 2:51 PM
Location: St Pete, FL
|

|
|
|
|
 |
Woops, I'm really sorry cavallino. These instructions are for the music_page.php file rather than the music.php file. I am looking at the MOM 2.0.6 version of the MOD too. I will adjust the file name above...
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Music Search Mod |  |
Posted: 08/25/2007 1:29 AM |
|
|
|
|
|
| Sparrow |
| Posts |
21 |
| Word Cnt. |
2,213 |
| BDay |
N/A |
| Sign |
N/A |
|
|
|
|
|
Joined: Dec 11, 2005
Local time: 1:51 PM
|

|
|
|
|
 |
Thanks a lot Nightrider, I just tested your hack and all the smilies in my lyrics have been parsed correcly!  |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Music Search Mod |  |
Posted: 08/25/2007 1:45 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 2:51 PM
Location: St Pete, FL
|

|
|
|
|
 |
Kewl, I wasn't absolutely sure that would work but I suspected that it would. That's awesome. Congratulations cavallino!!!
 |
|
|
 |
 |
| Back to Top |
|
|
 | Information |  |
|