Exemple #1
0
 /**
  * Function used to generate Embed Code
  */
 function embed_code($vdetails, $type = 'embed_object')
 {
     //Checking for video details
     if (!is_array($vdetails)) {
         $vdetails = $this->get_video($vdetails);
     }
     $embed_code = false;
     $funcs = $this->embed_func_list;
     if (is_array($funcs)) {
         foreach ($funcs as $func) {
             if (@function_exists($func)) {
                 $embed_code = $func($vdetails);
             }
             if ($embed_code) {
                 break;
             }
         }
     }
     if ($type == 'iframe') {
         $embed_code = '<iframe width="' . config('embed_player_width') . '" height="' . config('embed_player_height') . '" ';
         $embed_code .= 'src="' . BASEURL . '/player/embed_player.php?vid=' . $vdetails['videoid'] . '&width=' . config('embed_player_width') . '&height=' . config('embed_player_height') . '&autoplay=' . config('autoplay_embed') . '" frameborder="0" allowfullscreen></iframe>';
     }
     if (!$embed_code) {
         //Default ClipBucket Embed Code
         if (function_exists('default_embed_code')) {
             $embed_code = default_embed_code($vdetails);
         } else {
             //return new Embed Code
             $vid_file = get_video_file($vdetails, false, false);
             if ($vid_file) {
                 $code = '';
                 $code .= '<object width="' . EMBED_VDO_WIDTH . '" height="' . EMBED_VDO_HEIGHT . '">';
                 $code .= '<param name="movie" value="' . PLAYER_URL . '/embed_player.php?vid=' . $vdetails['videoid'] . '"></param>';
                 $code .= '<param name="allowFullScreen" value="true"></param>';
                 $code .= '<param name="allowscriptaccess" value="always"></param>';
                 $code .= '<embed src="' . PLAYER_URL . '/embed_player.php?vid=' . $vdetails['videoid'] . '"';
                 $code .= 'type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="300" height="250"></embed>';
                 return $code .= '</object>';
             } else {
                 return embeded_code($vdetails);
             }
         }
     }
     return $embed_code;
 }
Exemple #2
0
 /**
  * Generates embed code properties
  * 
  * @param ARRAY vdetails
  * @return ARRAY emebd_code_detailss
  */
 function embed_code_props($vdetails, $type = 'embed_object')
 {
     //Checking for video details
     if (!is_array($vdetails)) {
         $vdetails = $this->get_video($vdetails);
     }
     $embed_code = false;
     $funcs = $this->embed_func_list;
     if (is_array($funcs)) {
         foreach ($funcs as $func) {
             if (@function_exists($func)) {
                 $embed_code = $func($vdetails);
             }
             if ($embed_code) {
                 break;
             }
         }
     }
     if ($type == 'iframe') {
         //Setting up an array in case we dont want an echo
         //we can give array-output to re-use code even with jS
         $code_props = array();
         $code_props['type'] = 'iframe';
         $code_props['configs']['width'] = config('embed_player_width');
         $code_props['configs']['height'] = config('embed_player_height');
         $code_props['src']['url'] = BASEURL . '/player/embed_player.php';
         $code_props['src']['params'] = array('vid' => $vdetails['videoid'], 'height' => config('embed_player_height'), 'width' => config('embed_player_width'), 'autoplay' => config('autoplay_embed'));
         $code_props['params'] = array('height' => config('embed_player_height'), 'width' => config('embed_player_width'), 'frameborder' => 0, 'allowfullscreen' => true);
         return $code_props;
     }
     //Default ClipBucket Embed Code
     if (function_exists('default_embed_code')) {
         $code_props = default_embed_code($vdetails);
     } else {
         //return new Embed Code
         $embed_code = $vdetails['embed_code'];
         if (!$embed_code || $embed_code == 'none') {
             $code_props = array();
             $code_props['type'] = 'embed_object';
             $code_props['src']['url'] = PLAYER_URL . '/embed_player.php';
             $code_props['src']['params'] = array('vid' => $vdetails['videoid']);
             $code_props['params'] = array('width' => EMBED_VDO_WIDTH, 'height' => EMBED_VDO_HEIGHT, 'allowfullscreen' => true, 'allowscriptaccess' => 'always');
         } else {
             $code_props['type'] = 'embeded';
             $code_props['src'] = embeded_code($vdetails);
         }
     }
     return $code_props;
 }
Exemple #3
0
function cf_setting_page()
{
    $url = plugins_url();
    ?>
<div id="fg_of_container" class="fg_wrap">
        <form id="fg_ofform" action="" method="POST">
            <div id="fg_header">
                <div class="fg_logo">
                    <h2> FormGet Contact Form</h2>
                </div>
                <a target="#">
                    <div class="fg_icon-option"> </div>
                </a>
                <div class="clear"></div>
            </div>
            <div id="fg_main">

                <div id="fg_of-nav">
                    <ul>

                        <li> <a class="pn-view-a" href="#pn_content" title="Form Builder">Contact Form Builder </a></li>
                        <li> <a class="pn-view-a" href="#pn_displaysetting" title="Embed Code">Embed Code</a></li>
                        <li> <a class="pn-view-a" href="#pn_template" title="Help">Help</a></li>	
						<li> <a class="pn-view-a" href="#pn_contactus" title="Help">Plugin Support</a></li>

                    </ul>

                </div>
                <div id="fg_content">
                    <div class="fg_group" id="pn_content">
                        <h2>Contact Form Builder</h2>

                        <div class="fg_section section-text">
                            <h3 class="fg_heading"> Create your custom form by just clicking the fields on left side of the panel.</h3>

                            <iframe src="http://www.formget.com/app" name="iframe" id="iframebox" style="width:100%; height:750px; border:1px solid #dfdfdf; align:center;">
                            </iframe>
                        </div>

                    </div>	

                    <div class="fg_group" id="pn_displaysetting">
                        <h2>Embed Code</h2>

                        <div class="fg_section section-text">
                            <h3 class="fg_heading">Embed code field will only accept code for tabbed widgets. Please do not place shortcode here. </h3>
                            <div class="option">
                                <div class="fg_controls">
                                    <textarea name="content[html]" cols="60" rows="10"   class="regular-text"  id="fg_content_html" style="width:900px"><?php 
    echo embeded_code();
    ?>
</textarea>
                                    
									<input id="submit-form" class="fg_embed_code_save button-primary" type="button" value="Save Changes" name="submit_form" style="display:none;">			
									 <div id="loader_img" align="center" style="margin-left:460px; display:none;">
                                        <img src="<?php 
    echo plugins_url('image/ajax-loader.gif', __FILE__);
    ?>
">
                                    </div>

                                </div>
								
								</div>
                        </div>

                    </div>
                    <div class="fg_group" id="pn_template">
                        <h2>Steps to use FormGet Contact Form Plugin</h2>

                        <div class="fg_section section-text">
                            <h3></h3>
                            <div id="help_txt" style="width:900px;">
                                <ol class="step_ol">

                                    <li class="step_li">Click on the fields and create your contact form</br></br></br>
                                   <div id="step_img" style="width:963px; border: 1px solid #dfdfdf;"><img src="<?php 
    echo plugins_url('image/Sign_Up_and_Create_Your_Form.png', __FILE__);
    ?>
"></div></li></br></br></br>

                                    <li class="step_li">To rename the form in your own text, click on the tab field. You can make fields required if you want, just check mark the box. At last save your changes.</br></br></br>
                                        <div id="step_img" style="width:963px; border: 1px solid #dfdfdf;"><img src="<?php 
    echo plugins_url('image/Rename the Contact Form.png', __FILE__);
    ?>
"></div></li></br></br></br>
										
								  <li class="step_li">If you are already a registed member on FormGet then log in with your credentials to view your form or sign up yourself</br></br></br>
								  <div id="step_img" style="width:963px; border: 1px solid #dfdfdf;"><img src="<?php 
    echo plugins_url('image/Sign_Up.png', __FILE__);
    ?>
"></div></li></br></br></br>
								   <li class="step_li">Now you can embed your Contact Form on your website.</br></br></br>
								  <div id="step_img" style="width:963px; border: 1px solid #dfdfdf;"><img src="<?php 
    echo plugins_url('image/Message.png', __FILE__);
    ?>
"></div></li></br></br></br>
                                    <li class="step_li">To embed the form on your website click on Embed option.</br></br></br>
                                        <div id="step_img" style="width:963px; border: 1px solid #dfdfdf;"><img src="<?php 
    echo plugins_url('image/Embed the form.png', __FILE__);
    ?>
"></div></li></br></br></br>
                                    <li class="step_li">Copy the code for tabbed widget.</br></br></br>
                                        <div id="step_img" style="width:963px; border: 1px solid #dfdfdf;"><img src="<?php 
    echo plugins_url('image/Copy the code.png', __FILE__);
    ?>
"></div></li></br></br></br>
                                    <li class="step_li">Paste the copied embed code in the Embed Code section. At last save your changes.</li></br></br>
									<p><b>NOTE:- Only tabbed widget code can be placed in Embed Code field. 
</b></p></br>
                                    <div id="step_img" style="width:963px; border: 1px solid #dfdfdf;"><img src="<?php 
    echo plugins_url('image/Paste the code.png', __FILE__);
    ?>
"></div></li></br></br></br>
                                    <li class="step_li">This is how the tabbed widget will look on your website.</li></br></br>
                                    <div id="step_img" style="width:963px; border: 1px solid #dfdfdf;"><img src="<?php 
    echo plugins_url('image/Tabbed_Widget_On_Website.png', __FILE__);
    ?>
"></div></li></br></br></br>
                     
					                                 
                                    <li class="step_li">To display your Contact Form individually on pages, post, widgets and sidebar, just copy the code from the WordPress shortcode field.</li></br></br>
									                                  <div id="step_img" style="width:963px; border: 1px solid #dfdfdf;"><img src="<?php 
    echo plugins_url('image/Copy_the_code.png', __FILE__);
    ?>
"></div></li></br></br></br>
                                    <li class="step_li">Paste the copied code either of the above options. Like I just paste it in a page.</li></br></br>
									<p><b>NOTE:- Remember shortcodes are made to show your contact form on individual pages/posts/siderbar/footer. Do not put your code in Embed Code field. It will not work.
</b></p></br>
									<div id="step_img" style="width:963px; border: 1px solid #dfdfdf;"><img src="<?php 
    echo plugins_url('image/Shortcode For Page.png', __FILE__);
    ?>
"></div></li></br></br></br>
									<li class="step_li">This is how your Contact Form will appear on website's page through shortcode.</li></br></br>
									<div id="step_img" style="width:963px; border: 1px solid #dfdfdf;"><img src="<?php 
    echo plugins_url('image/Contact Form through shortcode.jpg', __FILE__);
    ?>
"></div></li></br></br></br>
									<li class="step_li">If you have any issues or need any help you can just click on Plugin Support section and submit your query.</li></br></br>
									                                  
                              
								<div id="step_img" style="width:963px; border: 1px solid #dfdfdf;"><img src="<?php 
    echo plugins_url('image/Plugin_Support.png', __FILE__);
    ?>
"></div></li></br></br></br>
                              <div style="font-size:15px;"> <b> Thanks,</br></br>
                                FormGet Team</i></b></div>
                            </div>
                        </div>

                    </div>
					 <div class="fg_group" id="pn_contactus">
                      <iframe height='570' allowTransparency='true' frameborder='0' scrolling='no' style='width:100%;border:none'  src='http://www.formget.com/app/embed/form/qQvs-639'>Your Contact </iframe>
                      
                    </div>	

                </div>
                <div class="clear"></div>
            </div>

            <div class="fg_save_bar_top">

                

            </div>

        </form>
    </div>


    <?php 
}