PDA

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


HMBeaty
11-22-2009, 09:56 PM
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
11-22-2009, 10:16 PM
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: https://vborg.vbsupport.ru/showthread.php?t=228078

HMBeaty
11-22-2009, 10:30 PM
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
11-22-2009, 10:42 PM
No worries, glad I could help. Now if only someone can help with my profile block issue. LOL