Keyword

I want my users choose a avatar image from a dropdown list?

  • thanasis
  • thanasis's Avatar Topic Author
  • Offline
  • New Member
More
9 years 8 months ago #136202 by thanasis
Hi,
i'm using joomla 3+ with "K2 Dev Build" and i install the "User Extended Fields for K2" plugin.

I want to add an option (to profile.php file) like a dropdown list or a list of images (avatar images) with a checkbox beside them. I want to allow my users to choose their avatar image from the upload field or choose one of my avatar images (i have 80 images 128x128px)!

I want keep the upload field in the profile.php file ...
<input type="file" id="image" name="image"/>
<?php if ($this->K2User->image): ?>
<img class="k2AccountPageImage" src="<?php echo JURI::root(true).'/media/k2/users/'.$this->K2User->image; ?>" alt="<?php echo $this->user->name; ?>" />
<input type="checkbox" name="del_image" id="del_image" />
<label for="del_image"><?php echo JText::_('K2_CHECK_THIS_BOX_TO_DELETE_CURRENT_IMAGE_OR_JUST_UPLOAD_A_NEW_IMAGE_TO_REPLACE_THE_EXISTING_ONE'); ?></label>
<?php endif; ?>


.. and i need to add a code for this field with images next to it as a secont option.

Thanks
Thanasis Kaltsoudas

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 8 months ago #136215 by Krikor Boghossian
Replied by Krikor Boghossian on topic I want my users choose a avatar image from a dropdown list?
You should create a new field in the xml and assign the values you want.
Alternatively you can change the avatar field type to select box. This is considered a hack however and you might lose your changes when you update.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum