![]() |
passing arguements to function
I have a simple function in my includes/functions.php file. it requires 2 arguements (userid, forumid).
I am trying to make a template conditional that uses this function where do the userid and forumid get passed to this function? any help with this would be great because i am super noob to templates thanks eric |
Without a few exceptions (like can_moderate() or in_array()) you can't use functions in Templates!
|
thanks
I realize you are quite limited in what you can do in the template conditionals. But how do the arguements get passed to say, the following function, found in /inludes/functions.php? PHP Code:
|
PHP Code:
|
Just to make things a bit clear. You are now talking about a php-script, not about a template.
|
Thanks but I am still lost. Let me be more specific.
I have this function (which I didn't write) which is in my inludes/function.php. what it is supposed to do is check if the user has started a thread in forum number 10. PHP Code:
Can someone help me with this? Thanks! Eric |
1) The function does what it is supposed to do
2) You can't use this function in Template conditionals |
I realize i cant use it in a template conditional. But can i use the result of this function in a template conditional?
|
Yes.
Calll it in a PHP file like PHP Code:
HTML Code:
<if condition="$hasposted"> |
i think we are getting closer.
I put this in my functions.php file: PHP Code:
HTML Code:
<if condition="$hasposted"> |
All times are GMT. The time now is 12:16 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|