Jump to the post that solved this thread.
Solved: 5 Years, 6 Months, 3 Weeks ago Username is blank when quoting a Guest user
#1
Solved: 5 Years, 6 Months, 3 Weeks ago
I just upgraded my forum from 1.8.6 to 1.8.20

Quoting other user's posts still works. The only problem is when I quote a Guest (unregistered) user, the username within the quote code is blank

For example, before the forum upgrade, this code was generated when trying to quote a Guest:

[quote="Guest" pid='9684' dateline='1556915520']


However, now, this is the code that is generated:

[quote="" pid='9684' dateline='1556915520']

Can someone advise what I need to do to fix this? Its inconvenient to remember to have to type in the Guest username when it should be prepopulated

Thanks
Reply
#2
Solved: 5 Years, 6 Months, 3 Weeks ago
you can try using this method from German Support forum

code needs to be modified in inc/functions_posting.php file [GitHub link]
Reply
#3
Solved: 5 Years, 6 Months, 3 Weeks ago
Thanks that worked!

From that link:

Quote:I have fixed the error once, by looking in the file inc / functions_posting.php

// Swap username over if we have a registered user
if($quoted_post['userusername'])
{
   $quoted_post['username'] = $quoted_post['userusername'];
} 


have expanded to

// Swap username over if we have a registered user
if($quoted_post['userusername'])
{
   $quoted_post['username'] = $quoted_post['userusername'];
}
else
{
   if(empty($quoted_post['username']))
   {
       $quoted_post['username'] = htmlspecialchars_uni($lang->guest);
   }
}
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)