News only for Registered users and CB integration

18 years 2 months ago #5364 by ssmkks
Hi.

We are publishing abstracts of news on our main page with a link "Read more..." to access the full content, and we would like to allow only registered users to access this option.

If we do that -by setting the "Access level" of the news only to registered users and the parameter "Show UnAuthorized Links" in Global Config (we are working with Mambo 4.5.2)- and a not-registered user tries to access the "Read more..." link, it sends them to the com_register instead of the CB's registration.

Is there any way to change this and show the CB's registration?

Thanks in advanced for your help.

Please Log in to join the conversation.

18 years 2 months ago #5365 by mikko
No way to do this currently. You might be able to code a mambot to do it, though

-Mikko

Please Log in to join the conversation.

18 years 2 months ago #5366 by LiviaDrusilla
Replied by LiviaDrusilla on topic Re:News only for Registered users and CB integrati
Thanks for your answer. We will try the mambot, although we are also "newbies" at Mambo/Joomla.

If you have any suggestion it would be appreciated. Anyway, if we succeed we will post it in the forum.

Thanks again.

Please Log in to join the conversation.

18 years 2 months ago #5389 by mikko
If you do, please post the code here to a new thread or the downloads section.

-Mikko

Please Log in to join the conversation.

17 years 11 months ago #11359 by Mr. Birmingham
Replied by Mr. Birmingham on topic Re:News only for Registered users and CB integrati
I'm not sure if you've tried to create a mambot to do what you need, but if you haven't, then you can still achieve this by hacking two-lines in components/com_content/content.html.php

...And as always, backup your file and document your changes

To begin, find this line of code (there will be two instances of it)
[code:1]$link_on = sefRelToAbs("index.php?option=com_registration&task=register"«»);
[/code:1]
Once you've found these lines, simply replace [code:1]com_registration&task=register[/code:1]
with
[code:1]com_comprofiler&task=registers[/code:1]

It's a gritty and unattractive workaround but it get's the job done. If you managed to construct a mambot to do this, I'd like to know so I too can avoid having to hard-code this solution.

Please Log in to join the conversation.

17 years 10 months ago #13864 by jmaduk
I had to change 3 instances to get it to work not two.

The third line was near the top

changed from

<a href="<?php echo sefRelToAbs( 'index.php?option=com_registration&amp;task=register' ); ?>">

to

<a href="<?php echo sefRelToAbs( 'index.php?option=com_comprofiler&amp;task=registers' ); ?>">


works like a charm now www.onlinesellinguniversity.com

www.MySmallBizU.com
1000 Videos, Hosting, Software, Support,
Coaching and Community!

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.198 seconds

Facebook Twitter LinkedIn