2017-02-12, 01:52 AM
I'm trying to use the original MyBB variables in a javascript piece. However because they have $ in them, it messes up and completely removes the area.
So I went in and added a backslash so that it was not noticed and now it shows up but the links don't place properly, it's just text.
Any ideas on how to go about this?
And it's weird because it's only modcp and admincp link that are doing this...
var dropdownHTML = '<div style="padding: 10px; text-align: center;">'
+'<a href="{$mybb->settings['bburl']}/private.php">Messages ({$mybb->user['pms_unread']} New)</a><div style="height: 10px;"></div><a href="{$mybb->settings['bburl']}/usercp.php?action=profile">Edit Profile</a><div style="height: 10px;"></div>{$modcplink}<div style="height: 10px;"></div>{$admincplink}<div style="height: 10px;"></div><a href="{$mybb->settings['bburl']}/member.php?action=logout&logoutkey={$mybb->user['logoutkey']}">Logout</a>'
+'</div>';
So I went in and added a backslash so that it was not noticed and now it shows up but the links don't place properly, it's just text.
var dropdownHTML = '<div style="padding: 10px; text-align: center;">'
+'<a href="{$mybb->settings['bburl']}/private.php">Messages ({$mybb->user['pms_unread']} New)</a><div style="height: 10px;"></div><a href="{$mybb->settings['bburl']}/usercp.php?action=profile">Edit Profile</a><div style="height: 10px;"></div>{\$\modcplink}<div style="height: 10px;"></div>{\$\admincplink}<div style="height: 10px;"></div><a href="{$mybb->settings['bburl']}/member.php?action=logout&logoutkey={$mybb->user['logoutkey']}">Logout</a>'
+'</div>';
Any ideas on how to go about this?
And it's weird because it's only modcp and admincp link that are doing this...