Funnily enough, your code is vulnerable to MySQL injection attacks (even though the warning was never designed to detect that).
Always escape variables
before they go into a query.
Apart from that, the code isn't even valid, so no surprise that it won't work.
Maybe you want this:
PHP Code:
$balance = mysql_fetch_array(mysql_query("SELECT `balance` FROM iconomy WHERE `username` = '".mysql_real_escape_string($mybb->user['fid4'])."'"));
echo $balance[0];
|
Hi,
after activating the plugin I get these emails:
Code:
Cannot modify header information - headers already sent by (output started at /home/xxx/domains/xxx.xxx/public_html/forum/global.php(503) : eval()'d code(1) : eval()'d code:1)
|
How can I fix it?
Revert your headerinclude, gobutton, htmldoctype and header templates.
I am getting
Code:
Parse error: syntax error, unexpected T_STRING in /home/silvert/public_html/forum/global.php(503) : eval()'d code(1) : eval()'d code on line 1
|
When this is used with the mybbGM template, any idea what may be causing this?
Cheers
Dan
* looks into crystal ball *
Hmm, not really.
Maybe, if there's a <?xml in the template, try getting rid of the tag.
(11-25-2011 11:33 PM)Earl Grey Wrote: [ -> ] (11-25-2011 03:45 PM)ZiNgA BuRgA Wrote: [ -> ]Nesting?
Code:
<if $forum['fid'] == 1 then>
ID 1
<else>
<if $forum['fid'] == 2 then>
ID 2
<else>
<if $forum['fid'] == 3 then>
ID 3
<else>
something else
</if>
</if>
</if>
|
Or reduce the clutter with elseif's
Code:
<if $forum['fid'] == 1 then>
ID 1
<elseif $forum['fid'] == 2 then>
ID 2
<elseif $forum['fid'] == 3 then>
ID 3
<else>
no, I'm not going to put any more IDs
</if>
|
Perfect! Thanks so much
Hey, it's me again! I'm working on this project again and I was wondering if there was a way I could use one code for more than one forum? Like:
Code:
<if $forum['fid'] == 1 then>
ID 1
<elseif $forum['fid'] == 2, 3, 4, 5, 6, 7, 8 then>
ID 2
<elseif $forum['fid'] == 9 then>
ID 3
<else>
no, I'm not going to put any more IDs
</if>
|
I'm not very good at PHP so don't know how to do this, any tips would be much appreciated <3[/code]
Code:
<if in_array($forum['fid'], array(1,2,4,7)) then>
|
thanks for your plugin ...
I need to put an image with a link next to a forum ...
In forumbit_depth2_forum with the code <if ..... then>, how can I intercept the forum id 14 ? (or by forum name)
Look at how forum information variables are in the template and use that as a basis.
They'll be an array and look something like {$forum['...']} or maybe {$foruminfo['...']} or something similar. Use "fid" as the key in the array.
Don't forget to remove the braces when being used in an if statement.