Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 08:16 am EST
Geeklog Forums
Help needed in adding PHP code to a template
Status: offline
ronack
Forum User
Full Member
Registered: 05/27/03
Posts: 612
I read the documentation that says if I want to use php in a template that I need to add it to the template functions.php but I'm not quite understanding it.
I want to add some php to my memberdetail.thtml custom registration form. If I understand correctly I would place the code in functions.php and then be able to call that code with curley queue { } brackets. That's all I know and I don't even know if that's correct. My question is the format, does it go in like this?
my code here
What goes where the word SOMETHING is? Would that be MEMBERDETAIL?
And I assume that I would place the my_variable word in the {brackets} in memberdetail.thtml
Or is the completly wrong?
Thanks,
Ron
I want to add some php to my memberdetail.thtml custom registration form. If I understand correctly I would place the code in functions.php and then be able to call that code with curley queue { } brackets. That's all I know and I don't even know if that's correct. My question is the format, does it go in like this?
Text Formatted Code
$_SOMETHING_TEMPLATE= 'my_variable' my code here
What goes where the word SOMETHING is? Would that be MEMBERDETAIL?
And I assume that I would place the my_variable word in the {brackets} in memberdetail.thtml
Or is the completly wrong?
Thanks,
Ron
12
14
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: ronack
Or is the completly wrong?
Yeah, you're looking at the wrong place.
If you want to add things to the custom registration form, do that in system/lib-custom.php, function CUSTOM_userForm. You'll see the $user_templates->set_var calls there that introduce new variables.
Also search the forum for "custom registration" ...
bye, Dirk
9
14
Quote
Status: offline
ronack
Forum User
Full Member
Registered: 05/27/03
Posts: 612
I thought maybe I was in the wrong place. Thanks Dirk!
I did do some searching and reading of the documentation. But didn't stumble on the right combination.
I'm going to attempt this on my own, don't know how long it will take but if it works I'll have a new plugin or hack.I may be back for some direction or suggestion.
Thanks,
Ron
I did do some searching and reading of the documentation. But didn't stumble on the right combination.
I'm going to attempt this on my own, don't know how long it will take but if it works I'll have a new plugin or hack.I may be back for some direction or suggestion.
Thanks,
Ron
8
13
Quote
All times are EST. The time is now 08:16 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content