Skip to Content Skip to Menu

picture and radio field

  • winzs
  • winzs
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
  • Add-ons
13 years 5 months ago - 13 years 5 months ago #166985 by winzs
picture and radio field was created by winzs
Hello,

I want my users to choose between 3 pictures during their registration and display their choice (one picture) in their profile.
It is not the avatar picture that I want, I want to display a picture for ranking skill for example.

So, I have added a custom radio field and give the value for radio field something like this : <img src="/****/****.jpg">

So when I update and edit a profil, the picture is well displayed in the form, but after if i want to display the profil, the code is displayed (<img src="/****/****.jpg">) instead of the picture .

I noticed that in the source code of the page, the special chars "<" and ">" are printed as source code like this : &lt;img src="/****/****.jpg"&gt;

Could someone help me please ?
I hope someone understand my problem and sorry for my poor english :sick:
Thanks a lot
Last edit: 13 years 5 months ago by winzs.

Please Log in or Create an account to join the conversation.

  • winzs
  • winzs
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
  • Add-ons
13 years 5 months ago #167359 by winzs
Replied by winzs on topic Re: picture and radio field
Hi,
I have "solved" my problem by adding the php function htmlspecialchars_decode() where needed in my template php theme files.

I hope, I won't have html data injection by doing this ... but that's the only way I found to display my picture with a radio field.

greetings

Please Log in or Create an account to join the conversation.

  • winzs
  • winzs
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
  • Add-ons
13 years 3 months ago - 13 years 3 months ago #173401 by winzs
Replied by winzs on topic Re: picture and radio field
Hi,
I have a new question ;

Now, I would like to personnalize the labels for my radio fields with CSS.
But i am not able to do that because there is not id (or class) defined in the label for the radio field

Here is a sample of the code for a radio field when I make a research via the list of users :

Code:
<div id="cbfr_82" class="sectiontableentry2 cbft_radio cb_form_line cbclearboth"> <label id="cblabcb_xxxx" for="cb_xxxx">XXXX</label> <div class="cb_field"> <div id="cbfv_82"> <div class="cbSearchContainer cbSearchSimple"> <div class="cbSearchCriteria cb__js_radio"> <span class="cbSnglCtrlLbl"> <input id="cbf244" type="checkbox" size="0" value="<img src="/xxxx/xxxx.png">" name="cb_xxx[]"> <label for="cbf244"> <img src="/xxxx/xxxx.png"> </label>

I would like to have something like this for the label of the radio filed :
Code:
<label for="cbf244" class="cbf244">

I have search comprofiler.html.php , comprofiler.php, cb_core.php , and my template_php_file.php and more .... :S ; I am sorry but i cannot find where I can add this class. :silly:

Is it a php file ? Where is this code defined ? in wich files ?


Thanks a lot for your help :)

sorry for my poor english again :blush:
greetings
Last edit: 13 years 3 months ago by winzs.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum