Bonjour,
serait il possible de faire un tutoriel sur comment intégrer un thème comme Core Admin ?

et accessible uniquement pour les personnes ayant acheter ce thème.

6 réponses


Hotgeart
Réponse acceptée

Et si tu fais $this->Html->image('/icons/mail-receive.png'); ?

Gné ? Le core admin n'est que de HTML/CSS. tu fais un layout admin et l'histoire est réglé. Grafikart en parle dans sa formation du comment utiliser les layouts.

giizmo
Auteur

merci j ai réussi ;) par contre si tu aurais une idée pour les images car certaine ne s affiche pas selon ou je suis dans le panel

Tu les affiches via le helper ? En relatif/Absolue ? Peut voir le code ?

giizmo
Auteur

Voici le code du layout:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> 
    <head>
        <title></title>    
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
        <title><?php echo $title_for_layout; ?></title>        
        <link rel="stylesheet" href="css/style.css" />
        <link rel="stylesheet" href="js/jwysiwyg/jquery.wysiwyg.old-school.css" />
        <!-- jQuery AND jQueryUI -->
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
        <?php echo $this->Html->css('style.css'); ?>
        <?php echo $this->Html->css('js/jwysiwyg/jquery.wysiwyg.old-school.css'); ?>
        <?php echo $this->Html->script('/js/cookie/jquery.cookie.js'); ?>
        <?php echo $this->Html->script('/js/jwysiwyg/jquery.wysiwyg.js'); ?>
        <?php echo $this->Html->script('/js/tooltipsy.min.js'); ?>
        <?php echo $this->Html->script('/js/iphone-style-checkboxes.js'); ?>
        <?php echo $this->Html->script('/js/excanvas.js'); ?>
        <?php echo $this->Html->script('/js/zoombox/zoombox.js'); ?>
        <?php echo $this->Html->script('/js/visualize.jQuery.js'); ?>
        <?php echo $this->Html->script('/js/jquery.uniform.js'); ?>
        <?php echo $this->Html->script('/js/main.js'); ?>
        <?php echo $this->Html->script('less'); ?>
        <?php echo $this->Html->script('less'); ?>
    </head> 
<body class="wood dark">        
        <!--HEAD--> 
        <div id="head">
            <div class="left">
                <a href="#" class="button profile"><img src="img/icons/top/huser.png" alt="" /></a>
                Bonjour , 
                <a href="#"><?php echo ('Admin'); ?></a>
                |
                <?php echo $this->Html->link('Se déconnecter',array('controller'=>'admins','action'=>'logout','admin'=>false)); ?>               
            </div>
            <div class="right">
                <form action="#" id="search" class="search placeholder">
                    <label>Vous recherchez un truc ?</label>
                    <input type="text" value="" name="q" class="text"/>
                    <input type="submit" value="rechercher" class="submit"/>
                </form>
            </div>
        </div>
         <!--SIDEBAR--> 
        <div id="sidebar" class="black">
            <ul>
                <li>
                    <a href="<?php echo $this->Html->url("/"); ?>">
                        <img src="img/icons/menu/home.png" alt="" />
                        Home
                    </a>
                    </li>

                    <li>
                    <a href="<?php echo $this->Html->url("/admin"); ?>">
                        <img src="img/icons/menu/home.png" alt="" />
                        Retour
                    </a>
                </li>
                <li class="current"><a href=""><img src="img/icons/menu/layout.png" alt="" />Configuration</a>                
                    <ul>
                        <li><?php echo $this->Html->link("Pages",array('controller'=>'pages','action'=>'index')); ?></li>
                        <li><?php echo $this->Html->link("Articles",array('controller'=>'posts','action'=>'index')); ?></li>
                        <li><?php echo $this->Html->link("Categorie",array('controller'=>'categories','action'=>'index')); ?></li>
                        <li><?php echo $this->Html->link("Utilisateurs",array('controller'=>'users','action'=>'index')); ?></li>                        
                        <!-- <li><a href=""></a></li>
                        <li><a href=""></a></li>
                        <li><a href=""></a></li>
                        <li><a href=""></a></li>
                        <li><a href=""></a></li> -->
                    </ul>
                </li>
                <li><a href="#"><img src="img/icons/menu/brush.png" alt="" /> Sous menu</a>
                    <ul>
                        <li><a href="#">Fake menu #1</a></li>
                        <li><a href="#">Fake menu #2</a></li>
                        <li><a href="#">Fake menu #3</a></li>
                    </ul>
                </li>
                <li><a href="#"><img src="img/icons/menu/brush.png" alt="" /> Sous menu infini</a>
                    <ul>
                        <li><a href="#">Fake menu #1</a></li>
                        <li><a href="#">Fake menu #2</a></li>
                        <li><a href="#">Fake menu #3</a>
                        <ul>
                            <li><a href="#">Fake menu #1</a></li>
                            <li><a href="#">Fake menu #2</a></li>
                            <li><a href="#">Fake menu #3</a>
                                <ul>
                                    <li><a href="#">Fake menu #1</a></li>
                                    <li><a href="#">Fake menu #2</a></li>
                                    <li><a href="#">Fake menu #3</a></li>
                                </ul>
                            </li>
                        </ul>
                        </li>
                    </ul>
                </li>
                <li class="nosubmenu"><a href="<?php echo $this->Html->url(array('action'=>'clearcache','controller'=>'pages'),true); ?>"><img src="img/icons/menu/dropbox.png" alt="" /> Vider le cache</a></li>
                <li class="nosubmenu"><a href="modal.html" class="zoombox w450 h700"><img src="img/icons/menu/comment.png" alt="" /> Boîte modale</a></li>
            </ul>
            <a href="#collapse" id="menucollapse"> Réduire la sidebar</a>
        </div>            
        <!--CONTENT--> 
        <div id="content" class="black">                     
            <h1><img src="img/icons/dashboard.png" alt="" />  Panel d'administration</h1>
                            <!--nocache-->
                                <?php echo $this->Session->flash(); ?>
                            <!--/nocache-->

            <div class="bloc left">
                <div class="title">
                    Racourci
                </div>
                <div class="content dashboard">
                    <div class="center">
                        <a href="<?php echo $this->Html->url(array('action'=>'index','controller'=>'posts')); ?>" class="shortcut">
                            <img src="img/icons/posts.png" alt="" width="48" height="48"/>
                            Ecrire Article
                        </a>
                        <a href="<?php echo $this->Html->url(array('action'=>'index','controller'=>'pages')); ?>" class="shortcut">
                            <img src="img/page.png" alt="" width="48" height="48" />
                            Créer une page
                        </a>
                        <a href="<?php echo $this->Html->url(array('action'=>'index','controller'=>'categories')); ?>" class="shortcut">
                            <img src="img/contact.png" alt="" width="48" height="48" />
                            Gérer les categories
                        </a>
                        <a href="<?php echo $this->Html->url(array('action'=>'index','controller'=>'users')); ?>" class="shortcut last">
                            <img src="img/icons/users.png" alt="" width="48" height="48" />
                            Gérer les utilsateurs
                        </a>                      
                        <div class="cb"></div>
                    </div>
                    <p><!-- Icônes par <a href="http://icondrawer.com">icondrawer.com</a> --></p>
                </div>
            </div>                           
            <div class="bloc right">
                <div class="title">
                    Aujourd'hui
                </div>
                <div class="content">
                    <div class="left">
                        <table class="noalt">
                            <thead>
                                <tr>
                                    <th colspan="2"><em>Contenu</em></th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td><h4>460</h4></td>
                                    <td>Articles</td>
                                </tr>
                                <tr>
                                    <td><h4>12</h4></td>
                                    <td>Pages</td>
                                </tr>
                                <tr>
                                    <td><h4>5</h4></td>
                                    <td>Catégories</td>
                                </tr>
                                <tr>
                                    <td><h4>20 000</h4></td>
                                    <td>Contacts</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="right">
                        <table class="noalt">
                            <thead>
                                <tr>
                                    <th colspan="2"><em>Comments</em></th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td><h4>46 000</h4></td>
                                    <td class="good">Comments</td>
                                </tr>
                                <tr>
                                    <td><h4><?php echo $this->Html->image('icons/mail-receive.png'); ?></h4></td>
                                    <td class="neutral">                                        
                                        <a href="">
                                            Waiting for validation
                                        </a>                                        
                                    </td>
                                </tr>
                                <tr>
                                    <td><h4>0</h4></td>
                                    <td class="bad"><a href="#">Spams</a></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="cb"></div>
                </div>
            </div>
            <div class="cb"></div>

            <div class="bloc">
                <div class="title">
                    <?php echo $title_for_layout; ?>
                </div>
                <div class="content">                    
                      <?php echo $content_for_layout; ?>                       
                    <div class="cb"></div>
                </div>
            </div>                                                  
        </div>        
    </body>
    <?php echo $this->Html->script('admin'); ?>
    <?php echo $scripts_for_layout;?>
</html>

ensuite sur chaque page j ai ajouter ceci pour que cela fonctionne :

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
<?php echo $this->Html->css('/style.css'); ?>
<?php echo $this->Html->css('/js/jwysiwyg/jquery.wysiwyg.old-school.css'); ?>
<?php echo $this->Html->script('/js/cookie/jquery.cookie.js'); ?>
<?php echo $this->Html->script('/js/jwysiwyg/jquery.wysiwyg.js'); ?>
<?php echo $this->Html->script('/js/tooltipsy.min.js'); ?>
<?php echo $this->Html->script('/js/iphone-style-checkboxes.js'); ?>
<?php echo $this->Html->script('/js/excanvas.js'); ?>
<?php echo $this->Html->script('/js/zoombox/zoombox.js'); ?>
<?php echo $this->Html->script('/js/visualize.jQuery.js'); ?>
<?php echo $this->Html->script('/js/jquery.uniform.js'); ?>
<?php echo $this->Html->script('/js/main.js'); ?>
<?php echo $this->Html->script('less'); ?>

l affichage des pages quand je clique ce fait bien mise a part les images.

merci d 'avance ^^

giizmo
Auteur

^^ mdr des fois je me dit que c d une logique imparable
mci beaucoup
a tte