Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
calendar_open_closeCalendar 
[Solved] Music Search Mod
Post new topic   Reply to topic View previous topic :: View next topic
Goto page: Previous  1, 2, 3, 4  Next
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support Add To Bookmarks
Re: [Solved] Music Search Mod
PostPosted: 08/21/2007 3:08 AM Reply with quote
Sparrow
cavallino
Sparrow
Posts 21
Word Cnt. 2,213
BDay N/A
Sign N/A
Joined: Dec 11, 2005
Local time: 1:51 PM
blank.gif
Thanks for helping out in solving this issue! Smile
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 Sad 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
View user's profile Find all posts by cavallino Send private message  
Re: [Solved] Music Search Mod
PostPosted: 08/21/2007 3:31 AM Reply with quote
Site Admin
rb2d2
Site Admin
Posts 49593
Word Cnt. 2,756,445
BDay Apr 22
Sign Taurus
Sex Sex:Female
Joined: Sep 25, 2004
Local time: 12:51 PM
Location: Texas
texasC.gif
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
View all pictures posted by this userView user's profile Find all posts by rb2d2 Send private message   Visit poster's website Phoogle Map
Re: [Solved] Music Search Mod
PostPosted: 08/21/2007 3:46 AM Reply with quote
Sparrow
cavallino
Sparrow
Posts 21
Word Cnt. 2,213
BDay N/A
Sign N/A
Joined: Dec 11, 2005
Local time: 1:51 PM
blank.gif
wow!! that was very nice .... prayer  prayer
Have a great day so far Smile
Back to Top
View user's profile Find all posts by cavallino Send private message  
Re: [Solved] Music Search Mod
PostPosted: 08/22/2007 4:55 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 2:51 PM
Location: St Pete, FL
peace.gif
Welcome to RCF  cavallino!!!   Applause

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) . "%'


Laughing
Laughing Laughing
Laughing Laughing Laughing Laughing Laughing
Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing

Welcome to RCF cavallino!!!

Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing Laughing
Laughing Laughing Laughing Laughing Laughing
Laughing Laughing
Laughing


headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Music Search Mod
PostPosted: 08/23/2007 11:08 AM Reply with quote
Sparrow
cavallino
Sparrow
Posts 21
Word Cnt. 2,213
BDay N/A
Sign N/A
Joined: Dec 11, 2005
Local time: 1:51 PM
blank.gif
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
View user's profile Find all posts by cavallino Send private message  
Re: [Solved] Music Search Mod
PostPosted: 08/23/2007 3:59 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 2:51 PM
Location: St Pete, FL
peace.gif
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...

munky2


Last edited by Nightrider on 08/25/2007 1:07 AM; edited 1 time in total
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Music Search Mod
PostPosted: 08/24/2007 1:16 PM Reply with quote
Sparrow
cavallino
Sparrow
Posts 21
Word Cnt. 2,213
BDay N/A
Sign N/A
Joined: Dec 11, 2005
Local time: 1:51 PM
blank.gif
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
View user's profile Find all posts by cavallino Send private message  
Re: [Solved] Music Search Mod
PostPosted: 08/25/2007 1:06 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 2:51 PM
Location: St Pete, FL
peace.gif
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...

Embarassed
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: [Solved] Music Search Mod
PostPosted: 08/25/2007 1:29 AM Reply with quote
Sparrow
cavallino
Sparrow
Posts 21
Word Cnt. 2,213
BDay N/A
Sign N/A
Joined: Dec 11, 2005
Local time: 1:51 PM
blank.gif
Thanks a lot Nightrider, I just tested your hack and all the smilies in my lyrics have been parsed correcly! thumbright
Back to Top
View user's profile Find all posts by cavallino Send private message  
Re: [Solved] Music Search Mod
PostPosted: 08/25/2007 1:45 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 2:51 PM
Location: St Pete, FL
peace.gif
Kewl, I wasn't absolutely sure that would work but I suspected that it would.  That's awesome.  Congratulations cavallino!!!   Applause

banana  banana  banana  banana  banana
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
 Post new topic  Reply to topic
Information
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support

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 vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
All times are GMT - 5 Hours
Goto page: Previous  1, 2, 3, 4  Next
Page 3 of 4


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group

Page generation time: 0.0625s (PHP: 83% - SQL: 17%) - SQL queries: 57 - GZIP disabled - Debug on