Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [charly] BR tags in admin submissions

Quote Reply
Re: [charly] BR tags in admin submissions In reply to
I am on a mac, and I use LSQL as a content management tool, rather than a link directory. Here is the thing: once you use this global, you cannot use html tags as well. You must choose. Use the global and no html, OR use html and no global. Not both.

I did, however, come up with a solution that allows me to mostly use the global, and sometimes NOT use the global (if I WANT) to use html on a certain page. It is very simple.

Create a global that accepts line breaks, [b], [i] and hotlinks urls and email addresses. This is for general submissions. Sort of like using markup on the forums here. (BTW: Full_Story is my Detailed column name)

sub {
my $tags = shift;
my $Full_Story = $tags->{Full_Story};
$Full_Story = GT::CGI::html_escape($Full_Story);
$Full_Story =~ s/\n/<BR>\n/g;
$Full_Story =~ s,\[(/?i)\],<$1>,g;
$Full_Story =~ s,\[(/?b)\],<$1>,g;
$Full_Story =~ s,(\S+@\S+\.\S+),<a href="mailto:$1">$1</a>,sg;
$Full_Story =~ s,(http://\S+),<a href="$1" target=_blank>$1</a>,sg;
$Full_Story =~ s,\[([/\w]+)\],<$1>,g;
return $Full_Story;
}

Then, create a new column in my Links Table, called: html
the colum has two radio buttons: html and markup, I set it default to markup.

Now, in my detailed.html template, I create an If statement.:
<%--this is where LSQL will format the text and accept line breaks and stuff. Defined by a template global in the admin--%>
<br><%if html eq "markup"%><%full_story_formatted%><%endif%>

<%--this is where LSQL will NOT format the text and accept line breaks and stuff. you can use html--%>
<%if html eq "html"%><%Full_Story%><%endif%>

Now, all links are defaulted to "markup" and will use the global, but if I sometimes want to use html, I just check the box when submitting or modifying a link, and it switches back to the old way of calling a column in the database.

Whew. I hope this helps!
You can't have it both ways at the same time!
Evoir

Last edited by:

Evoir: Sep 15, 2002, 10:23 AM
Subject Author Views Date
Thread; hot thread BR tags in admin submissions kuplo 15216 Aug 2, 2001, 4:10 PM
Post; hot thread Re: BR tags in admin submissions
Stealth 14544 Aug 2, 2001, 5:09 PM
Post; hot thread Re: BR tags in admin submissions
Eraser 14513 Aug 3, 2001, 7:47 AM
Thread; hot thread Re: BR tags in admin submissions
account deleted 14595 Aug 3, 2001, 10:15 AM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14640 Sep 6, 2001, 5:18 PM
Thread; hot thread Re: BR tags in admin submissions
Alex 14500 Sep 6, 2001, 6:22 PM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14669 Sep 7, 2001, 10:46 AM
Thread; hot thread Re: BR tags in admin submissions
Paul 14448 Sep 7, 2001, 11:15 AM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14448 Sep 7, 2001, 11:39 AM
Thread; hot thread Re: BR tags in admin submissions
Alex 15024 Sep 7, 2001, 11:59 AM
Post; hot thread Re: BR tags in admin submissions
Evoir 14445 Sep 7, 2001, 12:03 PM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14426 Sep 9, 2001, 1:20 AM
Thread; hot thread Re: BR tags in admin submissions
Paul 14379 Sep 9, 2001, 4:42 AM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14516 Sep 9, 2001, 11:28 AM
Thread; hot thread Re: BR tags in admin submissions
Paul 14436 Sep 9, 2001, 11:38 AM
Thread; hot thread Re: BR tags in admin submissions
Paul 14490 Sep 9, 2001, 11:39 AM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14440 Sep 9, 2001, 12:10 PM
Thread; hot thread Re: BR tags in admin submissions
Paul 14557 Sep 9, 2001, 12:44 PM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14453 Sep 9, 2001, 12:54 PM
Thread; hot thread Re: BR tags in admin submissions
Paul 14466 Sep 9, 2001, 1:03 PM
Thread; hot thread Re: [PaulW] BR tags in admin submissions
Evoir 14284 Dec 13, 2001, 6:57 PM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Alex 12087 Dec 13, 2001, 7:25 PM
Thread; hot thread Re: [Alex] BR tags in admin submissions
Evoir 12104 Dec 13, 2001, 7:51 PM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Paul 11968 Dec 14, 2001, 3:37 AM
Thread; hot thread Re: [PaulW] BR tags in admin submissions
Alex 12519 Dec 14, 2001, 10:04 AM
Thread; hot thread Re: [Alex] BR tags in admin submissions
Paul 12115 Dec 14, 2001, 10:13 AM
Thread; hot thread Re: [PaulW] BR tags in admin submissions
Evoir 12061 Dec 15, 2001, 7:00 PM
Post; hot thread Re: [Evoir] BR tags in admin submissions
Robert 12100 Feb 12, 2002, 12:38 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Evoir 11953 Mar 27, 2002, 6:13 PM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Paul 11983 Mar 28, 2002, 2:12 AM
Post; hot thread Re: [Paul] BR tags in admin submissions
Evoir 11818 Jul 18, 2002, 10:35 PM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Robo 11858 Jul 31, 2002, 4:03 AM
Thread; hot thread Re: [Robo] BR tags in admin submissions
Paul 11866 Jul 31, 2002, 4:09 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Robo 11841 Jul 31, 2002, 5:23 AM
Thread; hot thread Re: [Robo] BR tags in admin submissions
Paul 11874 Jul 31, 2002, 6:39 AM
Post; hot thread Re: [Paul] BR tags in admin submissions
Robo 11676 Jul 31, 2002, 7:23 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Evoir 11723 Aug 28, 2002, 9:04 AM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Paul 11691 Aug 28, 2002, 9:11 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Evoir 11667 Aug 28, 2002, 9:22 AM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Paul 11680 Aug 28, 2002, 9:31 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Evoir 11718 Aug 28, 2002, 9:37 AM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Paul 11726 Aug 28, 2002, 9:38 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Evoir 11698 Aug 28, 2002, 9:44 AM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Paul 11716 Aug 28, 2002, 9:51 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
ryel01 12193 Aug 28, 2002, 2:45 PM
Post; hot thread Re: [ryel01] BR tags in admin submissions
webmaster33 12058 Aug 28, 2002, 3:51 PM
Thread; hot thread Re: [ryel01] BR tags in admin submissions
Paul 12153 Aug 29, 2002, 2:30 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
charly 12174 Sep 15, 2002, 3:52 AM
Thread; hot thread Re: [charly] BR tags in admin submissions
Evoir 12147 Sep 15, 2002, 10:14 AM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
yogi 12156 Sep 15, 2002, 10:18 AM
Post; hot thread Re: [yogi] BR tags in admin submissions
Evoir 12035 Sep 15, 2002, 10:29 AM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
charly 12118 Sep 15, 2002, 1:03 PM
Thread; hot thread Re: [charly] BR tags in admin submissions
Evoir 12082 Sep 15, 2002, 4:34 PM
Post; hot thread Re: [Evoir] BR tags in admin submissions
charly 11947 Sep 22, 2002, 5:40 AM
Post; hot thread Re: [Alex] BR tags in admin submissions
Evoir 11756 Jul 27, 2002, 5:28 PM
Post; hot thread Re: [Paul] BR tags in admin submissions
charly 11758 Jun 12, 2002, 10:41 AM
Thread; hot thread Re: BR tags in admin submissions
Paul 14416 Sep 9, 2001, 11:41 AM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14767 Sep 9, 2001, 12:24 PM
Thread; hot thread Re: BR tags in admin submissions
Paul 14344 Sep 9, 2001, 12:31 PM
Post; hot thread Re: BR tags in admin submissions
Evoir 14312 Sep 9, 2001, 12:50 PM
Thread; hot thread Re: [Alex] BR tags in admin submissions
cfox 11943 Mar 6, 2003, 10:04 PM
Thread; hot thread Re: [cfox] BR tags in admin submissions
klauslovgreen 11959 Mar 6, 2003, 11:17 PM
Post; hot thread Re: [klauslovgreen] BR tags in admin submissions
klauslovgreen 11862 Mar 7, 2003, 12:21 AM
Thread; hot thread Re: [kuplo] BR tags in admin submissions
long327 11767 Apr 2, 2004, 2:45 PM
Thread; hot thread Re: [long327] BR tags in admin submissions
Matthias70 11473 Oct 31, 2007, 2:16 PM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 11411 Nov 1, 2007, 2:44 AM
Thread; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 11475 Nov 1, 2007, 4:50 AM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 11506 Nov 1, 2007, 5:02 AM
Thread; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 11377 Nov 1, 2007, 5:12 AM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 11940 Nov 1, 2007, 5:15 AM
Thread; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 11431 Nov 1, 2007, 5:21 AM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 11770 Nov 1, 2007, 5:26 AM
Thread; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 11425 Nov 1, 2007, 5:29 AM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 11540 Nov 1, 2007, 5:32 AM
Post; hot thread Re: [Andy] BR tags in admin submissions
Andy 11405 Nov 1, 2007, 5:42 AM
Thread; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 4037 Nov 1, 2007, 5:42 AM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 4020 Nov 1, 2007, 5:52 AM
Thread; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 4088 Nov 1, 2007, 6:03 AM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 4023 Nov 1, 2007, 6:22 AM
Post; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 3983 Nov 1, 2007, 6:44 AM