Jump to content

Far visualizzare un codice template solo a certi gruppi utenti


najaru

Recommended Posts

Per poter fare visualizzare un codice solo a determinati gruppi utenti è possibile usare questo codice

<if test="IPSMember::isInGroup( $this->memberData, array(4,5) )">ggggggggggggggggggggg</if>

utilizzando come numeri gli ID dei gruppi da includere

  • Like 1
Link to comment
Share on other sites

a questo c'ero arrivato per tentativi. :D

 

sai invece come impostare delle regole per tutte le funzioni del forum, come "promemoria", "nuovi contenuti", "calendario", ecc?

 

Grazie :)

Link to comment
Share on other sites

ci sono pagine non identificate come forum o discussioni, ma sono il "core" del forum, come quelle che ti ho elencato.

 

Ma forse è più semplice editare i template delle pagine in questione inserendo delle normali eccezioni.

Link to comment
Share on other sites

Caffpow ci sono diversi modi ma tra quelli che mi ricordo per individure le richieste alle app specifiche

1. $this->request['app'] == 'core' oppure $this->request['module'] oppure $this->request['section']

2. $this->_currentApp == 'core'

3. {$currentApp}

4. ipsRegistry::$current_application

5. ipsRegistry::$applications[ ipsRegistry::$current_application ][ ipsRegistry::$current_module ]

6. ipsRegistry::$current_module

7. ipsRegistry::$modules_by_section

8. ipsRegistry::$request['section']

9. {$this->registry->getCurrentApplication()}

10. $this->registry->getCurrentApplication() = 'core'

getCurrentApplication()

 

$this->request['app'] . '_' . $this->request['module'] . '_' . $this->request['section'] . '_' . $this->request['do'] . '_'

$this->default_tab

su google trovi altre informazioni ;)

 

per il calendario verrebbe una cosa del genere...

<if test="IPSMember::isInGroup( $this->memberData, array(4,5) ) AND ipsRegistry::$current_application == 'calendar'">ggggggggggggggggggggg</if>

Per le discussioni

<if test="IPSMember::isInGroup( $this->memberData, array(4,5) ) AND ipsRegistry::$current_application == 'forums' AND ipsRegistry::$current_module == 'forums' AND ipsRegistry::$current_section == 'topics'">ggggggggggggggggggggg</if> 
Edited by Skillman_92
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. to insert a cookie message.