Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
twp_grouprank help
  • Posted: 08.05.2007, 19:22
     
    Karman
    rank:
    Freshman Freshman
    registered:
     March 2007
    Status:
    offline
    last visit:
    17.09.07
    Posts:
    28
    I really love the idea behind this plugin and how it's displayed in the various sections of the demo site. ie: Members_list, etc. I can't seem to get this to display anything for me though. I only have 4 groups (Users, submissive, Dominant, Admins). I've place the plugin in /themes/postnuke/plugins. I'm using the PostNuke theme with my own designs to it. PostNuke version .764. I just can't seem to get the group name to display anywhere I put the tags. I'm sure anyone willing to help will need more info than what I've posted here, but it seems so simple a thing to add I just don't understand why I can't get it to work.
  • Posted: 09.05.2007, 01:12
     
    videokid
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    19.11.08
    Posts:
    901
    move the
    'themes/postnuke/plugins/twp_grouprank.php'
    to
    'modules/pnRender/plugins/
    folder, maybe that might help.

    - Igor

    --
    Have a nice day
    zikulapro.be is currently running
    Zikula 1.0.2
  • Posted: 09.05.2007, 04:11
     
    Karman
    rank:
    Freshman Freshman
    registered:
     March 2007
    Status:
    offline
    last visit:
    17.09.07
    Posts:
    28
    Thanks. I just tried with moving it to
    'modules/pnRender/plugins/
    I still get nothing. Frusterated at this point. I've tried calling it in Member_List, onlineXP...

    --
    "So let it be written. So let it be done."
  • Posted: 09.05.2007, 04:53
     
    videokid
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    19.11.08
    Posts:
    901
    mmm I've read the whole thing again, it really says

    Topiatic

    themes/YourTheme/plugins

    I'm sorry for the confusion, you'd better wait a little, Topiatic is here on often enough. Looking into the *.php files it looks very straight-forward though...


    Maybe, just maybe

    Code

    <!--[ twp_grouprank uid=$uid ]-->
    had space between "[" - "twp" and "uid" - "]", loose those space, I've seen that causes troubles sometimes.


    - Igor


    --
    Have a nice day
    zikulapro.be is currently running
    Zikula 1.0.2
  • Posted: 09.05.2007, 08:30
     
    Karman
    rank:
    Freshman Freshman
    registered:
     March 2007
    Status:
    offline
    last visit:
    17.09.07
    Posts:
    28
    Yes it does seem pretty straight forward. I must be missing something very simple. I appreciate your help with this and I'll wait for Topiatic and see if they have any ideas.
    Thanks again.



    edited by: Karman, May 09, 2007 - 03:31 AM

    --
    "So let it be written. So let it be done."
  • Posted: 09.05.2007, 22:02
     
    Topiatic
    rank:
    Professional Professional
    registered:
     November 2003
    Status:
    offline
    last visit:
    06.11.08
    Posts:
    1675
    Hiya, have you put the groupnames in question into the file?

    --
    Under Construction!
  • Posted: 09.05.2007, 22:50
     
    Karman
    rank:
    Freshman Freshman
    registered:
     March 2007
    Status:
    offline
    last visit:
    17.09.07
    Posts:
    28
    Yes I have in the following structure:
    $g1 = 'Users'; // Name of Group to find
    $g2 = 'submissive'; // Name of Group to find
    $g3 = 'Dominant'; // Name of Group to find
    $g4 = 'Admins'; // Name of Group to find

    I'm generally pretty good at figuring these things out and have modified alot of my PN site and various modules from all the great programmers. I don't know why I'm having such a hard time with this one. As I said, it seems really straight forward.

    --
    "So let it be written. So let it be done."
  • Posted: 10.05.2007, 04:29
     
    Topiatic
    rank:
    Professional Professional
    registered:
     November 2003
    Status:
    offline
    last visit:
    06.11.08
    Posts:
    1675
    Ok, so to avoid any more redundant questions on my part can you please paste the parts from your templates where you are adding the tag(s)?

    --
    Under Construction!
  • Posted: 11.05.2007, 20:04
     
    Karman
    rank:
    Freshman Freshman
    registered:
     March 2007
    Status:
    offline
    last visit:
    17.09.07
    Posts:
    28
    I think from your question I may be putting the tags in the wrong files. Just to test things out I've tried adding the tags in
    modules/MemberList/pntemplates/memberlist_user_view.htm
    directly after the user name:

    Code

    <td><img src="images/avatar/<!--[$users[users].pn_user_avatar]-->" alt="<!--[$users[users].pn_user_avatar]-->" /></td>
    <td><strong><a href="user.php?op=userinfo&uname=<!--[$users[users].uname]-->"><!--[$users[users].uname]--></a></strong>
    <!--[ twp_grouprank uid=$uid assign=gName ]-->
    <!--[ $gName ]--></td>




    edited by: Karman, May 11, 2007 - 03:13 PM

    --
    "So let it be written. So let it be done."
  • Posted: 12.05.2007, 06:35
     
    Topiatic
    rank:
    Professional Professional
    registered:
     November 2003
    Status:
    offline
    last visit:
    06.11.08
    Posts:
    1675
    Ahh ok... first up if that's a copy and paste then you should fix your HTML, your first td is not properly closed and you have a funky /st in the second one.

    You're in a Smarty section here where the current loop is referenced via '$users[user].', so what you need to get the current user id is '$users[user].uid'... I think.

    You can add

    Code

    <!--[pndebug]-->
    to the beginning of the template to see a full list of vars available to the template to know for sure, but I think Members_List uses both uid and pnuid as a handle there.

    Mine looks like this

    Code

    <td>
          <!--[twp_grouprank uid=$users[users].pn_uid assign=guildrank]-->
          <!--[if $guildrank]-->
            <strong><!--[$guildrank]--></strong>
          <!--[else]-->
            <strong><!--[pnml name="_TWP_MBRLST_GUILDNONE"]--></strong>
          <!--[/if]-->
          </td>


    In pnForum the uid of each post is held in '$post.poster_data.pn_uid', mine looks like this

    Code

    <!--[twp_grouprank uid=$post.poster_data.pn_uid assign=$guildrank]-->
        <!--[if $guildrank]-->
            <strong><!--[$guildrank]--></strong>
        <!--[/if]-->


    hth

    --
    Under Construction!
  • Posted: 12.05.2007, 12:23
     
    Karman
    rank:
    Freshman Freshman
    registered:
     March 2007
    Status:
    offline
    last visit:
    17.09.07
    Posts:
    28
    Yes, the .pn_uid addition solved the problem. The only issue now is it not displaying the groups properly. Dominant members display right, but submissive members display as Users. I've noticed when I make changes to function.twp, it isn't reflecting on the site at all. I've deleted the caches and pnRender caches and My own caches. At one point I even had the function.twp file deleted and it was still showing the information in Member_List and the pnForum. Ah well, I know it's working now and I'll fight with the rest as I find time.

    Thanks for all your help with this.



    edited by: Karman, May 12, 2007 - 07:25 AM

    --
    "So let it be written. So let it be done."
  • Posted: 13.05.2007, 10:46
     
    Topiatic
    rank:
    Professional Professional
    registered:
     November 2003
    Status:
    offline
    last visit:
    06.11.08
    Posts:
    1675
    I edit my users group through the members lists edit link but when I go back to the members list it still displays the old group, I have to go to the users profile (I use it in advProfile too) or the forum to see the changes... just never bothered me as it's good the next time I visit.

    However I wonder if wrapping it in nocache might help...

    Code

    <!--[nocache]--><!--[twp_grouprank uid=$post.poster_data.pn_uid assign=$guildrank]--><!--[/nocache]-->


    --
    Under Construction!
  • Posted: 14.05.2007, 01:39
     
    Karman
    rank:
    Freshman Freshman
    registered:
     March 2007
    Status:
    offline
    last visit:
    17.09.07
    Posts:
    28
    Actually, I pulled another 'god I need sleep' moment. I still had a copy of twp.function in Member_List/templates/plugins from when I was messing around trying to get it to work originally.

    So far using the .pn_uid has it working perfectly in my Member_List and pnForum.

    Thanks again for all your help.

    --
    "So let it be written. So let it be done."

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula