I see this topic has come up before, but I don't understand how to fix it.
My logged in users have the ability to make comments and read them, this is fine.
I don't want my anonymous users (guests) to see any prompt about comments or logging in or anything like that.
So, how can I suppress the display of "Login to post comments" for my guests, while still having the Comment module installed and working for logged in users?
I've seen answers to similar questions in this forum ranging from "hack the comment module" to "hack your theme" to "write your own module". But I haven't seen any clear instructions that apply to D6. Is it really possible to easily write a module to do this? If so, I'm surprised nobody has done it yet - or has it been done? I'd rather not hack the module or my theme, but if necessary, can anyone give me advice on this?
Thanks a lot - appreciate your comments [smile] -Steve
Edited by WorldFalls - added "[Solved]" to subject.
Comments
_
Try something like this in the template.php file for your theme:
Almost there?
WorldFallz, you're great!
I added the whole snippet above, and got a really unfriendly php error when I tried to view the page. None of the other stuff in my template.php file had the PHP beginning and end stuff, so I only added the function part:
Now, there is no prompt to login or leave a comment for guests, yayyy!
But, one problem, there is also no prompt to leave a comment for registered users - is there some way I can add that back in? I want the totally normal comment experience for logged-in people, and absolutely no prompts about logging in or comments for anonymous guests. So, I think we're halfway there! -Steve
_
i'm an idiot, lol. Try this:
You're a genius
You're a genius, and a mighty helpful one too.
Thanks a ton. That last bit of code, in my template.php file, does exactly the right thing!
_
lol, not even close-- but happy to help ;-)
ugly side-effect
I installed the snippet as a module and it does remove the Login link, thank you. However, there is a side-effect (at least in my D6.17 Garland themed pages): the "edit | reply" links sitting right below the comment are now rendered as HTML list, i.e.:
instead of:
can that be fixed?
[Edit] I updated the book page Remove link from teasers only. That solution fixes the HTML list and does not remove the link for full node views.
Opposite problem - how to ADD "Login to post comments" to nodes
I am using a marinelli subtheme, and it does not display 'Login to post comments', as I have set comments to be for logged in users only. How should I best go about adding a 'Login to view and post comments' link to the end of my links?
I tried adding the code from the Blueprint theme:
After adding this to my parent theme template.php I can't see any difference after clearing the cache etc., there must be something I am missing (yes, i'm a newbie).