PHP Classes

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

Recommend this page to a friend!
  Classes of Aby Dahana  >  Aksara  >  aksara/Modules/Blogs/Views/category.php  >  Download  
File: aksara/Modules/Blogs/Views/category.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

This commit replace the dependent configuration with newest CodeIgniter configuration (path /aksara/Config);

Changes for database migrations: Adds seeder to seeds the dummy data instead of writing it under migration.

Core and Model: Updating the missing placement for case insensitive query parameter;

String helper: remove unused parameter;

Touching the core javascript: /public/assets/local/require.min.js (add the missing array usage for css);

Minor updates for the core module
Initial commit for update 4.2.8

This commit focuses on functioning the market addons. Current progress was finished for:
1. Theme and module import;
2. Theme and module uninstall;
3. Theme preview (pre-install);
4. Theme changer;
5. Theme customizer;

Updating the theme and url helper that previously not working with imported theme and modules. Add the function to call the asset under theme and module. The route module (core) was added for getting the theme and module assets.

Changes on Assets controller to working with theme preview (related to base_url and asset_url configuration value).

Add the extension (intl) check (pre-install) and phpspreadsheet dependencies to scale up the app to produce the excel import and export.

Correct the installation migration that previously fail to execute (caused by invalid json format while insert the data on group privileges table "by typo"). Change the structure of app__users table and change the country field to country_id (also rewrite users and account module).

CORE
Adds the capability to using custom title and icon for each request method (create, read, update, delete etc.) that previously applied to set_desrcription() with array pair: [$method => $title] | [$method => $icon]. Correcting the missing variable called from CRUD search feature.

This commit already tested both MySQLi, PostgreSQL and SQLite3. You may help me to test to install it under SQL Server database to check if it's has no error.
Initial commit for update 4.2.8

- Add the capability to get nearest features when using OpenLayers;
- Refine the core module views.
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.
Date: 5 days ago
Size: 3,532 bytes
 

Contents

Class file image Download
<div class="leading pt-5 pb-5 mb-5 bg-light relative" style="background: url(<?php echo (isset($category->category_image) && $category->category_image != 'placeholder.png' ? get_image('blogs', $category->category_image) : 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 $meta->description; ?>
</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('category' => (service('request')->uri->getTotalSegments() > 1 ? service('request')->uri->getSegment(2) : null), '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_under') . ' ' . $meta->title; ?>" />
                    <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="container">
    <div class="row">
        <?php
           
if($results)
            {
                foreach(
$results as $key => $val)
                {
                   
$item_tags = array_map('trim', explode(',', $val->post_tags));
                   
$tags = null;
                   
                    if(
sizeof($item_tags) > 0)
                    {
                        foreach(
$item_tags as $label => $badge)
                        {
                            if(
$label == 2) break;
                            if(
$badge)
                            {
                               
$tags .= '
                                    <a href="'
. go_to('../tags', array('q' => $badge)) . '" class="--xhr">
                                        <span class="badge badge-secondary mr-2">
                                            #'
. trim($badge) . '
                                        </span>
                                    </a>
                                '
;
                            }
                        }
                    }
                   
                    echo
'
                        <div class="col-sm-2 col-md-4 col-lg-3">
                            <div class="card border-0 rounded-more shadow-sm mb-5">
                                <a href="'
. base_url(array('blogs', $val->category_slug, $val->post_slug)) . '" class="--xhr d-block">
                                    <div class="relative rounded-top" style="background:url('
. get_image('blogs', $val->featured_image, 'thumb') . ') center center no-repeat; background-size: cover; height: 200px">
                                        <div class="clip gradient-top rounded-top"></div>
                                        <div class="absolute bottom p-3">
                                            <h5 class="text-light">
                                                '
. truncate($val->post_title, 80) . '
                                            </h5>
                                        </div>
                                    </div>
                                </a>
                                <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
'
                    <div class="col-lg-12">
                        '
. $template->pagination . '
                    </div>
                '
;
            }
            else
            {
                echo
'
                    <div class="col-lg-6 offset-lg-3 text-center">
                        <div class="pt-5 pb-5">
                            <i class="mdi mdi-dropbox mdi-5x text-muted"></i>
                            <h2>
                                '
. phrase('the_category_does_not_have_any_post') . '
                            </h2>
                        </div>
                    </div>
                '
;
            }
       
?>
</div>
</div>

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