| Author |
Message |
MACscr
Joined: Jan 11, 2005
Posts: 128
Status: Offline
|
  Posted:
Aug 30, 2005 - 10:07 PM |
|
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
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Aug 30, 2005 - 10:45 PM |
|
Sure it is "position" ?... your if is looking in some "title"
 |
_________________ Chestnut !
Administrator
PNConcept.com |
|
 |
 |
MACscr
Joined: Jan 11, 2005
Posts: 128
Status: Offline
|
  Posted:
Sep 01, 2005 - 04:22 AM |
|
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
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Sep 01, 2005 - 11:35 AM |
|
Try :
| Code: | | uid=$members[members].uid |
instead of
| Code: | | uid=$members[members].pn_uid |
|
_________________ Chestnut !
Administrator
PNConcept.com |
|
 |
 |
MACscr
Joined: Jan 11, 2005
Posts: 128
Status: Offline
|
  Posted:
Sep 01, 2005 - 11:26 PM |
|
nope =(
Hmm, what the heck |
|
|
|
 |
Chestnut
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Sep 01, 2005 - 11:49 PM |
|
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... |
_________________ Chestnut !
Administrator
PNConcept.com |
|
 |
 |
MACscr
Joined: Jan 11, 2005
Posts: 128
Status: Offline
|
  Posted:
Sep 02, 2005 - 01:08 AM |
|
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
Joined: Jan 11, 2005
Posts: 128
Status: Offline
|
  Posted:
Sep 02, 2005 - 01:11 AM |
|
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
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Sep 02, 2005 - 12:24 PM |
|
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]-->
|
..... |
_________________ Chestnut !
Administrator
PNConcept.com |
|
 |
 |
MACscr
Joined: Jan 11, 2005
Posts: 128
Status: Offline
|
  Posted:
Sep 02, 2005 - 05:00 PM |
|
You would think it would, but it doesnt. Its so weird. |
|
|
|
 |
MACscr
Joined: Jan 11, 2005
Posts: 128
Status: Offline
|
  Posted:
Sep 02, 2005 - 05:18 PM |
|
For some reason $jobtitle is not being assigned a value |
|
|
|
 |
Chestnut
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Sep 02, 2005 - 05:33 PM |
|
Well.... work around :
| Code: |
<!--[if $members[members].pn_uid eq "BLABLABLA"]-->
|
 |
_________________ Chestnut !
Administrator
PNConcept.com |
|
 |
 |
MACscr
Joined: Jan 11, 2005
Posts: 128
Status: Offline
|
  Posted:
Sep 02, 2005 - 05:51 PM |
|
but that would only filter by uid, lol, u know that wouldnt do what im wanting. =P |
|
|
|
 |
Chestnut
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Sep 02, 2005 - 06:01 PM |
|
Humpff........
| Code: |
<!--[if pnusergetvar(name="_JOBTITLE" uid=$members[members].pn_uid) eq "BLABLABLA"]-->
|
The ( ) might not be at the right place... |
_________________ Chestnut !
Administrator
PNConcept.com |
|
 |
 |
MACscr
Joined: Jan 11, 2005
Posts: 128
Status: Offline
|
  Posted:
Sep 02, 2005 - 06:10 PM |
|
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
|
|
|
|
|
 |
|
|