Why does this enable CAPTCHA?
#1
I have this function in a plugin of mine:

function support_display_guest_ad_inline(&$post){
		global $mybb, $postcounter, $templates;
		if ($mybb->user['uid'] = 0 || !$mybb->user['uid']) {
			if ($postcounter == 1) {
				eval("\$post['postbit_inline_ad'] = \"".$templates->get("vtfm_inline_ad")."\";");
			}
		} 
	}


Its hooked by the "postbit" hook. For some reason it makes the captcha appear when posting, and stops the display of the "edit" button and "pm" bttons on the second last (or second) post Confused Any ideas?
Reply
#2
This user has been denied support. This user has been denied support.
$mybb->user['uid'] = 0
Reply
#3
Oh lord. That's annoying Smile Thanks Frostschutz Smile
Reply
#4
things like that annoy me. I've been doing .NET all week for hours on end and then last night tried some PHP and it took a bit to get back into the syntax. lots of little things like that that stumped me for a while
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Reply
#5
I spent 30 minutes trying to debug something in javascript that was caused by using = instead of ==. I hate it when that happens.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#6
I am always stuck with errors which take me hours or sometimes days to figure out.

I understand the errors, but fixing them never works well for me.
PGP Key (Fingerprint: 23B6 F4C0 FE2D 45AA 61A0 1E86 DB87 09DC DD87 6E40)
Reply
#7
/offtopic Didn't Jammer and I ban talk on VTFM? Toungue
$templates->get("vtfm_inline_ad")
-Paul H.

Cogisne lingua latina?
Reply
#8
In /me thread Wink
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)