Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

some text basic pages only visible for logged in users

This discussion is related to the Basic Pages addon.

Using 2.0.18.10
How can i make some content only visible for logged in users in the extra pages?
I tried to add some php code but it is shown als html text
see this: http://www.webprofis.nl/index.php?p=/page/testpage-php

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    As you can see here the plugin has been extended to use permissions. You can take a look at what has changed in that version to see if you can get it to work with your version (since you are using Vanilla 2.0, I assume you can not use the current version of Basic Pages)

    hgtonight
  • ShadowdareShadowdare π Moderator
    edited April 2014

    Basic Pages 2.0.0 should work with Vanilla 2.0.18.10.

    The view permission feature lets you allow or disallow roles from viewing the entire page. There is no way to make specific text in a page's body visible for only certain roles through the admin interface.

    To make specific text in a page's body visible for only certain roles, you can make a simple plugin, hook into the events in the page view from the Basic Pages application, and have custom PHP code there that can output special text on pages you specify. I can post an example if you would like to see how to do so.

    Also, you can use the Custom Pages plugin, which allows you to add in PHP code directly in the view for the pages.

    Add Pages to Vanilla with the Basic Pages app | Publish articles with the Articles app

    hgtonight
  • jackmaessenjackmaessen ✭✭✭
    edited April 2014

    @Shadowdare i really would appreciate if you could post some example code how to fix this

    It is all about this: http://www.webprofis.nl/index.php?p=/page/simpel-contact-formulier-met-validation
    The second blue Download button should only download the .zip file if you are a registered member, otherwise there should be some echo: "first become member to download this file".

Sign In or Register to comment.