[geeklog-devel] Idea for next 1.3.x

Marc mvonahn at techtracker.com
Sun Mar 9 21:37:46 EST 2003


The regex on the article.php page to highlight search terms could 
easily be used to do this



On Sunday, March 9, 2003, at 04:38 PM, Simon Lord wrote:

> I most definitely would like this feature!
>
> On Sunday, March 9, 2003, at 07:27 PM, 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
>>
>>
> Sincerely,
> Simon
>
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://lists.geeklog.net/listinfo/geeklog-devel




More information about the geeklog-devel mailing list