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.
By stevensj2 on
I was wondering if its possible to change the "reply" text links in comments & nodes with actuall buttons?
If so, what text do I edit to allow this?
I know I could make each link "look" like a button with CSS, but I'd actually like to replace the text with a clickable image (if possible).
Thanks for the help!
Comments
Nevermind....
This is the worst support ever; I'm tired of asking questions about Drupal and having to wait a week for even a response (I know I posted this yesterday, but I posted another one even longer ago without so much as a reply still).
This is the internet, not the pony express. I appreciate the help when it's offered, but for the success of Drupal I highly recommend quicker support.
I don't know what kind of sites people can wait a week on before knowing of a fix, but I can't do that any more. I'm switching back to Inivision for my forums.
......................
-----------------
Josh Stevens
Nautilus7 Design | Tibathon.com - Home of the National Tiburon Meet
This is the worst support
Why such anger? You act like members are obligated to answering your questions.
This is exactly what I want
This is exactly what I want to know and I hope someone can enlighten me on that. :)
I know this is an old thread, but why start a new one when this here stands unanswered. I would like to do exactly what Joshuwa is asking about in Drupal 4.7 without having to modify phptemplate.engine or any module, if possible.
Thanks in advance. I know there are great people here that offer their help. Some just aren't lucky enough to get a timely response I suppose, for any reason. If noone tells me this I guess I'll just have to find out on my own. :P
Cheers
Daniel
Solution!
Thanks to sime on drupal support IRC channel here is a solution that makes this possible. It's a hack rather, applied to comment.module in Drupal 4.7, but it works. So here's what is to be done if you want your reply, edit and delete links in comments and forum posts to be clickable button images instead:
1.) Open modules/comment.module in your favourite text editor
2) Find this function:
3) Now replace that with this hacked version of that function:
NOTE: Replace http://path/to/image.png with your image path corresponding to the link (since you'll probably want different images for reply, edit and delete links).
WARNING: Do not include
and
tags from above. I put them above just to highlight the code for nicer reading.That's it!
Cheers
Daniel
What if you want to remove
What if you want to remove the REPLY link? Can the above be modified to do that? I want to force my members to use the comment form to reply to comments instead of replying to a direct comment and then complaining that it doesn't make sense for their comment to show as most recent comment. Btw, I'm using flat list expanded for comments.
jaynedarcy, I've been asking
jaynedarcy, I've been asking the same question as you for weeks, no one seems to know the answer for that.
I too one the REPLY link removed to prevent direct replies.
I hope some one can help.
Comment out two lines
I think you'll get what you want simply by commenting out (or deleting) the following two lines in Libervisco's hacked function:
In PHP, you can comment out a line by preceding it with two slashes ie //
Hope this helps,
Jeff
_________
http://marmaladesoul.com
Found a better solution
in the function comment_links
change
to
The "reply" button will force your user to make a new comment, instead of replying to a comment
comment form reply
comment form reply button:
Make sure you don't replace the #value, because your comment form won't work anymore. It took me and my co-worker about 2 hours to figure that out.
For all other forms you can use this code:
comment form reply
this was a double post. Sorry about that
Instead of hacking the
Instead of hacking the comment core, I suggest another solution:
unfortunately the comment_links is not a themeable function (as I last time checked the documentation).
However, the phptemplate passes the variable $links to the comment tpl file, therefore you can always hack the template.php file of your phptemplate theme with _phptemplate_variables function
and alter the $links variable (which holds the html of the links of the comment) to your liking