PHP Classes

File: aksara/Modules/Addons/Views/themes/detail.php

Recommend this page to a friend!
  Classes of Aby Dahana  >  Aksara  >  aksara/Modules/Addons/Views/themes/detail.php  >  Download  
File: aksara/Modules/Addons/Views/themes/detail.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 updates the following changes:
1. Core: update the statement to skip the field inside the form validation. Update the null value to empty when preparing the field data value;
2. Validation: Update the statement under "unique" validation when second parameter is empty;
3. Add-Ons: Add the theme and modules install and update THRU from the Aksara Market. Finally!;
4. Modules and Themes: Changes on statement when removing the temporary folder from the extract package;
5. Refine the looks and feel on the Add-Ons page.
Initial commit for update 4.2.8

1. Refine addons views;
2. Refine grid view;
3. Refine require.js;
4. Add the capability to reload the page after CRUD action from outside the data table
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

1. Template core, add the limit number to the pagination;
2. Addons, capability to import the module and theme. Refine the market addon fetching;
3. Installer, correct the migration.
Fix theme thumbnail
Initial commit for update 4.2.8
Date: 7 days ago
Size: 5,157 bytes
 

Contents

Class file image Download
<?php
    $carousel
= null;
   
$attribution = null;
   
    if(isset(
$detail->screenshot) && $detail->screenshot)
    {
        foreach(
$detail->screenshot as $key => $val)
        {
            if(
file_exists(ROOTPATH . 'themes' . DIRECTORY_SEPARATOR . $detail->folder . DIRECTORY_SEPARATOR . str_replace(array('../', '..\\', './', '.\\'), null, $val->src)))
            {
               
$screenshot = base_url('themes/' . $detail->folder . '/' . str_replace(array('../', '..\\', './', '.\\'), null, $val->src));
            }
            else
            {
               
$screenshot = get_image(null, 'placeholder_thumb.png');
            }
           
           
$carousel .= '
                <div class="carousel-item rounded'
. (!$key ? ' active' : null) . '">
                    <a href="'
. $screenshot . '" target="_blank">
                        <img src="'
. $screenshot . '" class="d-block rounded w-100" alt="' . $val->alt . '">
                    </a>
                </div>
            '
;
        }
    }
   
    if(isset(
$detail->attribution) && $detail->attribution)
    {
        foreach(
$detail->attribution as $key => $val)
        {
           
$attribution .= '
                <div class="row">
                    <div class="col-4">
                        <label class="mb-0 text-muted">
                            '
. $key . '
                        </label>
                    </div>
                    <div class="col-8">
                        <label class="mb-0">
                            '
. $val . '
                        </label>
                    </div>
                </div>
            '
;
        }
    }
?>
<div class="container-fluid pt-3 pb-3">
    <div class="row">
        <div class="col-md-6 col-lg-7">
            <div class="relative rounded" style="overflow: hidden">
                <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
                    <div class="carousel-inner">
                        <?php echo $carousel; ?>
</div>
                    <?php if(sizeof($detail->screenshot) > 1) { ?>
<a class="carousel-control-prev gradient-right" href="#carouselExampleControls" role="button" data-slide="prev">
                            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                            <span class="sr-only">
                                <?php echo phrase('previous'); ?>
</span>
                        </a>
                        <a class="carousel-control-next gradient-left" href="#carouselExampleControls" role="button" data-slide="next">
                            <span class="carousel-control-next-icon" aria-hidden="true"></span>
                            <span class="sr-only">
                                <?php echo phrase('next'); ?>
</span>
                        </a>
                    <?php } ?>
</div>
            </div>
        </div>
        <div class="col-md-6 col-lg-5">
            <h5>
                <?php echo $detail->name; ?>
<?php echo ($detail->type == 'backend' ? '<span class="badge badge-dark float-right">' . phrase('back_end') . '</span>' : '<span class="badge badge-success float-right">' . phrase('front_end') . '</span>'); ?>
</h5>
            <hr class="mt-1 mb-1" />
            <div class="row">
                <div class="col-4">
                    <label class="mb-0 text-muted">
                        <?php echo phrase('author'); ?>
</label>
                </div>
                <div class="col-8">
                    <label class="mb-0">
                        <?php echo (isset($detail->website) ? '<a href="' . $detail->website . '" target="_blank"><b>' . $detail->author . '</b></a>' : '<b>' . $detail->author . '</b>'); ?>
</label>
                </div>
            </div>
            <div class="row">
                <div class="col-4">
                    <label class="mb-0 text-muted">
                        <?php echo phrase('version'); ?>
</label>
                </div>
                <div class="col-8">
                    <label class="mb-0">
                        <?php echo $detail->version; ?>
</label>
                </div>
            </div>
            <?php echo $attribution; ?>
<hr class="mt-1" />
            <div class="mb-0">
                <?php echo nl2br($detail->description); ?>
</div>
        </div>
    </div>
    <hr class="row" />
    <div class="row">
        <div class="col-md-6 col-lg-7">
            <a href="<?php echo current_page('../update', array('item' => $detail->folder)); ?>" class="btn btn-outline-success btn-sm --modal">
                &nbsp;
                <i class="mdi mdi-auto-fix"></i>
                <?php echo phrase('update'); ?>
&nbsp;
            </a>
        </div>
        <div class="col-md-6 col-lg-5">
            <div class="row">
                <div class="col-sm-4">
                    <?php if(($detail->type == 'backend' && $detail->folder == get_setting('backend_theme')) || ($detail->type == 'frontend' && $detail->folder == get_setting('frontend_theme'))) { ?>
<a href="<?php echo current_page('../customize', array('theme' => $detail->folder)); ?>" class="btn btn-dark btn-block btn-sm --modal">
                        <i class="mdi mdi-cogs"></i>
                        <?php echo phrase('customize'); ?>
</a>
                    <?php } else { ?>
<a href="<?php echo current_page('../activate'); ?>" class="btn btn-success btn-block btn-sm --modal">
                        <i class="mdi mdi-check"></i>
                        <?php echo phrase('activate'); ?>
</a>
                    <?php } ?>
</div>
                <div class="col-sm-4">
                    <a href="<?php echo base_url(('backend' == $detail->type ? 'dashboard' : null), array('aksara_mode' => 'preview-theme', 'aksara_theme' => $detail->folder, 'integrity_check' => $detail->integrity)); ?>" class="btn btn-outline-primary btn-block btn-sm" target="_blank">
                        <i class="mdi mdi-magnify"></i>
                        <?php echo phrase('preview'); ?>
</a>
                </div>
                <div class="col-sm-4">
                    <a href="<?php echo current_page('../delete', array('item' => $detail->folder)); ?>" class="btn btn-outline-danger btn-block btn-sm --modal">
                        <i class="mdi mdi-window-close"></i>
                        <?php echo phrase('delete'); ?>
</a>
                </div>
            </div>
        </div>
    </div>
</div>

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