Modules - More pnGroups Customizing

MACscr - Aug 30, 2005 - 10:07 PM
Post subject: More pnGroups Customizing
LOL, yep, using the module for a purpose other than its original. Im trying to make an if statement that will make it so that only people with a certain _JOBTITLE will show. Job title is DUD field. Here is what im trying to do and it obviously wont work, but hopefully it will give u an idea.

Code:

<!--[section name=members loop=$members]-->
<!--[pnusergetvar name="_JOBTITLE" assign="position" uid=$members[members].pn_uid]-->
<!--[if $title == "Market Advisor"]-->   
   <div class="pos_listing">
      <img src="modules/AboutUs/images/right-arrow.gif" border="0" height="9" width="5"> <a href="index.php?module=advProfile&uname=<!--[$members[members].uname|pnvarprepfordisplay]-->&page=bio"><!--[pnusergetvar name="_FIRSTNAME" uid=$members[members].pn_uid]--> <!--[pnusergetvar name="_LASTNAME" uid=$members[members].pn_uid]--></a>, <!--[pnusergetvar name="_JOBTITLE" uid=$members[members].pn_uid]-->
   </div>
<!--[/if]-->
<!--[/section]-->


position is coming up empty when i do a pndebug. I know im missing something simple, but i have tried all kinds of different ideas and it doesnt work.
Chestnut - Aug 30, 2005 - 10:45 PM
Post subject: Re: More pnGroups Customizing
Sure it is "position" ?... your if is looking in some "title"

Wink
MACscr - Sep 01, 2005 - 04:22 AM
Post subject: Re: More pnGroups Customizing
sure, i had mixed things around when i was trying ot show you. Even if i have the correct assign and if statement variable, it still doesnt seem to work.
Chestnut - Sep 01, 2005 - 11:35 AM
Post subject: Re: More pnGroups Customizing
Try :

Code:
uid=$members[members].uid


instead of
Code:
uid=$members[members].pn_uid

MACscr - Sep 01, 2005 - 11:26 PM
Post subject: Re: More pnGroups Customizing
nope =(

Hmm, what the heck
Chestnut - Sep 01, 2005 - 11:49 PM
Post subject: Re: More pnGroups Customizing
mmm... strange... the info is there... both pn_uid and uid should work.

I can only assume that it is your pnusergetvar that is not...

Try different approach to see if all variables are showing something :

Code:

<!--[$members[members].pn_uid]-->

<!--[assign var="testuid" value=$members[members].pn_uid]-->
<!--[$testuid]-->

<!--[pnusergetvar name="_JOBTITLE" uid=$testuid]-->


Things like that...
MACscr - Sep 02, 2005 - 01:08 AM
Post subject: Re: More pnGroups Customizing
yep, i get the correct results with that, but im still not figuring out how im going to be able to get the jobtitle field assigned. Assigning the uid has never been a problem.

Code:

(line 1)122
(2)
(3) 122
(4) Ag Finance Specialist

MACscr - Sep 02, 2005 - 01:11 AM
Post subject:
I get the results fine when i use:

Code:

<!--[pnusergetvar name="_JOBTITLE" uid=$members[members].pn_uid]-->


but like i said in the first post, im trying to filter the results by a specific JOBTITLE
Chestnut - Sep 02, 2005 - 12:24 PM
Post subject:
So if this is working, then this should too

Code:

<!--[pnusergetvar name="_JOBTITLE" uid=$members[members].pn_uid assign="jobtitle"]-->

<!--[if $jobtitle eq "Blablabla"]-->
  <!-- Show me -->
<!--[/if]-->


.....
MACscr - Sep 02, 2005 - 05:00 PM
Post subject:
You would think it would, but it doesnt. Its so weird.
MACscr - Sep 02, 2005 - 05:18 PM
Post subject:
For some reason $jobtitle is not being assigned a value
Chestnut - Sep 02, 2005 - 05:33 PM
Post subject:
Well.... work around :

Code:

<!--[if $members[members].pn_uid eq "BLABLABLA"]-->


Wink
MACscr - Sep 02, 2005 - 05:51 PM
Post subject:
but that would only filter by uid, lol, u know that wouldnt do what im wanting. =P
Chestnut - Sep 02, 2005 - 06:01 PM
Post subject:
Humpff........ Rolling Eyes Razz

Code:

<!--[if pnusergetvar(name="_JOBTITLE" uid=$members[members].pn_uid) eq "BLABLABLA"]-->


The ( ) might not be at the right place...
MACscr - Sep 02, 2005 - 06:10 PM
Post subject:
i tried that, even replaced eq with = and ==, but i still get this error:

Code:


Fatal error: Smarty error: [in pngroups_user_aboutus.tpl line 55]: syntax error: unidentified token '=' (Smarty_Compiler.class.php, line 1376) in /home/abs/public_html/includes/classes/Smarty/Smarty.class.php on line 1088


All times are GMT + 1 Hour
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits