MyBB Community Forums
Can I change showthread code like this? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Can I change showthread code like this? (/thread-219345.html)



Can I change showthread code like this? - Amen4747 - 2018-08-20

in showthread.php

$query = $db->query("
SELECT u.*, u.username AS userusername, p.*, f.*, eu.username AS editusername
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
LEFT JOIN ".TABLE_PREFIX."users eu ON (eu.uid=p.edituid)

to


$query = $db->query("
SELECT u.*, p.username AS userusername, p.*, f.*, eu.username AS editusername
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)
LEFT JOIN ".TABLE_PREFIX."userfields f ON (f.ufid=u.uid)
LEFT JOIN ".TABLE_PREFIX."users eu ON (eu.uid=p.edituid)


u.username -> p.username

I want my old username to be displayed in old posts.


RE: Can I change showthread code like this? - effone - 2018-08-20

I think its fine.