PHP Classes

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

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

- 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: 9 hours ago
Size: 3,568 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', 'tag-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_id' => 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'); ?>" value="<?php echo service('request')->getGet('q'); ?>" />
                    <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">
                                <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
'
                    <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('your_tag_did_not_match_any_result') . '
                            </h2>
                        </div>
                    </div>
                '
;
            }
       
?>
</div>
</div>

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