For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
I have a site, on which I have several videos . Now, I would like to have a combo box where the user can select which video he\she wishes.
What would you suggest to be the best method to implement this with CMSMS? I know PHP, Perl, and am actually quite fluent in several other system programming languages. (eg. C, assembly, etc.) I'm willing to do some work, but I don't really have time to delve into the inner workings of CMSMS and write a plugin. (I've looked into this already. Oh, yeah, I should mention that this does not need to configurable through the CMSMS interface.)
well, it's going to depend on what happens when the user selects a video.... and is there a submit button?
If you can do it in javascript with a hard coded list..... then that can be coded directly in the page content, or in the template (or even in a global content block).
If you need to read a directory, and stuff to populate the list, then you'll probably want to do a UDT that just spits out the HTML of a form, possibly with some javascript/ajax stuff in there too, and that possibly also handles the results of the POST.
UDT's are (usually small) snippets of php code (without the ) that can be called in your page template or page content with just {udt_name}.
If your code is going to be slightly bigger than a hundred or so lines of code, but only used once, on one page, then you can enable the appropriate option on the config.php and just use {php}echo 'blah blah blah';{/php} directly in the page content block (disable the wysiwyg for this). You'll see the option when you look at the config.php file, I can't remember the name right now, but it's pretty obvious.
If you want to re-use your code on a different site, then I'd suggest writing a smarty plugin and placing it in the plugins directory.
If it has databases, and you may want an admin interface now, or at some future date, (you said it didn't).... then you'll need a module.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
-------------------- If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Thanks greatly for help! I ended up using a combination of Javascript and PHP.
One more question, however: When I use {php} and then save the file, the contents in {php} are skewed. (ie. "'s changed, "->' changed, etc.) How can I fix this?