1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Global Template Usergroup Member Count 1.0.0

Access the counts of members in usergroups for use in templates.

  1. Liam W

    Liam W Well-Known Member

    Liam W submitted a new resource:

    Global Template Usergroup Member Count - Access the counts of members in usergroups for use in templates.

    Read more about this resource...
     
    theraptor and Markos like this.
  2. Sheldon

    Sheldon Well-Known Member

    Just wanted to add, works better than I even thought it could. Could have just been a random block, but instead you gave users the ultimate control.

    Great work.

    Screenshot_2.png
     
    Liam W likes this.
  3. Liam W

    Liam W Well-Known Member

    Wait, isn't an anti villain a hero and an anti hero a villain?

    Anyhow, thanks :)
     
  4. Sheldon

    Sheldon Well-Known Member

    Liam W likes this.
  5. theraptor

    theraptor Member

    I tried adding the variable to page_container but didint show a thing o_O also i get this error when i tried to install it on my localhost:
    Code:
    Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Deadlock found when trying to get lock; try restarting transaction - library/Zend/Db/Statement/Mysqli.php:214
    Generated By: theraptor, 1 minute ago
    Stack Trace
    #0 /opt/lampp/htdocs/xenforo/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
    #1 /opt/lampp/htdocs/xenforo/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
    #2 /opt/lampp/htdocs/xenforo/library/XenForo/Model/Phrase.php(1188): Zend_Db_Adapter_Abstract->query('????DELETE FROM...', 'liam_usergroupm...')
    #3 /opt/lampp/htdocs/xenforo/library/XenForo/Model/Phrase.php(1222): XenForo_Model_Phrase->deletePhrasesForAddOn('liam_usergroupm...')
    #4 /opt/lampp/htdocs/xenforo/library/XenForo/Model/AddOn.php(328): XenForo_Model_Phrase->importPhrasesAddOnXml(Object(SimpleXMLElement), 'liam_usergroupm...')
    #5 /opt/lampp/htdocs/xenforo/library/*******/Credits/Model/AddOn.php(14): XenForo_Model_AddOn->importAddOnExtraDataFromXml(Object(SimpleXMLElement), 'liam_usergroupm...')
    #6 /opt/lampp/htdocs/xenforo/library/XenForo/Model/AddOn.php(226): *******_Credits_Model_AddOn->importAddOnExtraDataFromXml(Object(SimpleXMLElement), 'liam_usergroupm...')
    #7 /opt/lampp/htdocs/xenforo/library/XenForo/Model/AddOn.php(169): XenForo_Model_AddOn->installAddOnXml(Object(SimpleXMLElement), false)
    #8 /opt/lampp/htdocs/xenforo/library/XenForo/ControllerAdmin/AddOn.php(187): XenForo_Model_AddOn->installAddOnXmlFromFile('/opt/lampp/temp...')
    #9 /opt/lampp/htdocs/xenforo/library/XenForo/FrontController.php(347): XenForo_ControllerAdmin_AddOn->actionInstall()
    #10 /opt/lampp/htdocs/xenforo/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #11 /opt/lampp/htdocs/xenforo/admin.php(13): XenForo_FrontController->run()
    #12 {main}
    Request State
    array(3) {
      ["url"] => string(50) "http://localhost/xenforo/admin.php?add-ons/install"
      ["_GET"] => array(1) {
        ["add-ons/install"] => string(0) ""
      }
      ["_POST"] => array(3) {
        ["server_file"] => string(0) ""
        ["_xfConfirm"] => string(1) "1"
        ["_xfToken"] => string(8) "********"
      }
    }
     
    Last edited: Jul 2, 2014
  6. Liam W

    Liam W Well-Known Member

    Try uninstalling and installing again.

    Liam
     
  7. theraptor

    theraptor Member

    Now the thing is whenever i try the variable nothing appear for example if i do {$userGroupMembers.4} it print nothing while the id 4 reffer to the moderating usergroup.
     
  8. Liam W

    Liam W Well-Known Member

    Go into the cron page and run the cron for this addon.

    The values probably haven't been updated.
     
    theraptor likes this.
  9. theraptor

    theraptor Member

    Thank you that solved it ;D
     
    Liam W likes this.
  10. Liam W

    Liam W Well-Known Member

    No worries :)

    It should run during the install, bit it's a bit temperamental.
     
  11. theraptor

    theraptor Member

    Is there a way to make it work with widget manager?
     
  12. Liam W

    Liam W Well-Known Member

    What do you mean? It's a variable. Use it in any template, including a widget template.
     
  13. theraptor

    theraptor Member

    in widget template it shows the variable as it is and not the count, i have tried it with an html widget.
     

Share This Page