当前位置: 首页>>代码示例>>PHP>>正文


PHP modX::getFullTableName方法代码示例

本文整理汇总了PHP中modX::getFullTableName方法的典型用法代码示例。如果您正苦于以下问题:PHP modX::getFullTableName方法的具体用法?PHP modX::getFullTableName怎么用?PHP modX::getFullTableName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在modX的用法示例。


在下文中一共展示了modX::getFullTableName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: displayModule

 /**
  * Returns the parsed module template
  * @return string
  */
 function displayModule()
 {
     include 'lang/' . $this->language['languagefile'] . '.managerwidgets.php';
     if ($this->configIsSet()) {
         $theme = $this->modx->db->select('setting_value', $this->modx->getFullTableName('system_settings'), 'setting_name=\'manager_theme\'', '');
         $theme = $this->modx->db->getRow($theme);
         $theme = $theme['setting_value'] != '' ? '/' . $theme['setting_value'] : '';
         $widgets = array();
         foreach ($piwikWidgets as $piwikWidget) {
             $this->chunkie->setPlaceholder('', $piwikWidget, 'widget');
             $this->chunkie->setPlaceholder('piwikURL', 'http://' . $this->options['piwikURL'], 'widget');
             $this->chunkie->setPlaceholder('piwikSiteId', $this->options['piwikSiteId'], 'widget');
             $this->chunkie->setPlaceholder('piwikTokenAuth', $this->options['piwikTokenAuth'], 'widget');
             $this->chunkie->setTpl($this->chunkie->getTemplateChunk('@FILE templates/widget.template.html'));
             $this->chunkie->prepareTemplate('', array(), 'widget');
             $widgets[] = $this->chunkie->process('widget');
         }
         $this->chunkie->setPlaceholder('widgets', implode("\n", $widgets), 'module');
         $this->chunkie->setPlaceholder('language', $this->language, 'module');
         $this->chunkie->setPlaceholder('piwikURL', 'http://' . $this->options['piwikURL'], 'module');
         $this->chunkie->setPlaceholder('piwikSiteId', $this->options['piwikSiteId'], 'module');
         $this->chunkie->setPlaceholder('piwikTokenAuth', $this->options['piwikTokenAuth'], 'module');
         $this->chunkie->setPlaceholder('managertheme', $theme, 'module');
         $this->chunkie->setTpl($this->chunkie->getTemplateChunk('@FILE templates/module.template.html'));
         $this->chunkie->prepareTemplate('', array(), 'module');
         $template = $this->chunkie->process('module');
     } else {
         $theme = $this->modx->db->select('setting_value', $this->modx->getFullTableName('system_settings'), 'setting_name=\'manager_theme\'', '');
         $theme = $this->modx->db->getRow($theme);
         $theme = $theme['setting_value'] != '' ? '/' . $theme['setting_value'] : '';
         $this->chunkie->setPlaceholder('language', $this->language, 'module');
         $this->chunkie->setPlaceholder('managertheme', $theme, 'module');
         $this->chunkie->setTpl($this->chunkie->getTemplateChunk('@FILE templates/noconfig.template.html'));
         $this->chunkie->prepareTemplate('', array(), 'module');
         $template = $this->chunkie->process('module');
     }
     return $template;
 }
开发者ID:Jako,项目名称:PiwikX,代码行数:42,代码来源:piwikx.class.php

示例2: xPDO

$can_migrate_comments = $modx->addPackage('quip', '../../components/quip/model/', $modx->db->config['table_prefix']);
// Now instantiate a new xpdo object and add our wordpress package.  This gives
// us the ability to make queries on the wordpress database as an xpdo object.
$wp = new xPDO('mysql:host=' . $wp_database_host . ';dbname=' . $wp_database_name . ';charset=' . $wp_database_charset, $wp_database_username, $wp_database_password);
$can_migrate_wp = $wp->addPackage('wordpress', '../', $wp_database_prefix);
if (!$can_migrate_wp) {
    die('Wordpress Package could not be loaded.');
}
/**
 * during migrations where you need to try, try and try again to get it right,
 * it's easier to truncate the tables here instead of doing it manually.
 * setting $empty_tables to true will delete data from the following tables.
 */
if ($empty_tables) {
    if ($can_migrate_comments) {
        $modx->db->query('TRUNCATE ' . $modx->getFullTableName('quip_comments'));
        $modx->db->query('TRUNCATE ' . $modx->getFullTableName('quip_comments_closure'));
    }
    $modx->db->query('TRUNCATE ' . $modx->getFullTableName('site_content'));
    $modx->db->query('TRUNCATE ' . $modx->getFullTableName('site_templates') . 'WHERE id != 1');
    $modx->db->query('TRUNCATE ' . $modx->getFullTableName('site_tmplvars'));
    $modx->db->query('TRUNCATE ' . $modx->getFullTableName('site_tmplvar_contentvalues'));
    $modx->db->query('TRUNCATE ' . $modx->getFullTableName('site_tmplvar_templates'));
}
// first set up the document parents
$post_parent = setupParent($post_document_parent, 'Post');
if ($post_parent === false) {
    die('There was an error setting up the post parent.
       Check your configuration value for $post_document_parent');
}
$page_parent = setupParent($page_document_parent, 'Page');
开发者ID:vgrish,项目名称:WordPress-to-MODx,代码行数:31,代码来源:wp-migrate.php


注:本文中的modX::getFullTableName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。