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
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