The code for checking the email address could just be .+@.+\..+ but that won't work in this case.
I can't believe how bad the code was in this thread after I re-read it this morning :) ...it was only from September too ....having said that the code above isn't great either.
Re: [Paul] BR tags in admin submissionsIn reply to
Hello again
I'm still working on this. [:P] So, I have the following as a global 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://[\w\.-]+),<a href="$1" target=_blank>$1</a>,sg; $Full_Story =~ s,\[([/\w]+)\],<$1>,g; return $Full_Story; }
and when I put a url like: http://dolphin.upenn.edu/~lgba the system only makes the http://dolphin.upenn.edu/ active as a link, it drops off the ~lgba
Is there a way to make it recognize this? I would be fine if I had to surround url's with
Re: [Paul] BR tags in admin submissionsIn reply to
First my enormous thanks for everyone's contributions to this thread, providing solutions for one of my headaches.
May I add a supplementary query?
I cut and paste texts from my Word files into DBMan SQL fields. The original texts display normally with paragraphs etc. in my database programme from which I export tab-delimited records into DBMan SQL.
Despite the mods you and others have indicated, these plain text documents do not display in DBMan views WITH the paragrphs and line breaks. If I modify a record and manually insert a CR just to test, then the global works and the break is displayed.
So I examined the exported data and found two small 'box' symbols between paragraphs. Checking these, their hex value is 0B. Now the question: can we also convert these to <CR>s in the global? Thanks again for helping me so much. Charly
Re: [Paul] BR tags in admin submissionsIn reply to
Ok, I am still at this. While the code Paul and Alex (am I forgetting anyone?) came up with is cool, what I really want is LSQL to accept a line break as a <br> tag.
I had all the the [b] and other tags working too, but I found I didn't want to set up two sets of code for my editors, one for the full article, and another way to bold and italics the synopsys etc.
So, what I'd like is for LSQL to make a line break mean a <br> and also accept a <b> tag or an <i> tag. This would help my editors have success in learning the tags. Also, I may sometimes want to add html elements to the articles (forms?). For that I'd like to use html.
Is there a way to modify this global to do this? Is there another approach?
My current globl is:
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; return $Full_Story; }
Re: [Alex] BR tags in admin submissionsIn reply to
Alex,
I noticed in the Reviews section of LSQL that there is a toggle for "Convert line breaks to <br> tags:" and I think this is a great admin option! Is there anyway to implememnt this site wide to submissions through LSQL?
This would hopefully solve the issue of having to use this global.
If this were implemented, would the field be able to accept html as well?
Re: [Paul] BR tags in admin submissionsIn reply to
I am still looking for a solution to this problem: I want LSQL to accept line breaks, hotlink email addresses and urls -- but also to accept html. (I am fine with tagging <b> and <i> in html. Right now it requires [b][/b][i][/i]
Is this at all possible? I don't want to be stuck formatting all my tags in [markup]. And sometimes I'd like to add a form, or a photo to a detailed page in html. This global seems to cut off that option.
Anyway, if someone can help I'd be so appreciative! The current global I have right now is:
Re: [Evoir] BR tags in admin submissionsIn reply to
I can't remember if links sql strips out html or not, it probably does, which it why I think we used [] so if you want to create a table you can just use:
Re: [Paul] BR tags in admin submissionsIn reply to
The weird thing is that LSQL, as I remember, does NOT strip out html. This global does.
Most ideally, what I'd like is the ability for LSQL to recognize line breaks and urls and email addresses.
Other than line breaks, urls and email addresses, I would prefer to use regular html tags. Is there some way to change the global so that it would allow this? Or is it an all or nothing kind of thing?
Re: [Paul] BR tags in admin submissionsIn reply to
tee hee
I wish to automate parts of it, so that when my editors enter a link with a detailed page, line breaks are recognized, urls are recognized and email addresses are recognized (and hyperlinked).
When I use this gloabl, it turns off the ability to just standard html snippets in addition. (for example, a table, or <b> and <i> tags)
I am hoping for a hybrid solution.
I don't want my editors to have to remember <br><br> for paragraph breaks. Or how to link a url. But I want also to have some flexibility for me to add html snippets in there, too.