By Adriano on Thursday, 23 August 2018
Posted in General Issues
Likes 0
Views 1.2K
Votes 0
How can I display the available plan links, as in the example from my other site that also uses payplans (but I can not remember how it was done)



Site link: https://is.gd/pR2Mbb
Hi Adriano,

After checking the link from your other site, it looks like the link is actually part of the article content.

Perhaps you can edit that article and see how the link is written? I suspect its hardcoded.

EDIT: I just saw your optional information. I will investigate your content hider plugin to see why the plan names are not generated.
·
Thursday, 23 August 2018 17:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Adriano,

After investigating, it appears the content acl app is unpublished on your site. It is actually required to display the plan links.

Perhaps you can try setting that up and let us know how it goes?
·
Thursday, 23 August 2018 18:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello!

The ACL application is installed and published, as you can see in the images below ... And even then, it does not work. Maybe I'm doing something wrong.


https://screenshots.firefox.com/qGMVP2mS4K8Nr8dq/lojinhadakarly.com.br
https://screenshots.firefox.com/GH1cydE3Cto47EKZ/lojinhadakarly.com.br
https://screenshots.firefox.com/O7UlKmud6DtlE1qN/lojinhadakarly.com.br

In the article I use syntax '' {payplans plan_id=1,2 SHOW} ''

https://lojinhadakarly.com.br/videoaula/minhas-video-aulas/34-teste-video
·
Saturday, 25 August 2018 04:10
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey there,

I am really sorry for the delay of this reply as it is a weekend for us here.

Based on what i checked on your site, regarding this Content Hider command you did configure correctly from that article.

So those user who do not have these subscription, they shouldn't able to see those restricted content in this article.

After that, you set this Content ACL app instance, you have to specific which article you would like to display those subscription plan in article page.

For example, I set this "Test video" article into this Content ACL app instance [Plano Básico] http://take.ms/Y4aDB , so the output will be show what subscription user need to subscribe in order to see the hidden content.
https://lojinhadakarly.com.br/videoaula/minhas-video-aulas/34-teste-video

If you set this following command into article content {payplans plan_id=1,2 SHOW}, i assume you would like user to subscribe either plan id 1 or plan id 2 then only can see the restricted content right?

If yes, you have to add plan id 2 into this section http://take.ms/C1GNq
·
Saturday, 25 August 2018 11:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Great, I'll test that today. Thank you!
·
Tuesday, 28 August 2018 00:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Alright, keep us update then.
·
Tuesday, 28 August 2018 10:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello!

Your information was indeed correct! Now I just want to improve the look of the page. Can I display the names of plans in this format? (see Attachment) It would be cleaner and more organized. Thank you!
·
Tuesday, 28 August 2018 14:10
·
0 Likes
·
0 Votes
·
0 Comments
·
In order to achieve this, you have to modify this file JoomlaFolder/plugins/payplans/contentacl/contentacl/app/contentacl/contentacl.php

Find this code (you can take a look of my attached screenshot below) :
[gist type="php"]
foreach ($allPlanLinks as $link) {
$tmp = '<strong>' . XiText::_('COM_PAYPLANS_CONTENTACL_SUBSCRIBE_PLAN') . '</strong> ( ' . $link . ' )';
$links .= ($links) ? '<br />' . $tmp : $tmp;
}
[/gist]

Then replace to :

[gist type="php"]
$links = implode(', ', $allPlanLinks);
$links = '<strong>' . XiText::_('COM_PAYPLANS_CONTENTACL_SUBSCRIBE_PLAN') . '</strong> ( ' . $links . ' )';
[/gist]

Hope this will help.
·
Tuesday, 28 August 2018 16:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Adriano,

To achieve that layout, you would have to customize the related file.
JoomlaFolder/plugins/payplans/contentacl/contentacl/app/contentacl/contentacl.php
·
Tuesday, 28 August 2018 16:49
·
0 Likes
·
0 Votes
·
0 Comments
·
I changed the code, but it did not work. There were no changes to the site.. Can you send me the file with the changed code? I do not know what I did wrong

path:
/public_html/plugins/payplans/contentacl/contentacl/app/contentacl/contentacl.php
·
Friday, 31 August 2018 03:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Oh, it seems like you use 'Category' type instead of 'article' from your ContentACL app instances.

I've help you modified the code on your site, it will show correctly now.

For those user who want to achieve this, you can take a look this following instruction :

Find this code (you can take a look of my attached screenshot below) :
[gist type="php"]
foreach ($links as $link) {
$tmp = '<strong>' . XiText::_('COM_PAYPLANS_CONTENTACL_SUBSCRIBE_PLAN') . '</strong> ( ' . $link . ' )';
$planLinks .= ($planLinks) ? '<br />' . $tmp : $tmp;
}
[/gist]

Then replace to :
[gist type="php"]
$links = implode(', ', $links);
$planLinks = '<strong>' . XiText::_('COM_PAYPLANS_CONTENTACL_SUBSCRIBE_PLAN') . '</strong> ( ' . $links . ' )';
[/gist]
·
Friday, 31 August 2018 10:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you! that really was the problem.
·
Friday, 31 August 2018 13:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

You are most welcome. Glad to hear that your issue has been resolved now.

Just for your information, I have locked and marked this thread as resolved to avoid confusions in the future. Please start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiries.

Thanks for understanding.
·
Friday, 31 August 2018 18:00
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post