PDA

View Full Version : My php code doesn't work anymore?


HMBeaty
22 Nov 2009, 23:56
Ok, not sure if this is a php code problem or the actual conditional since the template coding pretty much completely changed and is still changing. Anyway, below, you'll see my php file and template attached. The problem area I'm stuck at is...
<vb:if condition="$imp_vars['do'] == 'main'">
since once that is added, the form goes completely blank. (Not a white page, since the header and footer and everything is still there, but all my code between the conditionals disappears).

Mythotical
23 Nov 2009, 00:16
Anytime you use a var, it MUST be registered first.

$templater->register('imp_var', $imp_var);

You'll need to put 'do' into an array so it gets registered as well before you can use it. You register vars when you register the template, so if you want it in your main template then you have to register the var with your main template register.

Good read: http://www.vbulletin.org/forum/showthread.php?t=228078

HMBeaty
23 Nov 2009, 00:30
Ok, got it working (I think, haha). I'll figure out if that fixed it when I edit all the css in there. Thank you Steve M :)

Mythotical
23 Nov 2009, 00:42
No worries, glad I could help. Now if only someone can help with my profile block issue. LOL