Hi,
I'd like to use the login link in the comment module's code so that when a user is not logged in and this is mentioned to the user, a link is also given in that sentence. I changed the code appropriately but don't know how to generate the link via php code.
Thanks in advance!
Posts: 27300
You can set permissions for comments not show for guests. But I digress....This is what you want to add:
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 11
Thank you for your answer dave. It worked but not exactly as I wanted it to be because of the openid module that I use. What your suggestion brings up is the classic login form. Openid module replaces some links automatically; Can't such a link be used instead of "login/ajax" so that when openid module is active, it takes you to openid login page and otherwise to the classical login page? Pretty much like the one in the top right login link of gallery (which exists at least in the theme clean canvas)?
Posts: 11
I tried entering "openid" instead of "login/ajax" in function site, and it opened up a complete gallery openid login page in the comments section -in contrast to showing only a username/password inputs with login/ajax. Perhaps it has to do with openid module code?
Posts: 27300
I've never used the openID module if the url is different just change the code to reflect that or am I going to have to install the module to understand what you are asking as I don't understand now. Perhaps a url to your site witht he module in question and a temp username/password would help me understand.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 11
I just sent you a pm with the link to the site.
Thank you for looking into this dave.
Posts: 27300
Add:
<?= t("Translatable text ") ?><a id="g-user-profile-link" href="<?= url::site("openid") ?>"><?= t("Login") ?></a>
to modules/comment/views/connents.html.php just after:
The openid module does not have a referral url parameter that I can see so it does not redirect you back to the page you were on anyway.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team