XF 2.3 How do I get rid of this pesky thing?

Solution
Then what you need to do is add a template modifcation, so edit your member_notable to contain this
HTML:
<xf:js>
document.querySelectorAll('.contentRow-extra').forEach(div => {
  const text = div.textContent;
  const index = text.indexOf(' at ');
  if(index !== -1) {
    div.textContent = text.substring(0, index);
  }
});
</xf:js>

This would be your final result:
1753199485769.webp

Then you don't have to mess around with css, you can just remove it using javascript. I found this method easier. I couldn't remove it all properly using css.
Where is this exactly?
From the image I assumed it was the Newest Member Widget, located in the Members page, but mine hasn't been edited and it's just showing the pfp's of the users, in the order they registered.

Is this a custom addon you've installed?
 
Okay so I managed to replicate something similar in the member stats, but it is custom, it doesn't come in the default xenforo installation.

In the future when making custom content i'd suggest maybe giveing it a tag or something, so you can tell easily it's custom and not default. I use 'syl_' before the unique key just so I can remember what's default and what I need to check when updates occur.

So I then went diving into the xenforo files and I found what you need to edit:
option 1:
The php file your looking for is PreparerService that file has this method in which I change return \XF::language()->dateTime($value); -> return \XF::language()->date($value, null, false);
PHP:
protected function prepareCacheResults($order, array $cacheResults)
    {
        switch ($order)
        {
            case 'reaction_score':
            case 'message_count':
            case 'trophy_points':
                $cacheResults = array_map(function ($value)
                {
                    return \XF::language()->numberFormat($value);
                }, $cacheResults);
                break;

            case 'register_date':
            case 'last_activity':
                $cacheResults = array_map(function ($value)
                {
                    //return \XF::language()->dateTime($value);
          return \XF::language()->date($value, null, false);
                }, $cacheResults);
                break;
        }

        $this->app->fire('member_stat_result_prepare', [$order, &$cacheResults]);

        return $cacheResults;
    }

Option 2:
If you want to just edit the template, you want to look for member_notable, this is the line your looking to edit
HTML:
<div class="contentRow-extra contentRow-extra--large">{$data.value}</div>

The final result using the php edit method is this
1753188835488.webp
 
Option 1 is not an option for me because I am on cloud.

Option 2 is where I have been getting stuck so far not knowing what to change {data.value} to to get the change like this.

1753188835488.webp



As far as custom content, this was a preset xenforo member stat, I only edited the name of it.

You can add new ones, which I also did, and then select the option in the second pic below.

Screenshot (43).webp



Screenshot (44).webp
 
Then what you need to do is add a template modifcation, so edit your member_notable to contain this
HTML:
<xf:js>
document.querySelectorAll('.contentRow-extra').forEach(div => {
  const text = div.textContent;
  const index = text.indexOf(' at ');
  if(index !== -1) {
    div.textContent = text.substring(0, index);
  }
});
</xf:js>

This would be your final result:
1753199485769.webp

Then you don't have to mess around with css, you can just remove it using javascript. I found this method easier. I couldn't remove it all properly using css.
 
Solution
Back
Top Bottom