PDA

View Full Version : Seks icons


Andy1961
09-17-2006, 07:08 AM
I made extra field "Seks".
On submit form I did a drop down menu to choose seks (male or female) along with corresponding icons (me.gif and fe.gif).
I used this code to show my drop down menu and icons on submit.tpl:
Content visible to registered users only.

Please tell me how to display icons on detail.tpl along with chosen seks.
This is my detail.tpl code:

Content visible to registered users only.

Boby
09-17-2006, 09:48 AM
I think you need an IF clause:

Content visible to registered users only.
Don't forget you also need to make the $Seks image available from detail.php:
Content visible to registered users only.
Boby

Andy1961
09-17-2006, 10:41 AM
Thank you. I will try it.

Andy1961
09-18-2006, 12:57 AM
Thank you Boby, it works.
I also want to add icons for seks orientation, like "straight" st.gif "bi" bi.gif "TV" tv.gif and "TS" ts.gif.
Please tell me if following code is correct.
Content visible to registered users only.
Thank you in advance.

Boby
09-18-2006, 09:45 AM
Yes, seems correct :)

Andy1961
09-19-2006, 07:44 AM
Hey Boby!
To display Orientation on dir_links_edit.tpl (admin panel) I used this code:
Content visible to registered users only.
It displays a drop down menu with selected orientation only, no other choice.
Please tell me how to do it so there will be a drop down menu with selected (by submitter) orientation as default and a list of other choices so admin can change it if required.
Thank you in advance.

Boby
09-19-2006, 07:49 AM
http://smarty.php.net/manual/en/language.function.html.options.php

The DB field name should be different from the array of options.

Content visible to registered users only.
The options array is an associative array where the keys are your prefered options, and the array values a text.
For example:
Content visible to registered users only.
$DBFIELD is your DB field name, $Orient or $ORIENT or how you've named it.

Andy1961
09-19-2006, 08:41 AM
OK, I understand that codeContent visible to registered users only.
But where should go that PHP code you posted?

Boby
09-19-2006, 09:26 AM
To /admin/dir_links_edit.php

Andy1961
09-19-2006, 09:30 AM
OK.
I pasted this code to dir_links_edit.tpl
Content visible to registered users only.
and this code to dir_links_edit.php on line 237
Content visible to registered users only.
But now I have an empty drop down box. What is wrong?