Hi there,

I would like guest users to see what interactive features my site has to offer without the need of a registration. So I user the logintoboggan module so they get redirected to the login page once the want to get to a page that needs an account.

The discuss this link either does not show at all or shows the "login or register to..." text which in my case is waaaaay too long for where the link resides.

How can i just have the normal link as anonymous user please?

Thank you!

Comments

AlexisWilke’s picture

Hi l0calh0rst,

Is the "New user message:" label not sufficient?

Thank you.
Alexis Wilke

l0calh0rst’s picture

Not really. I want the link to be identical to when a user is logged in as the logintoboggan module will take care of the redirect to the login/register page. So basically discuss this should not care about wether the user is registered or logged in. That would perfectly match my needs. Could that be done optionally?

Thx

AlexisWilke’s picture

There is a permission "access discuss this links" which if you setup for anonymous users should do what you're looking for.

Let me know if that doesn't work.

Thank you.
Alexis

l0calh0rst’s picture

It does work, but it shows the "login or register" links and text plus the "New user message". That's not what I want.

AlexisWilke’s picture

In discussthis.module you have this test around line 399

    // still no link?
    if (count($links) == 0) {

Change it like this:

    // still no link?
    if (FALSE && count($links) == 0) {

And see whether you still got those pesky links. Or if they all disappear.

Thank you.
Alexis

l0calh0rst’s picture

When I do that, nothing appears at all for anonymous users.

AlexisWilke’s picture

Okay... that means the earlier user_access() calls return FALSE... Weird. You could try to replace the two user_access calls that are in the previous if() block by TRUE and see if you get the result you need.

dom.’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Module maintainer has changed. I'm closing this issue after years of inactivity, please open a new issue if needed.