Catched a variable from member.php

How can I catch a variable from member.php? I would like to write a conditional function based on the number of Events, Groups or Ads created by that member. Let's say you if you created more than 0 event, then you will see something or get redirected to somewhere etc.

I am not sure what the correct syntax format for catching those Custom section numbers at member.php

Anyone did something similar or knows how?

Quote · 21 Apr 2010

It's not so much that it's in member.php (since it's not) but rather it's in the DB.  You can use the Groups in D6 as an example (Because I have a D6 DB open)

functin NumberOfGroupsCreated....

 

FROM Groups WHERE creatorID = MemberID....

 

Then run an if command...

 

if creatorID COUNT >= 3 (for example)

 

then do this,

 

else

do this.

 

No, I didn't right it all out as you can obviously tell, but it gives you a starting point

Quote · 21 Apr 2010

Thank you for the pointers mydatery. I am actually trying to prevent another hit to database since the data is already pulled once in order to show up on member.php (account control)view as "Custom" statistics.


If it is already displayed on that page somewhere, can't I capture it to use for writing a conditional php statement? I would like to use an existing variable instead of making another raw SELECT COUNT query...

Quote · 21 Apr 2010

You can try checking the member.php and all the files that it pulls and see if this COUNT is already pulled, if it is then just write the function utilizing it, sorta like a function inside a function more or less.  But I think your going to find that it's not already pulled. 

All to often the CreatorID is not pulled on most stuff unless actually entering the Group, Event and so on to help with moderation control, which is what you said your looking for. 

I'd say just start checking the files, but keep in mind you will probably need to write this one out.  And yes, I know you know how to write out & echo a function. 

Good luck

Quote · 21 Apr 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.