MyBB Community Forums

Full Version: I need help making a link with all this {mybb} stuff
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a string:

<td  class="thead" align="center">' . $lang->eztrader_submittitle . ' for: ' . $context['tradername']  . '</td>

I need to make the tradername a link to their profile, and the respective UID of the trader is stored in:

$context['traderid']

I tried this but it didn't work:

<td  class="thead" align="center">' . $lang->eztrader_submittitle . ' for: ' . <a href="{$mybb->settings['bburl']}/member.php?action=profile&uid= . $context['traderid']">$context['tradername']</a> . '</td>
You can't concatenate strings in the templates, nor is PHP allowed. Try this:

<td class="thead" align="center">{$lang->eztrader_submittitle} for: <a href="{$mybb->settings['bburl']}/member.php?action=profile&uid={$context['traderid']}">{$context['tradername']}</a></td>
But this isn't in the templates, the author of this plugin just decided to hard-code everything into the plugin file...

I'll give this a try and let you know Smile Thanks!

EDIT:

Yup, getting this error:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/content/72/7302072/html/eztrader.php on line 683

EDIT:
Nevermind, I figured it out. Here it is for anyone who is wondering:


<td  class="thead" align="center">' . $lang->eztrader_submittitle . ' for: <a href="member.php?action=profile&uid=' . $context['traderid'] . '">' . $context['tradername'] . '</a></td>


Thanks!