JDefender — Ultimate Joomla Protection

Attention!!! We are working from Monday till Friday, any time from 9:00 AM till 6:00 PM (+6 GMT) or, from 4:00 PM till 1:00 AM (EST). During weekends nobody from support team can answer topics.

News Joomla Components arrow Forum
  LoudMouth Board
  General
   Support Desk
    Customize the subscription page for JCS?
     Viewing Topic
Support Desk
Please, post you bugs, troubles, and other support ticket. If you post here please, be patient. we cannot quickly process forum posts currently. If you need quick assistance use e-mail, Skype or MSN.
Navigator


Customize the subscription page for JCS?
Last Page
 Author   Message
magneteye
Customize the subscription page for JCS?  #749


baby mamber

Messages: 7
Registered: 31-12-1969

The subscription page is setup by the module. Can we have any options to customize this page? We want our own content along with it.

 
Wednesday, 26 December 2007
JE.Support
Re: Customize the subscription page for JCS?  #1789


Administrator

Messages: 1422
Registered: 31-12-1969

Hello,

generally if you are speaking about texts along the site that everything could be translated/changed in language file /components/com_jcs/languages/english.php,

Note: if you use different from english language site you better translate english.php to your language and than just rename it to yourlanguage.php and put this file into appropriate folder, the english.php should not be deleted anyway if you even not need it.

Thank you.

 
Friday, 28 December 2007
magneteye
Re: Customize the subscription page for JCS?  #1814


baby mamber

Messages: 7
Registered: 31-12-1969

What if i want to change MORE than just the text? I think making an option for admin to create a custom page in your next release might be a good idea. We dont have any flexibility with this.

 
Monday, 31 December 2007
JE.Support
Re: Customize the subscription page for JCS?  #1818


Administrator

Messages: 1422
Registered: 31-12-1969

Hello,


Please provide me with clear example what exactly your goal, probably this is already realized in JCS?

Thank you.

 
Thursday, 03 January 2008
triresources
Re: Customize the subscription page for JCS?  #2858


baby mamber

Messages: 8
Registered: 31-12-1969

OK, here's something I would like.  When a user stumbles upon a page requiring a subscription (perhaps because he/she has bookmarked the page, but has not logged in) there is a page generated that indicates:
  Access restricted
  You need to login.
and the user login is displayed and also a list of possible subscriptions.

Of course we can change the text, but actually we do not want to display a list of subscriptions here at all.  We would be more pleased with a page where we could include a message, perhaps an entire content item, and display the login in our usual position instead of in the main content area.

ALSO... we tried to make something work by simply making all of our subscriptions plans invisible (which might be OK for our site.)  However if there are no visible subscriptions, JCS creates the  "Access restricted" page with a serious HTML error... here's how the "subscription list" is rendered if there is a visible subscription (I reformatted for clarity)

<p>The page you are trying to access is available on subscription basis only. Please, Login or register to get one of the folowing subscriptions.</p>
<form action="http://my.domain.com/index.php"; method="post">
  <div class="contentheading">
    Test Subscriptions     
  </div>
  <div class="contentpanopen">
    <p>TRIguideOnline Single User</p>
    <table border="0" cellpadding="5" cellspacing="0">
      <tbody>
        <tr class="sectiontableentry1" valign="top">
          <td nowrap="nowrap" width="1%">7 Days</td>
          <td><b>Test Subscription</b><p></p></td>
          <td align="right" nowrap="nowrap">
            <b><big>$ 0.00</big></b>
            <input name="price1" value="0.00" type="hidden"></td>
        </tr>
      </tbody>
    </table>
  </div>
  <div class="contentpanopen">
   </div>
  <input name="task" value="addsubscription" type="hidden">
  <input name="option" value="com_jcs" type="hidden">
</form>

However when there are NO visible subscriptions, the "subscription list" is rendered like this:

<p>The page you are trying to access is available on subscription basis only. Please, Login or register to get one of the folowing subscriptions.</p>
<FORM action="http://my.domain.com/index.php"; method="post">

    </table>
  </div>
<DIV class="contentpanopen">
</DIV>
<input type="hidden" name="task" value="addsubscription">
<input type="hidden" name="option" value="com_jcs">
</FORM>

The JCS content closes a <div> element that it did not open and the effect is that is screws up the entire page! (Also a <table> element, though that is probably ignored by the browser.)

So, in short, I would love to be able to create or customize the "Access restricted" page, or alternatively I would like to be able to show the usual page but with no list of subscriptions. 

Please let me know if there is a way to configure this to customize the page, or at least how to fix the html error that is generated by JCS in this case.

Thanks,
  -Tom

Steps to recreate the html problem:
  • Set up a subscription plan and create a page that is restricted to the plan
  • Set this, and all other subscriptions plans to be invisible
  • Create a user and subscribe them to the plan
  • Log in to the front end and go to the restricted page, and bookmark the page
  • Log out, then use the bookmark to try and access the restricted page.
You will see the JCS-generated "Access restricted" page with a login and an empty subscription list.  Depending on your site's template and style sheet, the page may appear to display correctly, but if you examine the page source (html) you will see that the <FORM> element that follows the message "The page you are trying to access is available on subscription basis only. Please, Login or register to get one of the folowing subscriptions." includes malformed html.

 
Friday, 13 June 2008 (Last Updated: Friday, 13 June 2008)
triresources
Re: Customize the subscription page for JCS?  #2860


baby mamber

Messages: 8
Registered: 31-12-1969

One more quick comment on this... there is really no need for JCS to automatically create the "Access restricted" page.  If we were allowed to simply select a regular content item to display in case of access denial, we could have full control over what the user sees.

If we wanted, we could even create a page that looks just like the current JCS "Access restricted" page by including the login and available subscription list module output into the content item.  (Perhaps that example could just be included in the docs.)

That seems like a simpler approach anyway, providing more flexibility without losing any current capabilities. 

For now I hacked the code to simply redirect unauthorized users to the home page.

 
Saturday, 14 June 2008
JE.Support
Re: Customize the subscription page for JCS?  #2867


Administrator

Messages: 1422
Registered: 31-12-1969

Hello,

Thank you for points, this could be good feature.
For current, let's clear the hacks that could be helpful:

1. for com_content:
File: /mambots/content/jcontentsubscription.content.php
line: 333
mosRedirect(sefRelToAbs($mosConfig_live_site."/index.php?option=com_jcs&task=add&Itemid=".$Itemid));
you can change /idex.php?option=com_jcs&task=add to any site url, for example specially performed static content page, example:
mosRedirect(sefRelToAbs($mosConfig_live_site."/index.php?option=com_content&task=view&id=5&Itemid=".$Itemid));

2. the same for components controller mambot:
File: /mambots/system/jcontentsubscription.component.php
Line:  226
mosRedirect($mosConfig_live_site.'/index.php?option=com_jcs&task=add&Itemid='.$Itemid);


You can even specify what pagre redirect users if they are trying access resticted content or component.

hope this will be helpful.

@triesources yes indeed JCS is required at least one subscription was not hidden, this why problem with div appear.

Thank you.

 
Monday, 16 June 2008
 
Display #
- latest messages from this topic
Address: Joomla Equipment, Box 1951, Bishkek, 720000, Kyrgyzstan
Telephones: Office: +996 312 68-91-34, Mobile: +996 543 91-81-42
More contacts...