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

|
|
|
|
 |
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 |
|
|
 | Re: [Solved] Music Search Mod |  |
Posted: 09/11/2007 2:40 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 1:22 AM
Location: St Pete, FL
|

|
|
|
|
 |
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'])) : '';
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: [Solved] Music Search Mod |  |
Posted: 09/11/2007 2:46 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 1:22 AM
Location: St Pete, FL
|

|
|
|
|
 |
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,
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Information |  |
|