Gossamer Forum
Home : Products : Links 2.0 : Customization :

add/modify Description

Quote Reply
add/modify Description
Hello,
In the field 'decription', how can I convert \n into <br> for not see all the description of the added or modified link in one line at the end of the action ?

Regards,

Fred.
Quote Reply
Re: add/modify Description In reply to
Try searching the Links Modification Forum for :

''line breaks'' (exact match, all entries)

Quote Reply
Re: add/modify Description In reply to
Hi!

Sorry but i haven't found this topic !?!
Could you tell me more plz?
Tx

Regards,

Fred.

------------------
Quote Reply
Re: add/modify Description In reply to
Read the following Topics:

http://www.gossamer-threads.com/...um3/HTML/004770.html
http://www.gossamer-threads.com/...um3/HTML/004619.html
http://www.gossamer-threads.com/...um3/HTML/003653.html
http://www.gossamer-threads.com/...um3/HTML/003177.html
http://www.gossamer-threads.com/...um3/HTML/002433.html
http://www.gossamer-threads.com/...um3/HTML/000408.html

As Ant suggested, I used line break
as Exact Word Match in the LINKS
Modification
and LINKS Discussion
Forum
.

Wink

Please read suggestions more carefully that are provided
in the forums.

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: add/modify Description In reply to
Thanks guys! Wink
Quote Reply
Re: add/modify Description In reply to
You're welcome.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: add/modify Description In reply to
Hello!

I've put the followin code in the site_html_templates.pl :
sub site_html_add_success {
# --------------------------------------------------------
# This routine determines how the add success page will look like.

&html_print_headers;
$rec{'Description'} =~ s,\n\n,<p>,;
$rec{'Description'} =~ s,\n,<br>,;
print &load_template ('add_success.html', {
%in,
%globals
});
}

but this replace \n into space for the description in the add_sucess.html ???

Heuu..I don't understand why !!
Could you help me once more time please ?

Thanks a lot.
Fred.
Quote Reply
Re: add/modify Description In reply to
The codes that you should use are the following:

Code:
$rec{'Description'} =~ s/\n/<br>/g;
$rec{'Description'} =~ s/\n\n/<p>/g;

Taken from the following Topic:


-OR-

Try the following codes:

Code:
if ($rec{'Description'} !~ /<([p|P]|(br|BR))>/
{
$rec{'Description'} =~ s/\n/<br>/g;
}

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: add/modify Description In reply to
Hi Eliot!

I've tried your codes and others from the forum but I still have space instead of line break...
I've have to place codes only in function
sub site_html_add_success of site_html_templates.pl ?

Regards,
Fred.
Quote Reply
Re: add/modify Description In reply to
Try replacing $rec with $in.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: add/modify Description In reply to
You're welcome.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: add/modify Description In reply to
pffff ! I'm too bad..
It's ok Wink
Thanks a lot Eliot for your help.

Regards,
Fred.