Beispiel #1
0
    public function generate_content()
    {
        // style
        $text_font_color = $this->block->data('text_font_color');
        $text_font_weight = $this->block->data('text_font_weight');
        $text_font_size = $this->block->data('text_font_size');
        $animation_type = $this->block->data('animation_type');
        $animation_duration = $this->block->data('animation_duration');
        $animation_event = $this->block->data('animation_event');
        $animation_delay = $this->block->data('animation_delay');
        $settings[0][0] = 'titleb' . $this->block->get_id();
        $settings[0][1] = $animation_event;
        $settings[0][2] = $animation_duration . ' ' . $animation_delay . ' ' . $animation_type;
        add_action("be_foot", generate_animation_events($settings));
        $text_style = 'style="
                    color: ' . $text_font_color . ' !important;
                    font-weight: ' . $text_font_weight . ' !important;
                    font-size: ' . $text_font_size . ' !important;
                "';
        $output = '
				<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
                <h3 id="titleb' . $this->block->get_id() . '" ' . $text_style . '>This is a title</h3>
            ';
        return $output;
    }
Beispiel #2
0
    public function generate_content()
    {
        $button_style = $this->block->data('color');
        $button_text = $this->block->data('text');
        $button_animation_type = $this->block->data('button_animation_type');
        $button_animation_duration = $this->block->data('button_animation_duration');
        $button_animation_event = $this->block->data('button_animation_event');
        $button_animation_delay = $this->block->data('button_animation_delay');
        $settings[0][0] = 'button' . $this->block->get_id();
        $settings[0][1] = $button_animation_event;
        $settings[0][2] = $button_animation_duration . ' ' . $button_animation_delay . ' ' . $button_animation_type;
        add_action("be_foot", generate_animation_events($settings));
        if ($button_text == '') {
            $button_text = 'Button';
        }
        if ($button_style == '') {
            $button_style = 'primary';
        }
        $output = '
                <link href="' . base_url('blocks/button/style.css') . '" rel="stylesheet">
				<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
				<button id="button' . $this->block->get_id() . '" type="button" class="btn btn-' . $button_style . '">' . $button_text . '</button>
            ';
        return $output;
    }
Beispiel #3
0
    public function generate_content()
    {
        $image_url = $this->block->data('image_url');
        $image_width = $this->block->data('image_width');
        $image_float = $this->block->data('image_float');
        $image_animation_state = $this->block->data('image_animation_state');
        $image_animation_type = $this->block->data('image_animation_type');
        $image_animation_duration = $this->block->data('image_animation_duration');
        $image_animation_event = $this->block->data('image_animation_event');
        $image_animation_delay = $this->block->data('image_animation_delay');
        $settings[0][0] = 'image' . $this->block->get_id();
        $settings[0][1] = $image_animation_event;
        $settings[0][2] = $image_animation_duration . ' ' . $image_animation_delay . ' ' . $image_animation_type;
        add_action("be_foot", generate_animation_events($settings));
        if ($image_width == '') {
            $image_width = '100%';
        }
        if ($image_url == '') {
            $image_url = '/blocks/image/images/placeholder.jpg';
        }
        if ($image_float == 'left') {
            $image_float = 'float:left !important;';
        } elseif ($image_float == 'right') {
            $image_float = 'float:right !important;';
        } else {
            $image_float = 'text-align:center !important;';
        }
        $output = '
                <link href="' . base_url('blocks/image/style.css') . '" rel="stylesheet">
				<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
				<a href="#" class="thumbnail" style="' . $image_float . ' pointer-events:none;width: ' . $image_width . ';background-color: transparent;">
                    <img id="image' . $this->block->get_id() . '" src="' . $image_url . '" style="height: auto; width: 100%;">
                </a>
            ';
        return $output;
    }
Beispiel #4
0
    public function generate_content()
    {
        $titles = $this->block->data('titles');
        $texts = $this->block->data('texts');
        if (!is_array($titles) || empty($titles)) {
            $titles[0] = "Title of the first accordion";
            $texts[0] = "This is a sample text for the first collapsible group.";
            $titles[1] = "Title of the 2nd accordion";
            $texts[1] = "This is a sample text for the 2nd collapsible group.";
            $titles[2] = "Title of the 3rd accordion";
            $texts[2] = "This is a sample text for the 3rd collapsible group.";
            $titles[3] = "Title of the 4th accordion";
            $texts[3] = "This is a sample text for the 4th collapsible group.";
        }
        //style
        $title_font_color = $this->block->data('title_font_color');
        $title_font_weight = $this->block->data('title_font_weight');
        $title_font_size = $this->block->data('title_font_size');
        $title_animation_type = $this->block->data('title_animation_type');
        $title_animation_duration = $this->block->data('title_animation_duration');
        $title_animation_event = $this->block->data('title_animation_event');
        $title_animation_delay = $this->block->data('title_animation_delay');
        $text_font_color = $this->block->data('text_font_color');
        $text_font_weight = $this->block->data('text_font_weight');
        $text_font_size = $this->block->data('text_font_size');
        $text_animation_type = $this->block->data('text_animation_type');
        $text_animation_duration = $this->block->data('text_animation_duration');
        $text_animation_event = $this->block->data('text_animation_event');
        $text_animation_delay = $this->block->data('text_animation_delay');
        $title_background = $this->block->data('title_background');
        $text_background = $this->block->data('text_background');
        $section_border_color = $this->block->data('section_border_color');
        $num_slides = count($titles);
        $settings = array();
        for ($i = 0; $i < $num_slides; $i++) {
            $title_settings[0] = 'title' . $this->block->get_id() . $i;
            $title_settings[1] = $this->block->data('title_animation_event');
            $title_settings[2] = $this->block->data('title_animation_state') . ' ' . $this->block->data('title_animation_delay') . ' ' . $this->block->data('title_animation_type');
            array_push($settings, $title_settings);
            $text_settings[0] = 'text' . $this->block->get_id() . $i;
            $text_settings[1] = $this->block->data('text_animation_event');
            $text_settings[2] = $this->block->data('text_animation_state') . ' ' . $this->block->data('text_animation_delay') . ' ' . $this->block->data('text_animation_type');
            array_push($settings, $text_settings);
        }
        add_action("be_foot", generate_animation_events($settings));
        $title_style = 'style="
                    color: ' . $title_font_color . ' !important;
                    font-weight: ' . $title_font_weight . ' !important;
                    font-size: ' . $title_font_size . ' !important;
                "';
        $text_style = 'style="
                    color: ' . $text_font_color . ' !important;
                    font-weight: ' . $text_font_weight . ' !important;
                    font-size: ' . $text_font_size . ' !important;
                    background-color: ' . $text_background . ' !important;
                    border-color: ' . $section_border_color . ' !important;
                "';
        $section_style = 'style="
                    border-color: ' . $section_border_color . ' !important;
                "';
        $heading_style = 'style="
                    background-color: ' . $title_background . ' !important;
                "';
        $output = '
		  <link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
          <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">';
        for ($i = 0; $i < $num_slides; $i++) {
            $output .= '
                <div class="panel panel-default" ' . $section_style . '>
                    <div class="panel-heading" role="tab" id="headingOne" ' . $heading_style . '>
                        <h4 class="panel-title" id="title' . $this->block->get_id() . '' . $i . '">
                            <i class="fa fa-info" style="margin-right: 5px; color: #96979d;"> </i> <a data-toggle="collapse" data-parent="#accordion" href="#collapse-' . $i . '" aria-expanded="false" aria-controls="collapseOne" ' . $title_style . '>
                                ' . $titles[$i] . '
                            </a>
                        </h4>
                    </div>
                    <div id="collapse-' . $i . '" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
                        <div class="panel-body" ' . $text_style . '>
                            <p class="" id="text' . $this->block->get_id() . '' . $i . '" >' . $texts[$i] . '</p>
                        </div>
                    </div>
                </div>
              ';
        }
        $output .= '
          </div>
        ';
        return $output;
    }
    public function generate_content()
    {
        $texts = $this->block->data('texts');
        if (!is_array($texts) || empty($texts)) {
            $texts[0] = "Lorem ipsum dolor sit amet.";
            $texts[1] = "Consectetur adipiscing elit.";
            $texts[2] = "Integer molestie lorem at massa.";
            $texts[3] = "Facilisis in pretium nisl aliquet.";
        }
        $text_font_color = $this->block->data('text_font_color');
        $text_font_weight = $this->block->data('text_font_weight');
        $text_font_size = $this->block->data('text_font_size');
        $animation_type = $this->block->data('animation_type');
        $animation_duration = $this->block->data('animation_duration');
        $animation_event = $this->block->data('animation_event');
        $animation_delay = $this->block->data('animation_delay');
        $num_slides = count($texts);
        $settings[0][0] = 'unordered' . $this->block->get_id();
        $settings[0][1] = $animation_event;
        $settings[0][2] = $animation_duration . ' ' . $animation_delay . ' ' . $animation_type;
        add_action("be_foot", generate_animation_events($settings));
        $text_style = 'style="
                    color: ' . $text_font_color . ' !important;
                    font-weight: ' . $text_font_weight . ' !important;
                    font-size: ' . $text_font_size . ' !important;
                "';
        $output = '
			<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
                <ul id="unordered' . $this->block->get_id() . '">';
        for ($i = 0; $i < $num_slides; $i++) {
            $output .= '<li ' . $text_style . '>' . $texts[$i] . '</li>';
        }
        $output .= '
                </ul>
            ';
        return $output;
    }
Beispiel #6
0
    public function generate_content()
    {
        // Style
        $first_row_font_color = $this->block->data('first_row_font_color');
        $first_row_font_weight = $this->block->data('first_row_font_weight');
        $first_row_font_size = $this->block->data('first_row_font_size');
        $first_row_background = $this->block->data('first_row_background');
        $first_col_font_color = $this->block->data('first_col_font_color');
        $first_col_font_weight = $this->block->data('first_col_font_weight');
        $first_col_font_size = $this->block->data('first_col_font_size');
        $first_col_background = $this->block->data('first_col_background');
        $contents_font_color = $this->block->data('contents_font_color');
        $contents_font_weight = $this->block->data('contents_font_weight');
        $contents_font_size = $this->block->data('contents_font_size');
        $contents_background = $this->block->data('contents_background');
        $animation_type = $this->block->data('animation_type');
        $animation_duration = $this->block->data('animation_duration');
        $animation_event = $this->block->data('animation_event');
        $animation_delay = $this->block->data('animation_delay');
        $settings[0][0] = 'table' . $this->block->get_id();
        $settings[0][1] = $animation_event;
        $settings[0][2] = $animation_duration . ' ' . $animation_delay . ' ' . $animation_type;
        add_action("be_foot", generate_animation_events($settings));
        $first_row_style = 'style="
                    color: ' . $first_row_font_color . ' !important;
                    font-weight: ' . $first_row_font_weight . ' !important;
                    font-size: ' . $first_row_font_size . ' !important;
                    background-color: ' . $first_row_background . ' !important;
                "';
        $first_col_style = 'style="
                    color: ' . $first_col_font_color . ' !important;
                    font-weight: ' . $first_col_font_weight . ' !important;
                    font-size: ' . $first_col_font_size . ' !important;
                    background-color: ' . $first_col_background . ' !important;
                "';
        $contents_style = 'style="
                    color: ' . $contents_font_color . ' !important;
                    font-weight: ' . $contents_font_weight . ' !important;
                    font-size: ' . $contents_font_size . ' !important;
                    background-color: ' . $contents_background . ' !important;
                "';
        $output = '
			<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
                <table id="table' . $this->block->get_id() . '" class="table">
                    <thead>
                        <tr>
                            <th ' . $first_row_style . '>#</th>
                            <th ' . $first_row_style . '>First Name</th>
                            <th ' . $first_row_style . '>Last Name</th>
                            <th ' . $first_row_style . '>Username</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <th ' . $first_col_style . ' scope="row">1</th>
                            <td ' . $contents_style . '>Mark</td>
                            <td ' . $contents_style . '>Otto</td>
                            <td ' . $contents_style . '>@WebsiteBuilder</td>
                        </tr>
                        <tr>
                            <th ' . $first_col_style . ' scope="row">2</th>
                            <td ' . $contents_style . '>Jacob</td>
                            <td ' . $contents_style . '>Thornton</td>
                            <td ' . $contents_style . '>@BuilderEngine</td>
                        </tr>
                        <tr>
                            <th ' . $first_col_style . ' scope="row">3</th>
                            <td ' . $contents_style . '>Larry</td>
                            <td ' . $contents_style . '>the Bird</td>
                            <td ' . $contents_style . '>@Twitter</td>
                        </tr>
                    </tbody>
                </table>
            ';
        return $output;
    }
Beispiel #7
0
    public function generate_content()
    {
        $post_id = $this->block->data('post');
        $sections_font_color = $this->block->data('sections_font_color');
        $sections_background_color = $this->block->data('sections_background_color');
        $sections_animation_type = $this->block->data('sections_animation_type');
        $sections_animation_duration = $this->block->data('sections_animation_duration');
        $sections_animation_event = $this->block->data('sections_animation_event');
        $sections_animation_delay = $this->block->data('sections_animation_delay');
        $settings[0][0] = 'blog';
        $settings[0][1] = $sections_animation_event;
        $settings[0][2] = $sections_animation_duration . ' ' . $sections_animation_delay . ' ' . $sections_animation_type;
        add_action("be_foot", generate_animation_events($settings));
        $section_style = 'style="
                    background-color: ' . $sections_background_color . ' !important;
                "';
        $section_link_style = 'style="
                    color: ' . $sections_font_color . ' !important;
                "';
        $CI =& get_instance();
        $CI->load->library('session');
        $CI->load->library('form_validation');
        $BuilderEngine = new BuilderEngine();
        $user = new User();
        $users = new Users();
        $CI->load->model('post');
        $post = $CI->post;
        $post = $post->where('id', $post_id)->get();
        $CI->load->model('comment');
        $comments = $CI->comment;
        $comments = $comments->where('post_id', $post->id)->get();
        $pub_user = $user->get_by_id($post->user_id);
        $output = '
                <link href="' . base_url('blocks/blog_posts/style.css') . '" rel="stylesheet">
				<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
				<div ' . $section_style . ' class="left" id="blog">
				<li class="masonry-item">
                    <header class="blog-post">
                       <a href="' . base_url('blog/post') . '/' . $post->slug . '"> <h1 ' . $section_link_style . '>Blog: ' . $post->title . '</h1></a>
                        <small class="space18">';
        $post_comments = array();
        foreach ($comments as $comment) {
            array_push($post_comments, $comment->id);
        }
        $count = count($post_comments);
        $pluralizer = $count == 1 ? 'Comment' : 'Comments';
        $output .= '
                            <a href="' . base_url('blog/post') . '/' . $post->slug . '" class="scrollTo label label-default light"> <i class="fa fa-comment-o"></i> ' . $count . ' ' . $pluralizer . '</a>
                            <span class="label label-default light">' . date('d.M.Y', $post->time_created) . '</span> 
                            <span class="label label-default pull-right"><span><i>Post by:</i></span> <span class="light" ><a href="#">' . $pub_user->username . '</a></span></span>
                        </small>
                    </header>';
        if (!empty($post->image)) {
            $output .= '
                            <div class="item" style="padding-bottom:0px">
                                <a href="' . base_url('blog/post') . '/' . $post->slug . '"><img src="' . $post->image . '" class="img-responsive blogimage-fullwidth thumbnail" alt="img" /></a>
                            </div>';
        }
        $output .= '
				<link href="' . base_url('blocks/blog_posts/style.css') . '" rel="stylesheet">               
			   <article>
                   ' . ChEditorfix($post->text) . '
                </article>

                <hr />';
        if ($BuilderEngine->get_option('be_blog_show_tags') != 'no') {
            $output .= '
                            <p class="space16"> <b>Blog Tags:</b>';
            foreach ($post as $item) {
                if ($item->tags != '') {
                    $tags = explode(',', $item->tags);
                    foreach ($tags as $tag) {
                        $output .= '
                                                <a class="label label-default light" href="' . base_url('blog/search/' . $tag) . '" ><i class="fa fa-tags"></i> ' . $tag . '</a> ';
                    }
                } else {
                    $output .= '-';
                }
            }
            $output .= '
                           </li> <div class="clearfix"></div>
                        </p>';
        }
        $output .= '<div class="divider"></div>';
        $comments_alowed = 'no';
        foreach ($post->stored as $key => $val) {
            if ($key == 'comments_allowed' && $val == 'yes') {
                $comments_alowed = 'yes';
            }
        }
        // if($comments_alowed == 'yes' && $BuilderEngine->get_option('be_blog_allow_comments') != 'no'){
        //     $output .= '
        //         <div id="comments">
        //             <h4>'.$count.' '.$pluralizer.'</h4>';
        //             $i = 1;
        //             foreach($comments as $comment){
        //                 $output .= '
        //                     <div class="comment">
        //                         <span class="user-avatar">';
        //                         if($comment->user_id == 0 || $comment->user_id == ''){
        //                             $output .= '<img class="pull-left media-object" src="'.get_theme_path().'/images/avatars/no_avatar.jpg" width="64" height="64" alt="">';
        //                         }else{
        //                             $commenter = new User($comment->user_id);
        //                             $allow_avatar = new Setting();
        //                             if(isset($allow_avatar->get_user_settings($comment->user_id)->all[0]->allow_avatar) && $allow_avatar->get_user_settings($comment->user_id)->all[0]->allow_avatar != 0)
        //                                 $allow_avatar = 1;
        //                             else
        //                                 $allow_avatar = 0;
        //                             if((!isset($commenter->avatar) || $commenter->avatar == '') || !intval($allow_avatar)){
        //                                 $output .= '<img class="pull-left media-object" src="'.get_theme_path().'/images/avatars/no_avatar.jpg" width="64" height="64" alt="">';
        //                             }else{
        //                                 $output .= '<img class="pull-left media-object" src="'.base_url().''.$commenter->avatar.'" width="64" height="64" alt="">';
        //                             }
        //                         }
        //                 $output .= '
        //                     </span>
        //                     <div class="media-body">
        //                         <h3 class="media-heading bold">'.$comment->name.'</h3>
        //                         <small class="block">'.date('d.M.Y - h:i',$comment->time_created).'</small>
        //                         <br/>
        //                         '.$comment->text.'
        //                     </div>
        //                     <div class="btn-group pull-right" role="group">
        //                         <a href="#commentForm" data-toggle="modal" data-target="#report'.$i.'" class="btn btn-danger blogPostBtn">Report</a>';
        //                         if($users->is_admin()){
        //                             $output .= '<a href="javascript:;" data-id="'.$comment->id.'" class="btn btn-danger blogPostBtn delete-comment">Delete</a>';
        //                         }
        //                 $output .= '
        //                     </div>
        //                     <!-- Modal -->
        //                     <div class="modal fade" id="report'.$i.'" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        //                         <div class="modal-dialog" style="z-index:10">
        //                             <div class="modal-content">
        //                                 <div class="modal-header">
        //                                     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        //                                     <h4 class="modal-title" id="myModalLabel">Report Comment</h4>
        //                                 </div>
        //                                 <form method="get" action="'.base_url('blog/report_comment').'">
        //                                     <div class="modal-body">
        //                                         <input type="hidden" name="comment_id" value="'.$comment->id.'">
        //                                         <p>Please describe what aspect of this comment or it`s author you find inadequate, inappropriate or insulting</p>
        //                                         <div class="form-group">
        //                                             <textarea class="form-control" name="text" placeholder="Describe your reason for reporting this comment"></textarea>
        //                                         </div>
        //                                     </div>
        //                                     <div class="modal-footer">
        //                                         <button type="button" class="btn btn-default blogPostBtn" data-dismiss="modal">Close</button>
        //                                         <button type="submit" class="btn btn-primary blogPostBtn">Report</button>
        //                                     </div>
        //                                 </form>
        //                             </div>
        //                         </div>
        //                     </div>
        //                 </div>';
        //                 $i++;
        //             }
        //             if($BuilderEngine->get_option('be_blog_comments_private') == 'private'){
        //                 if(!($CI->session->userdata('user_id') == 0)){
        //                     $output .= '
        //                         <br/>
        //                         <div class="divider"></div>
        //                         <h4>Leave a comment</h4>
        //                         <form id="commentForm" action="'.base_url().'blog/post/'.$post->slug.'" class="form-horizontal" method="post">
        //                             <input type="hidden" name="post_id" value="'.$post->id.'">
        //                             <div class="row">
        //                                 <div class="col-md-12">
        //                                     <textarea required class="form-control input-lg" id="comment" name="text" rows="5" placeholder="Your Comment">'.$CI->form_validation->set_value('text').'</textarea>
        //                                     '.form_error('text').'
        //                                 </div>
        //                             </div>
        //                             <br>';
        //                             $check_captcha = $BuilderEngine->get_option('be_blog_captcha') == 'yes';
        //                             if($check_captcha){
        //                                 $output .= '
        //                                     <div class="row">
        //                                         <div class="col-md-2">
        //                                             <label>Captcha *</label>
        //                                         </div>
        //                                         <div class="col-md-3">
        //                                             <input required class="form-control input-lg" type="text" name="captcha" id="captcha" />
        //                                         </div>
        //                                         <div class="col-md-4">
        //                                             '.$this->createCaptcha().'
        //                                         </div>
        //                                         <div class="clearfix"></div>
        //                                         '.form_error('captcha').'
        //                                     </div>';
        //                             }
        //                         $output .= '
        //                             <div class="row">
        //                                 <div class="col-md-12">
        //                                     <p><button class="btn btn-primary blogPostBtn">Post Comment</button></p>
        //                                 </div>
        //                             </div>
        //                         </form>';
        //                 }
        //             }else{
        //                 $output .= '
        //                 <br/>
        //                 <div class="divider"></div>
        //                 <h4>Leave a comment</h4>
        //                 <form id="commentForm" class="form-horizontal" method="post">
        //                     <div class="row">
        //                         <input type="hidden" name="post_id" value="'.$post->id.'">';
        //                         if($CI->session->userdata('user_id') == 0){
        //                             $output .= '
        //                                 <div class="col-md-4">
        //                                     <label>Name *</label>
        //                                     <input required class="form-control input-lg" type="text" name="name" id="author" value="'.$CI->form_validation->set_value('name').'" />
        //                                     '.form_error('name').'
        //                                 </div>';
        //                         }
        //                 $output .= '
        //                     </div>
        //                     <div class="row">
        //                         <div class="col-md-12">
        //                             <textarea required class="form-control input-lg" id="comment" name="text" rows="5" placeholder="Your Comment">'.$CI->form_validation->set_value('text').'</textarea>
        //                             '.form_error('text').'
        //                         </div>
        //                     </div>
        //                     <br>';
        //                     $check_captcha = $BuilderEngine->get_option('be_blog_captcha') == 'yes';
        //                     if($check_captcha){
        //                         $output .= '
        //                             <div class="row">
        //                                 <div class="col-md-2">
        //                                     <label>Captcha *</label>
        //                                 </div>
        //                                 <div class="col-md-3">
        //                                     <input required class="form-control input-lg" type="text" name="captcha" id="captcha" />
        //                                 </div>
        //                                 <div class="col-md-4">
        //                                     '.$this->createCaptcha().'
        //                                 </div>
        //                                 <div class="clearfix"></div>
        //                                 '.form_error('captcha').'
        //                             </div>';
        //                     }
        //                 $output .= '
        //                     <div class="row">
        //                         <div class="col-md-12">
        //                             <p><button class="btn btn-primary">Post Comment</button></p>
        //                         </div>
        //                     </div>
        //                 </form>';
        //             }
        //     $output .= '</div>';
        // }
        $output .= '</div>';
        if ($users->is_admin()) {
            $output .= '
                    <div class="modal fade" id="delete-comment" tabindex="-1" role="dialog" aria-hidden="true">
                        <div class="modal-dialog" style="z-index:10">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                    <h4 class="modal-title">Delete comment</h4>
                                </div>
                                <form method="post" action="' . base_url('blog/deleteComment') . '">
                                    <div class="modal-body">
                                        <p>Are you sure you want to delete this comment?</p>
                                        <input type="hidden" name="comment_id">
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-default blogPostBtn" data-dismiss="modal">Close</button>
                                        <button type="submit" class="btn btn-primary blogPostBtn">Delete</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                ';
        }
        return $output;
    }
Beispiel #8
0
    public function generate_content()
    {
        $author = $this->block->data('author');
        $quotation = $this->block->data('quotation');
        $from = $this->block->data('from');
        // style
        $quotation_font_color = $this->block->data('quotation_font_color');
        $quotation_font_weight = $this->block->data('quotation_font_weight');
        $quotation_font_size = $this->block->data('quotation_font_size');
        $author_font_color = $this->block->data('author_font_color');
        $author_font_weight = $this->block->data('author_font_weight');
        $author_font_size = $this->block->data('author_font_size');
        $from_font_color = $this->block->data('from_font_color');
        $from_font_weight = $this->block->data('from_font_weight');
        $from_font_size = $this->block->data('from_font_size');
        $background_image = $this->block->data('background_image');
        $animation_type = $this->block->data('animation_type');
        $animation_duration = $this->block->data('animation_duration');
        $animation_event = $this->block->data('animation_event');
        $animation_delay = $this->block->data('animation_delay');
        $settings[0][0] = 'quote' . $this->block->get_id();
        $settings[0][1] = $animation_event;
        $settings[0][2] = $animation_duration . ' ' . $animation_delay . ' ' . $animation_type;
        add_action("be_foot", generate_animation_events($settings));
        if ($background_image == '') {
            $background_image = get_theme_path() . 'images/quote-bg.jpg';
        }
        if ($quotation == '') {
            $quotation = 'Passion leads to design, design leads to performance, performance leads to success!';
        }
        if ($author == '') {
            $author = 'Sean Murphy';
        }
        if ($from == '') {
            $from = 'Web Guru';
        }
        $quotation_style = 'style="
                    color: ' . $quotation_font_color . ' !important;
                    font-weight: ' . $quotation_font_weight . ' !important;
                    font-size: ' . $quotation_font_size . ' !important;
                "';
        $author_style = 'style="
                    color: ' . $author_font_color . ' !important;
                    font-weight: ' . $author_font_weight . ' !important;
                    font-size: ' . $author_font_size . ' !important;
                    display: inline;
                "';
        $from_style = 'style="
                    color: ' . $from_font_color . ' !important;
                    font-weight: ' . $from_font_weight . ' !important;
                    font-size: ' . $from_font_size . ' !important;
                    display: inline;
                "';
        $output = '
			<link href="' . base_url('blocks/quote/style.css') . '" rel="stylesheet">
			<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
			<div id="quote" class="blockcontent-quote bg-black-darker has-bg" data-scrollview="true">
	            <div class="content-bg">
	                
	            </div>
	            <div class="" data-animation="true" data-animation-type="fadeInLeft">
	                <div class="row">
	                    <div id="quote' . $this->block->get_id() . '" class="col-md-12 quote" ' . $quotation_style . '>
	                        <i class="fa fa-quote-left"></i> ' . $quotation . '  
	                        <i class="fa fa-quote-right"></i>
	                        <small><div ' . $from_style . '>' . $author . '</div><div ' . $from_style . '>, ' . $from . '</div></small>
	                    </div>
	                </div>
	            </div>
	        </div>';
        return $output;
    }
    public function generate_content()
    {
        $slide_author = $this->block->data('slide_author');
        $slide_author_profession = $this->block->data('slide_author_profession');
        $slide_text = $this->block->data('slide_text');
        if (!is_array($slide_text) || empty($slide_text)) {
            $slide_author[0] = "John Doe";
            $slide_author_profession[0] = "Manager";
            $slide_text[0] = "Copy over your client / customer quotes to fill this important section of testimonials,<br>show new visitors why your best, why they should trust you and win them.";
            $slide_author[1] = "Joe Doe";
            $slide_author_profession[1] = "Marketing";
            $slide_text[1] = "Copy over your client / customer quotes to fill this important section of testimonials,<br>show new visitors why your best, why they should trust you and win them.";
            $slide_author[2] = "Paddy Doe";
            $slide_author_profession[2] = "QA Lead";
            $slide_text[2] = "Copy over your client / customer quotes to fill this important section of testimonials,<br>show new visitors why your best, why they should trust you and win them.";
        }
        //style
        $slide_font_color = $this->block->data('slide_font_color');
        $slide_font_weight = $this->block->data('slide_font_weight');
        $slide_font_size = $this->block->data('slide_font_size');
        $author_font_color = $this->block->data('author_font_color');
        $author_font_weight = $this->block->data('author_font_weight');
        $author_font_size = $this->block->data('author_font_size');
        $profession_font_color = $this->block->data('profession_font_color');
        $profession_font_weight = $this->block->data('profession_font_weight');
        $profession_font_size = $this->block->data('profession_font_size');
        $animation_type = $this->block->data('animation_type');
        $animation_duration = $this->block->data('animation_duration');
        $animation_event = $this->block->data('animation_event');
        $animation_delay = $this->block->data('animation_delay');
        $settings[0][0] = 'testimonials' . $this->block->get_id();
        $settings[0][1] = $animation_event;
        $settings[0][2] = $animation_duration . ' ' . $animation_delay . ' ' . $animation_type;
        add_action("be_foot", generate_animation_events($settings));
        $num_slides = count($slide_text);
        $text_style = 'style="
                    color: ' . $slide_font_color . ' !important;
                    font-weight: ' . $slide_font_weight . ' !important;
                    font-size: ' . $slide_font_size . ' !important;
                "';
        $author_style = 'style="
                    color: ' . $author_font_color . ' !important;
                    font-weight: ' . $author_font_weight . ' !important;
                    font-size: ' . $author_font_size . ' !important;
                "';
        $profession_style = 'style="
                    color: ' . $profession_font_color . ' !important;
                    font-weight: ' . $profession_font_weight . ' !important;
                    font-size: ' . $profession_font_size . ' !important;
                "';
        $output = '
			<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
            <link href="' . base_url('blocks/testimonials/style.css') . '" rel="stylesheet">
			<div id="client" class="blockcontent-testimonials has-bg custom-content" data-scrollview="true">
                <div class="content-bg">
                    
                </div>
                <div data-animation="true" data-animation-type="fadeInUp">
                    <h2 id="testimonials' . $this->block->get_id() . '" class="content-title">Our Client Testimonials</h2>
                    <div class="carousel testimonials slide" data-ride="carousel" id="testimonials">
                        <div class="carousel-inner text-center">';
        for ($i = 0; $i < $num_slides; $i++) {
            $output .= '
                            <div class="item';
            if ($i == 0) {
                $output .= ' active';
            }
            $output .= '">
                                <blockquote ' . $text_style . '>
                                    <i class="fa fa-quote-left"></i>
                                    ' . $slide_text[$i] . '
                                    <i class="fa fa-quote-right"></i>
                                </blockquote>
                                <div ' . $profession_style . ' class="name"> — 
                                    <span ' . $author_style . ' class="text-theme">' . $slide_author[$i] . '</span>
                                    , ' . $slide_author_profession[$i] . '
                                </div>
                            </div>';
        }
        $output .= '    
                        </div>
                        <ol class="carousel-indicators">';
        for ($i = 0; $i < $num_slides; $i++) {
            $output .= '
                                <li data-target="#testimonials" data-slide-to="' . $i . '"';
            if ($i == 0) {
                $output .= 'class="active"';
            }
            $output .= '
                                ></li>';
        }
        $output .= '
                        </ol>
                    </div>
                </div>
            </div>';
        return $output;
    }
Beispiel #10
0
    public function generate_content()
    {
        $section_text = $this->block->data('section_text');
        $section_number = $this->block->data('section_number');
        $text_animation_type = $this->block->data('text_animation_type');
        $text_animation_duration = $this->block->data('text_animation_duration');
        $text_animation_event = $this->block->data('text_animation_event');
        $text_animation_delay = $this->block->data('text_animation_delay');
        $number_animation_type = $this->block->data('number_animation_type');
        $number_animation_duration = $this->block->data('number_animation_duration');
        $number_animation_event = $this->block->data('number_animation_event');
        $number_animation_delay = $this->block->data('number_animation_delay');
        if (!is_array($section_text) || empty($section_text)) {
            $section_text[0] = "Cups of Coffee (cost)";
            $section_number[0] = "15";
            $section_text[1] = "Registered Members";
            $section_number[1] = "5039";
            $section_text[2] = "Services Sold";
            $section_number[2] = "3191";
            $section_text[3] = "Years in Business";
            $section_number[3] = "20";
        }
        // style
        $text_font_color = $this->block->data('text_font_color');
        $text_font_weight = $this->block->data('text_font_weight');
        $text_font_size = $this->block->data('text_font_size');
        $number_font_color = $this->block->data('number_font_color');
        $number_font_weight = $this->block->data('number_font_weight');
        $number_font_size = $this->block->data('number_font_size');
        $num_sections = count($section_text);
        $settings = array();
        for ($i = 0; $i < $num_sections; $i++) {
            $number_settings[0] = 'number' . $this->block->get_id() . $i;
            $number_settings[1] = $this->block->data('number_animation_event');
            $number_settings[2] = $this->block->data('number_animation_state') . ' ' . $this->block->data('number_animation_delay') . ' ' . $this->block->data('number_animation_type');
            array_push($settings, $number_settings);
            $text_settings[0] = 'text' . $this->block->get_id() . $i;
            $text_settings[1] = $this->block->data('text_animation_event');
            $text_settings[2] = $this->block->data('text_animation_state') . ' ' . $this->block->data('text_animation_delay') . ' ' . $this->block->data('text_animation_type');
            array_push($settings, $text_settings);
        }
        add_action("be_foot", generate_animation_events($settings));
        $text_style = 'style="
                    color: ' . $text_font_color . ' !important;
                    font-weight: ' . $text_font_weight . ' !important;
                    font-size: ' . $text_font_size . ' !important;
                "';
        $number_style = 'style="
                    color: ' . $number_font_color . ' !important;
                    font-weight: ' . $number_font_weight . ' !important;
                    font-size: ' . $number_font_size . ' !important;
                "';
        $output = '
			<link href="' . base_url('blocks/milestones/css/style.css') . '" rel="stylesheet">
			<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
			<div id="milestone" class="blockcontent-milestones bg-black-darker has-bg custom-content" data-scrollview="true">
	            <div class="content-bg">
	                
	            </div>
	            
	            <div class="container">
	                <div class="row">';
        for ($i = 0; $i < $num_sections; $i++) {
            if (empty($section_text[$i])) {
                continue;
            }
            if ($num_sections == 1) {
                $size = 'col-md-6 col-sm-6 col-md-offset-3 col-sm-offset-3';
            } elseif ($num_sections == 2) {
                $size = 'col-md-6 col-sm-6';
            } elseif ($num_sections == 3) {
                $size = 'col-md-4 col-sm-4';
            } else {
                $size = 'col-md-3 col-sm-3';
            }
            $output .= '
	                    	<div class="' . $size . ' milestone-col">
		                        <div class="milestone">
		                            <div id="number' . $this->block->get_id() . '' . $i . '" class="number" ' . $number_style . ' data-animation="true" data-animation-type="number" data-final-number="' . $section_number[$i] . '">' . $section_number[$i] . '</div>
		                            <div id="text' . $this->block->get_id() . '' . $i . '" class="title" ' . $text_style . '>' . $section_text[$i] . '</div>
		                        </div>
		                    </div>';
        }
        $output .= '
	                </div>
	            </div>
	        </div>';
        return $output;
    }
Beispiel #11
0
    public function generate_content()
    {
        // style
        $line_1_font_color = $this->block->data('line_1_font_color');
        $line_1_font_weight = $this->block->data('line_1_font_weight');
        $line_1_font_size = $this->block->data('line_1_font_size');
        $line_2_font_color = $this->block->data('line_2_font_color');
        $line_2_font_weight = $this->block->data('line_2_font_weight');
        $line_2_font_size = $this->block->data('line_2_font_size');
        $line_3_font_color = $this->block->data('line_3_font_color');
        $line_3_font_weight = $this->block->data('line_3_font_weight');
        $line_3_font_size = $this->block->data('line_3_font_size');
        $line_4_font_color = $this->block->data('line_4_font_color');
        $line_4_font_weight = $this->block->data('line_4_font_weight');
        $line_4_font_size = $this->block->data('line_4_font_size');
        $address_animation_state = $this->block->data('address_animation_state');
        $address_animation_type = $this->block->data('address_animation_type');
        $address_animation_duration = $this->block->data('address_animation_duration');
        $address_animation_event = $this->block->data('address_animation_event');
        $address_animation_delay = $this->block->data('address_animation_delay');
        $line_1 = $this->block->data('line_1');
        $line_2 = $this->block->data('line_2');
        $line_3 = $this->block->data('line_3');
        $line_4 = $this->block->data('line_4');
        $settings[0][0] = 'address' . $this->block->get_id();
        $settings[0][1] = $address_animation_event;
        $settings[0][2] = $address_animation_duration . ' ' . $address_animation_delay . ' ' . $address_animation_type;
        add_action("be_foot", generate_animation_events($settings));
        if (empty($line_1)) {
            $line_1 = 'Some Company , Inc';
        }
        if (empty($line_2)) {
            $line_2 = 'Example Street 244';
        }
        if (empty($line_3)) {
            $line_3 = 'Brand New York, 35442';
        }
        if (empty($line_4)) {
            $line_4 = '(02) 233-4323';
        }
        $line_1_style = 'style="
                    color: ' . $line_1_font_color . ' !important;
                    font-weight: ' . $line_1_font_weight . ' !important;
                    font-size: ' . $line_1_font_size . ' !important;
                "';
        $line_2_style = 'style="
                    color: ' . $line_2_font_color . ' !important;
                    font-weight: ' . $line_2_font_weight . ' !important;
                    font-size: ' . $line_2_font_size . ' !important;
                "';
        $line_3_style = 'style="
                    color: ' . $line_3_font_color . ' !important;
                    font-weight: ' . $line_3_font_weight . ' !important;
                    font-size: ' . $line_3_font_size . ' !important;
                "';
        $line_4_style = 'style="
                    color: ' . $line_4_font_color . ' !important;
                    font-weight: ' . $line_4_font_weight . ' !important;
                    font-size: ' . $line_4_font_size . ' !important;
                "';
        $output = '
			<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
				<div id="address' . $this->block->get_id() . '">
					<address>
						<strong ' . $line_1_style . '>' . $line_1 . '</strong><br>
						<span ' . $line_2_style . '>' . $line_2 . '</span><br>
						<span ' . $line_3_style . '>' . $line_3 . '</span><br>
						<span ' . $line_4_style . '><abbr title="Phone">Phone: </abbr> ' . $line_4 . '</span>
					</address>
				</div>
            ';
        return $output;
    }
Beispiel #12
0
    public function generate_content()
    {
        $sections_font_color = $this->block->data('sections_font_color');
        $sections_font_weight = $this->block->data('sections_font_weight');
        $sections_font_size = $this->block->data('sections_font_size');
        $sections_background_color = $this->block->data('sections_background_color');
        $tags_count = $this->block->data('tags_count');
        $alphabetical_order_tags = $this->block->data('alphabetical_order_tags');
        $animation_type = $this->block->data('animation_type');
        $animation_duration = $this->block->data('animation_duration');
        $animation_event = $this->block->data('animation_event');
        $animation_delay = $this->block->data('animation_delay');
        $settings[0][0] = 'tags' . $this->block->get_id();
        $settings[0][1] = $animation_event;
        $settings[0][2] = $animation_duration . ' ' . $animation_delay . ' ' . $animation_type;
        add_action("be_foot", generate_animation_events($settings));
        $section_style = 'style="
                    background-color: ' . $sections_background_color . ' !important;
                "';
        $section_link_style = 'style="
                    color: ' . $sections_font_color . ' !important;
                    font-weight: ' . $sections_font_weight . ' !important;
                    font-size: ' . $sections_font_size . ' !important;
                "';
        $output = '
				<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
                <link href="' . base_url('blocks/tags/style.css') . '" rel="stylesheet">
				<div ' . $section_style . ' class="widgetblogtags" id="blog">
				<div id="tags' . $this->block->get_id() . '" class="masonry-item-blog-tags">
                    <h4>BLOG TAGS</h4>';
        $BuilderEngine = new BuilderEngine();
        $CI =& get_instance();
        $CI->load->model('post');
        $posts = new Post();
        $posts = $posts->order_by('time_created', 'desc')->get();
        $available_tags = array();
        $set_limit = $BuilderEngine->get_option('be_blog_num_tags_displayed');
        if ($set_limit == '' || $set_limit == 0) {
            $set_limit = 12;
        }
        foreach ($posts as $post) {
            $tags = explode(',', $post->tags);
            foreach ($tags as $tag) {
                array_push($available_tags, $tag);
            }
        }
        if (isset($tags_count)) {
            if ($tags_count == 'all') {
                $set_limit = count($available_tags);
            } else {
                $set_limit = $tags_count;
            }
        }
        $available_tags = array_unique($available_tags);
        $available_tags = array_slice($available_tags, 0, $set_limit);
        if ($alphabetical_order_tags == 'yes') {
            asort($available_tags);
        }
        foreach ($available_tags as $tag) {
            $output .= '
                            <a class="label label-default light tagsblock" href="' . base_url('blog/search/' . $tag) . '"><i class="fa fa-tags"></i> ' . $tag . '</a>';
        }
        $output .= '
                        <div class="clearfix"></div>
                   </div> </div>';
        return $output;
    }
Beispiel #13
0
    public function generate_content()
    {
        $title = $this->block->data('title');
        $text = $this->block->data('text');
        $button_text = $this->block->data('button_text');
        $button_link = $this->block->data('button_link');
        $icon = $this->block->data('icon');
        $icon_font_color = $this->block->data('icon_font_color');
        $icon_font_size = $this->block->data('icon_font_size');
        $icon_font_weight = $this->block->data('icon_font_weight');
        $icon_animation = $this->block->data('icon_animation');
        $icon_animation_state = $this->block->data('icon_animation_state');
        $icon_animation_type = $this->block->data('icon_animation_type');
        $icon_animation_duration = $this->block->data('icon_animation_duration');
        $icon_animation_event = $this->block->data('icon_animation_event');
        $icon_animation_delay = $this->block->data('icon_animation_delay');
        $title_font_color = $this->block->data('title_font_color');
        $title_font_weight = $this->block->data('title_font_weight');
        $title_font_size = $this->block->data('title_font_size');
        $title_animation = $this->block->data('title_animation');
        $title_animation_state = $this->block->data('title_animation_state');
        $title_animation_type = $this->block->data('title_animation_type');
        $title_animation_duration = $this->block->data('title_animation_duration');
        $title_animation_event = $this->block->data('title_animation_event');
        $title_animation_delay = $this->block->data('title_animation_delay');
        $subtitle_font_color = $this->block->data('subtitle_font_color');
        $subtitle_font_weight = $this->block->data('subtitle_font_weight');
        $subtitle_font_size = $this->block->data('subtitle_font_size');
        $subtitle_animation = $this->block->data('subtitle_animation');
        $subtitle_animation_state = $this->block->data('subtitle_animation_state');
        $subtitle_animation_type = $this->block->data('subtitle_animation_type');
        $subtitle_animation_duration = $this->block->data('subtitle_animation_duration');
        $subtitle_animation_event = $this->block->data('subtitle_animation_event');
        $subtitle_animation_delay = $this->block->data('subtitle_animation_delay');
        $button_animation_type = $this->block->data('button_animation_type');
        $button_animation_duration = $this->block->data('button_animation_duration');
        $button_animation_event = $this->block->data('button_animation_event');
        $button_animation_delay = $this->block->data('button_animation_delay');
        $background_image = $this->block->data('background_image');
        $settings[0][0] = 'icon' . $this->block->get_id();
        $settings[0][1] = $icon_animation_event;
        $settings[0][2] = $icon_animation_duration . ' ' . $icon_animation_delay . ' ' . $icon_animation_type;
        $settings[1][0] = 'title' . $this->block->get_id();
        $settings[1][1] = $title_animation_event;
        $settings[1][2] = $title_animation_duration . ' ' . $title_animation_delay . ' ' . $title_animation_type;
        $settings[2][0] = 'subtitle' . $this->block->get_id();
        $settings[2][1] = $subtitle_animation_event;
        $settings[2][2] = $subtitle_animation_duration . ' ' . $subtitle_animation_delay . ' ' . $subtitle_animation_type;
        $settings[3][0] = 'button' . $this->block->get_id();
        $settings[3][1] = $button_animation_event;
        $settings[3][2] = $button_animation_duration . ' ' . $button_animation_delay . ' ' . $button_animation_type;
        add_action("be_foot", generate_animation_events($settings));
        if ($background_image == '') {
            $background_image = get_theme_path() . 'images/action-bg.jpg';
        }
        if ($title == '') {
            $title = 'CHECK OUT OUR CMS PLATFORM!';
        }
        if ($text == '') {
            $text = 'BuilderEngine CMS Platform Version 3 is Open Source software and is under the MIT License agreement.';
        }
        if ($button_text == '') {
            $button_text = 'Download Here';
        }
        if ($button_link == '') {
            $button_link = 'http://builderengine.org/page-cms-download.html';
        }
        if ($icon == '') {
            $icon = 'fa-check';
        }
        $icon_style = 'style="
                    color: ' . $icon_font_color . ' !important;
                    font-size: ' . $icon_font_size . ' !important;
                "';
        $title_style = 'style="
                    color: ' . $title_font_color . ' !important;
                    font-weight: ' . $title_font_weight . ' !important;
                    font-size: ' . $title_font_size . ' !important;
                "';
        $subtitle_style = 'style="
                    color: ' . $subtitle_font_color . ' !important;
                    font-weight: ' . $subtitle_font_weight . ' !important;
                    font-size: ' . $subtitle_font_size . ' !important;
                "';
        $output = '
			<link href="' . base_url('blocks/action_bar/style.css') . '" rel="stylesheet">
			<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
			<div id="action-box" class="blockcontent-action has-bg custom-content" data-scrollview="true" style="padding-left:15px;padding-right:15px;">
	            <div class="content-bg">
	                
	            </div>
	            <div data-animation="true" data-animation-type="fadeInRight">
	                <div class="row action-box" id="action_box">
	                    <!-- Column & Block -->
	                    <div class="col-md-9 col-sm-9">
	                        <div class="icon-large text-theme" id="icon' . $this->block->get_id() . '">
	                            <i ' . $icon_style . ' class="fa ' . $icon . '"></i>
	                        </div> 
	                        <h3 id="title' . $this->block->get_id() . '" ' . $title_style . '>' . $title . '</h3>
	                        <p id="subtitle' . $this->block->get_id() . '" ' . $subtitle_style . '>
	                           ' . $text . '
	                        </p>
	                    </div>
	                    <div class="col-md-3 col-sm-3">
	                        <a id="button' . $this->block->get_id() . '" href="' . $button_link . '" class="btn btn-outline btn-block">' . $button_text . '</a>
	                    </div>
	                </div>
	            </div>
	        </div>
            ';
        return $output;
    }
    public function generate_content()
    {
        $CI =& get_instance();
        $CI->load->model('visits');
        $sequence = $CI->visits->populyar_post_by_visits();
        $sections_font_color = $this->block->data('sections_font_color');
        $sections_font_weight = $this->block->data('sections_font_weight');
        $sections_font_size = $this->block->data('sections_font_size');
        $sections_background_color = $this->block->data('sections_background_color');
        $sections_animation_type = $this->block->data('sections_animation_type');
        $sections_animation_duration = $this->block->data('sections_animation_duration');
        $sections_animation_event = $this->block->data('sections_animation_event');
        $sections_animation_delay = $this->block->data('sections_animation_delay');
        $settings[0][0] = 'blog_list';
        $settings[0][1] = $sections_animation_event;
        $settings[0][2] = $sections_animation_duration . ' ' . $sections_animation_delay . ' ' . $sections_animation_type;
        add_action("be_foot", generate_animation_events($settings));
        $post_count = $this->block->data('post_count');
        $alphabetical_order = $this->block->data('alphabetical_order');
        $category = $this->block->data('category');
        $section_style = 'style="
                    background-color: ' . $sections_background_color . ' !important;
                "';
        $section_link_style = 'style="
                    color: ' . $sections_font_color . ' !important;
                    font-weight: ' . $sections_font_weight . ' !important;
                    font-size: ' . $sections_font_size . ' !important;
                "';
        $all_posts = new Post();
        $all_category = new Category();
        $BuilderEngine = new BuilderEngine();
        $recent_posts = $all_posts->order_by('time_created', 'desc');
        // out(intval($category));
        if ($category == 'all' || intval($category) == 0) {
            $recent_posts = $recent_posts->get();
        } else {
            $recent_posts = $recent_posts->get_where(array('category_id' => intval($category)));
        }
        $recent_post_limit = $BuilderEngine->get_option('be_blog_num_recent_posts_displayed');
        if ($recent_post_limit == '' || $recent_post_limit == 0) {
            $recent_post_limit = 5;
        }
        if (isset($post_count)) {
            if ($post_count == 'all') {
                $recent_post_limit = count($recent_posts->all);
            } else {
                $recent_post_limit = $post_count;
            }
        }
        if ($alphabetical_order == 'az') {
            //ok
            ksort($sequence);
        }
        if ($alphabetical_order == 'za') {
            //ok
            krsort($sequence);
        }
        if ($alphabetical_order == 'oldest') {
            $recent_posts = $all_posts->order_by('time_created', 'asc');
        }
        if ($alphabetical_order == 'latest') {
            //ok
            rsort($sequence);
        }
        if ($alphabetical_order == 'updated') {
            $recent_posts = $all_posts->order_by('time_created', 'desc');
        }
        if ($alphabetical_order == 'most_visited') {
            //ok
            arsort($sequence);
        }
        if ($alphabetical_order == 'less_visited') {
            //ok
            asort($sequence);
        }
        $output = '
                    <link href="' . base_url('blocks/blog_posts_list/style.css') . '" rel="stylesheet">
					<div ' . $section_style . ' class="widgetbloglist" id="blog_list">
					<div class="masonry-item-blog-list">
                        <h4>BLOG POSTS</h4>
                        <ul class="nav nav-list">';
        $j = 1;
        foreach ($sequence as $key => $value) {
            foreach ($recent_posts as $recent_post) {
                if ($key == $recent_post->slug) {
                    if ($j <= $recent_post_limit) {
                        $output .= '
                                            <li>
                                                <a ' . $section_link_style . ' href="' . base_url() . 'blog/post/' . $recent_post->slug . '">
                                                    <i class="fa fa-sign-out"></i>  
                                                ' . $recent_post->title . '</a>
                                                <small>' . date('d.M.Y / h:i', $recent_post->time_created) . '</small>
                                            </li>';
                        $j++;
                    }
                }
            }
        }
        $output .= '
                        </ul>
                  </div>   </div>';
        return $output;
    }
Beispiel #15
0
    function output_flexslider()
    {
        $direction = $this->block->data('flexslider_settings_direction');
        if (!$direction) {
            $this->block->set_data('flexslider_settings_direction', "horizontal");
            $this->block->set_data('flexslider_settings_controlNav', "false");
            $this->block->set_data('flexslider_settings_directionNav', "true");
            $this->block->set_data('flexslider_settings_pauseOnHover', "true");
            $this->block->set_data('flexslider_settings_slideshowSpeed', "5000");
        }
        $slide_titles = $this->block->data('slide_title');
        $title_color = $this->block->data('title_color');
        $title_background_color = $this->block->data('title_background_color');
        $text_color = $this->block->data('text_color');
        $text_background_color = $this->block->data('text_background_color');
        $title_animation_type = $this->block->data('title_animation_type');
        $title_animation_duration = $this->block->data('title_animation_duration');
        $title_animation_event = $this->block->data('title_animation_event');
        $title_animation_delay = $this->block->data('title_animation_delay');
        $text_animation_type = $this->block->data('text_animation_type');
        $text_animation_duration = $this->block->data('text_animation_duration');
        $text_animation_event = $this->block->data('text_animation_event');
        $text_animation_delay = $this->block->data('text_animation_delay');
        $num_slides = count($slide_titles);
        $settings = array();
        for ($i = 0; $i < $num_slides; $i++) {
            $title_settings[0] = 'title' . $this->block->get_id() . $i;
            $title_settings[1] = $title_animation_event;
            $title_settings[2] = $title_animation_duration . ' ' . $title_animation_delay . ' ' . $title_animation_type;
            array_push($settings, $title_settings);
            $text_settings[0] = 'text' . $this->block->get_id() . $i;
            $text_settings[1] = $text_animation_event;
            $text_settings[2] = $text_animation_duration . ' ' . $text_animation_delay . ' ' . $text_animation_type;
            array_push($settings, $text_settings);
        }
        add_action("be_foot", generate_animation_events($settings));
        $title_style = 'style="
                    color: ' . $title_color . ' !important;
					background-color: ' . $title_background_color . ' !important;
                "';
        $text_style = 'style="
                    color: ' . $text_color . ' !important;
					background-color: ' . $text_background_color . ' !important;
                "';
        $output = "\r\n\t\t\t<link href=\"/builderengine/public/animations/css/animate.min.css\" rel=\"stylesheet\" />\r\n            <link href=\"/blocks/slider/css/flexslider.css\" rel=\"stylesheet\" />\r\n            <div class=\"flex-image flexslider\" id=\"flexslider-{$this->block->name}\">\r\n                <ul class=\"slides\">";
        $slide_titles = $this->block->data('slide_title');
        $slide_images = $this->block->data('slide_image');
        $slide_texts = $this->block->data('slide_text');
        $slide_urls = $this->block->data('slide_url');
        $num_slides = count($slide_titles);
        for ($i = 0; $i < $num_slides; $i++) {
            if ($i == 0) {
                $output .= "<li style=\"display:list-item;\">";
                if ($slide_urls[$i] != "") {
                    $output .= "<a href=\"{$slide_urls[$i]}\">";
                } else {
                    $output .= "<a href=\"#\">";
                }
            } else {
                $output .= "<li style=\"display:block;\">";
                if ($slide_urls[$i] != "") {
                    $output .= "<a href=\"{$slide_urls[$i]}\">";
                } else {
                    $output .= "<a href=\"#\">";
                }
            }
            $caption = "\r\n                            <div class=\"flex-caption\">\r\n                                <!-- Title -->\r\n                                <h3 id=\"title" . $this->block->get_id() . "" . $i . "\" " . $title_style . "><span>" . $slide_titles[$i] . "</span></h3>\r\n                                <!-- Para -->\r\n                                <p id=\"text" . $this->block->get_id() . "" . $i . "\" " . $text_style . ">" . $slide_texts[$i] . "</p>\r\n                            </div></li>\r\n                        ";
            $output .= "\r\n                            <img src=\"" . $slide_images[$i] . "\" />\r\n                        ";
            if ($slide_texts[$i] != "" && $slide_titles[$i] != "") {
                $output .= $caption;
            } else {
                $output .= "</a></li>";
            }
        }
        $output .= "\r\n                </ul>\r\n            </div>\r\n\r\n            ";
        return $output;
    }
Beispiel #16
0
    public function generate_content()
    {
        $quote_author = $this->block->data('author');
        $quote_quotation = $this->block->data('quotation');
        $quote_from = $this->block->data('from');
        // style
        $quotation_font_color = $this->block->data('quotation_font_color');
        $quotation_font_weight = $this->block->data('quotation_font_weight');
        $quotation_font_size = $this->block->data('quotation_font_size');
        $author_font_color = $this->block->data('author_font_color');
        $author_font_weight = $this->block->data('author_font_weight');
        $author_font_size = $this->block->data('author_font_size');
        $from_font_color = $this->block->data('from_font_color');
        $from_font_weight = $this->block->data('from_font_weight');
        $from_font_size = $this->block->data('from_font_size');
        $animation_type = $this->block->data('animation_type');
        $animation_duration = $this->block->data('animation_duration');
        $animation_event = $this->block->data('animation_event');
        $animation_delay = $this->block->data('animation_delay');
        $settings[0][0] = 'quotation' . $this->block->get_id();
        $settings[0][1] = $animation_event;
        $settings[0][2] = $animation_duration . ' ' . $animation_delay . ' ' . $animation_type;
        add_action("be_foot", generate_animation_events($settings));
        $text_style = 'style="
                    color: ' . $quotation_font_color . ' !important;
                    font-weight: ' . $quotation_font_weight . ' !important;
                    font-size: ' . $quotation_font_size . ' !important;
                "';
        $author_style = 'style="
                    color: ' . $author_font_color . ' !important;
                    font-weight: ' . $author_font_weight . ' !important;
                    font-size: ' . $author_font_size . ' !important;
                    display: inline;
                "';
        $from_style = 'style="
                    color: ' . $from_font_color . ' !important;
                    font-weight: ' . $from_font_weight . ' !important;
                    font-size: ' . $from_font_size . ' !important;
                    display: inline;
                "';
        if ($quote_author == '') {
            $quote_author = 'John Doe';
        }
        if ($quote_quotation == '') {
            $quote_quotation = 'To Be Or Not To Be';
        }
        if ($quote_from == '') {
            $quote_from = 'BuilderEngine';
        }
        $output = '
			<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
                <blockquote id="quotation' . $this->block->get_id() . '">
                    <p ' . $text_style . '>"' . $quote_quotation . '"</p>
                    <small>
                        <span ' . $author_style . '>' . $quote_author . '</span>
                        <cite title="Source Title">
                            <span ' . $from_style . '>&nbsp;&nbsp;' . $quote_from . '</span>
                        </cite>
                    </small>
                </blockquote>
            ';
        return $output;
    }
Beispiel #17
0
    public function generate_content()
    {
        $field1_name = $this->block->data('field1_name');
        $field1_active = $this->block->data('field1_active');
        $field1_required = $this->block->data('field1_required');
        $field2_name = $this->block->data('field2_name');
        $field2_active = $this->block->data('field2_active');
        $field2_required = $this->block->data('field2_required');
        $field3_name = $this->block->data('field3_name');
        $field3_active = $this->block->data('field3_active');
        $field3_required = $this->block->data('field3_required');
        $field4_name = $this->block->data('field4_name');
        $field4_active = $this->block->data('field4_active');
        $field4_required = $this->block->data('field4_required');
        $email_destination = $this->block->data('email_destination');
        $email_title = $this->block->data('email_title');
        $email_active = $this->block->data('email_active');
        $captcha_active = $this->block->data('captcha_active');
        $form_animation_type = $this->block->data('form_animation_type');
        $form_animation_duration = $this->block->data('form_animation_duration');
        $form_animation_event = $this->block->data('form_animation_event');
        $form_animation_delay = $this->block->data('form_animation_delay');
        $settings[0][0] = 'form' . $this->block->get_id();
        $settings[0][1] = $form_animation_event;
        $settings[0][2] = $form_animation_duration . ' ' . $form_animation_delay . ' ' . $form_animation_type;
        add_action("be_foot", generate_animation_events($settings));
        if ($field1_name == '') {
            $field1_name = 'Name';
        }
        if ($field2_name == '') {
            $field2_name = 'Email';
        }
        if ($field3_name == '') {
            $field3_name = 'Phone';
        }
        if ($field4_name == '') {
            $field4_name = 'Message';
        }
        if ($email_title == '') {
            $email_title = 'Message submitted in ' . base_url() . ' contact form';
        }
        // style
        $form_text_font_color = $this->block->data('form_text_font_color');
        $form_text_font_weight = $this->block->data('form_text_font_weight');
        $form_text_font_size = $this->block->data('form_text_font_size');
        $form_background_color = $this->block->data('form_background_color');
        if ($_POST) {
            if ($email_active != 'no') {
                $to = $email_destination;
                $title = $email_title;
                $message = "\r\n                    Contact form message received:";
                $count = 1;
                foreach ($_POST as $field_name => $field_value) {
                    if ($field_value == '') {
                        $field_value = '[empty]';
                    }
                    if ($count == 1) {
                        $message .= "\n\n" . str_replace('_', ' ', ucwords($field_name)) . ": " . $field_value;
                    } else {
                        $message .= "\n" . str_replace('_', ' ', ucwords($field_name)) . ": " . $field_value;
                    }
                    $count++;
                }
                $message .= "\n\n" . base_url();
                mail($to, $title, $message);
            }
        }
        $background_style = 'style="
                    background-color: ' . $form_background_color . ' !important;
                "';
        $label_style = 'style="
                    color: ' . $form_text_font_color . ' !important;
                    font-weight: ' . $form_text_font_weight . ' !important;
                    font-size: ' . $form_text_font_size . ' !important;
					padding-right:15px; !important;
                "';
        $output = '
                <link href="' . base_url('blocks/contact_form/style.css') . '" rel="stylesheet">
				<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
				<div class="row">
				<div id="form' . $this->block->get_id() . '" ' . $background_style . ' class="col-md-12 form-col" data-animation="true" data-animation-type="fadeInRight">
                    <form class="form-horizontal" style="padding-right:20px !important;padding-left:20px !important;" method="post">';
        if ($field1_active != 'no') {
            $output .= '
                        <div class="form-group">
                            <label ' . $label_style . ' class="control-label col-md-3">' . $field1_name;
            if ($field1_required == 'yes') {
                $output .= ' <span class="text-theme">*</span>';
            }
            $output .= '
                            </label>
                            <div class="col-md-9">
                                <input type="text" name="' . strtolower(str_replace(' ', '_', $field1_name)) . '" class="form-control"';
            if ($field1_required == 'yes') {
                $output .= ' required';
            }
            $output .= '/>
                            </div>
                        </div>';
        }
        if ($field2_active != 'no') {
            $output .= '
                        <div class="form-group">
                            <label ' . $label_style . ' class="control-label col-md-3">' . $field2_name;
            if ($field2_required == 'yes') {
                $output .= ' <span class="text-theme">*</span>';
            }
            $output .= '
                            </label>
                            <div class="col-md-9">
                                <input type="text" name="' . strtolower(str_replace(' ', '_', $field2_name)) . '" class="form-control"';
            if ($field2_required == 'yes') {
                $output .= ' required';
            }
            $output .= '/>
                            </div>
                        </div>';
        }
        if ($field3_active != 'no') {
            $output .= '
                        <div class="form-group">
                            <label ' . $label_style . ' class="control-label col-md-3">' . $field3_name;
            if ($field3_required == 'yes') {
                $output .= ' <span class="text-theme">*</span>';
            }
            $output .= '
                            </label>
                            <div class="col-md-9">
                                <input type="text" name="' . strtolower(str_replace(' ', '_', $field3_name)) . '" class="form-control"';
            if ($field3_required == 'yes') {
                $output .= ' required';
            }
            $output .= '/>
                            </div>
                        </div>';
        }
        if ($field4_active != 'no') {
            $output .= '
                        <div class="form-group">
                            <label ' . $label_style . ' class="control-label col-md-3">' . $field4_name;
            if ($field4_required == 'yes') {
                $output .= ' <span class="text-theme">*</span>';
            }
            $output .= '
                            </label>
                            <div class="col-md-9">
                                <textarea class="form-control" name="' . strtolower(str_replace(' ', '_', $field4_name)) . '" rows="5"';
            if ($field4_required == 'yes') {
                $output .= ' required';
            }
            $output .= '
                            ></textarea>
                            </div>
                        </div>';
        }
        if ($captcha_active != 'no') {
            $output .= '
                            <div class="form-group">
                                <div class="col-md-3 control-label">
                                    <label class="control-label">Captcha <span class="text-theme">*</span></label>
                                </div>
                                <div class="col-md-4">
                                    <input required class="form-control input-lg" type="text" name="captcha" id="captcha" />
                                </div>
                                <div class="col-md-5">' . $this->createCaptcha() . '</div>' . form_error('captcha') . '</div>';
        }
        $output .= '
                        <div class="form-group">
                            <label ' . $label_style . ' class="control-label col-md-3"></label>
                            <div class="col-md-9 text-left">
                                <button type="submit" class="btn btn-contact btn-block"';
        if ($email_active == 'no') {
            $output .= 'style="pointer-events:none !important; background: rgb(165, 164, 164);border: 1px solid rgb(165, 164, 164);"';
        }
        $output .= '>Send Message</button>
                            </div>
                        </div>
                    </form>
                </div>
			</div>
	        ';
        return $output;
    }
Beispiel #18
0
    public function generate_content()
    {
        $sections_font_color = $this->block->data('sections_font_color');
        $sections_font_weight = $this->block->data('sections_font_weight');
        $sections_font_size = $this->block->data('sections_font_size');
        $sections_background_color = $this->block->data('sections_background_color');
        $post_count = $this->block->data('post_count');
        $animation = $this->block->data('animation');
        $animation_type = $this->block->data('animation_type');
        $animation_duration = $this->block->data('animation_duration');
        $animation_event = $this->block->data('animation_event');
        $animation_delay = $this->block->data('animation_delay');
        $settings[0][0] = 'recentitems' . $this->block->get_id();
        $settings[0][1] = $animation_event;
        $settings[0][2] = $animation_duration . ' ' . $animation_delay . ' ' . $animation_type;
        add_action("be_foot", generate_animation_events($settings));
        $section_style = 'style="
                    background-color: ' . $sections_background_color . ' !important;
                "';
        $section_link_style = 'style="
                    color: ' . $sections_font_color . ' !important;
                    font-weight: ' . $sections_font_weight . ' !important;
                    font-size: ' . $sections_font_size . ' !important;
                "';
        $CI =& get_instance();
        $CI->load->model('post');
        $all_posts = new Post();
        $BuilderEngine = new BuilderEngine();
        $recent_posts = $all_posts->order_by('time_created', 'desc');
        $recent_post_limit = $BuilderEngine->get_option('be_blog_num_recent_posts_displayed');
        if ($recent_post_limit == '' || $recent_post_limit == 0) {
            $recent_post_limit = 5;
        }
        if (isset($post_count)) {
            $recent_post_limit = $post_count;
        }
        $j = 1;
        $output = '
					<link href=\\"/builderengine/public/animations/css/animate.min.css\\" rel=\\"stylesheet\\" />
                     <link href="' . base_url('blocks/recent_posts/style.css') . '" rel="stylesheet">
					<div ' . $section_style . ' class="widgetblogrecent" id="blog">
					<div id="recentitems' . $this->block->get_id() . '" class="masonry-item-blog-recent">
                        <h4>RECENT BLOGS</h4>
                        <ul class="nav nav-list">';
        foreach ($recent_posts->get() as $recent_post) {
            if ($j <= $recent_post_limit) {
                $output .= '
                                    <li>
                                        <a ' . $section_link_style . ' href="' . base_url() . 'blog/post/' . $recent_post->slug . '">
                                            <i class="fa fa-sign-out"></i> 
                                        ' . $recent_post->title . '</a>
                                        <small>' . date('d.M.Y / h:i', $recent_post->time_created) . '</small>
                                    </li>';
                $j++;
            }
        }
        $output .= '
                        </ul>
                   </div> </div>';
        return $output;
    }
Beispiel #19
0
    public function generate_content()
    {
        $title = $this->block->data('title');
        $subtitle = $this->block->data('subtitle');
        $text = $this->block->data('text');
        $button_1_text = $this->block->data('button_1_text');
        $button_1_link = $this->block->data('button_1_link');
        $button_2_text = $this->block->data('button_2_text');
        $button_2_link = $this->block->data('button_2_link');
        $endtext = $this->block->data('endtext');
        // Style options
        $title_font_color = $this->block->data('title_font_color');
        $title_font_weight = $this->block->data('title_font_weight');
        $subtitle_font_color = $this->block->data('subtitle_font_color');
        $subtitle_font_weight = $this->block->data('subtitle_font_weight');
        $tex_font_color = $this->block->data('tex_font_color');
        $text_font_weight = $this->block->data('text_font_weight');
        $endtext_font_color = $this->block->data('endtext_font_color');
        $endtext_font_weight = $this->block->data('endtext_font_weight');
        $background_image = $this->block->data('background_image');
        $title_animation_type = $this->block->data('title_animation_type');
        $title_animation_duration = $this->block->data('title_animation_duration');
        $title_animation_event = $this->block->data('title_animation_event');
        $title_animation_delay = $this->block->data('title_animation_delay');
        $subtitle_animation_type = $this->block->data('subtitle_animation_type');
        $subtitle_animation_duration = $this->block->data('subtitle_animation_duration');
        $subtitle_animation_event = $this->block->data('subtitle_animation_event');
        $subtitle_animation_delay = $this->block->data('subtitle_animation_delay');
        $text_animation_type = $this->block->data('text_animation_type');
        $text_animation_duration = $this->block->data('text_animation_duration');
        $text_animation_event = $this->block->data('text_animation_event');
        $text_animation_delay = $this->block->data('text_animation_delay');
        $endtext_animation_type = $this->block->data('endtext_animation_type');
        $endtext_animation_duration = $this->block->data('endtext_animation_duration');
        $endtext_animation_event = $this->block->data('endtext_animation_event');
        $endtext_animation_delay = $this->block->data('endtext_animation_delay');
        $settings[0][0] = 'text' . $this->block->get_id();
        $settings[0][1] = $text_animation_event;
        $settings[0][2] = $text_animation_duration . ' ' . $text_animation_delay . ' ' . $text_animation_type;
        $settings[1][0] = 'title' . $this->block->get_id();
        $settings[1][1] = $title_animation_event;
        $settings[1][2] = $title_animation_duration . ' ' . $title_animation_delay . ' ' . $title_animation_type;
        $settings[2][0] = 'subtitle' . $this->block->get_id();
        $settings[2][1] = $subtitle_animation_event;
        $settings[2][2] = $subtitle_animation_duration . ' ' . $subtitle_animation_delay . ' ' . $subtitle_animation_type;
        $settings[3][0] = 'endtext' . $this->block->get_id();
        $settings[3][1] = $endtext_animation_event;
        $settings[3][2] = $endtext_animation_duration . ' ' . $endtext_animation_delay . ' ' . $endtext_animation_type;
        add_action("be_foot", generate_animation_events($settings));
        if ($title_font_color == '') {
            $title_font_color = '#fff';
        }
        if ($title_font_weight == '') {
            $title_font_weight = '600';
        }
        if ($subtitle_font_color == '') {
            $subtitle_font_color = '#fff';
        }
        if ($subtitle_font_weight == '') {
            $subtitle_font_weight = '300';
        }
        if ($tex_font_color == '') {
            $tex_font_color = '#DEDEDE';
        }
        if ($text_font_weight == '') {
            $text_font_weight = 'normal';
        }
        if ($endtext_font_color == '') {
            $endtext_font_color = '#DEDEDE';
        }
        if ($endtext_font_weight == '') {
            $endtext_font_weight = 'normal';
        }
        if ($background_image == '') {
            $background_image = base_url() . '/blocks/home_image/images/be_bg.jpg';
        }
        if ($title == '') {
            $title = 'BuilderEngine Version 3';
        }
        if ($subtitle == '') {
            $subtitle = 'Default 2015 Theme for BuilderEngine';
        }
        if ($text == '') {
            $text = 'Welcome to the Home Image Block, you can change the text here by clicking on the Designer button and selecting the Settings Option. Also you can press the Style Icon beside Settings where you can change background image or the text colors & sizes.';
        }
        if ($button_1_text == '') {
            $button_1_text = 'View Guide';
        }
        if ($button_1_link == '') {
            $button_1_link = 'http://builderengine.com/page-support.html';
        }
        if ($button_2_text == '') {
            $button_2_text = 'Admin Login';
        }
        if ($button_2_link == '') {
            $button_2_link = base_url('/admin');
        }
        if ($endtext == '') {
            $endtext = 'or View Cloud Login Account';
        }
        $title_style = 'style="
                    color: ' . $title_font_color . ' !important;
                    font-weight: ' . $title_font_weight . ' !important;
                "';
        $subtitle_style = 'style="
                    color: ' . $subtitle_font_color . ' !important;
                    font-weight: ' . $subtitle_font_weight . ' !important;
                "';
        $text_style = 'style="
                    color: ' . $tex_font_color . ' !important;
                    font-weight: ' . $text_font_weight . ' !important;
                "';
        $endtext_style = 'style="
                    color: ' . $endtext_font_color . ' !important;
                    font-weight: ' . $endtext_font_weight . ' !important;
                "';
        $output = '
            <link href="' . base_url('blocks/home_image/style.css') . '" rel="stylesheet">
			<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
			<div id="home" class="blockcontent-homeimage has-bg home custom-content block-big-image">
	            <div class="content-bg">
	                <img style="width:100%" src="' . $background_image . '" alt="Home" />
	            </div>
	            <div class="container home-content">
	                <h1 id="title' . $this->block->get_id() . '" ' . $title_style . '>' . $title . '</h1>
	                <h3 id="subtitle' . $this->block->get_id() . '" ' . $subtitle_style . '>' . $subtitle . '</h3>
	                <p id="text' . $this->block->get_id() . '" ' . $text_style . '>
	                    ' . $text . '
	                </p>
	                <a style="color:#fff !important" href="' . $button_1_link . '" class="btn btn-homeimage home_image_text">' . $button_1_text . '</a> 
	                <a style="color:#fff !important" href="' . $button_2_link . '" class="btn btn-outline home_image_text">' . $button_2_text . '</a><br />
	                <br />
	                <div id="endtext' . $this->block->get_id() . '" ' . $endtext_style . '>
	                ' . $endtext . '
	                </div>
	            </div>
	        </div>';
        return $output;
    }
    public function output_content()
    {
        $scroll_rate = $this->block->data('scroll_rate');
        $title = $this->block->data('title');
        $image = $this->block->data('image');
        $default_image = $this->block->data('default_image');
        $text1 = $this->block->data('text1');
        $text2 = $this->block->data('text2');
        $text3 = $this->block->data('text3');
        $button_url = $this->block->data('button_url');
        $title_font_color = $this->block->data('title_font_color');
        $title_font_size = $this->block->data('title_font_size');
        $title_font_weight = $this->block->data('title_font_weight');
        $title_background_color = $this->block->data('title_background');
        $title_animation_type = $this->block->data('title_animation_type');
        $title_animation_duration = $this->block->data('title_animation_duration');
        $title_animation_event = $this->block->data('title_animation_event');
        $title_animation_delay = $this->block->data('title_animation_delay');
        $text1_font_color = $this->block->data('text1_font_color');
        $text1_font_weight = $this->block->data('text1_font_weight');
        $text1_font_size = $this->block->data('text1_font_size');
        $text1_background_color = $this->block->data('text1_background_color');
        $text1_animation_type = $this->block->data('text1_animation_type');
        $text1_animation_duration = $this->block->data('text1_animation_duration');
        $text1_animation_event = $this->block->data('text1_animation_event');
        $text1_animation_delay = $this->block->data('text1_animation_delay');
        $text2_font_color = $this->block->data('text2_font_color');
        $text2_font_weight = $this->block->data('text2_font_weight');
        $text2_font_size = $this->block->data('text2_font_size');
        $text2_background_color = $this->block->data('text2_background_color');
        $text2_animation_type = $this->block->data('text2_animation_type');
        $text2_animation_duration = $this->block->data('text2_animation_duration');
        $text2_animation_event = $this->block->data('text2_animation_event');
        $text2_animation_delay = $this->block->data('text2_animation_delay');
        $text3_font_color = $this->block->data('text3_font_color');
        $text3_font_weight = $this->block->data('text3_font_weight');
        $text3_font_size = $this->block->data('text3_font_size');
        $text3_background_color = $this->block->data('text3_background_color');
        $text3_animation_type = $this->block->data('text3_animation_type');
        $text3_animation_duration = $this->block->data('text3_animation_duration');
        $text3_animation_event = $this->block->data('text3_animation_event');
        $text3_animation_delay = $this->block->data('text3_animation_delay');
        $button_font_color = $this->block->data('button_font_color');
        $button_font_weight = $this->block->data('button_font_weight');
        $button_font_size = $this->block->data('button_font_size');
        $button_background_color = $this->block->data('button_background_color');
        $button_animation_type = $this->block->data('button_animation_type');
        $button_animation_duration = $this->block->data('button_animation_duration');
        $button_animation_event = $this->block->data('button_animation_event');
        $button_animation_delay = $this->block->data('button_animation_delay');
        $image_animation_type = $this->block->data('image_animation_type');
        $image_animation_duration = $this->block->data('image_animation_duration');
        $image_animation_event = $this->block->data('image_animation_event');
        $image_animation_delay = $this->block->data('image_animation_delay');
        $background_image = $this->block->data('background_image');
        $background_default = $this->block->data('background_default');
        $settings[0][0] = 'stext1' . $this->block->get_id();
        $settings[0][1] = $text1_animation_event;
        $settings[0][2] = $text1_animation_duration . ' ' . $text1_animation_delay . ' ' . $text1_animation_type;
        $settings[1][0] = 'stitle' . $this->block->get_id();
        $settings[1][1] = $title_animation_event;
        $settings[1][2] = $title_animation_duration . ' ' . $title_animation_delay . ' ' . $title_animation_type;
        $settings[2][0] = 'sbutton' . $this->block->get_id();
        $settings[2][1] = $button_animation_event;
        $settings[2][2] = $button_animation_duration . ' ' . $button_animation_delay . ' ' . $button_animation_type;
        $settings[3][0] = 'simage' . $this->block->get_id();
        $settings[3][1] = $image_animation_event;
        $settings[3][2] = $image_animation_duration . ' ' . $image_animation_delay . ' ' . $image_animation_type;
        $settings[4][0] = 'stext2' . $this->block->get_id();
        $settings[4][1] = $text2_animation_event;
        $settings[4][2] = $text2_animation_duration . ' ' . $text2_animation_delay . ' ' . $text2_animation_type;
        $settings[5][0] = 'stext3' . $this->block->get_id();
        $settings[5][1] = $text3_animation_event;
        $settings[5][2] = $text3_animation_duration . ' ' . $text3_animation_delay . ' ' . $text3_animation_type;
        add_action("be_foot", generate_animation_events($settings));
        if (empty($title)) {
            $title = 'Simple <strong>Parallax</strong>';
        }
        if ($default_image == 'default' || $image == '') {
            $image = base_url() . 'blocks/simple_parallax_scroller/images/image2.png';
        }
        if (empty($text1)) {
            $text1 = 'This is text 1.Simple Parallax is a multipurpose parallax template for business or portfolio website. It is fully responsive design ready for PC, Tablet and Mobile.';
        }
        if (empty($text2)) {
            $text2 = 'This is text 2.Simple Parallax is a multipurpose parallax template for business or portfolio website. It is fully responsive design ready for PC, Tablet and Mobile.';
        }
        if (empty($text3)) {
            $text3 = 'This is text 3.Simple Parallax is a multipurpose parallax template for business or portfolio website. It is fully responsive design ready for PC, Tablet and Mobile.';
        }
        if (empty($button_url)) {
            $button_url = 'http://builderengine.com';
        }
        $title_style = 'style="
                    color: ' . $title_font_color . ' !important;
					font-size: ' . $title_font_size . ' !important;
                    font-weight: ' . $title_font_weight . ' !important;
					background-color: ' . $title_background_color . ' !important;
                "';
        $text1_style = 'style="
                    color: ' . $text1_font_color . ' !important;
					font-size: ' . $text1_font_size . ' !important;
                    font-weight: ' . $text1_font_weight . ' !important;
					background-color: ' . $text1_background_color . ' !important;
					padding-left:10px;
                "';
        $text2_style = 'style="
                    color: ' . $text2_font_color . ' !important;
					font-size: ' . $text2_font_size . ' !important;
                    font-weight: ' . $text2_font_weight . ' !important;
					background-color: ' . $text2_background_color . ' !important;
					padding-left:10px;
                "';
        $text3_style = 'style="
                    color: ' . $text3_font_color . ' !important;
					font-size: ' . $text3_font_size . ' !important;
                    font-weight: ' . $text3_font_weight . ' !important;
					background-color: ' . $text3_background_color . ' !important;
					padding-left:10px;
                "';
        $button_style = 'style="
                    color: ' . $button_font_color . ' !important;
					font-size: ' . $button_font_size . ' !important;
                    font-weight: ' . $button_font_weight . ' !important;
					background-color: ' . $button_background_color . ' !important;
					padding:15px 25px;
					font-size:18px;
                "';
        if ($background_default == 'default' || $background_image == '') {
            $background_style = 'style="
						background: url(' . base_url() . 'blocks/simple_parallax_scroller/images/parallax.jpg) repeat; !important;
				"';
        } else {
            $background_style = 'style="
						background: url(' . $background_image . ') repeat; !important;
				"';
        }
        $output = '
					<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet">
					<link type="text/css" rel="stylesheet" href="' . base_url('blocks/simple_parallax_scroller/css/style.css') . '">				
				<section class="section-one">
					<div class="prlx-1" ' . $background_style . '></div>
					
						<h2 id="stitle' . $this->block->get_id() . '" ' . $title_style . '>' . $title . '</h2>
						
						<p id="stext1' . $this->block->get_id() . '" class="text1" ' . $text1_style . '>' . $text1 . '</p>
						<p id="stext2' . $this->block->get_id() . '" class="text2" ' . $text2_style . '>' . $text2 . '</p>
						<p id="stext3' . $this->block->get_id() . '" class="text3" ' . $text3_style . '>' . $text3 . '</p>
						<a id="sbutton' . $this->block->get_id() . '" class="btn btn-large btn-danger btn-main" ' . $button_style . ' href="' . $button_url . '" target="_blank" >Tell Me More</a>
						<img id="simage' . $this->block->get_id() . '" class="img-responsive pull-right" style="width:450px; height:350px; position: absolute;right: 50px;top: 50px;" src="' . $image . '"/>
				</section>
			';
        return $output;
    }
    public function generate_content()
    {
        $CI =& get_instance();
        $CI->load->model('visits');
        $sequence = $CI->visits->populyar_post_by_visits();
        $sections_font_color = $this->block->data('sections_font_color');
        $sections_font_weight = $this->block->data('sections_font_weight');
        $sections_font_size = $this->block->data('sections_font_size');
        $sections_background_color = $this->block->data('sections_background_color');
        $post_count = $this->block->data('post_count');
        $alphabetical_order = $this->block->data('alphabetical_order');
        $category = $this->block->data('category');
        $sections_animation_type = $this->block->data('sections_animation_type');
        $sections_animation_duration = $this->block->data('sections_animation_duration');
        $sections_animation_event = $this->block->data('sections_animation_event');
        $sections_animation_delay = $this->block->data('sections_animation_delay');
        $settings[0][0] = 'category' . $this->block->get_id();
        $settings[0][1] = $sections_animation_event;
        $settings[0][2] = $sections_animation_duration . ' ' . $sections_animation_delay . ' ' . $sections_animation_type;
        add_action("be_foot", generate_animation_events($settings));
        $section_style = 'style="
                    background-color: ' . $sections_background_color . ' !important;
                "';
        $section_link_style = 'style="
                    color: ' . $sections_font_color . ' !important;
                    font-weight: ' . $sections_font_weight . ' !important;
                    font-size: ' . $sections_font_size . ' !important;
                "';
        $users = new User();
        $all_posts = new Post();
        $all_category = new Category();
        $BuilderEngine = new BuilderEngine();
        $recent_posts = $all_posts->order_by('time_created', 'desc');
        if ($category == 'all' || intval($category) == 0) {
            $recent_posts = $recent_posts->get();
        } else {
            $recent_posts = $recent_posts->get_where(array('category_id' => intval($category)));
        }
        $recent_post_limit = $BuilderEngine->get_option('be_blog_posts_per_page');
        if ($recent_post_limit == '' || $recent_post_limit == 0) {
            $recent_post_limit = 5;
        }
        if (isset($post_count)) {
            if ($post_count == 'all') {
                $recent_post_limit = count($recent_posts->all);
            } else {
                $recent_post_limit = $post_count;
            }
        }
        if ($alphabetical_order == 'yes') {
            ksort($sequence);
        }
        $output = '<div class="row">
                <div ' . $section_style . ' class="masonry-list">';
        $i = 1;
        foreach ($sequence as $key => $value) {
            foreach ($recent_posts as $post) {
                if ($key == $post->slug) {
                    if ($i <= $recent_post_limit) {
                        $user = $users->get_by_id($post->user_id);
                        $output .= '
							<link href="' . base_url('blocks/category_posts/style.css') . '" rel="stylesheet">
							<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
							<div class="col-md-6" id="blog">
                                <li class="masonry-item-blog-category-post">
                                    <div class="item" id="category' . $this->block->get_id() . '">
                                        <div class="item-title blog-header-small">
                                            <h2><a ' . $section_link_style . ' href="' . base_url('/blog/post') . '/' . $post->slug . '"> ' . $post->title . '</a></h2>  
											<small class="space14">';
                        $post_comments = array();
                        $CI =& get_instance();
                        $CI->load->model('comment');
                        $comments = new Comment();
                        foreach ($comments->where('post_id', $post->id)->get() as $comment) {
                            array_push($post_comments, $comment->id);
                        }
                        $num_comments = count($post_comments);
                        $pluralizer = $num_comments == 1 ? 'Comment' : 'Comments';
                        $output .= '                                          
                                            <a href="/blog/post/' . $post->slug . '#comments" class="label label-default light"><i class="fa fa-comment-o"></i> ' . $num_comments . '' . $pluralizer . '</a>
                                            <span class="label label-default light">' . date('M d, Y', $post->time_created) . '</span> 
											<a class="label label-default light pull-right"><i>Post by: </i> ' . $user->username . ' </a>
                                        </div>

                                        <figure>
                                            <a href="/blog/post/' . $post->slug . '"><img src="' . $post->image . '" class="img-responsive thumbnail" alt="" /></a>
                                        </figure>';
                        $text_without_slashes = ChEditorfix($post->text);
                        if (strlen($post->text) > 300) {
                            $text = substr($text_without_slashes, 0, 300) . '...';
                        } else {
                            $text = $text_without_slashes;
                        }
                        $output .= '<div style="word-wrap: break-word;">' . $text . '</div>
                                        <a href="/blog/post/' . $post->slug . '" class="btn-primary btn-xs pull-right"><i class="fa fa-sign-out"></i> READ MORE..</a>
                                    </div>
                                
                                </li></div>';
                        $i++;
                    }
                }
            }
        }
        $output .= '
                </div></div>';
        return $output;
    }
Beispiel #22
0
    public function generate_content()
    {
        // style
        $sections_font_color = $this->block->data('sections_font_color');
        $sections_font_weight = $this->block->data('sections_font_weight');
        $sections_font_size = $this->block->data('sections_font_size');
        $sections_background_color = $this->block->data('sections_background_color');
        $subsections_font_color = $this->block->data('subsections_font_color');
        $subsections_font_weight = $this->block->data('subsections_font_weight');
        $subsections_font_size = $this->block->data('subsections_font_size');
        $subsections_background_color = $this->block->data('subsections_background_color');
        $animation_type = $this->block->data('animation_type');
        $animation_duration = $this->block->data('animation_duration');
        $animation_event = $this->block->data('animation_event');
        $animation_delay = $this->block->data('animation_delay');
        $settings[0][0] = 'header-navbar';
        $settings[0][1] = $animation_event;
        $settings[0][2] = $animation_duration . ' ' . $animation_delay . ' ' . $animation_type;
        add_action("be_foot", generate_animation_events($settings));
        $section_style = 'style="
                    background-color: ' . $sections_background_color . ' !important;
                "';
        $section_link_style = 'style="
                    color: ' . $sections_font_color . ' !important;
                    font-weight: ' . $sections_font_weight . ' !important;
                    font-size: ' . $sections_font_size . ' !important;
                "';
        $subsection_style = 'style="
                    background-color: ' . $subsections_background_color . ' !important;
                "';
        $subsection_link_style = 'style="
                    color: ' . $subsections_font_color . ' !important;
                    font-weight: ' . $subsections_font_weight . ' !important;
                    font-size: ' . $subsections_font_size . ' !important;
                "';
        $output = '
				<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
                <link href="' . base_url('blocks/navbar/style.css') . '" rel="stylesheet">
                <div class="navbar-header custom-content">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-navbar">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>
                <div class="collapse navbar-collapse" id="header-navbar" style="background-color: transparent !important;">
                    <ul ' . $section_style . ' class="nav navbar-nav navbar-right">';
        foreach (get_links() as $link) {
            $output .= '
                        <li class="dropdown">';
            if (count($link->childs) > 0) {
                $output .= '
                            <a ' . $section_link_style . ' href="' . $link->target . '" class="dropdown-toggle" data-toggle="dropdown">
                                ' . $link->name . '
                                <b class="caret"></b>                           
                            </a>
                            <ul ' . $subsection_style . ' class="dropdown-menu dropdown-menu-left animated fadeInDown" style="z-index:10000">';
                foreach ($link->childs as $sub_link) {
                    $output .= '
                                <li><a ' . $subsection_link_style . ' href="' . base_url($sub_link->target) . '">' . $sub_link->name . '</a></li>';
                }
                $output .= '</ul>';
            } else {
                $output .= '<a href="' . base_url($link->target) . '">' . $link->name . '</a>';
            }
            $output .= '
                        </li>';
        }
        $output .= '
                    </ul>
                </div>';
        return $output;
    }
Beispiel #23
0
    public function generate_content()
    {
        $sections_font_color = $this->block->data('sections_font_color');
        $sections_font_weight = $this->block->data('sections_font_weight');
        $sections_font_size = $this->block->data('sections_font_size');
        $sections_background_color = $this->block->data('sections_background_color');
        $categoty_count = $this->block->data('categoty_count');
        $alphabetical_order_categoty = $this->block->data('alphabetical_order_categoty');
        $sections_animation_type = $this->block->data('sections_animation_type');
        $sections_animation_duration = $this->block->data('sections_animation_duration');
        $sections_animation_event = $this->block->data('sections_animation_event');
        $sections_animation_delay = $this->block->data('sections_animation_delay');
        $settings[0][0] = 'blog_cat';
        $settings[0][1] = $sections_animation_event;
        $settings[0][2] = $sections_animation_duration . ' ' . $sections_animation_delay . ' ' . $sections_animation_type;
        add_action("be_foot", generate_animation_events($settings));
        $section_style = 'style="
                    background-color: ' . $sections_background_color . ' !important;
                "';
        $section_link_style = 'style="
                    color: ' . $sections_font_color . ' !important;
                    font-weight: ' . $sections_font_weight . ' !important;
                    font-size: ' . $sections_font_size . ' !important;
                "';
        $output = '
                    <link href="' . base_url('blocks/categories/style.css') . '" rel="stylesheet">
					<link href="' . base_url('builderengine/public/animations/css/animate.min.css') . '" rel="stylesheet" />
					<div ' . $section_style . ' class="widgetblogcategorylist" id="blog_cat">
					<div class="masonry-item-blog-category-list">
                        <h4>BLOG CATEGORIES</h4>
                        <ul class="nav nav-list">
                            <li><a ' . $section_link_style . ' href="' . base_url('blog/all_posts') . '"><i class="fa fa-th-large"></i> All Blog Posts</a></li>';
        $i = 1;
        $categories = new Category();
        $categories = $categories->get();
        if ($categoty_count != '') {
            if ($categoty_count == 'all') {
                $count = 0;
                foreach ($categories->all as $key => $value) {
                    if ($value->parent_id == 0) {
                        $count++;
                    }
                }
            } else {
                $count = $categoty_count;
            }
        } else {
            $count = 5;
        }
        $category_name = array();
        foreach ($categories->all as $key => $value) {
            if ($value->parent_id == 0) {
                array_push($category_name, $value->name);
            }
        }
        if ($alphabetical_order_categoty == 'yes') {
            asort($category_name);
        }
        foreach ($category_name as $key => $value) {
            foreach ($categories as $parent_category) {
                if ($value == $parent_category->name) {
                    if ($i <= $count) {
                        if ($parent_category->parent_id == 0) {
                            if ($parent_category->has_children()) {
                                $output .= '
                                                        <li id="parent' . $i . '"><a ' . $section_link_style . ' href="' . base_url('blog/category/' . $parent_category->id) . '"><i class="fa fa-plus-circle"></i> ' . $parent_category->name . '</a></li>
                                                            <ul class="child' . $i . 'nav nav-list" style="display: none; margin-left: 10%">
                                                                  <li><a ' . $section_link_style . ' href="' . base_url('blog/category/' . $parent_category->id) . '"><i class="fa fa-th-large"></i> All Posts: ' . $parent_category->name . '</a></li>';
                                foreach ($categories as $category) {
                                    if ($category->parent_id == $parent_category->id) {
                                        $output .= '
                                                                        <li><a ' . $section_link_style . ' href="' . base_url('blog/category/' . $category->id) . '"><i class="fa fa-arrow-circle-o-right"></i>' . $category->name . '</a></li>';
                                    }
                                }
                                $output .= '
                                                        </ul>';
                            } else {
                                $output .= '
                                                        <li>
                                                            <a ' . $section_link_style . ' href="' . base_url('blog/category/' . $parent_category->id) . '">
                                                                <i class="fa fa-arrow-circle-o-right"></i>
                                                            ' . $parent_category->name . '</a>
                                                        </li>';
                            }
                        }
                    }
                    $i++;
                }
            }
        }
        $output .= '
                        </ul>
                    </div></div>';
        return $output;
    }
 public function generate_content()
 {
     global $carousel_js_settings;
     $image1 = $this->block->data('image1');
     $image2 = $this->block->data('image2');
     $image3 = $this->block->data('image3');
     $image1_animation_type = $this->block->data('image1_animation_type');
     $image1_animation_duration = $this->block->data('image1_animation_duration');
     $image1_animation_event = $this->block->data('image1_animation_event');
     $image1_animation_delay = $this->block->data('image1_animation_delay');
     $image2_animation_type = $this->block->data('image2_animation_type');
     $image2_animation_duration = $this->block->data('image2_animation_duration');
     $image2_animation_event = $this->block->data('image2_animation_event');
     $image2_animation_delay = $this->block->data('image2_animation_delay');
     $image3_animation_type = $this->block->data('image3_animation_type');
     $image3_animation_duration = $this->block->data('image3_animation_duration');
     $image3_animation_event = $this->block->data('image3_animation_event');
     $image3_animation_delay = $this->block->data('image3_animation_delay');
     $settings[0][0] = 'imgcrs1' . $this->block->get_id();
     $settings[0][1] = $image1_animation_event;
     $settings[0][2] = $image1_animation_duration . ' ' . $image1_animation_delay . ' ' . $image1_animation_type;
     $settings[1][0] = 'imgcrs2' . $this->block->get_id();
     $settings[1][1] = $image2_animation_event;
     $settings[1][2] = $image2_animation_duration . ' ' . $image2_animation_delay . ' ' . $image2_animation_type;
     $settings[2][0] = 'imgcrs3' . $this->block->get_id();
     $settings[2][1] = $image3_animation_event;
     $settings[2][2] = $image3_animation_duration . ' ' . $image3_animation_delay . ' ' . $image3_animation_type;
     add_action("be_foot", generate_animation_events($settings));
     $carousel_js_settings[0] = $this->block->data('carousel_navigation');
     $carousel_js_settings[1] = $this->block->data('carousel_speed');
     $carousel_js_settings[2] = $this->block->data('carousel_pagination_speed');
     switch ($this->block->data('carousel_type')) {
         case "custom":
             return $this->output_custom_carousel();
             break;
         default:
             return $this->output_custom_carousel();
             break;
     }
 }