*

BabyDunk

  • ****
  • 161 posts
[HELP]change displayed commentator name
« on: August 03, 2016, 08:11:55 PM »
Hello

I have been trying a for a while now to change the displayed name  'commentator_name' in form_feedback_list.php to display s_username.

i'd be very greatful for your help

Cheers
Chris
« Last Edit: August 03, 2016, 09:16:24 PM by BabyDunk »
I Am A Noob But I Am Here To Learn.
Please be patient ;) ;D

*

BabyDunk

  • ****
  • 161 posts
Re: [HELP]change displayed commentator name
« Reply #1 on: August 05, 2016, 11:34:12 AM »
Hi

Can this be achieved without to much code change?

thank
I Am A Noob But I Am Here To Learn.
Please be patient ;) ;D

*

MB Themes

Re: [HELP]change displayed commentator name
« Reply #2 on: August 05, 2016, 11:46:10 AM »
@BabyDunk
I am not sure what would be purpose of this change.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

BabyDunk

  • ****
  • 161 posts
Re: [HELP]change displayed commentator name
« Reply #3 on: August 05, 2016, 11:57:08 AM »
i prefer to keep real name private on my site. its only username visible to the buyer. my reasoning at the beginning when i started changing to username . was to hide info from harvest bots but most of my users like the anonymity.

and because my whole site is based on usernames, i think the commentator_name should be the same, especially if the seller was to comment/reply to feedback. this would defeat everything i was trying to do from the beginning.


thanks
Chris
I Am A Noob But I Am Here To Learn.
Please be patient ;) ;D

*

MB Themes

Re: [HELP]change displayed commentator name
« Reply #4 on: August 05, 2016, 12:09:05 PM »
@BabyDunk
In form folder of plugin you need to modify all files related to feedback.
Mostly osc_logged_user_name is used to get user name, you may replace it with whatever you want.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

BabyDunk

  • ****
  • 161 posts
Re: [HELP]change displayed commentator name
« Reply #5 on: August 06, 2016, 03:40:54 AM »
thanks for the pointers Frosticek. i got it sorted with this function :D

Code: [Select]
// Display Commentator Username
    function BO_username_commentator_now(){
        if( osc_logged_user_id()  <> 0 && osc_logged_user_id()  <> '') {
        $user = User::newInstance()->findByPrimaryKey( osc_logged_user_id()  );
        return $user['s_username'];
    } else {
        return false;
    }
}

then replace the 3 instances  of osc_logged_user_name() with BO_username_commentator_now() on the form_feedback_add.php

its works a treat :D

ps: line 7  of feedback.css needs a wee tweak to keep the names in its container.

find this
Code: [Select]
.score_list .name {float:left;clear:both;width:100%;font-size:12px;font-weight:bold;font-size:12px;color:#444;margin-top:2px;}

replace with this
Code: [Select]
.score_list .name {float:left;clear:both;width:100%;font-size:12px;font-weight:bold;font-size:12px;color:#444;margin-top:2px;word-break: break-word;-ms-word-break: break-all;overflow-wrap: break-word;word-wrap: break-word;}

Cheers
Chris
I Am A Noob But I Am Here To Learn.
Please be patient ;) ;D

*

MB Themes

Re: [HELP]change displayed commentator name
« Reply #6 on: August 06, 2016, 03:13:04 PM »
@BabyDunk
Your code looks good ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

BabyDunk

  • ****
  • 161 posts
Re: [HELP]change displayed commentator name
« Reply #7 on: August 06, 2016, 06:14:02 PM »
Im learning from the master lol aka Frosticek.  ;D well that an code academy  ;)

Cheers and thank you
I Am A Noob But I Am Here To Learn.
Please be patient ;) ;D

*

MB Themes

Re: [HELP]change displayed commentator name
« Reply #8 on: August 06, 2016, 06:34:44 PM »
haha :D
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots