PHP Classes

File: aksara/Modules/Blogs/Views/index.php

Recommend this page to a friend!
  Classes of Aby Dahana  >  Aksara  >  aksara/Modules/Blogs/Views/index.php  >  Download  
File: aksara/Modules/Blogs/Views/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Aksara
A CodeIgniter based API and CRUD generator
Author: By
Last change: Initial commit for update 4.2.8

This commit includes many update such like:
1. Capability to install the modules and auto generate the menus and permission (sets from module properties) from module package;
2. Capability to remove junk menus and permission when the related module is uninstalled;
3. Verification during uninstall the active theme, that will throw a notification;
4. Refine the blog module;
5. Restructure the coding style;
6. Correcting the PostgreSQL syntax support.
Initial commit for update 4.2.8

1. Update the installation (database migration) for the timestamp field type;
2. Removing bubble animation for landing page and blogs;
3. Change the excel export with PHPOffice/PHPSpreadSheet;
4. Change the default return type for i18n asset.
Initial commit for update version 4.2.8

1. \aksara\Laboratory\Core.php: assign the method of "parent_module" related to view template and permission, add the option parameter for "set_title" to set the individual title for current action (index, create, read, update), improve the autocomplete function;

2. \aksara\Laboratory\Model.php: add the method to get error message, throwing an error message than error exception;

3. \aksara\Laboratory\Permission.php: change the thrown error method when validate AJAX request;

4. \aksara\Laboratory\Template.php: correct the view path finder of sub-modules;

5. Change the template of core modules;

6. Add the reverse geocoding for openlayers when updating the layer feature;

7. Minor updates for core plugins.
Revert "Initial commit for updat 4.2.8"

This reverts commit 5d2eaabba9d42ad8dc108eaf4303b2d58a50a735.
Initial commit for update 3.2.8

1. \aksara\Laboratory\Core.php: assign the method of "parent_module" related to view template and permission, add the option parameter for "set_title" to set the individual title for current action (index, create, read, update), improve the autocomplete function;

2. \aksara\Laboratory\Model.php: add the method to get error message, throwing an error message than error exception;

3. \aksara\Laboratory\Permission.php: change the thrown error method when validate AJAX request;

4. \aksara\Laboratory\Template.php: correct the view path finder of sub-modules;

5. Change the template of core modules;

6. Add the reverse geocoding for openlayers when updating the layer feature;

7. Minor updates for core plugins.
Revert "Revert "Revert "Initial commit for updat 4.2.8"""

This reverts commit 73226fbaf324b253ed2c3888e8eabd81ca8ef946.
Revert "Revert "Initial commit for updat 4.2.8""

This reverts commit 94a714c958f637d932a6bea4bb15a884ddef733e.
Revert "Initial commit for updat 4.2.8"

This reverts commit 5d2eaabba9d42ad8dc108eaf4303b2d58a50a735.
Revert "Revert "Initial commit for updat 4.2.8""

This reverts commit 91ca274f4924f2ba97344ab5d80cb64f6a1a1274.
Revert "Initial commit for updat 4.2.8"

This reverts commit 5d2eaabba9d42ad8dc108eaf4303b2d58a50a735.
Initial commit for updat 4.2.8

1. \aksara\Laboratory\Core.php: assign the method of "parent_module" related to view template and permission, add the option parameter for "set_title" to set the individual title for current action (index, create, read, update), improve the autocomplete function;

2. \aksara\Laboratory\Model.php: add the method to get error message, throwing an error message than error exception;

3. \aksara\Laboratory\Permission.php: change the thrown error method when validate AJAX request;

4. \aksara\Laboratory\Template.php: correct the view path finder of sub-module;

5. Change the template of core module;

6. Add the reverse geocoding for openlayers when updating the layer feature;

7. Minor update for core plugins.
Initial commit for update 4.2.8

Files changed:
1. \aksara\Common.php (remove the single quote string replacement);
2. \aksara\laboratory\Core.php (correcting the response for API request);
3. \aksara\laboratory\Template.php (adds the API documentation for administration menu);
4. Adds the required validation for some modules;
5. Adds the API Documentation under the API module;
6. Adds the parameter from the data atribut when using swiperJS;
7. Change the structure of session table.
8. Minor changes for installation page;
9. Minor changes for core modules.
Replace the Owl Carousel with SwiperJS
Date: 10 hours ago
Size: 4,966 bytes
 

Contents

Class file image Download
<div class="leading pt-5 pb-5 mb-5 bg-light relative" style="background: url(<?php echo get_image('blogs', 'cover.jpg'); ?>) center center no-repeat; background-size: cover">
    <div class="clip gradient-top"></div>
    <div class="container pt-5 pb-5">
        <div class="row">
            <div class="col-md-8 offset-md-2">
                <h1 class="text-center text-light">
                    <?php echo $meta->title; ?>
</h1>
                <p class="lead text-center text-light mb-5">
                    <?php echo truncate($meta->description, 256); ?>
</p>
            </div>
        </div>
        <div class="row">
            <div class="col-md-8 offset-md-2 col-lg-6 offset-lg-3">
                <form action="<?php echo base_url('blogs/search', array('per_page' => null)); ?>" method="POST" class="form-horizontal relative --xhr-form">
                    <input type="text" name="q" class="form-control form-control-lg pt-4 pr-4 pb-4 pl-4 border-0 rounded-pill" placeholder="<?php echo phrase('search_post'); ?>" />
                    <button type="submit" class="btn btn-lg float-right absolute top right">
                        <i class="mdi mdi-magnify font-weight-bold"></i>
                    </button>
                </form>
            </div>
        </div>
    </div>
</div>

<div class="">
    <div class="container">
        <?php
            $posts
= null;
           
            foreach(
$spotlight as $key => $val)
            {
               
$posts .= '
                    <div class="swiper-slide">
                        <div class="card border-0 rounded-more shadow-sm mb-5">
                            <div class="relative rounded-top" style="background:url('
. get_image('blogs', $val->featured_image, 'thumb') . ') center center no-repeat; background-size: cover; height: 256px">
                                <a href="'
. base_url(array('blogs', $val->category_slug, $val->post_slug)) . '" class="--xhr d-block">
                                    <div class="clip gradient-top rounded-top"></div>
                                    <div class="absolute bottom p-3">
                                        <h5 class="text-light" data-toggle="tooltip" title="'
. $val->post_title . '">
                                            '
. truncate($val->post_title, 80) . '
                                        </h5>
                                    </div>
                                </a>
                                <a href="'
. base_url(array('blogs', $val->category_slug)) . '" class="--xhr badge badge-primary absolute right">
                                    '
. $val->category_title . '
                                </a>
                            </div>
                            <div class="card-body">
                                <p class="card-text">
                                    <a href="'
. base_url(array('blogs', $val->category_slug, $val->post_slug)) . '" class="--xhr d-block">
                                        '
. truncate($val->post_excerpt, 100) . '
                                    </a>
                                </p>
                                <p class="card-text">
                                    <i class="mdi mdi-clock-outline"></i> '
. time_ago($val->updated_timestamp) . '
                                </p>
                            </div>
                        </div>
                    </div>
                '
;
            }
               
            echo
'
                <h3 class="text-center text-md-left text-primary pt-3 mb-0 text-uppercase">
                    '
. phrase('spotlight') . '
                </h3>
                <p class="text-center text-md-left">
                    '
. phrase('an_article_spotlight_you_may_want_to_know') . '
                </p>
                <div class="swiper-container swiper" data-sm-items="1" data-md-items="2" data-lg-items="3" data-autoplay="1" data-space-between="30" data-navigation="1">
                    <div class="swiper-wrapper">
                        '
. $posts . '
                    </div>
                </div>
            '
;
       
?>
</div>
</div>

<div class="">
    <div class="container">
        <?php
           
foreach($articles as $key => $val)
            {
               
$posts = null;
               
                foreach(
$val->posts as $_key => $_val)
                {
                   
$posts .= '
                        <div class="swiper-slide">
                            <div class="card border-0 rounded-more shadow-sm mb-5">
                                <div class="relative rounded-top" style="background:url('
. get_image('blogs', $_val->featured_image, 'thumb') . ') center center no-repeat; background-size: cover; height: 256px">
                                    <a href="'
. base_url(array('blogs', $val->category_slug, $_val->post_slug)) . '" class="--xhr d-block">
                                        <div class="clip gradient-top rounded-top"></div>
                                        <div class="absolute bottom p-3">
                                            <b class="text-light">
                                                '
. truncate($_val->post_title, 80) . '
                                            </b>
                                        </div>
                                    </a>
                                </div>
                                <div class="card-body">
                                    <p class="card-text">
                                        <a href="'
. base_url(array('blogs', $val->category_slug, $_val->post_slug)) . '" class="--xhr d-block">
                                            '
. truncate($_val->post_excerpt, 100) . '
                                        </a>
                                    </p>
                                    <p class="card-text text-sm">
                                        <i class="mdi mdi-clock-outline"></i> '
. time_ago($_val->updated_timestamp) . '
                                    </p>
                                </div>
                            </div>
                        </div>
                    '
;
                }
               
                echo
'
                    <a href="'
. base_url(array('blogs', $val->category_slug)) . '" class="--xhr">
                        <h3 class="text-center text-md-left text-primary pt-3 mb-0">
                            '
. $val->category_title . '
                        </h3>
                    </a>
                    <p class="text-center text-md-left">
                        '
. $val->category_description . '
                    </p>
                    <div class="swiper-container swiper" data-sm-items="1" data-md-items="2" data-lg-items="4" data-autoplay="1" data-space-between="30" data-navigation="1">
                        <div class="swiper-wrapper">
                            '
. $posts . '
                        </div>
                    </div>
                '
;
            }
       
?>
</div>
</div>

For more information send a message to info at phpclasses dot org.