21
olivee
Re: Admin interface for theme
  • 2014/2/18 0:15

  • olivee

  • Just popping in

  • Posts: 24

  • Since: 2014/1/28







22
olivee
Re: Admin interface for theme
  • 2014/2/5 9:04

  • olivee

  • Just popping in

  • Posts: 24

  • Since: 2014/1/28


I think I can do this but I must have time.
for now I should finish theme builder part and than that will be easy for module.

what about menus and slider construct can you have the output like you want to have



23
olivee
Re: Admin interface for theme
  • 2014/2/4 12:40

  • olivee

  • Just popping in

  • Posts: 24

  • Since: 2014/1/28


function news_TableExists($tablename){
        global 
$xoopsDB;
        
$result=$xoopsDB->queryF("SHOW TABLES LIKE '$tablename'");
        return(
$xoopsDB->getRowsNum($result) > 0);
    }
    global 
$xoopsDB;
    
// 1) Create, if it does not exists, the config_theme table
    
if(!news_TableExists($xoopsDB->prefix('config_theme'))){

        
$sqlinstall 'CREATE TABLE '.$xoopsDB->prefix('config_theme')." (
        
          conf_id smallint(5) unsigned NOT NULL AUTO_INCREMENT,
          conf_modid smallint(5) unsigned NOT NULL DEFAULT '0',
          conf_catid smallint(5) unsigned NOT NULL DEFAULT '0',
          conf_name varchar(25) NOT NULL DEFAULT '',
          conf_title varchar(255) NOT NULL DEFAULT '',
          conf_value text,
          url varchar(255) DEFAULT NULL,
          conf_desc varchar(255) NOT NULL DEFAULT '',
          conf_formtype varchar(15) NOT NULL DEFAULT '',
          conf_valuetype varchar(10) NOT NULL DEFAULT '',
          conf_order smallint(5) unsigned NOT NULL DEFAULT '0',
          PRIMARY KEY (conf_id),
          KEY conf_mod_cat_id (conf_modid,conf_catid),
          KEY conf_order (conf_order)
        ) ENGINE=MyISAM;"
;
        if (!
$xoopsDB->queryF($sqlinstall)) {
            echo 
'<br />install failed1';
        }else{
            echo 
'<br>table config_theme est installé<br>';
            
$new 'a:2:{i:0;a:3:{s:4:"type";s:6:"column";s:4:"size";s:3:"1/4";s:6:"fields";a:1:{s:7:"content";s:4:"test";}}i:1;a:3:{s:4:"type";s:6:"column";s:4:"size";s:3:"1/4";s:6:"fields";a:1:{s:7:"content";s:4:"iiii";}}}';
            
$sqltemplateinsert "INSERT INTO " $xoopsDB -> prefix('config_theme') . " (conf_id, conf_catid, conf_name, conf_value) VALUES ('1', '3', 'template', '$new')";

                    
$resultsqltemplate $xoopsDB->queryF($sqltemplateinsert);
                     
                    if(!
$resultsqltemplate){
                        echo 
'probleme_INSERT_config_template' ;
                    }else{
                     
                        echo  
'INSERT_config_template_ok' ;
                    }
        }
    }else{
    echo 
'<br>table config_theme déjà installé<br>';
    }
    
        
// 1) Create, if it does not exists, the config_theme_menu table
    
if(!news_TableExists($xoopsDB->prefix('config_theme_menu'))){

        
$sqlinstall2 'CREATE TABLE '.$xoopsDB->prefix('config_theme_menu')." (
        
                id int(11) NOT NULL AUTO_INCREMENT,
              catmenu varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
              label varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
              link varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '#',
              image varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
              parent int(11) NOT NULL DEFAULT '0',
              sort int(11) DEFAULT NULL,
              PRIMARY KEY (id)
            ) ENGINE=MyISAM;"
;
        if (!
$xoopsDB->queryF($sqlinstall2)) {
            echo 
'<br />install failed2';
        }else{
            echo 
'<br>table config_theme_menu est installé<br>';
        }
    }else{
    echo 
'<br>table config_theme_menu déjà installé<br>';
    }


the first table is a copy of config table of xoops with the config of theme. the second is for storing menus and sliders.

==> after official release we can integrate this with all theme by copying admin folder and 4 file php. I will explan this after finish.

I can't reproduce the error, it looks like a probleme with php version.

I can't see how can i do this with a module, perheps we can have a link or a redirect to admin folder in the interface of xoops. I will think of this



24
olivee
Admin interface for theme
  • 2014/2/3 21:42

  • olivee

  • Just popping in

  • Posts: 24

  • Since: 2014/1/28


This is my little project for XOOPS quickly done. I want to make an admin interface for my theme. I started using the theme maitscorporate of Mariane.
it can be integrated with any other theme once ok.

This is just to show you what I did until now so it's not finished yet. I can say that this is an alpha version. it is necessary to test locally and do not use it on a website online until the confirmation.

I want to share with you for testing and improve based on your feedback ...

In all there are 5 parts

/themes/maitscocorporate/admin/cf-admin.php?page=dashboard
It is a summary or an overview of configuration.

/themes/maitscocorporate/admin/cf-admin.php?page=menu
create, edit and delete an endless menus with 5 skins PREDEFINED

/themes/maitscocorporate/admin/cf-admin.php?page=slider
create, edit and delete an infinite sliders with 5 skins PREDEFINED

/themes/maitscocorporate/admin/cf-admin.php?page=messages
modify the predefined settings in the theme

/themes/maitscocorporate/admin/cf-admin.php?page=theme
drag & drop & resize & add element to theme.html. COMING SOON




Download




TopTop
« 1 2 (3)



Login

Who's Online

181 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 181


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits