Extending
Posted: 22 January 2008 03:25 PM   [ Ignore ]
Member
RankRankRank
Total Posts:  65
Joined  2006-01-09

Hi!

A client is looking for something like this, but one that will create a link to a definitions, (or something, even another weblog for definitions), more like a phrase recognition)

ie” Nappa Valley”
Becomes a link automatically linking to an entry/definition. Not much like Acronym, maybe more like tags?
Anything that can be made to do that?
Thanks

Profile
 
 
Posted: 23 January 2008 07:03 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2751
Joined  2006-10-18

This is apparently possible! smile

Have a look here at the Acronym 1.5.0 Tips & Tricks Documentation

Acronym Documentation -

Tips and Tricks

The acronym module can be used in many different ways that extend the use from just working with an acronym and its description.

Kurt Deutscher for example created a dynamic glossary system for a site with really tough vocabulary. The author has about 100 words listed, and now anytime one of them is used on the site, it dynamically becomes a link that calls a small pop-up window with a definition of the word (as within the context of this author’s site). For an example and more information visit: NetRaising Web Development Services. [link no longer works]

Using the ReplaceString function you can turn an acronym into a link. Simply enter as the acronym definition an html formatted link. Whenever the acronym is used in the content it will be replaced by the link.

Using Acronym and ReplaceString at the same time:

It is very easy to use the acronym and replacestring function at the same time. Per acronym group you either have it set to acronym or to replacestring. However, if you wish to use that functionality at the same time you can create two seperate acronym groups. One for the acronyms and one for the string replacements. In your template you simply call the Acronym Module twice:

{exp:acronym acronym_group_name='Standard'}
{exp
:acronym acronym_group_name='links'}
...content...
{/exp:acronym}
{
/exp:acronym}

 Signature 
Profile
 
 
Posted: 23 January 2008 08:28 AM   [ Ignore ]   [ # 2 ]
Member
RankRankRank
Total Posts:  65
Joined  2006-01-09

Heyyyyy!

Thanks!

It does look doable then, will give it a spin and see how it works out.
If it does a popup link automatically will do a reg link methinks,,,

Profile
 
 
Posted: 29 January 2008 01:40 PM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  16
Joined  2007-04-12

Another thread about this over here: http://expressionengine.com/forums/viewthread/69581/

Thanks,

Doug

Profile
 
 
Posted: 29 January 2008 02:14 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  16
Joined  2007-04-12

I just tried out using the Replace functionality in the Acronym Module, and it’s not working like I would’ve hoped for.  For one, my ideal module would skip anything that’s already in certain HTML tags so it does not interfere with formatting or site structure.

As you can see by viewing the links below, I have the acronym “HP” listed twice in the story… once in the post image’s ALT tag, and once in the body of the story.  The module is replacing the characters “HP” even when they are in an IMG tag attribute.

<img src="http://www.dabbledoo.com/ee/images/uploads/gadgetell/hp_2710p_175.jpg" title="" 
alt="<a href="http://www.gadgetell.com/tech/tag/HP/">HP</a> 2710p Tablet PC with 64GB SSD option" width="175" height="196" align="right" />

IS NOT using the Acronym Module:
http://www.gadgetell.com/tech/comment/hp-2710p-tablet-pc-now-with-optional-64gb-ssd/

IS using the Acronym Module:
http://www.gadgetell.com/tech_test/comment/hp-2710p-tablet-pc-now-with-optional-64gb-ssd/

I’d love to see a skip="a,img" or something like that added.  Any other thoughts on how I can do this?

Thanks!

Profile
 
 
Posted: 30 January 2008 07:41 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2751
Joined  2006-10-18

Dabbledoo,

Shouldn’t this work using Acronym Module normally? Or have I missed what you’re trying to do LOL

 Signature 
Profile
 
 
Posted: 30 January 2008 07:47 AM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  16
Joined  2007-04-12

Sorry, I think I posted what I’m trying to do in the EE forum that I linked to above… and forgot to post it here.  What we want to do is link key phrases in our entry body to relevant tag archives on our site (using your Tag module… of course!).  We always include an image in our posts, and push our writers to put relevant ALT / Title text in IMG tags - which is where the problem comes up.  As I mention above, the issue is that when you apply the Acronym Module to the body field (which includes an IMG and relevant ALT / Title attributes), it interferes with the HTML of the IMG tags.  Hope that makes sense.  Let me know your thoughts!

Thanks,

Doug

Profile
 
 
Posted: 30 January 2008 07:53 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2751
Joined  2006-10-18

I see… so did you still want it to “expand” the acronym on the image ALT as well? Or leave it alone altogether?

 Signature 
Profile
 
 
Posted: 30 January 2008 09:32 AM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  16
Joined  2007-04-12

I’m thinking it would be neat to leave it alone since what you type in the ALT or TITLE attributes have no reason to be changed in the first place.  Do you agree?  I would pretty much ignore anything in <a> or <img> tags all together… Also, anything that is in an attribute of any other HTML element has no reason to be changed either.  For example, if I had an acronym set to replace “HP” with the following…

<a href="http://www.gadgetell.com/tech/tag/HP/">HP</a>

...and the following was the text of my post (in the body field)…

<div class="HP">Hewlett Packard</div>

...I wouldn’t want it to replace the HP class in the div tag either.  Now I would never have a new class in a post specific to a company, but I could see this being an issue with others.... so I figured I should throw it out there.  It would probably be best to ignore anything within “<” and “>”.

Thoughts?

Profile
 
 
Posted: 30 January 2008 10:27 AM   [ Ignore ]   [ # 9 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2751
Joined  2006-10-18

Good call Dabbledoo, I’ll add this as a feature request wink

 Signature 
Profile
 
 
Posted: 30 January 2008 10:55 AM   [ Ignore ]   [ # 10 ]
Newbie
Rank
Total Posts:  16
Joined  2007-04-12

Thank you VERY much Pie Man (and Solspace in general)!!!  Can you note this thread in the feature request so you guys remember to update me?  Pretty please =)

Profile
 
 
Posted: 30 January 2008 01:17 PM   [ Ignore ]   [ # 11 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2751
Joined  2006-10-18

My friend,

I always track the Source/Forum Post of any bug reports / feature requests, so when they get implemented or fixed, they are the first to know wink

 Signature 
Profile
 
 
Posted: 30 January 2008 02:11 PM   [ Ignore ]   [ # 12 ]
Newbie
Rank
Total Posts:  16
Joined  2007-04-12

You da man! smile

Profile
 
 
Posted: 31 May 2008 08:46 AM   [ Ignore ]   [ # 13 ]
Newbie
Rank
Total Posts:  16
Joined  2007-04-12

Any updates here, we are still keen to create auto links on our sites.

Profile
 
 
Posted: 02 June 2008 07:00 AM   [ Ignore ]   [ # 14 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2751
Joined  2006-10-18

dabbledoo,

We’ve been bogged down quite a bit with other work, and unfortunately we haven’t had a chance to get to this module yet.

Sorry for the inconvenience.

 Signature 
Profile