Closed (fixed)
Project:
Follow
Version:
6.x-1.3
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2009 at 22:30 UTC
Updated:
26 Aug 2009 at 06:22 UTC
thanks for the module y'all...
I'd like to add /individual the text rendered for each link;
for example 'facebook' would read 'eggonbeagle on facebook'
'youtube' would read 'eggonbeagle on youtube'
can you customize the text rendered for link titles?
i've been able to modify the positioning of the images on the link w css
do i need to modify the follow.module or the install file?
thanks
Comments
Comment #1
q0rban commentedHi Jack!
The easiest way I would think is to override theme_follow_link():
Replace the line here with your own customized title:
You can look at the code in follow_link_title() to see how to get the username in there.
Hope that was helpful!
ta
Comment #2
q0rban commentedI just realized you might have been talking about the actual text of the link and not the title attribute of the anchor itself. If so, you'd actually want to change this line instead:
You could do something like this instead:
Comment #3
jackhutton commentedthanks for the response:
the second situation is what I'd like to modifly;
(i'm not a php guru.. )
in the folow.module, can i insert static text like 'Eggonbeagle on '
not a field like user.. but leading text...?
would this be right: (probably not.. )
also.
i notice as i modified the settings in 'Site Configuration' >> 'Performance' >> and enable Block Caching;
rather than return my list of menu items, it would collapse horizontally, onto a single row of text links w. out an image. does this seem odd..or is that affecting something..
i've disabled block caching and the menu renders vertically, with images -
thanks again for your work here..
Jack
Comment #4
q0rban commentedRe: block caching: Can you open a separate issue (bug report) for that please? Sounds like it might be a bug, but I need to test it to find out.
Back to your support request:
Copy and paste this function into your template.php file for your theme (without the php tags):
You might need to clear the theme registry cache after doing it, and best practice would be to replace phptemplate with the machine name of your theme. E.G., Zen theme would look like this: zen_follow_link()
Hope that helps!
Comment #5
jackhutton commentedcloser..
added the function to template.php
renamed the function according to your stated parameters..
and it returns 'Anonymous on Facebook'
can i rewrite over the 'username field' w. just actual text: 'eggonbeagle on ' then $title - it will never (in this instance) be used for any other person/link..
thanks - it was fun modifying the templatephp file..thanks for the clear instructions.. & your patience..
Comment #6
q0rban commentedWhoops, I forgot a line! :D
Comment #7
q0rban commentedIf you are using the site block instead of the user block, then yes. The code I posted in #6 above won't work for you if that's the case.
Comment #8
jackhutton commentedThat did the trick.
What a bright guy. Thank you!!
I'll post the collapsed on cached issue under 'bugs'
Thanks again..
jack