Paid Subscriptions Question

  • Hello everyone,
    is it possible to hyperlink a link on the Paid Subscriptions Page?

    Also, is it possible to add several custom pages? I did find the Simple Page plugin but I think it only allowed one page :(

  • Do you want to link the page listing all paid subscriptions or just a single subscription?

    A link to a single subscription works as well :D
    But what I mean is that links inside the paid subscriptions page doesn't seem to be clickable.

    • Official Post

    Actually this is pure text, hence you can't add a link there.

    I then started to wonder if I can't come up with some JavaScript to handle this, eventually I ended up with way more code than I expected, but it does the job in the most efficient way. You simply need to paste the code into the Footer-Code textarea found in your ACP > System > Options > General[/tt] (don't worry, it will only execute on the paid subscription list):

    If you don't like this huge pile of code, you can use the minified version which does the same job but is anything but readable:

    {if $templateName == 'paidSubscriptionList' && $templateNameApplication == 'wcf'}
    		{literal}!function(){for(var e,t,n,o=document.querySelectorAll(".paidSubscriptionList .containerHeadline > p:not(.marginTopTiny)"),d=0;d<o.length;d++)for(e=o[d];/https?:\/\//.test(e.textContent);){n=!1;for(var a=0,r=e.childNodes.length;r>a&&(t=e.childNodes[a],t.nodeType!==Node.TEXT_NODE||"A"===t.parentNode.nodeName||(t.nodeValue.replace(/(https?:\/\/[^\s]+)/,function(e){n=!0;var o=document.createRange();o.setStart(t,t.nodeValue.indexOf(e)),o.setEnd(t,t.nodeValue.indexOf(e)+e.length),o.deleteContents();var d=document.createElement("a");d.href=e,d.textContent=e,o.insertNode(d)}),!n));a++);if(n===!1)break}}();{/literal}
  • Yeah I guess x)

    The code you just came up, that's what I needed, thank you very much!
    I hope in the future versions there would be the [Enable HTML] button for the Paid Subscriptions Page, would help a lot haha :)

  • Oh wait hold on, the {if}{/if} statements are visible on all of the pages' footer, should that happen?

    • Official Post

    Oh wait hold on, the {if}{/if} statements are visible on all of the pages' footer, should that happen?

    I'm still curious why I always assume that the footer code allows for template scripting :(

    Use this version:


    !function(e){if("paidSubscriptionList"===e.body.getAttribute("data-template")&&"wcf"===e.body.getAttribute("data-application"))for(var t,n,o,a=e.querySelectorAll(".paidSubscriptionList .containerHeadline > p:not(.marginTopTiny)"),d=0;d<a.length;d++)for(t=a[d];/https?:\/\//.test(t.textContent);){o=!1;for(var i=0,r=t.childNodes.length;r>i&&(n=t.childNodes[i],n.nodeType!==Node.TEXT_NODE||"A"===n.parentNode.nodeName||(n.nodeValue.replace(/(https?:\/\/[^\s]+)/,function(t){o=!0;var a=e.createRange();a.setStart(n,n.nodeValue.indexOf(t)),a.setEnd(n,n.nodeValue.indexOf(t)+t.length),a.deleteContents();var d=e.createElement("a");d.href=t,d.textContent=t,a.insertNode(d)}),!o));i++);if(o===!1)break}}(document);
  • If I may ask another thing, is it possible to display the username of the registered user on the notices?

    An example would be: User2 viewed the forums, the notice would then be: Hello User2, welcome to the forums.
    or if it were User4, it would then greet User4.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!