Gossamer Forum
Home : Products : Links 2.0 : Customization :

<Þscription%> in order

Quote Reply
<Þscription%> in order
Hi. I set up new Links as my lyrics collection but the problem is when i add text to database in link.html it look like this: eg. aaaaa sssss ddddd fffff ggggg but i like to add new rows and make it look like this:
aaaaa sssss
ddddd ddddd
fffff fffff
is it posible to fix and how or where?

www.midi-studio.com
Quote Reply
Re: <Þscription%> in order In reply to
Search this forum for linewrap and also regular expressions and $rec{'Description'} going back to All posts for the Date Range and 250 Hits for the Hits field.

This has been addressed before in this forum....

Regards,

Eliot Lee
Quote Reply
Re: <Þscription%> in order In reply to
Try adding something like this in sub site_html_link

Code:
$rec{'Description'} =~ s/(.{10})/$1< br >/g;
Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

Quote Reply
Re: <Þscription%> in order In reply to
sorry i need this for detailed.html, so are same thing applay to sub site_html_detailed? Here is how it look now:
sub site_html_detailed {
# --------------------------------------------------------
# This routine will build a single page per link. It's only
# really useful if you have a long review for each link --
# or more information then can be displayed in a summary.
#
my %rec = @_;
return &load_template ('detailed.html', {
total => $total,
grand_total => $grand_total,
title_linked => $title_linked,
%rec,
%globals
} );
}

what should be done???


www.midi-studio.com
Quote Reply
Re: <Þscription%> in order In reply to
Yeah put it under:

my %rec = @_;

Removes the spaces in the br tag too - they are only there to stop the forum messing up the code.

Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

Quote Reply
Re: <Þscription%> in order In reply to
i done it but text in detailed page look like:
aaaaa
sssss
ddddd....
tried to remove
in the code but come up with same problem as first time aaaaa sssss ddddd...
what could be wrong

www.midi-studio.com
Quote Reply
Re: <Þscription%> in order In reply to
I don't see what you are saying.

I thought thats HOW you wanted it displayed?

What are you saying is wrong with that display?

Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

Quote Reply
Re: <Þscription%> in order In reply to
sorry sorry missprint. after changes it looked like this:
aaaa ssss < br > ddddd fffff < br > ggggg...

www.midi-studio.com
Quote Reply
Re: <Þscription%> in order In reply to
problem fixed :-) sorry i forgot to delete space on < br >
now is OK
Thank you Paul!!!

www.midi-studio.com
Quote Reply
Re: <Þscription%> in order In reply to
Doh. There is problem again. It adds new rows but not in order. Actualy it add new row just anywhere and lyrics look like this:
aaaaa ss
sss ddddd f
ffff ggg
ggg hhhh
hh...
any guess?

www.midi-studio.com
Quote Reply
Re: <Þscription%> in order In reply to
It doesn't add it anywhere - it adds a br after every 10 characters. To change that, alter (.{10}) to whatever you want, or you could insert it after each period using:
Code:
$rec{'Description'} =~ s/\./\.< br >/g;
..or whatever you want. If you are specific about where you want the br's to occur then I can give you the code.

Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

Quote Reply
Re: <Þscription%> in order In reply to
thanks paul, but i thougt my question was clear. I need that br to be added only where i hit enter for new row, same like here in forum, i hit it here
and it goes in new row! how to do that?

www.midi-studio.com
Quote Reply
Re: <Þscription%> in order In reply to
$rec{'Description'} =~ s/\ n/< br >/g;

Replace the spaces before the n and inbetween the br codes.

(as posted in other Threads in this forum...)

Regards,

Eliot Lee
Quote Reply
Re: <Þscription%> in order In reply to
Thanks Anthro it worked and now i have everything in order as i needed.

www.midi-studio.com