eingabe felder beim Xdata mod
Verfasst: 14.10.2005 19:21
hi,
habend den Xdata mod eingebaut er funktioniert soweit. nun möchte ich aber die eingabefelder die ich damit erstellt habe in die profile_add_body.tpl einbauen.
normal macht er es alleine aber dann listet er die so wie sie erstellt sind untereinander auf.
man kann aber den anzeige-typ einstellen, ob man normal, keine oder TPL Variable machen möchte.
das problem ist das es keine anleitung gibt (ich habe keine gefunden) wie die eingabe felder auszusehen haben für den Xdata mod.
habe sie so gemacht wie es nomal üblich ist. aber er behällt die eingaben nicht. sie werden zwar in die DB gespeichet und auch im profile_view_body.tpl angezeigt. aber bei einem erneutem aufruf des profils stechen keine angaben mehr n den feldern. und amn kann ja nciht immer das ganze profil neu ausfüllen nur weil man mal was ändern möchte.
beispiele von meinen eingabefeldern:
<input type="text" class="post" style="width: 200px" name="xd_16" size="25" maxlength="20" value="{xd_16}" />
und so:
<select name="{xd_23}">
<option value="{xd_23}" {xd_23}>{xd_23}</option>
xd_16 usw. sind die bezeichnungen die Xdata vegibt für die felder und die DB eintagungen .
kann einer weiter helfen.
habe noch dieses zum xdata mod gefunden öeider reicht mein englishc nicht dafür vieleicht hilft das für die lösung:
gruß ralf
habend den Xdata mod eingebaut er funktioniert soweit. nun möchte ich aber die eingabefelder die ich damit erstellt habe in die profile_add_body.tpl einbauen.
normal macht er es alleine aber dann listet er die so wie sie erstellt sind untereinander auf.
man kann aber den anzeige-typ einstellen, ob man normal, keine oder TPL Variable machen möchte.
das problem ist das es keine anleitung gibt (ich habe keine gefunden) wie die eingabe felder auszusehen haben für den Xdata mod.
habe sie so gemacht wie es nomal üblich ist. aber er behällt die eingaben nicht. sie werden zwar in die DB gespeichet und auch im profile_view_body.tpl angezeigt. aber bei einem erneutem aufruf des profils stechen keine angaben mehr n den feldern. und amn kann ja nciht immer das ganze profil neu ausfüllen nur weil man mal was ändern möchte.
beispiele von meinen eingabefeldern:
<input type="text" class="post" style="width: 200px" name="xd_16" size="25" maxlength="20" value="{xd_16}" />
und so:
<select name="{xd_23}">
<option value="{xd_23}" {xd_23}>{xd_23}</option>
xd_16 usw. sind die bezeichnungen die Xdata vegibt für die felder und die DB eintagungen .
kann einer weiter helfen.
habe noch dieses zum xdata mod gefunden öeider reicht mein englishc nicht dafür vieleicht hilft das für die lösung:
Code: Alles auswählen
]==========================================================
Advanced Options
===========================================================
Display Type
These three options determine the way a field is
displayed.
-"Normal" means that it will show up automatically
-"None" means that it won't show up at all on that
page (unless you write your own php code to put
it into the template, that is)
-"TPL Variable" means that the information about
the field will be assigned to the template but
not displayed. All you have to do is edit the
appropriate .tpl file to make it visible. This
is useful when you want a field to display in a
different manner than usual. For example, a
"custom post color" field could be made using
this by placing the color that the user has
selected directly into the HTML code for the page.
(This is one of the optional MODs in the 'extras'
folder that came with this MOD.)
Name In Templates
This dictates the name of the template variable that
the profile field info will be assigned to. There are
actually several variable that will be available, as
shown in this list. ??? is the value you chose for
this option; paths start at templates/tpl_name_here/:
-profile_view_body.tpl
-{???} is the user's data for this field
-{switch_???} is a switch variable executed if the
user has set the field to something
-{switch_no_???} is a switch variable executed if
the user has _not_ set the field to something
-profile_add_body.tpl and admin/user_edit_body.tpl
-{NAME} is the name of this field
-{CODE_NAME} has the value of ??? and should be
the name of the form field that contains the
user's input
-{DESCRIPTION} is the field's description
-{VALUE} is the user's current value for the field
-{switch_is_???} is a switch used to determine that
this iteration of the xdata loop is for this
field
-viewtopic_body.tpl viewtopic_body
-{???} is the user's data for this field
-{switch_???} is a switch variable executed if the
user has set the field to something
-{switch_no_???} is a switch variable executed if
the user has _not_ set the field to something
MOD Developers: It should also be noted that the
functions set_user_xdata() and xdata_auth() take the
field's template name and not its field_id as an
argument. Also, get_xd_metadata() and get_user_xdata()
return an associative array by template name. This
allows you to write code that works no matter what
other fields a user has created.