Closed (fixed)
Project:
Alinks
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
22 Apr 2007 at 00:14 UTC
Updated:
8 Oct 2018 at 11:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedMore info, if the alink is part of an image filename or path it can mess up the image
ie. http://www.mydomain.com/drupal/files/******HERE****
Comment #2
Anonymous (not verified) commentedForgot to say if the alink matches 'mydomain' it doesnt appear to have an effect so it may be related to after the path after files/
http://www.mydomain.com/drupal/files/myfile
Comment #3
Anonymous (not verified) commentedmore info
if you create an alink of 'table border', and you have a table on your node, watch it dissapear
it appears the alink is substituting almost any code even '<'
Comment #4
tic2000 commentedhttp://pnl.tic2000.ro/view/stiri shows this module on a view view, and http://pnl.tic2000.ro/test/drupal the same on a taxonomy view. But I'll do more test to check. About the alt attribute I need a little time to take a look at the prblem and see if I can come up with something.
Comment #5
Anonymous (not verified) commentedThe issue with Views maybe as i use 'Insert View' module http://drupal.org/project/insert_view to insert the output of a view into a node
here is an example on my test site
http://cms2.crydee.com/?q=node/2021
'Magician' is the alink term
I would have expected the first reference to Magician in the body of each node of the linked view to be affected, but it can see why it may only affect the first entry. If you now select the title of the first or second entry to go to the node itself the alink appears, although broken in this case
As to the issue with Taxonomy i just realised that the page i thought was taxonomy was an inserted view :)
If i can help test this one let me know, i have been looking for this for sometime, the older autolink module thats around only appears to work for 4.7
Comment #6
Anonymous (not verified) commentedOK i now have a handle on the cause of the problem with views. If the views 'Page' 'View Type' is set to 'list view', the links do not appear, but if they are set to 'Full Node' they do unfortunately full node is not always the best choice
Comment #7
tic2000 commentedAlinks works for full node or teaser. It's coded to work only on the body of the node, not it's title (especially cause most of the time the title is used as a link to the full node, and as you have noticed this brakes the layout, was intended for simple text, not html code which it brakes. I hope to solve this though.). But I don't plan to make it work on the title also. Or who know, I'll make an option on the setting page so the site owner can choose if he wants to use alinks on the title also. I'll think about it.
Comment #8
Anonymous (not verified) commentedI agree I can see no point in linking from the title, especially as it may already link to the full node, and i guess it could cause problems with the existing links
The biggest problem i see is that there is likely to be a need to have code on a page, otherwise a website will be rather plain. A list of tags and symbols could be created and used to prevent creation of alinks that would cause a problem, but then there is still a problem with paths in URL links, alt tags etc. Being no coder these are just thoughts
A couple of ideas
In admin settings of alinks is there a way of setting an option for all case variants of a link so you only need one entry. i.e ALINK Alink aLink would all be linked to the same place, but in other cases you can permit each to have a different destination
Another thing came to mind was rather than having first occurence linked, or 'x' count linked, what about every 'x' count ie every 5th occurence maybe it would save overhead on long pages
I think once you solve the linking issue the module is going to be a great asset for many, keep up the good work
Comment #9
tic2000 commentedRight now I found a solution to link only strings outside tags, but will link every instance of that word. So still workning on that one.
About the case insensitive alink, this is pretty easy to achieve, and I think I'll implement that in the next release.
Comment #10
Anonymous (not verified) commentedIt sounds like you have made good progress on the link issue
Comment #11
tic2000 commentedI solved the # of instances problem. My only problem now is if the string we want to replace is already in a link.
Comment #12
Anonymous (not verified) commentedA theoretical scenario,
I have a website and link several occurences of word 'x' to a specific location. I then realise that this is becoming a common link so i should use an Alink.
Options
1/Ignore existing links then all new links are by Alink - problem is if i change the Alink destination the existing links do not get changed
2/Strip existing links where an Alink exists for the 'word string' and replace with the Alink - The argument being i intended word 'x' to link to location 'y' so i should accept that it will happen in all cases
Note: there may have been a specific reason why you linked the 25th occurence of word 'x' on a page, so stripping links may have to be applied to only the number of links defined in settings not all on the page
Unfortunately both options have their own merits. Hope this helps with the link issue
The main thing is User Beware - Think Before you Link
Comment #13
Anonymous (not verified) commentedBeen playing further with how Alink works in 'Views' which earlier in the thread you mentiond that Alink is compatable with 'Full Nodes' and 'Teasers' only in 'Views'.
Rereading your response, I think that you may have assumed that in using the 'List View' option I only have the Titles.
In my case I add the 'Node Body' to the 'Fields' list. I use this option to display the whole node but without the Title linking to the new node, as happens in 'Full Nodes'. I cant see the point of offering someone the option of clicking the title to open a new page showing exactly what they have already read, it also removes the read more option which also isn't needed if its all already displayed.
If it is possible to allow Alink to affect the Node body when it appears in 'List View' it would be great
Comment #14
tic2000 commentedAlinks uses the nodeapi hook to alter the node teaser and body. So in theory this should happen on all teaser and bodies of the node if the module that displays them uses node_view to render the node. So this is a module specific problem. I can't do nothing in alink to make it work, I should patch the views module for that.
Comment #15
tic2000 commentedSolved some of the problem, I still haven't time to fix the case when the alink string is inside another link. Take a look and tell me how it works. Also now the alink must be a full word in the text (see the plural issue)
Comment #16
Anonymous (not verified) commentedIts looking good, if the link is part of an alt tag, or path, it seems to work OK now.
I did a test of an A link which is part of an existing link, it came up with an interesting result, which may or may not work depending on your point of view. If its restricted to whole words it may be good
example 1
Existing Link - 'ONE TWO THREE FOUR' takes you to 'LINK1'
add an ALink for 'THREE FOUR' that takes you to 'LINK2'
the result is that for 'ONE TWO THREE FOUR'
'ONE TWO' takes you to 'LINK1'
and
'THREE FOUR' takes you to 'LINK2'
example2
Existing Link - 'ONE TWO THREE FOUR' takes you to 'LINK1'
add an ALink for 'TWO THREE' that takes you to 'LINK2'
the result is that for 'ONE TWO THREE FOUR'
'ONE' takes you to 'LINK1'
and
'TWO THREE' takes you to 'LINK2'
and
'FOUR' becomes unlinked text again
To sumarise, in example 1 you could probably get away with it, but example 2 you coudl not
Which ever way you decide to go, either stripping existing link and replacing, or leaving as is, there is probably no right way, so the user will find a solution for the exception to the rule
Comment #17
tic2000 commentedMy way is to leave existing links as they are and do not replace them (or part of them). But I'm still "playing" with regexp (which I'm not so familiar with).
Comment #18
tic2000 commentedComment #19
Anonymous (not verified) commentedI have been thinking on this more during the day and agree that link sould be left as is.
Ideally, this should be one of the first modules installed when a site is created, even better if it were in core That way a user could decide if they want a new link to be singular or across the site as an Alink.
Comment #20
tic2000 commentedOK, a new patch. This one should fix the already existing link problem.
Comment #21
Anonymous (not verified) commentedI added the patch, but somehow got it wrong so downloaded the dev version from last night. All seems to work fine
// $Id: alinks.module,v 1.7 2007/04/25 22:46:35 tic2000 Exp $Will test further during the day, but as it is, all the basic functions seem to be there and working, now you can play with the bells and whistles :)
Comment #22
tic2000 commentedYou should download the latest stable release. In the first one I missed somethning and the alink didn't displayed, but now it's fixed
Comment #23
tic2000 commented