Forum Index   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
MACscrOffline



Joined: Jan 11, 2005
Posts: 128

Status: Offline
Post   Posted: Aug 30, 2005 - 10:07 PM Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website AIM Address
Chestnut
Site Admin


Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
Post   Posted: Aug 30, 2005 - 10:45 PM Reply with quote Back to top

Sure it is "position" ?... your if is looking in some "title"

Wink

_________________
Chestnut ! Cool
Administrator
PNConcept.com
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
MACscrOffline



Joined: Jan 11, 2005
Posts: 128

Status: Offline
Post   Posted: Sep 01, 2005 - 04:22 AM Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website AIM Address
Chestnut
Site Admin


Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
Post   Posted: Sep 01, 2005 - 11:35 AM Reply with quote Back to top

Try :

Code:
uid=$members[members].uid


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

_________________
Chestnut ! Cool
Administrator
PNConcept.com
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
MACscrOffline



Joined: Jan 11, 2005
Posts: 128

Status: Offline
Post   Posted: Sep 01, 2005 - 11:26 PM Reply with quote Back to top

nope =(

Hmm, what the heck
View user's profile Send private message Visit poster's website AIM Address
Chestnut
Site Admin


Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
Post   Posted: Sep 01, 2005 - 11:49 PM Reply with quote Back to top

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 ! Cool
Administrator
PNConcept.com
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
MACscrOffline



Joined: Jan 11, 2005
Posts: 128

Status: Offline
Post   Posted: Sep 02, 2005 - 01:08 AM Reply with quote Back to top

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
View user's profile Send private message Visit poster's website AIM Address
MACscrOffline



Joined: Jan 11, 2005
Posts: 128

Status: Offline
Post   Posted: Sep 02, 2005 - 01:11 AM Reply with quote Back to top

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
View user's profile Send private message Visit poster's website AIM Address
Chestnut
Site Admin


Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
Post   Posted: Sep 02, 2005 - 12:24 PM Reply with quote Back to top

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 ! Cool
Administrator
PNConcept.com
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
MACscrOffline



Joined: Jan 11, 2005
Posts: 128

Status: Offline
Post   Posted: Sep 02, 2005 - 05:00 PM Reply with quote Back to top

You would think it would, but it doesnt. Its so weird.
View user's profile Send private message Visit poster's website AIM Address
MACscrOffline



Joined: Jan 11, 2005
Posts: 128

Status: Offline
Post   Posted: Sep 02, 2005 - 05:18 PM Reply with quote Back to top

For some reason $jobtitle is not being assigned a value
View user's profile Send private message Visit poster's website AIM Address
Chestnut
Site Admin


Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
Post   Posted: Sep 02, 2005 - 05:33 PM Reply with quote Back to top

Well.... work around :

Code:

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


Wink

_________________
Chestnut ! Cool
Administrator
PNConcept.com
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
MACscrOffline



Joined: Jan 11, 2005
Posts: 128

Status: Offline
Post   Posted: Sep 02, 2005 - 05:51 PM Reply with quote Back to top

but that would only filter by uid, lol, u know that wouldnt do what im wanting. =P
View user's profile Send private message Visit poster's website AIM Address
Chestnut
Site Admin


Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
Post   Posted: Sep 02, 2005 - 06:01 PM Reply with quote Back to top

Humpff........ Rolling Eyes Razz

Code:

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


The ( ) might not be at the right place...

_________________
Chestnut ! Cool
Administrator
PNConcept.com
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
MACscrOffline



Joined: Jan 11, 2005
Posts: 128

Status: Offline
Post   Posted: Sep 02, 2005 - 06:10 PM Reply with quote Back to top

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

View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits
DarkMindZ