1. gteigland
  2. General
  3. Wednesday, February 25 2015, 09:54 PM
I can't say enough about your great product. Almost done with my site but wondering about a function or your could provide direction.

1. I created a field "Verified" that is only visible to administrator backend (Under About Me Category). http://awesomescreenshot.com/0784hmm371

2. Its defaulted to No.

3. When the administrator Selects "Yes" and saves we want a "Verified" Badge to show up on Profile - like this (see attached)

I have no problem hard coding this into template or something like that but can you share with me the code it would take so that when that field "Verified" is selected to Yes .. that badge appears on user profile for other members to see.

Thanks!
Gene
Attachments (1)
Accepted Answer
admin Accepted Answer
Admin
Hi,
you have missing to put code between
<?php
?>


see screenshot
Attachments (1)
  1. more than a month ago
  2. General
  3. # Permalink
admin Accepted Answer
Admin
Hi,
at file Elements/cover.ctp in theme manager at line 5 you can find Name of user, here you can add the code to show badge.

You can use this code:
require_once(JPATH_SITE.'/components/com_jsn/helpers/helper.php');
$jsnUser=new JsnUser($user['User']['id']);
if($jsnUser->getValue('alias_of_field_verified')) echo('<img src="/badge_image_path" />');

we assumed 1 to yes 0 to no
  1. more than a month ago
  2. General
  3. # 1
admin Accepted Answer
Admin
  1. more than a month ago
  2. General
  3. # 2
gteigland Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. General
  3. # 3
gteigland Accepted Answer
Pro
DUH ON ME!
  1. more than a month ago
  2. General
  3. # 4
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.