[geeklog-devel] Idea for next 1.3.x

Tony Bibbs tony at tonybibbs.com
Mon Mar 10 09:46:12 EST 2003


I'm sure a little time with the Komodo regex tool and you could have it 
working. Be sure to let this be configurable.  Some may want to turnt his 
off.

--Tony

 On Mon, 10 Mar 2003, LIMBURG, Mark wrote:

> Howdy,
> 
> Autolinks as per postnuke.
> 
> In essence, the concept is fairly simple.  The admin creates a bunch of
> 'text' which is automatically altered to become a link.  Let's go with an
> example.
> 
> Text: Google
> Link: http://www.google.com/
> Title: The Google Search Engine
> 
> Whenever the word 'google' appears, it's replaced with:
> 
>   <a href="http://www.google.com/" title="The Google Search Engine"
> class="autolink">Google</a>
> 
> Now the annoying bit.  We'll need to ensure that the autolink does NOT occur
> when it shouldn't.  The best example I can think of is if the word is
> already inside a link.  This would be annoying:
> 
>   <a href="http://www.<a href="http://www.google.com/" title="The Google
> Search Engine" class="autolink">Google</a>.com/">Go</a>
> 
> Now, you *could* use a space pattern match, so only " google " would be
> valid, but that doesn't fix a bunch of problems also.  The follow shows this
> ..
> 
>  <a href="http://sitename.com">My <a href="http://www.google.com/"
> title="The Google Search Engine" class="autolink">Google</a> Statistics</a>
> 
> .. not to mention " google." and the like.  
> 
> So, I think we'd need to do some pattern parsing.  If the term is inside a
> <a> then it doesn't apply.  If my brain was actually online (I'm writing
> this from notes I made on the weekend) I'm sure I could think of a few more.
> 
> As an additional extra, these links would appear in the 'whats releated'
> section of a story.
> 
> Thoughts?  Is this something people want?
> 
> Regards,
> 
> Mark Limburg
> Team Leader, Unix Operations, Information Systems
> 
> BAE SYSTEMS, AUSTRALIA
> PO Box 1068, Salisbury
> South Australia,  5108
> Phone: +61 8 8480 7971
> Fax:   +61 8 8480 8866
> Mobile:+61 4 0448 0599
> 
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://lists.geeklog.net/listinfo/geeklog-devel
> 

-- 
Tony Bibbs          "I guess you have to remember that those who don't
tony at tonybibbs.com  hunt or fish often see those of us who do as      
                    harmlessly strange and sort of amusing. When you  
                    think about it, that might be a fair assessment." 
                    --Unknown





More information about the geeklog-devel mailing list