0
Welcome Guest! Login
0 items Join Now

Re: Guest/Registered

    • Leckenby's Avatar
    • Leckenby
    • Elite Rocketeer
    • Posts: 714
    • Thanks: 0

    Re: Guest/Registered

    Posted 17 years 2 months ago
    • I have customised a template, and it has several image links that must be displayed through the template. I would like three to display when a guest views, and three to display when a registered user views.

      How can I do this?
  • Re: Re: Guest/Registered

    Posted 17 years 2 months ago
    • Try RokAccess.
    • James Spencer / Developer & Support / Hull, UK
    • Leckenby's Avatar
    • Leckenby
    • Elite Rocketeer
    • Posts: 714
    • Thanks: 0

    Re: Re: Guest/Registered

    Posted 17 years 2 months ago
    • Right, ive got the bot
      But what code for the mambot do I put round my images to make them viewable by guests only or members only, as the mambot code can't just be entered into the template right?
  • Re: Re: Guest/Registered

    Posted 17 years 2 months ago
    • The Mambot comes with instructions :)
    • James Spencer / Developer & Support / Hull, UK
    • Dan L's Avatar
    • Dan L
    • Elite Rocketeer
    • Posts: 1453
    • Thanks: 0

    Re: Re: Guest/Registered

    Posted 17 years 2 months ago
  • Re: Re: Guest/Registered

    Posted 17 years 2 months ago
    • Has to be something like this:

      RokAccess Content Plugin

      Usage:

      {rokaccess [!]group[,group]}...some content...{/rokaccess}



      One ore more group name should be passed, you can expressly deny access by putting a '!'
      before the group name in question. It will keep looping through the list provided until
      it finds a 'true' value so strange results may occur with conflicting group access. The
      standard Joomla! hierarchy applies so an Editor, would be allowed to see content secured
      by the Registered or Author group names.

      Valid group names are:

      • guest
      • registered
      • author
      • editor
      • publisher
      • manager
      • administrator
      • super administrator
      • special (administrator or super administrator)


      Examples:


      {rokaccess guest}shows only to guest users{/rokaccess}
      {rokaccess !guest}shows to all users who are not a guest{/rokaccess}
      {rokaccess registered}shows to all users who are registered{/rokaccess}
      {rokaccess guest,!editor}shows to all guests and members who are NOT editors{/rokaccess}
      {rokaccess editor,special}shows to editors, administrators, and superadministrators{/rokaccess}
    • IT Consulting - Asesor Informatico
      www.ninjoomla.com
      Extensions, training, tips and services to support Web Developers and Site Owners.
    • Leckenby's Avatar
    • Leckenby
    • Elite Rocketeer
    • Posts: 714
    • Thanks: 0

    Re: Re: Guest/Registered

    Posted 17 years 2 months ago
    • NO! Your not understanding me!
      I need the HTML in the template not the content!
      I can't simply put {rokaccess guest}{/rokaccess} in the template HTML can I?

      I have some code in the template which I want to work only for guests or only for registered

      See what I mean yet?
    • Dan L's Avatar
    • Dan L
    • Elite Rocketeer
    • Posts: 1453
    • Thanks: 0

    Re: Re: Guest/Registered

    Posted 17 years 2 months ago
    • Bloggs_x wrote:
      I can't simply put {rokaccess guest}{/rokaccess} in the template HTML can I?

      Errr, yes. It won't singe your eyes to try it out you know.
    • Toolbox Digital | Dribbble | Forrst
    • Dan L's Avatar
    • Dan L
    • Elite Rocketeer
    • Posts: 1453
    • Thanks: 0

    Re: Re: Guest/Registered

    Posted 17 years 2 months ago
    • Oh plop....yes I see what you mean.

      No you'd have to reference the Joomla include variables to acertain the current user group status.

      Something like if ($this->group) I think...
    • Toolbox Digital | Dribbble | Forrst
    • Dan L's Avatar
    • Dan L
    • Elite Rocketeer
    • Posts: 1453
    • Thanks: 0

    Re: Re: Guest/Registered

    Posted 17 years 2 months ago
    • UPDATE:

      It's $my->usertype...

      You will need to set a global in index for $my:

      global $my

      ...and the user groups are as they appear in Joomla, so "registered" "administrator" etc.
    • Last Edit: 17 years 2 months ago by Dan L.
    • Toolbox Digital | Dribbble | Forrst

Time to create page: 0.058 seconds