Monthly Archives: January 2015

OpenSencillo file system

File system after OpenSencillo installation.

OpenSencillo 2015.003 file system

System folders:

  • fw_cache – folder for OpenSencillo Cache or QuickCache subsystem
  • fw_core – OpenSencillo and LightWeight Sencillo main core
  • fw_doxygen – doxygen configuration for create docs
  • fw_headers – config and core modules layer (if you want find core modules and system configuration)
  • fw_libraries – system libraries for standard OpenSencillo PHP classes
  • fw_modules – destination for custom modules. If you write new module, save it here.
  • fw_templates – destination for all templates

System files:

  • .htaccess – special file for configuration your hosting
  • firststart.json – information about first start your OpenSencillo installation
  • ajax.slot.php – file for obtaining and sending AJAX request
  • basicstrap.php – basic requires for bootup OpenSencillo before your PHP code
  • cache.php – usable if cache is Allowed
  • index.php – introducing OpenSencillo basicstrap
  • yourcode.php – if you write main code for your webpage, save it here. It is most important file for all your projects.
Facebooktwitterredditpinterestlinkedinmail

OpenSencillo simple debug

You can add pretty debug. This tool not work correct if your server using PHP xdebug module.

  1. Open yourcode.php to edit your new webpage.
  2. Add code:
    <?php
      $seo=new headerSeo;
      $seo->encode();
      $seo->robots();
      echo $seo->save();
    ?>
    <body>
    <?php
      $var=array('my first debug','my second debug',null,123); //debuging variable
      log::vd($var); //Print pretty var_dump equivalent
    ?>
    </body>
    </html>
    
  3. Save yourcode.php and open your example.com first page where is installed OpenSencillo.
  4. Check example.com with your first pretty debug.
Facebooktwitterredditpinterestlinkedinmail

OpenSencillo add subpages

You can add your first subpage with custom URL.

  1. Find file yourcode.php.
  2. Open yourcode.php to edit your new webpage.
  3. Add code:
    <?php
      $seo=new headerSeo; //add minimal seo and create opening HTML tag
      $seo->encode(); //add page encoding to UTF-8
      $seo->robots(); //add support for bots control
      echo $seo->save(); //generate meta tags
    ?>
    <body>
    <?php
      switch(PAGE)
      {
        //create new subpage by case
        case 'my-first-subpage':
        case '/my-first-subpage':
          echo 'HELLO SUBPAGE';
        break;
        //create homepage / landing page
        case '':
        case '/':
          echo 'HELLO WORLD';
        break;
        //create custom 404 page
        default:
          echo 'MY 404 PAGE';
      }
    ?>
    </body>
    </html>
    
  4. Save yourcode.php and open your example.com first page where is installed OpenSencillo.
  5. Check example.com/my-first-subpage new subpage with pretty URL.
Facebooktwitterredditpinterestlinkedinmail

OpenSencillo hello world webpage

After installation you can write your first webpage.

  1. Find file yourcode.php.
  2. Open yourcode.php to edit your new webpage.
  3. Add code:
    <?php
      $seo=new headerSeo; //add minimal seo and add opening HTML tag
      $seo->encode(); //add page encoding to UTF-8
      $seo->robots(); //add support for bots control
      echo $seo->save(); //generate meta tags
    ?>
    
    <body>
      HELLO WORLD
    </body>
    </html>
    
  4. Save yourcode.php and open your example.com first page where is installed OpenSencillo.
Facebooktwitterredditpinterestlinkedinmail