anubis2814, en

Hey guys, is there something special I need to know about using smarty? I'm back to plugging away on the quiz option, trying to make a dynamic radio button that is clickable and returns a value. I have a version using a js file, that works with an HTML document, but I'm having issues integrating it into tpl files with php variables.
html_radios is a smarty option we have that should create dynamic radio buttons. Problem is I can't make it work even though I'm using this smarty.net/docsv2/en/language.… Which is a copy of a md file we have.
I will put something like:

 {html_radios options=$options_title 
        separator='<br />'}

Into the content/question.tpl file
If I run it as normal, it just spits out code as a result in the poll.
If I run something like this in /model/item.php
$smarty->assign('option_title', $option.name)); It always gives me just a white screen.
I want to make sure there isn't some easy fix that I need to do to smarty to make it work right, it might well be I'm just doing it all wrong with my non-professional newb status. If there isn't I'll just keep pluging and chugging til i figure it out. Just wnt to make sure I'm not wasting my time where there is any easy fix

anubis2814,

Ok so I used the following $smarty = new Smarty();
Now it throws a white screen but nothing shows up in the error log.

anubis2814,

It appears that there is some method of defining smarty arrays
The exception it threw now is for $smarty array being undefined. Do i need to "use" a file to make it work?

heluecht,

@anubis2814 This white screen means that something is wrong. And in the logfiles you should see, what exactly failed.

anubis2814,

@heluecht I don't remember when I stopped last night but the only things I'm getting in my error log are undefined variables.

  • Todo
  • Suscrito
  • Moderado
  • Favoritos
  • random
  • developers@forum.friendi.ca
  • noticiascr
  • CostaRica
  • Todos las revistas