Display YouTube thumbs in my admin
2 posts by 2 authors in: Forums > CMS Builder
Last Post: October 22, 2010 (RSS)
Hello,
I wonder how to call / print a variable in a field in CMS Builder admin.
Here is what i want to acheive.
I made a simple editor to record Youtube videos.
I know how to display the video thumbs automaticaly on my website, what i want to do is to display the thumbs also in my admin
Exemple if my video code is "l1xpDLNXhzY" it is simple to call the thumb this way http://i1.ytimg.com/vi/l1xpDLNXhzY/default.jpg.
So my idea is to have a "textfield" call "thumb", wich will be autofill as this <iframe src="http://i1.ytimg.com/vi/l1xpDLNXhzY/default.jpg" width="120" height="90" frameborder="0"></iframe>
I've tryed to set my textfield default value calling my variable as this
<?php echo $record['youtube_code'] ?>
Here is what i get in the field : Notice: Undefined variable: record in /var/www/vhosts/......../lib/common.php(432) : eval()'d code on line 1
Could some body help me please?
I wonder how to call / print a variable in a field in CMS Builder admin.
Here is what i want to acheive.
I made a simple editor to record Youtube videos.
I know how to display the video thumbs automaticaly on my website, what i want to do is to display the thumbs also in my admin
Exemple if my video code is "l1xpDLNXhzY" it is simple to call the thumb this way http://i1.ytimg.com/vi/l1xpDLNXhzY/default.jpg.
So my idea is to have a "textfield" call "thumb", wich will be autofill as this <iframe src="http://i1.ytimg.com/vi/l1xpDLNXhzY/default.jpg" width="120" height="90" frameborder="0"></iframe>
I've tryed to set my textfield default value calling my variable as this
<?php echo $record['youtube_code'] ?>
Here is what i get in the field : Notice: Undefined variable: record in /var/www/vhosts/......../lib/common.php(432) : eval()'d code on line 1
Could some body help me please?
Re: [willbegood] Display YouTube thumbs in my admin
By Jason - October 22, 2010
Hi,
If you're using v2.06 of CMS Builder, you would need to use the variable $RECORD. However, the problem is that the default value will only appear when creating a new record and when your creating a new record, there will be no values stored in $RECORD. The best solution would be to create a plugin that would populate a field for you when the record is saved.
If you'd like us to do that for you, please email consulting@interactivetools.com
Hope this helps.
If you're using v2.06 of CMS Builder, you would need to use the variable $RECORD. However, the problem is that the default value will only appear when creating a new record and when your creating a new record, there will be no values stored in $RECORD. The best solution would be to create a plugin that would populate a field for you when the record is saved.
If you'd like us to do that for you, please email consulting@interactivetools.com
Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/