- mercromina responded to »error when i try to upgrade to the last version of dizkus module (3.1)« 08:01 PM
- craigh responded to »TagIt 3.0 for Zikula« 03:58 PM
- localrags responded to »Remove contents of nuke_sc_anticracker from Database« 11:30 AM
- jmvaughn responded to »Shoutit for zikula 1.3?« 09:31 AM
- mdee responded to »Different page content under one template (tpl file) based on URL« 07:17 AM
- espaan responded to »Categories disappear when editing ...« 08. Feb
- eledril responded to »How decrease zikula cpu usage« 08. Feb
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
twp_grouprank help
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Sep 17, 2007
- 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. -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: May 18, 2010
- Posts: 985
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 maybehad space between "[" - "twp" and "uid" - "]", loose those space, I've seen that causes troubles sometimes.Code
<!--[ twp_grouprank uid=$uid ]-->
- Igor
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Sep 17, 2007
- 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 -
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
Hiya, have you put the groupnames in question into the file?
--
Under Construction! -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Sep 17, 2007
- 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. -
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
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! -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Sep 17, 2007
- 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 -
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
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 addto 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.Code
<!--[pndebug]-->
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! -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Sep 17, 2007
- 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 -
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
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! -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Sep 17, 2007
- 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.
- Moderated by:
- Support
