Ok - I am close to wrapping this one up - thanks to all who have chimed in to help!
I have the form updating the table - just can not get the file to play now that the variable is inplace. If you hard code the sound file - no problems.
First, I created two new fields via the gforum admin panel
play_email_greet (integer - yes or no option for people to decide if they want an audible greeting)
email_greet (integer option number -- I renamed the files 1.wav, 2.wav, 3.wav ...)
Here is the problem - should be simple to solve...
in category_list.html - I have my if/then set up to play the sound.
<%GForum::Config::tpl_get(play_email_greet, email_greet)%>
<%if play_email_greet%>
<%if current_user_new_messages%>
<embed src="http://www.investingdd.com/sounds/<%email_greet%>.wav" autostart=true hidden=true loop=false>
<%endif%>
<%endif%>
However - nothing happens - when one views the source code in the browser:
1) I actually mispoke earlier when I agreed with paul that it needs $ here -
<%GForum::Config::tpl_get($play_email_greet, $email_greet)%>
This actually does not cause a page error, but one receives this in the page source:
<embed src="http://www.investingdd.com/sounds/Unknown Tag: 'email_greet'.wav" autostart=true hidden=true loop=false>
2) same error results if you remove the <%GForum::Config::tpl_get(play_email_greet, email_greet)%>
line.
3) if you simply have <%GForum::Config::tpl_get(play_email_greet, email_greet)%> line - here is the new code that is generated:
<embed src="http://www.investingdd.com/sounds/.wav" autostart=true hidden=true loop=false>
almost as if it is returning a null value... I checked the table again and there are non-null values in there....
Any tips on returning the correct number?
I have the form updating the table - just can not get the file to play now that the variable is inplace. If you hard code the sound file - no problems.
First, I created two new fields via the gforum admin panel
play_email_greet (integer - yes or no option for people to decide if they want an audible greeting)
email_greet (integer option number -- I renamed the files 1.wav, 2.wav, 3.wav ...)
Here is the problem - should be simple to solve...
in category_list.html - I have my if/then set up to play the sound.
<%GForum::Config::tpl_get(play_email_greet, email_greet)%>
<%if play_email_greet%>
<%if current_user_new_messages%>
<embed src="http://www.investingdd.com/sounds/<%email_greet%>.wav" autostart=true hidden=true loop=false>
<%endif%>
<%endif%>
However - nothing happens - when one views the source code in the browser:
1) I actually mispoke earlier when I agreed with paul that it needs $ here -
<%GForum::Config::tpl_get($play_email_greet, $email_greet)%>
This actually does not cause a page error, but one receives this in the page source:
<embed src="http://www.investingdd.com/sounds/Unknown Tag: 'email_greet'.wav" autostart=true hidden=true loop=false>
2) same error results if you remove the <%GForum::Config::tpl_get(play_email_greet, email_greet)%>
line.
3) if you simply have <%GForum::Config::tpl_get(play_email_greet, email_greet)%> line - here is the new code that is generated:
<embed src="http://www.investingdd.com/sounds/.wav" autostart=true hidden=true loop=false>
almost as if it is returning a null value... I checked the table again and there are non-null values in there....
Any tips on returning the correct number?