Ver Mensaje Individual
  #4 (permalink)  
Antiguo 31/01/2013, 05:31
Avatar de OlgaHernandezPerez
OlgaHernandezPerez
 
Fecha de Ingreso: enero-2013
Mensajes: 3
Antigüedad: 11 años, 3 meses
Puntos: 0
Respuesta: Añadir nuevas caracteristicas a un CMS

Imagenes de las Librerias con sus Clases y Funciones:
---------------------------------------------------------------------
Libreria CMS



Libreria Freelance Manager



Libreria Digital Downloads


------------------------------------------------------------

Un ejemplo dentro de "class_core.php": en CMS

Código:
<?php
  /**
   * Core Class
   *
   * @package CMS Pro
   * @author wojoscripts.com
   * @copyright 2010
   * @version $Id: core_class.php, v2.00 2011-04-20 10:12:05 gewa Exp $
   */
  
  if (!defined("_VALID_PHP"))
      die('Direct access to this location is not allowed.');
  
  class Core
  {
      
	  public $msgs = array();
	  public $showMsg;
	  private $sTable = "settings";
	  public $action = null;
	  public $maction = null;
	  public $paction = null;
	  public $do = null;
      public $year = null;
      public $month = null;
      public $day = null;
	  
      private $langdir;
      public $language;
	  public $lang_dir;
	  public $dblang;
	  public $langlist;
	  
	  
      /**
       * Core::__construct()
       * 
       * @return
       */
      public function __construct()
      {
          $this->getSettings();
		  $this->getLanguage();
		  $this->getAction();
		  $this->getModAction();
		  $this->getPlugAction();
		  $this->getDo();
		  
		  ($this->dtz) ? date_default_timezone_set($this->dtz) : date_default_timezone_set('GMT');
		  
          $this->year = (get('year')) ? get('year') : strftime('%Y');
          $this->month = (get('month')) ? get('month') : strftime('%m');
          $this->day = (get('day')) ? get('day') : strftime('%d');
          
          return mktime(0, 0, 0, $this->month, $this->day, $this->year);
      }
      
      /**
       * Core::getSettings()
       *
       * @return
       */
      private function getSettings()
      {
          global $db;
          $sql = "SELECT * FROM " . $this->sTable;
          $row = $db->first($sql);
          
          $this->site_name = cleanOut($row['site_name']);
		  $this->company = cleanOut($row['company']);
          $this->site_url = $row['site_url'];
		  $this->site_email = $row['site_email'];
		  $this->theme = $row['theme'];
		  $this->theme_var = $row['theme_var'];
		  $this->seo = $row['seo'];
		  $this->perpage = $row['perpage'];
		  $this->backup = $row['backup'];
		  $this->thumb_w = $row['thumb_w'];
		  $this->thumb_h = $row['thumb_h'];
		  $this->img_w = $row['img_w'];
		  $this->img_h = $row['img_h'];
		  $this->avatar_w = $row['avatar_w'];
		  $this->avatar_h = $row['avatar_h'];
		  $this->short_date = $row['short_date'];
		  $this->long_date = $row['long_date'];
		  $this->dtz = $row['dtz'];
		  $this->weekstart = $row['weekstart'];
		  $this->lang = $row['lang'];
		  $this->show_lang = $row['show_lang'];
		  $this->lang_dir = $row['langdir'];
		  $this->eucookie = $row['eucookie'];
		  $this->logo = $row['logo'];
		  $this->currency = $row['currency'];
		  $this->cur_symbol = $row['cur_symbol'];
		  $this->offline = $row['offline'];
		  $this->offline_msg = $row['offline_msg'];
		  $this->offline_data = $row['offline_data'];
		  $this->reg_verify = $row['reg_verify'];
		  $this->notify_admin = $row['notify_admin'];
		  $this->auto_verify = $row['auto_verify'];
		  $this->reg_allowed = $row['reg_allowed'];
		  $this->user_limit = $row['user_limit'];
		  $this->flood = $row['flood'];
		  $this->attempt = $row['attempt'];
		  $this->logging = $row['logging'];
		  $this->enablefb = $row['enablefb'];
		  $this->fbapi = $row['fbapi'];
		  $this->fbsecret = $row['fbsecret'];
		  $this->analytics = $row['analytics'];
          $this->metakeys = $row['metakeys'];
          $this->metadesc = $row['metadesc'];
		  $this->mailer = $row['mailer'];
		  $this->smtp_host = $row['smtp_host'];
		  $this->smtp_user = $row['smtp_user'];
		  $this->smtp_pass = $row['smtp_pass'];
		  $this->smtp_port = $row['smtp_port'];
		  $this->is_ssl = $row['is_ssl'];
		  $this->sendmail = $row['sendmail'];
		  
		  $this->version = $row['version'];

      }
etc....
Un ejemplo dentro de "class_core.php": en Freelance Manager

Código:
<?php
  /**
   * Core Class
   *
   * @package Freelance Manager
   * @author wojoscripts.com
   * @copyright 2011
   * @version $Id: core_class.php, v1.00 2011-06-05 10:12:05 gewa Exp $
   */
  
  if (!defined("_VALID_PHP"))
      die('Direct access to this location is not allowed.');

  class Core
  {

      const sTable = "settings";
      public $year = null;
      public $month = null;
      public $day = null;
	  public $language;


      /**
       * Core::__construct()
       * 
       * @return
       */
      function __construct()
      {
          $this->getSettings();
		  $this->getLanguage();

          ($this->dtz) ? date_default_timezone_set($this->dtz) : date_default_timezone_set('GMT');

          $this->year = (get('year')) ? get('year') : strftime('%Y');
          $this->month = (get('month')) ? get('month') : strftime('%m');
          $this->day = (get('day')) ? get('day') : strftime('%d');

          return mktime(0, 0, 0, $this->month, $this->day, $this->year);
      }


      /**
       * Core::getSettings()
       * 
       * @return
       */
      private function getSettings()
      {
          $sql = "SELECT * FROM " . self::sTable;
          $row = Registry::get("Database")->first($sql);

          $this->company = $row->company;
          $this->site_url = $row->site_url;
          $this->site_email = $row->site_email;
          $this->address = $row->address;
          $this->city = $row->city;
          $this->state = $row->state;
          $this->zip = $row->zip;
          $this->phone = $row->phone;
          $this->fax = $row->fax;
          $this->logo = $row->logo;
          $this->short_date = $row->short_date;
          $this->long_date = $row->long_date;
          $this->dtz = $row->dtz;
		  $this->lang  = $row->lang;
		  $this->weekstart  = $row->weekstart;
		  $this->enable_reg = $row->enable_reg;
          $this->enable_tax = $row->enable_tax;
          $this->tax_name = $row->tax_name;
          $this->tax_rate = $row->tax_rate;
		  $this->tax_number = $row->tax_number;
		  $this->enable_offline = $row->enable_offline;
		  $this->offline_info = $row->offline_info;
		  $this->invoice_note = $row->invoice_note;
		  $this->invoice_number = $row->invoice_number;
          $this->enable_uploads = $row->enable_uploads;
          $this->file_types = $row->file_types;
          $this->file_max = $row->file_max;
          $this->perpage = $row->perpage;
          $this->sbackup = $row->sbackup;
          $this->currency = $row->currency;
          $this->cur_symbol = $row->cur_symbol;
		  $this->tsep = $row->tsep;
		  $this->dsep = $row->dsep;
		  $this->invdays = $row->invdays;
          $this->mailer = $row->mailer;
          $this->smtp_host = $row->smtp_host;
          $this->smtp_user = $row->smtp_user;
          $this->smtp_pass = $row->smtp_pass;
          $this->smtp_port = $row->smtp_port;
		  $this->sendmail = $row->sendmail;
		  $this->is_ssl = $row->is_ssl;

          $this->crmv = $row->crmv;

Última edición por OlgaHernandezPerez; 31/01/2013 a las 05:37