Beispiel #1
0
 public function page_builder_element_class()
 {
     global $page_meta_boxes;
     $page_meta_boxes['Page Item']['name']['Gallery'] = $this->gallery_array;
     $page_meta_boxes['Page Item']['name']['Gallery']['page']['options'] = function_library::get_title_list_array('gallery');
     //$page_meta_boxes['Gallery Slideshow']['options'] = function_library::get_title_list_array('gallery');
 }
Beispiel #2
0
 public function page_builder_element_class()
 {
     global $page_meta_boxes;
     $page_meta_boxes['Page Item']['name']['Slider'] = $this->slider_array;
     $page_meta_boxes['Page Item']['name']['Slider']['slider-slide']['options'] = function_library::get_title_list_array('cp_slider');
     $page_meta_boxes['Top Slider Images']['options'] = function_library::get_title_list_array('cp_slider');
     if (class_exists('LS_Sliders')) {
         $page_meta_boxes['Page Item']['name']['Slider']['slider-slide-layer']['options'] = function_library::layer_slider_id();
         $page_meta_boxes['Top Slider Layer']['options'] = function_library::layer_slider_id();
     }
 }
Beispiel #3
0
        public function add_event_option_element()
        {
            $event_detail_xml = '';
            $event_social = '';
            $sidebar_event = '';
            $right_sidebar_event = '';
            $left_sidebar_event = '';
            $event_start_date = '';
            $event_end_date = '';
            $event_start_time = '';
            $event_end_time = '';
            $additional_info = '';
            $entry_level = '';
            $booking_url = '';
            $event_thumbnail = '';
            $video_url_type = '';
            $select_slider_type = '';
            $event_location_select = '';
            $schedule_head = '';
            $schedule_descrip = '';
            $team_parti_head = '';
            $team_parti_descrip = '';
            $name_post_schedule = '';
            $title_post_schedule = '';
            $des_post_schedule = '';
            $sch_select_organizer = '';
            foreach ($_REQUEST as $keys => $values) {
                ${$keys} = $values;
            }
            global $post, $EM_Event;
            $event_detail_xml = get_post_meta($EM_Event->ID, 'event_detail_xml', true);
            if ($event_detail_xml != '') {
                $cp_event_xml = new DOMDocument();
                $cp_event_xml->loadXML($event_detail_xml);
                $event_social = find_xml_value($cp_event_xml->documentElement, 'event_social');
                $sidebar_event = find_xml_value($cp_event_xml->documentElement, 'sidebar_event');
                $left_sidebar_event = find_xml_value($cp_event_xml->documentElement, 'left_sidebar_event');
                $right_sidebar_event = find_xml_value($cp_event_xml->documentElement, 'right_sidebar_event');
                $event_thumbnail = find_xml_value($cp_event_xml->documentElement, 'event_thumbnail');
                $video_url_type = find_xml_value($cp_event_xml->documentElement, 'video_url_type');
                $select_slider_type = find_xml_value($cp_event_xml->documentElement, 'select_slider_type');
            }
            ?>
			<div class="event_options cp-wrapper" id="event_backend_options" >
				<!--<?php 
            if ($post->ID != '') {
                ?>
				<div class="short_code">
					<p class="shortcode_placeholder">[Event event_id="<?php 
                echo $post_id;
                ?>
" showImage="false" showTitle="false" showContent="false" first_event_in_row="false"]</p>
				</div>
				<?php 
            }
            ?>
-->
				<ul class="event_social_class recipe_class row-fluid">
					<li class="panel-input span12">
						<span class="panel-title">
							<h3 for="event_social" > <?php 
            _e('SOCIAL NETWORKING', 'crunchpress');
            ?>
 </h3>
						</span>
						<label for="event_social"><div class="checkbox-switch <?php 
            echo $event_social == 'enable' || $event_social == '' && empty($default) ? 'checkbox-switch-on' : 'checkbox-switch-off';
            ?>
"></div></label>
					<input type="checkbox" name="event_social" class="checkbox-switch" value="disable" checked>
					<input type="checkbox" name="event_social" id="event_social" class="checkbox-switch" value="enable" <?php 
            echo $event_social == 'enable' || $event_social == '' && empty($default) ? 'checked' : '';
            ?>
>
						<p><?php 
            _e('You can turn On/Off social sharing from event detail.', 'crunchpress');
            ?>
</p>
					</li>
				</ul>
				<div class="clear"></div>
				<?php 
            echo function_library::show_sidebar($sidebar_event, 'right_sidebar_event', 'left_sidebar_event', $right_sidebar_event, $left_sidebar_event);
            ?>
				<div class="clear"></div>
				<!--<div class="row-fluid">
					<ul class="recipe_class span4">
						<li class="panel-input">	
							<span class="panel-title">
								<h3 for="event_thumbnail"><?php 
            _e('Select Type', 'crunchpress');
            ?>
</h3>
							</span>
							<div class="combobox">
								<select name="event_thumbnail" id="event_thumbnail">
									<option class="Image" value="Image" <?php 
            if ($event_thumbnail == 'Image') {
                echo 'selected';
            }
            ?>
>Feature Image</option>
									<option class="Video" value="Video" <?php 
            if ($event_thumbnail == 'Video') {
                echo 'selected';
            }
            ?>
>Video</option>
									<option class="Slider" value="Slider" <?php 
            if ($event_thumbnail == 'Slider') {
                echo 'selected';
            }
            ?>
>Slider</option>
								</select>
							</div>
							<p><?php 
            _e('Please select your post type of content.', 'crunchpress');
            ?>
</p>
						</li>
					</ul>
					<ul class="video_class recipe_class span4">						
						<li class="panel-input">
							<span class="panel-title">
								<h3 for="video_url_type" > <?php 
            _e('Video URL', 'crunchpress');
            ?>
 </h3>
							</span>
							<input type="text" name="video_url_type" id="video_url_type" value="<?php 
            if ($video_url_type != '') {
                echo $video_url_type;
            }
            ?>
" />
							<p><?php 
            _e('Please paste Youtube or Vimeo url.', 'crunchpress');
            ?>
</p>
						</li>
					</ul>
					<ul class="select_slider_option recipe_class span4">					
						<li class="panel-input">	
							<span class="panel-title">
								<h3 for="event_thumbnail"><?php 
            _e('Select Images Slide', 'crunchpress');
            ?>
</h3>
							</span>
							<div class="combobox">
								<select name="select_slider_type" id="select_slider_type">
									<?php 
            foreach (function_library::get_title_list_array('cp_slider') as $values) {
                ?>
										<option value="<?php 
                echo $values->ID;
                ?>
" <?php 
                if ($select_slider_type == $values->ID) {
                    echo 'selected';
                }
                ?>
><?php 
                echo $values->post_title;
                ?>
</option>
									<?php 
            }
            ?>
								</select>
							</div>
							<p><?php 
            _e('Please select slide to show in post.', 'crunchpress');
            ?>
</p>
						</li>
					</ul>
				</div>-->
				<div class="clear"></div>
				<input type="hidden" name="event_submit" value="events"/>
				<div class="clear"></div>
			</div>	
			<div class="clear"></div>
			
		<?php 
        }
        public function add_sermons_option_element()
        {
            //Empty Variables
            $event_detail_xml = '';
            $event_social = '';
            $sidebar_event = '';
            $right_sidebar_event = '';
            $left_sidebar_event = '';
            $event_thumbnail = '';
            $video_url_type = '';
            $select_slider_type = '';
            $amazon_url_type = '';
            $itune_url_type = '';
            $soundcloud_url_type = '';
            //All Request Convert into Variable
            foreach ($_REQUEST as $keys => $values) {
                ${$keys} = $values;
            }
            global $post, $post_id;
            //Fetching Sermons Detail extra field values
            $sermons_detail_xml = get_post_meta($post->ID, 'sermons_detail_xml', true);
            if ($sermons_detail_xml != '') {
                $cp_sermons_xml = new DOMDocument();
                $cp_sermons_xml->loadXML($sermons_detail_xml);
                $event_social = find_xml_value($cp_sermons_xml->documentElement, 'event_social');
                $sidebar_event = find_xml_value($cp_sermons_xml->documentElement, 'sidebar_event');
                $left_sidebar_event = find_xml_value($cp_sermons_xml->documentElement, 'left_sidebar_event');
                $right_sidebar_event = find_xml_value($cp_sermons_xml->documentElement, 'right_sidebar_event');
                $video_url_type = find_xml_value($cp_sermons_xml->documentElement, 'video_url_type');
                $soundcloud_url_type = find_xml_value($cp_sermons_xml->documentElement, 'soundcloud_url_type');
            }
            ?>
			<div class="event_options bootstrap_admin " id="event_backend_options" >
                <div class="op-gap"><!--my start -->
					<ul class="event_social_class recipe_class row-fluid">
						<li class="panel-input span12">
							<div>
								<h3 for="event_social" > <?php 
            _e('SOCIAL NETWORKING', 'crunchpress');
            ?>
 </h3>
							</div>	
							<label for="event_social"><div class="checkbox-switch <?php 
            echo $event_social == 'enable' || $event_social == '' && empty($default) ? 'checkbox-switch-on' : 'checkbox-switch-off';
            ?>
"></div></label>
						<input type="checkbox" name="event_social" class="checkbox-switch" value="disable" checked>
						<input type="checkbox" name="event_social" id="event_social" class="checkbox-switch" value="enable" <?php 
            echo $event_social == 'enable' || $event_social == '' && empty($default) ? 'checked' : '';
            ?>
>
						<p><?php 
            _e('You can turn On/Off social sharing from event detail.', 'crunchpress');
            ?>
</p>
						</li>
					</ul>
					<div class="clear"></div>
					<?php 
            echo function_library::show_sidebar($sidebar_event, 'right_sidebar_event', 'left_sidebar_event', $right_sidebar_event, $left_sidebar_event);
            ?>
					<div class="clear"></div>
					<div class="row-fluid">
						<!--<ul class="recipe_class span4">
							<li class="panel-input">	
								<div class="panel-title">
									<h3 for="event_thumbnail"><?php 
            _e('Select Type', 'crunchpress');
            ?>
</h3>
								</div>
								<div class="combobox">
									<select name="event_thumbnail" id="event_thumbnail">
										<option class="Image" value="Image" <?php 
            if ($event_thumbnail == 'Image') {
                echo 'selected';
            }
            ?>
>Feature Image</option>
										<option class="Video" value="Video" <?php 
            if ($event_thumbnail == 'Video') {
                echo 'selected';
            }
            ?>
>Video</option>
										<option class="Slider" value="Slider" <?php 
            if ($event_thumbnail == 'Slider') {
                echo 'selected';
            }
            ?>
>Slider</option>
									</select>
								</div>
								<p><?php 
            _e('Please select your post type of content.', 'crunchpress');
            ?>
</p>
							</li>
						</ul>
						<ul class="video_class recipe_class span4">
							<li class="panel-input">
								<div class="panel-title">
									<label for="video_url_type" > <?php 
            _e('Video URL', 'crunchpress');
            ?>
 </label>
								</div>				
								<input type="text" name="video_url_type" id="video_url_type" value="<?php 
            if ($video_url_type != '') {
                echo $video_url_type;
            }
            ?>
" />
								<p><?php 
            _e('Please paste Youtube or Vimeo url.', 'crunchpress');
            ?>
</p>
							</li>
						</ul>
						<ul class="select_slider_option recipe_class span4">
							<li class="panel-input">	
								<div class="panel-title">
									<label for="event_thumbnail"><?php 
            _e('Select Images Slide', 'crunchpress');
            ?>
</label>
								</div>
								<div class="combobox">
									<select name="select_slider_type" id="select_slider_type">
										<?php 
            foreach (function_library::get_title_list_array('cp_slider') as $values) {
                ?>
											<option value="<?php 
                echo $values->ID;
                ?>
" <?php 
                if ($select_slider_type == $values->ID) {
                    echo 'selected';
                }
                ?>
><?php 
                echo $values->post_title;
                ?>
</option>
										<?php 
            }
            ?>
									</select>
								</div>
								<p><?php 
            _e('Please select slide to show in post.', 'crunchpress');
            ?>
</p>
							</li>
						</ul>-->
					</div>
                </div><!--my end -->
				
				<ul class="recipe_class top-bg">
					<li><h2><?php 
            _e('Sermon Video and SoundCloud URL', 'crunchpress');
            ?>
</h2></li>
				</ul>
                
                <div class="op-gap row-fluid"><!--my start -->                
					<ul class="recipe_class span6">
						<li class="panel-input">
							<div class="panel-title">
								<h3 for="video_url_type" > <?php 
            _e('Video', 'crunchpress');
            ?>
 </h3>
							</div>
							<input type="text" name="video_url_type" id="video_url_type" value="<?php 
            if ($video_url_type != '') {
                echo $video_url_type;
            }
            ?>
" />
							<p><?php 
            _e('Please paste video URL here.', 'crunchpress');
            ?>
</p>
						</li>
					</ul>
					<ul class="recipe_class span6">
						<li class="panel-input">
							<div class="panel-title">
								<h3 for="soundcloud_url_type" > <?php 
            _e('Sound Cloud', 'crunchpress');
            ?>
 </h3>
							</div>				
							<input type="text" name="soundcloud_url_type" id="soundcloud_url_type" value="<?php 
            if ($soundcloud_url_type != '') {
                echo $soundcloud_url_type;
            }
            ?>
" />
							<p><?php 
            _e('Please add sermons ID here For example https://api.soundcloud.com/tracks/142314548 add only numbers (142314548).', 'crunchpress');
            ?>
</p>
						</li>
					</ul>
				</div> 
				<ul class="recipe_class top-bg">
					<li><h2><?php 
            _e('Sermons', 'crunchpress');
            ?>
</h2></li>
				</ul>
                <div class="op-gap add-music">
                
					<!--my start -->
					<ul class="recipe_class row-fluid">
						<li class="panel-title time-start span3">
							<h4><i class="icon-music"></i> <?php 
            _e('Sermons Name', 'crunchpress');
            ?>
</h4>
							<input type="text" class="" id="add-track-name" value="Add Track Name" rel="Add Track Name">
						</li>

						<li class="panel-title border_left time_end span3 op-upload">
							<h4><i class="icon-link"></i> <?php 
            _e('Sermons URL', 'crunchpress');
            ?>
</h4>
							<!--<input type="text" class="" id="add-track-title" value="Add Track URL" rel="Add Track URL">-->
							<input name="add-track-title" id="upload_image_text" class="clearme upload_image_text" type="text" value="Add Track URL" />
							<input class="upload_image_button" type="button" value="Add Track" />
						</li>

						<li class="panel-title border_left desc_start span3">
							<h4><i class="icon-file-text"></i> <?php 
            _e('Lyrics', 'crunchpress');
            ?>
</h4>
							<textarea id="add-track-desc" value="Enter Description here" rel="Enter description here" col="5"><?php 
            _e('Add Lyrics Here', 'crunchpress');
            ?>
</textarea>
						</li>

						<li class="panel-title border_left desc_start span2">
							<h4><i class="icon-download"></i> <?php 
            _e('Download', 'crunchpress');
            ?>
</h4>
							<div class="combobox">
								<select id="album_download">
									<option><?php 
            _e('Yes', 'crunchpress');
            ?>
</option>
									<option selected><?php 
            _e('No', 'crunchpress');
            ?>
</option>
								</select>
							</div>
						</li>

						<li class="panel-title border_left delete_btn span1">
							<h4><i class="icon-minus"></i> / <i class="icon-plus"></i> <?php 
            _e('', 'crunchpress');
            ?>
</h4>
							<div id="add-more-tracks" class="add-track-element"></div>
						</li>
					</ul>	
                
                
                
					<div class="clear"></div>
					<ul id="selected-element" class="selected-element nut_table_inner">
						<li class="default-element-item" id="element-item">
							<ul class="career_salary_class recipe_class row-fluid">
								<li class="panel-title span3">
									<input class="element-track-name" type="text" id="add-track-name" value="Add Track Name" rel="Add Track Name">
									<!--<span class="ingre-item-text"></span>-->
								</li>	
								<li class="panel-title border_left span3">
									<input id="upload_image_text" class="element-track-title upload_image_text" type="text" value="Add Track URL" />
									<input class="upload_image_button" type="button" value="Add Track" />
									<!--<input class="element-track-title" type="text" id="add-track-title" value="Add Track URL" rel="Add Track URL">-->
									<!--<span class="ingre-item-text"></span>-->
								</li>								
								<li class="panel-title border_left span3">
									<textarea class="element-track-desc" id="add-track-desc" rel="Add Lyrics Here" col="5"></textarea>
									<!--<span class="ingre-item-text"></span>-->
								</li>
								<li class="panel-title  border_left span2">
									<div class="combobox">
										<select class="element-track-download" id="album_download">
											<option><?php 
            _e('Yes', 'crunchpress');
            ?>
</option>
											<option selected><?php 
            _e('No', 'crunchpress');
            ?>
</option>
										</select>
									</div>
								</li>
								<li class="panel-title border_left span1"><span class="panel-delete-element"></span></li>
							</ul>
						</li>
                        
					<?php 
            //Fetching All Tracks from Database
            $track_name_xml = get_post_meta($post->ID, 'track_name_xml', true);
            $track_url_xml = get_post_meta($post->ID, 'track_url_xml', true);
            $track_des_xml = get_post_meta($post->ID, 'track_des_xml', true);
            $track_down_xml = get_post_meta($post->ID, 'track_down_xml', true);
            //Empty Variables
            //$album_download = '';
            $children = '';
            $children_title = '';
            //Track Name
            if ($track_name_xml != '') {
                $ingre_xml = new DOMDocument();
                $ingre_xml->recover = TRUE;
                $ingre_xml->loadXML($track_name_xml);
                $children_name = $ingre_xml->documentElement->childNodes;
            }
            //Track URL
            if ($track_url_xml != '') {
                $ingre_title_xml = new DOMDocument();
                $ingre_title_xml->recover = TRUE;
                $ingre_title_xml->loadXML($track_url_xml);
                $children_title = $ingre_title_xml->documentElement->childNodes;
            }
            //Track Description
            if ($track_des_xml != '') {
                $ingre_des_xml = new DOMDocument();
                $ingre_des_xml->recover = TRUE;
                $ingre_des_xml->loadXML($track_des_xml);
                $children_des = $ingre_des_xml->documentElement->childNodes;
            }
            //Track Download Fetch
            if ($track_down_xml != '') {
                $ingre_down_xml = new DOMDocument();
                $ingre_down_xml->recover = TRUE;
                $ingre_down_xml->loadXML($track_down_xml);
                $children_down = $ingre_down_xml->documentElement->childNodes;
            }
            //Combine Loop
            if ($track_name_xml != '' || $track_url_xml != '') {
                $counter = 0;
                $nofields = $ingre_xml->documentElement->childNodes->length;
                for ($i = 0; $i < $nofields; $i++) {
                    $counter++;
                    ?>
								<li class="" style="display: block;">
									<ul class="career_salary_class recipe_class row-fluid">
										<li class="panel-title span3">
											<input class="" type="text" name="add-track-name[]" value="<?php 
                    echo $children_name->item($i)->nodeValue;
                    ?>
">
										</li>	
										<li class="panel-title border_left span3">
											<input id="upload_image_text" class="element-track-title upload_image_text" type="text" name="add-track-title[]" value="<?php 
                    echo $children_title->item($i)->nodeValue;
                    ?>
" />
											<input class="upload_image_button" type="button" value="Add Track" />
										</li>								
										<li class="panel-title border_left span3">
											<textarea class="element-item-desc" name="add-track-desc[]" col="5"><?php 
                    echo $children_des->item($i)->nodeValue;
                    ?>
</textarea>
										</li>
										<li class="panel-title border_left span2">
											<div class="combobox">
												<select name="album_download[]" id="album_download">
													<option <?php 
                    if ($children_down->item($i)->nodeValue == 'Yes') {
                        echo 'selected';
                    }
                    ?>
><?php 
                    _e('Yes', 'crunchpress');
                    ?>
</option>
													<option <?php 
                    if ($children_down->item($i)->nodeValue == 'No') {
                        echo 'selected';
                    }
                    ?>
><?php 
                    _e('No', 'crunchpress');
                    ?>
</option>
												</select>
											</div>
										</li>
										<li class="panel-title span1 border_left"><span class="panel-delete-element"></span></li>
									</ul>
								</li>
								<?php 
                }
            }
            ?>
					</ul>
				</div>
				<div class="clear"></div>
				<input type="hidden" name="sermons_submit" value="sermons"/>
				<div class="clear"></div>
			</div>	
			<div class="clear"></div>
			
		<?php 
        }