Forumlar / Cotonti / Support / How to Parse user Extra Fields?

scriptor
#1 2010-06-25 23:19
I have add some User Extra Fields. So an textarea field with the minieditor... now i want that these new custom fields are parse with bbcode in the user.details. Anyone a idea?
[url=http://www.freak-forum.de]Freak-Forum.de[/url] - The Freakstyle Community<br />
[url=http://www.adelmann-solutions.com]adelmann-solutions, webdesign Freiburg[/url]
urlkiller
#2 2010-06-26 05:05
hook in to user details and implement a sed_parse(<var_with_content_here>);
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
scriptor
#3 2010-06-27 16:57
In the Template it wont work with a <?php ?> tag... i know the sed_parse command for my own variables, but i don´t know how to use with User extra fields from cotonti
[url=http://www.freak-forum.de]Freak-Forum.de[/url] - The Freakstyle Community<br />
[url=http://www.adelmann-solutions.com]adelmann-solutions, webdesign Freiburg[/url]
urlkiller
#4 2010-06-28 06:04
of course </php> wont work in the templates because its a security risk!

plugins can have hooks, hooks are there for hooking in to system routines.
so you could make a plugins that hooks into the right one and there you have to add a tag array and the parse command.

you can read about that topic here: http://www.cotonti.com/docs/en/plugins/hooks?highlight=HOOKS
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
scriptor
#5 2010-06-28 21:24
okay the user extra value from me can read with usr['hobby']... but only with the hook user.details. But it need the hook user.details.tag... if i use user.details.tag as hook the usr value isnt show... whats my prob?
[url=http://www.freak-forum.de]Freak-Forum.de[/url] - The Freakstyle Community<br />
[url=http://www.adelmann-solutions.com]adelmann-solutions, webdesign Freiburg[/url]
urlkiller
#6 2010-06-28 23:57
ok easy.

1. first make a plugins that hooks in the right place (user.details.tags)
2. then make a mysql query that reads the correct field. ($my_user_row['hobbys'])
3. now you need a parse array like this:

/* SQL QUERY IS HERE */

$t->assign(array(
    'MYPLUG_HOBBYS' => sed_parse($my_user_row['hobbys']),
));

hope that helps a bit...
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
scriptor
#7 2010-06-29 02:29
oh a mysql query... thats so stupid from me... it was so easy... oh ohoh :D
[url=http://www.freak-forum.de]Freak-Forum.de[/url] - The Freakstyle Community<br />
[url=http://www.adelmann-solutions.com]adelmann-solutions, webdesign Freiburg[/url]
urlkiller
#8 2010-06-29 02:52
did you get it to run?
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
scriptor
#9 2010-06-29 03:02
jop it was easier as i think :) merci for it :)
[url=http://www.freak-forum.de]Freak-Forum.de[/url] - The Freakstyle Community<br />
[url=http://www.adelmann-solutions.com]adelmann-solutions, webdesign Freiburg[/url]