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
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support Add To Bookmarks
Re: [Solved] Music Search Mod
PostPosted: 09/11/2007 1:27 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: 12:22 AM
blank.gif
Hi Nightrider,
I'm back again just to let you know about a little issue in using this snippet.

As i told you smilies are parsed correctly but I see that the layout of the written lyrics text is broken.
What I mean is that the lyrics text shows up all in a row now, without anymore line breaks, centered text etc...
Can you possibly fix it?

Also, if you have time... how can we parse smilies in music comments as well?

Thanks
Back to Top
View user's profile Find all posts by cavallino Send private message  
Re: [Solved] Music Search Mod
PostPosted: 09/11/2007 2:40 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: 1:22 AM
Location: St Pete, FL
peace.gif
Welcome back cavallino.  Yep, I can see how that caused a problem.  The nl2br function converts line breaks to HTML newlines and my version didn't account for that.  Ok, try this and see if it helps:

OPEN
music_page.php

FIND
Code:
$music_desc = ( trim(nl2br($thissong['song_desc'])) != '' ) ? smilies_pass($thissong['song_desc']) : '';

REPLACE WITH
Code:
$music_desc = ( trim($thissong['song_desc']) != '' ) ? smilies_pass(nl2br($thissong['song_desc'])) : '';

munky2
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: 09/11/2007 2:46 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: 1:22 AM
Location: St Pete, FL
peace.gif
To do this for comments, you would do something very similar to what we did for the description...

Ok, try this:

OPEN
music_page.php

FIND
Code:
$template->assign_vars(array(

BEFORE, ADD
Code:
$music_comment = ( trim($thissong['comments']) != '') ? smilies_pass(nl2br($thissong['comments'])) : '';

FIND
Code:
'SONG_COMMENTS' => $thissong['comments'],

REPLACE WITH
Code:
'SONG_COMMENTS' => $music_comment,

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
 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
Page 4 of 4


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group

Page generation time: 0.0685s (PHP: 76% - SQL: 24%) - SQL queries: 36 - GZIP disabled - Debug on