Advertisement:

Author Topic: Show username instead of real name  (Read 1221 times)

Dublay

  • Newbie
  • *
  • Posts: 33
Show username instead of real name
« on: February 18, 2016, 04:46:59 pm »
Hi,

is it possible to display the username instead of the real name on item page if has been filled by the user? This is important for privacy purposes - not everybody want's his real name posted to his ad.

Thanks in advance!

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Show username instead of real name
« Reply #1 on: February 18, 2016, 07:12:51 pm »
Hi,

What theme are you using?

Regards

Dublay

  • Newbie
  • *
  • Posts: 33
Re: Show username instead of real name
« Reply #2 on: February 18, 2016, 07:15:33 pm »
Hi,

it's the glider theme.

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Show username instead of real name
« Reply #3 on: February 18, 2016, 07:56:48 pm »
Sorry, don't know that theme. :( Better ask to its developers.

Regards

Dublay

  • Newbie
  • *
  • Posts: 33
Re: Show username instead of real name
« Reply #4 on: February 18, 2016, 08:07:28 pm »
Ok, I'll try that.

But besided of that theme - is there a variable to show up the username of an item, like oc_posted_by(); or something else?

teseo

  • Hero Member
  • *****
  • Posts: 6169
Re: Show username instead of real name
« Reply #5 on: February 18, 2016, 08:15:45 pm »
On bender this is the equivalent:

Code: [Select]
                <p class="name"><?php _e('Name''bender'?>: <a href="<?php echo osc_user_public_profile_urlosc_item_user_id() ); ?>" ><?php echo osc_item_contact_name(); ?></a></p>
As you can see, it's not the user's Name or Username what is used directly, but the Name specified when the ad was posted: osc_item_contact_name()

You could just change that for osc_user_username() if only registered users can post ads on your site.

Regards

Dublay

  • Newbie
  • *
  • Posts: 33
Re: Show username instead of real name
« Reply #6 on: February 18, 2016, 09:17:15 pm »
Ok, I'll try that tomorrow - maybe this will do the trick.
But maybe this is interesting for further versions of osclass, as there are many sites people don't want to get their real name posted. Thanks for your help!