Submitted by Tom on 2009/09/30 05:40
When clipping web content (or 'bookmarking' a webpage in IQ) it would be nice to have the option to create a link in the item field.
 
Lately I've added <a href=></a> to my clipboard extender's 'favourites'
but it's very awkward copying and pasting the url and then adding the text
 
I havent really thought this through (throwing it out there so-to-speak) but something like an add link tick-box which would make the url etc wrap around the test in the Item field ?
 
I couldnt find this in Mantis so will add at some stage unless someone knows of it lurking there somewhere

Comments

Would you like to have all item "names" (field) from all items to have their URL (if they have one) wrapped around them ? This can probably be done quite easily already -- would have to try with multiline item texts though.
You could even decide to check another fiel to  trigger this option on/off.
I could check this out tomorrow if you want -- and off course, Pierre might want to integrate that option to the Add item window.

Tom

2009/10/01 04:44

In reply to by Armando

[quote=Armando]
Would you like to have all item "names" (field) from all items to have their URL (if they have one) wrapped around them ? This can probably be done quite easily already -- would have to try with multiline item texts though.
You could even decide to check another fiel to  trigger this option on/off.
I could check this out tomorrow if you want -- and off course, Pierre might want to integrate that option to the Add item window.
[/quote]
Thanks for the offer Armando!
I'll have to look and think about that one - in some items I've added the link (manually) to a different field than the item field
For some items (not many though) I've already added other links to the item field

Tom, I don't understand what it is you are after.
I never create a link in edit mode
What's the matter w selecting text in item & <CTRL>K to create a link
I'm sure you have a point & I'd like to be supportive
I just don't undertand what it is
 
--
Jan Rifkinson
Ridgefield CT USA
HP Blackbird Vista Ultimate SP-2

Pierre_Admin

2009/10/01 10:34

In reply to by jan_rifkinson

What (I think) Tom was asking was that in this window:
 
 
that there be an option so that the "Add link to Item field when making web-clipping ?" text be a hyperlink (i.e. wrap it in an <a href=> tag). This is possible, though I would recommend instead that the option simply append a "(link)". As you know, when the whole item is a hyperlink, sorting is modified (as it sorts on the <a> tag)
 

jan_rifkinson

2009/10/01 10:50

In reply to by Pierre_Admin

OH, ok. Now I see what Tom is after.
I guess Tom's way would reduce steps & there is some value to that
 
Would it be possible to select a portion of the item text (vs the entire text) to create a link?
That might solve both problems as long as the first word wasn't part of the selection.
 
--
Jan Rifkinson
Ridgefield CT USA
HP Blackbird Vista Ultimate SP-2

Armando

2009/10/01 11:10

In reply to by Pierre_Admin

[quote][...]the option simply append a "(link)". As you know, when the whole item is a hyperlink, sorting is modified (as it sorts on the <a> tag) [...]
[/quote]
 
Yes, this is probably the best option to avoid sorting problems.

Tom

2009/10/02 07:30

In reply to by Armando

[quote=Armando]
[quote][...]the option simply append a "(link)". As you know, when the whole item is a hyperlink, sorting is modified (as it sorts on the <a> tag) [...]
[/quote]
 
Yes, this is probably the best option to avoid sorting problems.
[/quote]
 
That sounds good

Armando

2009/10/05 04:42

In reply to by Tom

Hi Tom,
i forgot about your request.
You can paste that in your "user code".
 
Function AppendURLToItem(item, URL)
  AppendURLToItem=item & " (<a href="& URL & ">" & "Link" & "</a>)"
end function
 
and add this to your URL field autoassign section :
 
AM:item=AppendURLToItem(item, URL)
 
Dead simple...  but not perfect as nothing gets removed if you delete the URL in the URL field, and Links are appended one after the other if you change your mind and change the URL... ;)
 
(can somebody add a function to remove the link part when the URL is deleted ?)

Tom

2009/10/05 10:18

In reply to by Armando

[quote=Armando]
Hi Tom,
i forgot about your request.
You can paste that in your "user code".
 
Function AppendURLToItem(item, URL)
  AppendURLToItem=item & " (<a href="& URL & ">" & "Link" & "</a>)"
end function
 
and add this to your URL field autoassign section :
 
AM:item=AppendURLToItem(item, URL)
 
Dead simple...  but not perfect as nothing gets removed if you delete the URL in the URL field, and Links are appended one after the other if you change your mind and change the URL... ;)
 
(can somebody add a function to remove the link part when the URL is deleted ?)
[/quote]
thanks Armando !!
I wasnt 100% sure what I wanted -
[quote=Tom]
Thanks for the offer Armando!
I'll have to look and think about that one - in some items I've added the link (manually) to a different field than the item field
For some items (not many though) I've already added other links to the item field
[/quote]
I was thinking I'd definitely want it for the 'bookmarks' - i.e where no content is copied to the HTML pane.
Mostly for the other ones I've copied what I need to the html pane so the link is only for reference
Would there be a way of adding "if html pane is empty" to the code?

Armando

2009/10/05 19:03

In reply to by Tom

I thought it was going to be very simple, but for some reason, it doesn't work when I'm adding a simple condition.
Could be that html content is added a while after and it's not detected by my function. Could be that itemHasHTML is some smart field.
Dunno. Anyways, there are probably better ways to achieve what you want but here, that works :
 
No more functions... Just this, in the URL autoassign section :
 
AM:item=item & " (<a href="& URL & ">" & "Link" & "</a>)" | AM:URLlink=" (<a href=" & URL & ">" & "Link" & "</a>)"

 
Create a new text field called "URLlink".
 
Put this in itemHTMLText  field autoassign section:
 
A:item=removekeyword(item,URLlink) | E:item=addkeyword(item,URLlink)

 
tell me if it works... And test it a few times to see if it does what you want... :)
 
 

Tom

2009/10/06 07:42

In reply to by Armando

Armando,
The way you've done it - adding link to end of Item field text thus: (Link) - it's wonderful !
 
It adds a link to all clippings regardless of html pane content but I've now decided to use it for all webclippings anyway -
apologies for being indecisive about this - it's just so neat it's perfect !
So,
I'm sorry I made you go the extra mile (or two) for nothing.
 
BTW I not sure why the ItemHasHTML bit didnt work here - I copied
A:item=removekeyword(item,URLlink) | E:item=addkeyword(item,URLlink)
into the auto-assign rules and tried a restart as well  - but as I say I'll stick with adding the (Link) to all clippings
 
 

Armando

2009/10/06 12:07

In reply to by Tom

My pleasure, Tom.
 
[quote=Tom]
BTW I not sure why the ItemHasHTML bit didnt work here - I copied
A:item=removekeyword(item,URLlink) | E:item=addkeyword(item,URLlink)
into the auto-assign rules and tried a restart as well  - but as I say I'll stick with adding the (Link) to all clipping 
[/quote]
 
could be...
 
1- because you didn't create a text field called "URLlink" ? (You need to create that field for the autoassign rules  in itemHTMLText to work properly)
 
2- Or because you pasted the autoassign rules in the itemHasHTML (Yes/No field) instead of itemHTMLtext ?
 

Tom

2009/10/06 15:09

In reply to by Armando

[quote=Armando]
My pleasure, Tom.
[quote=Tom]
BTW I not sure why the ItemHasHTML bit didnt work here - I copied
A:item=removekeyword(item,URLlink) | E:item=addkeyword(item,URLlink)
into the auto-assign rules and tried a restart as well  - but as I say I'll stick with adding the (Link) to all clipping 
[/quote]
could be...
 
1- because you didn't create a text field called "URLlink" ? (You need to create that field for the autoassign rules  in itemHTMLText to work properly)
 
2- Or because you pasted the autoassign rules in the itemHasHTML (Yes/No field) instead of itemHTMLtext ?
[/quote]
# 2