Basically, I'd like to open an affiliate website in a new tab. I've tried editing the below code, but I keep getting "T_String" errors.
"<span style=\"width:{\$maxwidth}px;height:{\$maxheight}px;float:left;margin-right:5px;margin-bottom: 2px;text-align:left;\"><a href=\"{\$mybb->settings['bburl']}/index.php?action=visit&id={\$affiliate['id']}&key={\$mybb->post_code}\"><img src=\"{\$mybb->settings['uploadspath']}/affiliates/{\$affiliate['image']}\" alt=\"\" width=\"auto\" height=\"auto\" title=\"{\$affiliate['name']}\"></a></span>"
Any help?
What plugin are you using? I just use good old HTML with the target="_blank" attribute.
(2011-07-28, 06:16 AM)lucasbytegenius Wrote: [ -> ]What plugin are you using? I just use good old HTML with the target="_blank" attribute.
Excuse my sloppiness, I forgot to include the link:
http://mods.mybb.com/view/forum-affiliate-manager
I'm trying to use the exact code that your using. However, anywhere I put it results in a "T_String" error. I think you have to add something before or after the expression to close the argument - I'm not sure.
Use this code:
"<span style=\"width:{\$maxwidth}px;height:{\$maxheight}px;float:left;margin-right:5px;margin-bottom: 2px;text-align:left;\"><a target=\"blank\" href=\"{\$mybb->settings['bburl']}/index.php?action=visit&id={\$affiliate['id']}&key={\$mybb->post_code}\"><img src=\"{\$mybb->settings['uploadspath']}/affiliates/{\$affiliate['image']}\" alt=\"\" width=\"auto\" height=\"auto\" title=\"{\$affiliate['name']}\"></a></span>"
(2011-07-28, 12:13 PM)crazy4cs Wrote: [ -> ]Use this code:
"<span style=\"width:{\$maxwidth}px;height:{\$maxheight}px;float:left;margin-right:5px;margin-bottom: 2px;text-align:left;\"><a target=\"blank\" href=\"{\$mybb->settings['bburl']}/index.php?action=visit&id={\$affiliate['id']}&key={\$mybb->post_code}\"><img src=\"{\$mybb->settings['uploadspath']}/affiliates/{\$affiliate['image']}\" alt=\"\" width=\"auto\" height=\"auto\" title=\"{\$affiliate['name']}\"></a></span>"
The page loaded without any errors, but the links still open in the same page.
Here is a link to my site:
http://sanparoshame.net/
The affiliates bar is at the bottom.
^ it appears that you just edited the plugin file - not deactivated & re-activated ... it might be required
AND not sure if target="blank" works ; it is target="_blank"
(2011-07-28, 06:34 PM)ranjani Wrote: [ -> ]AND not sure if target="blank" works ; it is target="_blank"
I use same in all the plugins I code for my site and it works fine.
(2011-07-28, 06:34 PM)ranjani Wrote: [ -> ]^ it appears that you just edited the plugin file - not deactivated & re-activated ... it might be required
AND not sure if target="blank" works ; it is target="_blank"
I've deactivated and reactivated the plugin - nothing changed.
have you made the changes mentioned ?
(2011-07-28, 06:59 PM)crazy4cs Wrote: [ -> ]have you made the changes mentioned ?
I made the changes but it's still the same.