Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
i need a setting "Display anchor text on janode view?"
it need a one new table (anchor) and change some functions
Comments
Comment #1
AjK CreditAttribution: AjK commentedSorry, I don't understand the feature request. Can you be a bit more specific please?
best regards
--AjK
Comment #2
kors4r CreditAttribution: kors4r commentedsorry, I don't speek english too good
thank you for your update :)
so - now, when you submit a "janode", you must fill:
- title,
- description,
- url
by view this node, system show title, description and url: <a href="SUBMITTED URL">SUBMITTED URL AS ANCHOR TEXT</a>
I need a one more textarea in submit form: Anchor, and another url in view of node (with anchor as anchor, not url as anchor)
do you understand me?
Comment #3
AjK CreditAttribution: AjK commentedSorry, no, I don't understand. May be you could create an example and supply a url to it so I can look at what you would like to be seeing?
best regards
--AjK
Comment #4
AjK CreditAttribution: AjK commentedassigning issue to "me"
Comment #5
kors4r CreditAttribution: kors4r commentedok,
NOW janode works so:
1. user submit a node type 'janode', he must fill: "Title" (like all nodes), "Description" (like all nodes), "URL", all this information drupal save in database
2. When user want to see this node, drupal show:
- title
- description
- url (drupal build link html code like: <a href="URL SUBBMITED BY USER">URL SUBMITTED BY USER=ANCHOR TEXT</a>
We have 3 params of node: title, description and url
I need a one more param: Anchor text
It should works so:
1. When user submit janode, must give:
- title (like now it is)
- descriptoin (like now)
- url (like now)
- anchor text for url (THIS SHOULD BE ADDED)
2. When user view a janode, drupal show:
- title,
- description
- url (BUT: drupal should build a link code like this: <a href="URL SUBMITTED BY USER">ANCHOR TEXT</a>
best regards
Comment #6
kors4r CreditAttribution: kors4r commentedi have idea!
can drupal build link code like this?
<a href="URL SUBMITTED BY USER">TITLE SUBMITED BY USER</a>
I don't know how to modify a module code, can you do this?
best regards
Comment #7
AjK CreditAttribution: AjK commentedOK, I think I understand this now. What you want is a field that "describes" the link that is placed between the and the right?
That's doable and I'll think on it. It would require a db mod and not yet ready to do that. Another "feature request" may also need a db update so if and when I do that I will add in this functionality at that time.
As for the TITLE SUBMITED BY USER I don't think that's a good idea as the node already publishes the USER anyhow.
best regards
--AjK
Comment #8
AjK CreditAttribution: AjK commentedActually, I've given this some more thought and I've decided not to do it.
My reasons are simple, there already exists a title and a massive body area to describe the link in great detail. So, adding in a method that allows <a></a> text to be alter seems a bit pointless. Also, I like the links starting with their protocol (http://) so it's very obviously a link to end users.
So I'm going to change this to "won't fix".
I do however think that implementing a "links exchange" enforcement protocol (on your other issue) is a good idea and will be doing that.
regards
--AjK
Comment #9
kors4r CreditAttribution: kors4r commentedoki, it's your project
but I will try :)
in this time I don't have computer at home :(, so I can't do anything now
but soon I will make so change:
in module file i found a code
see this:
will it be working with something like this?
I changed a 'l()' function - it wait for some data, maybe janode.module should give to l() not twice $node->http_link, but one $node->http_link and one title of this node (in this case, l() should build link code with NODE TITLE as LINK DESCRIPTION = Anchor text)
best regards
Comment #10
AjK CreditAttribution: AjK commentedBy all means have a go at hacking it up and adding the feature. If you do, please supply a patch for review so that it can be considered for inclusion/commit. After all, Drupal is about sharing and helping others when it comes to code.
I've change the status of this from "won't fix" to "active" on the assumption that you may well supply a patch.
best regards
--AjK
Comment #11
Coyote CreditAttribution: Coyote commentedI think that there _definitely_ needs to be a way to have the URL link appear as something other than the url itself.
For instance, what if the URL referenced is something dreadfully long and ugly? Or that shoots of the end of the screen (for instance, a link to an article on a news or blogging site)?
There should be, ideally, an option for the clickable link to use, as a label:
-- a plain default text used by all links (for instance "Click to visit this link" or "[link]"
-- a user-definable label (probably should be optional)
-- the text of the url itself
-- possibly something like "click here to visit %urlname"
Very often, the actual URL itself will make a terribly ugly or unmanageable label. This could be something that makes someone leery of using this otherwise decent module.
Coyote
Comment #12
AjK CreditAttribution: AjK commentedOK, the reasoning is sound (aka ultra long dumb ass URLs can break your theme).
I oersonally would just prefer to "trim" to length that anchor section but I'll bow to pressure and put this in.
I'm currently doing some paid work at the mo so it'll take a few days (unless someone supplies a patch ;)
Anyhow, it'll involve a db alteration to add in the extra info required. Since I'm making db alterations there's another feature request regarding link exchanging that I'm going to do so I'll try and do both at the same time.
best regards
--AjK
Comment #13
kors4r CreditAttribution: kors4r commentedquote:
"
1. -- a plain default text used by all links (for instance "Click to visit this link" or "[link]"
2. -- a user-definable label (probably should be optional)
3. -- the text of the url itself
4. -- possibly something like "click here to visit %urlname"
/quote
google and other search engines will see "description" (anchor text) of link
if you will submitted jandoe about your site ("www.example.com") - you want to show google, that "Click here to visit www.example.com" is keyword for your site, or want to show google, that keyword is "Example"?
if you think about SEO, you want to have a "Example" (or other keyword) in descriptions of your links (on other sites), write?
so, in my opinion, the best is:
"2. -- a user-definable label (probably should be optional)"
best regards
Comment #14
kors4r CreditAttribution: kors4r commentedit works 8)
if anybody want to have "Title" of nody in description of link, please change function "theme_janode_http_link" (line: 331 in janode.module file):
in line 343
from:
to:
best regards
Comment #15
AjK CreditAttribution: AjK commentedhttp://drupal.org/cvs?commit=33328
Comment #16
(not verified) CreditAttribution: commented