• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_theme函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_theme函数的典型用法代码示例。如果您正苦于以下问题:PHP get_theme函数的具体用法?PHP get_theme怎么用?PHP get_theme使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: jetpack_load_infinite_scroll_annotation

/**
* Load theme's infinite scroll annotation file, if present in the IS plugin.
* The `setup_theme` action is used because the annotation files should be using `after_setup_theme` to register support for IS.
*
* As released in Jetpack 2.0, a child theme's parent wasn't checked for in the plugin's bundled support, hence the convoluted way the parent is checked for now.
*
* @uses is_admin, wp_get_theme, get_theme, get_current_theme, apply_filters
* @action setup_theme
* @return null
*/
function jetpack_load_infinite_scroll_annotation()
{
    if (is_admin() && isset($_GET['page']) && 'jetpack' == $_GET['page']) {
        $theme = function_exists('wp_get_theme') ? wp_get_theme() : get_theme(get_current_theme());
        if (!is_a($theme, 'WP_Theme') && !is_array($theme)) {
            return;
        }
        /**
         * Filter the directory where all Infinite Scroll compat files are located.
         *
         * @since 2.0.0
         *
         * @param string $var Infinite Scroll compat file URL.
         * @param string $theme['Stylesheet'] Theme directory URI.
         */
        $customization_file = apply_filters('infinite_scroll_customization_file', dirname(__FILE__) . "/infinite-scroll/themes/{$theme['Stylesheet']}.php", $theme['Stylesheet']);
        if (is_readable($customization_file)) {
            require_once $customization_file;
        } elseif (!empty($theme['Template'])) {
            $customization_file = dirname(__FILE__) . "/infinite-scroll/themes/{$theme['Template']}.php";
            if (is_readable($customization_file)) {
                require_once $customization_file;
            }
        }
    }
}
开发者ID:tinggao,项目名称:woofWarrior,代码行数:36,代码来源:infinite-scroll.php


示例2: test_theme_sandbox

	/**
	 * @expectedDeprecated get_theme
	 * @expectedDeprecated get_themes
	 */
	function test_theme_sandbox() {
		$theme = get_theme('Sandbox');

		$this->assertFalse( empty($theme) );

		#echo gen_tests_array('theme', $theme);

		$this->assertEquals( 'Sandbox', $theme['Name'] );
		$this->assertEquals( 'Sandbox', $theme['Title'] );
		$this->assertEquals( 'A theme with powerful, semantic CSS selectors and the ability to add new skins.', $theme['Description'] );
		$this->assertEquals( '<a href="http://andy.wordpress.com/">Andy Skelton</a> &amp; <a href="http://www.plaintxt.org/">Scott Allan Wallick</a>', $theme['Author'] );
		$this->assertEquals( '0.6.1-wpcom', $theme['Version'] );
		$this->assertEquals( 'sandbox', $theme['Template'] );
		$this->assertEquals( 'sandbox', $theme['Stylesheet'] );

		$template_files = $theme['Template Files'];

		$this->assertEquals( $this->theme_root.'/sandbox/functions.php', reset( $template_files ) );
		$this->assertEquals( $this->theme_root.'/sandbox/index.php', next( $template_files ) );

		$stylesheet_files = $theme['Stylesheet Files'];

		$this->assertEquals( $this->theme_root.'/sandbox/style.css', reset( $stylesheet_files ) );

		$this->assertEquals( $this->theme_root.'/sandbox', $theme['Template Dir'] );
		$this->assertEquals( $this->theme_root.'/sandbox', $theme['Stylesheet Dir'] );
		$this->assertEquals( 'publish', $theme['Status'] );
		$this->assertEquals( '', $theme['Parent Theme'] );

	}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:34,代码来源:themeDir.php


示例3: w3tc_get_current_theme

function w3tc_get_current_theme()
{
    global $wp_version;
    if (version_compare($wp_version, '3.4', '>=')) {
        return wp_get_theme();
    }
    return get_theme(get_current_theme());
}
开发者ID:easinewe,项目名称:Avec2016,代码行数:8,代码来源:compat.php


示例4: test_get_theme

	/**
	 * @expectedDeprecated get_theme
	 * @expectedDeprecated get_themes
	 */
	function test_get_theme() {
		$themes = get_themes();
		foreach (array_keys($themes) as $name) {
			$theme = get_theme($name);
			// WP_Theme implements ArrayAccess. Even ArrayObject returns false for is_array().
			$this->assertFalse( is_array( $theme ) );
			$this->assertInstanceOf( 'WP_Theme', $theme );
			$this->assertEquals($theme, $themes[$name]);
		}
	}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:14,代码来源:theme.php


示例5: xpress_ThemeTemplate

function xpress_ThemeTemplate($template)
{
    global $xpress_config;
    $theme = $xpress_config->theme_select;
    $theme = get_theme($theme);
    if (empty($theme)) {
        return $template;
    }
    return $theme['Template'];
}
开发者ID:nouphet,项目名称:rata,代码行数:10,代码来源:xpressme.php


示例6: menuimg

 function menuimg($gfile)
 {
     $ThemeSel = get_theme();
     if (file_exists("themes/{$ThemeSel}/images/menu/{$gfile}")) {
         $menuimg = "themes/{$ThemeSel}/images/menu/{$gfile}";
     } else {
         $menuimg = "modules/Your_Account/images/{$gfile}";
     }
     return $menuimg;
 }
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:10,代码来源:navbar.php


示例7: test_page_templates

 /**
  * @ticket 10959
  * @ticket 11216
  * @expectedDeprecated get_theme
  * @expectedDeprecated get_themes
  */
 function test_page_templates()
 {
     $theme = get_theme('Page Template Theme');
     $this->assertNotEmpty($theme);
     switch_theme($theme['Template'], $theme['Stylesheet']);
     $this->assertEqualSetsWithIndex(array('Top Level' => 'template-top-level.php', 'Sub Dir' => 'subdir/template-sub-dir.php', 'This Template Header Is On One Line' => 'template-header.php'), get_page_templates());
     $theme = wp_get_theme('page-templates');
     $this->assertNotEmpty($theme);
     switch_theme($theme['Template'], $theme['Stylesheet']);
     $this->assertEqualSetsWithIndex(array('Top Level' => 'template-top-level.php', 'Sub Dir' => 'subdir/template-sub-dir.php', 'This Template Header Is On One Line' => 'template-header.php'), get_page_templates());
 }
开发者ID:aaemnnosttv,项目名称:develop.git.wordpress.org,代码行数:17,代码来源:includesTheme.php


示例8: test_page_templates

 /**
  * @ticket 10959
  * @ticket 11216
  */
 function test_page_templates()
 {
     $theme = get_theme('Page Template Theme');
     $this->assertFalse(empty($theme));
     switch_theme($theme['Template'], $theme['Stylesheet']);
     $templates = get_page_templates();
     $this->assertEquals(3, count($templates));
     $this->assertEquals("template-top-level.php", $templates['Top Level']);
     $this->assertEquals("subdir/template-sub-dir.php", $templates['Sub Dir']);
     $this->assertEquals("template-header.php", $templates['This Template Header Is On One Line']);
 }
开发者ID:rmccue,项目名称:wordpress-unit-tests,代码行数:15,代码来源:includesTheme.php


示例9: get_template

 function get_template($template)
 {
     $theme = $this->get_theme();
     if (empty($theme)) {
         return $template;
     }
     $theme = get_theme($theme);
     if (empty($theme)) {
         return $template;
     }
     // Don't let people peek at unpublished themes.
     if (isset($theme['Status']) && $theme['Status'] != 'publish') {
         return $template;
     }
     return $theme['Template'];
 }
开发者ID:s-diez,项目名称:TOXID-cURL,代码行数:16,代码来源:theme-switcher.php


示例10: menu

function menu($mainlink)
{
    global $module_name;
    OpenTable();
    $ThemeSel = get_theme();
    if (file_exists("themes/{$ThemeSel}/images/link-logo.gif")) {
        echo "<br><center><a href=\"modules.php?name={$module_name}\"><img src=\"themes/{$ThemeSel}/images/link-logo.gif\" border=\"0\" alt=\"\"></a><br><br>";
    } else {
        echo "<br><center><a href=\"modules.php?name={$module_name}\"><img src=\"modules/{$module_name}/images/link-logo.gif\" border=\"0\" alt=\"\"></a><br><br>";
    }
    echo "<form action=\"modules.php?name={$module_name}&amp;l_op=search&amp;query={$query}\" method=\"post\">" . "<font class=\"content\"><input type=\"text\" size=\"25\" name=\"query\"> <input type=\"submit\" value=\"" . _SEARCH . "\"></font>" . "</form>";
    echo "<font class=\"content\">[ ";
    if ($mainlink > 0) {
        echo "<a href=\"modules.php?name={$module_name}\">" . _LINKSMAIN . "</a> | ";
    }
    echo "<a href=\"modules.php?name={$module_name}&amp;l_op=AddLink\">" . _ADDLINK . "</a>" . " | <a href=\"modules.php?name={$module_name}&amp;l_op=NewLinks\">" . _NEW . "</a>" . " | <a href=\"modules.php?name={$module_name}&amp;l_op=MostPopular\">" . _POPULAR . "</a>" . " | <a href=\"modules.php?name={$module_name}&amp;l_op=TopRated\">" . _TOPRATED . "</a>" . " | <a href=\"modules.php?name={$module_name}&amp;l_op=RandomLink\">" . _RANDOM . "</a> ]" . "</font></center>";
    CloseTable();
}
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:18,代码来源:index.php


示例11: SERVICE_CMSCSS_cpgnuke

function SERVICE_CMSCSS_cpgnuke()
{
    global $include_path, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $thename, $cms_mode, $css, $row_colors, $jz_MenuItem, $jz_MenuItemHover, $jz_MenuItemLeft, $jz_MainItemHover, $jz_MenuSplit;
    echo "<style type=\"text/css\">" . ".jz_row1 { background-color:{$bgcolor1}; }" . ".jz_row2 { background-color:{$bgcolor2}; }" . ".and_head1 { background-color:{$bgcolor2}; }" . ".and_head2 { background-color:{$bgcolor1}; }" . "</style>";
    // Now let's set the style sheet for CMS stuff
    $thename = @get_theme();
    $_SESSION['cms-style'] = "themes/" . $thename . "/style/style.css";
    $_SESSION['cms-theme-data'] = urlencode($bgcolor1 . "|" . $bgcolor2);
    $row_colors = array('jz_row2', 'jz_row1');
    $jz_MenuItemHover = "jz_row2";
    $jz_MenuItem = "jz_row1";
    $jz_MenuItemLeft = "jzMenuItemLeft";
    $jz_MenuSplit = "jzMenuSplit";
    $jz_MainItemHover = "jzMainItemHover";
    // Now let's set the CSS
    $css = $include_path . "style/cms-theme/default.php";
    return $css;
}
开发者ID:seanfbrown,项目名称:jinzora,代码行数:18,代码来源:cpgnuke.php


示例12: jetpack_load_infinite_scroll_annotation

/**
 * Load theme's infinite scroll annotation file, if present in the IS plugin.
 * The `setup_theme` action is used because the annotation files should be using `after_setup_theme` to register support for IS.
 *
 * As released in Jetpack 2.0, a child theme's parent wasn't checked for in the plugin's bundled support, hence the convoluted way the parent is checked for now.
 *
 * @uses is_admin, wp_get_theme, get_theme, get_current_theme, apply_filters
 * @action setup_theme
 * @return null
 */
function jetpack_load_infinite_scroll_annotation()
{
    if (is_admin() && isset($_GET['page']) && 'jetpack' == $_GET['page']) {
        $theme = function_exists('wp_get_theme') ? wp_get_theme() : get_theme(get_current_theme());
        if (!is_a($theme, 'WP_Theme') && !is_array($theme)) {
            return;
        }
        $customization_file = apply_filters('infinite_scroll_customization_file', dirname(__FILE__) . "/infinite-scroll/themes/{$theme['Stylesheet']}.php", $theme['Stylesheet']);
        if (is_readable($customization_file)) {
            require_once $customization_file;
        } elseif (!empty($theme['Template'])) {
            $customization_file = dirname(__FILE__) . "/infinite-scroll/themes/{$theme['Template']}.php";
            if (is_readable($customization_file)) {
                require_once $customization_file;
            }
        }
    }
}
开发者ID:burbridge,项目名称:thesis2013website,代码行数:28,代码来源:module-extras.php


示例13: head

function head()
{
    global $slogan, $sitename, $banners, $nukeurl, $Version_Num, $artpage, $topic, $hlpfile, $user, $hr, $theme, $cookie, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $textcolor1, $textcolor2, $forumpage, $adminpage, $userpage, $pagetitle;
    $ThemeSel = get_theme();
    include "themes/{$ThemeSel}/theme.php";
    echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
    echo "<html>\n";
    echo "<head>\n";
    echo "<title>{$sitename} {$pagetitle}</title>\n";
    include "includes/meta.php";
    include "includes/javascript.php";
    if (file_exists("themes/{$ThemeSel}/images/favicon.ico")) {
        echo "<link REL=\"shortcut icon\" HREF=\"themes/{$ThemeSel}/images/favicon.ico\" TYPE=\"image/x-icon\">\n";
    }
    echo "<LINK REL=\"StyleSheet\" HREF=\"themes/{$ThemeSel}/style/style.css\" TYPE=\"text/css\">\n\n\n";
    include "includes/my_header.php";
    echo "\n\n\n</head>\n\n";
    themeheader();
}
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:19,代码来源:header.php


示例14: downl_menu_tpl

function downl_menu_tpl($maindownload)
{
    global $user_adddownload, $module_name;
    OpenTable();
    $ThemeSel = get_theme();
    if (file_exists("themes/{$ThemeSel}/images/down-logo.gif")) {
        echo "<br /><div align=\"center\"><a href=\"" . getlink() . "\"><img src=\"themes/{$ThemeSel}/images/down-logo.gif\" border=\"0\" alt=\"\" /></a><br /><br />";
    } else {
        echo "<br /><div align=\"center\"><a href=\"" . getlink() . "\"><img src=\"modules/{$module_name}/images/down-logo.gif\" border=\"0\" alt=\"\" /></a><br /><br />";
    }
    echo "<form action=\"" . getlink("&amp;d_op=search") . "\" method=\"post\"><input type=\"text\" size=\"25\" name=\"query\" /> <input type=\"submit\" value=\"" . _SEARCH . "\" /></form>" . "<font class=\"content\">[ ";
    if ($maindownload > 0) {
        echo "<a href=\"" . getlink() . "\">" . _DOWNLOADSMAIN . "</a> | ";
    }
    if ($user_adddownload) {
        echo "<a href=\"" . getlink("&amp;d_op=AddDownload") . "\">" . _ADDDOWNLOAD . "</a> | ";
    }
    echo "<a href=\"" . getlink("&amp;d_op=NewDownloads") . "\">" . _NEW . "</a>" . " | <a href=\"" . getlink("&amp;d_op=MostPopular") . "\">" . _POPULAR . "</a>" . " | <a href=\"" . getlink("&amp;d_op=TopRated") . "\">" . _TOPRATED . "</a> ]" . "</font></div>";
    CloseTable();
}
开发者ID:cbsistem,项目名称:nexos,代码行数:20,代码来源:theme.php


示例15: get_themes

/**
 * get_themes
 * this looks in /themes and pulls all of the
 * theme.cfg.php files it can find and returns an
 * array of the results
 */
function get_themes()
{
    /* Open the themes dir and start reading it */
    $handle = opendir(AmpConfig::get('prefix') . '/themes');
    if (!is_resource($handle)) {
        debug_event('theme', 'Failed to open /themes directory', 2);
        return array();
    }
    $results = array();
    while (($f = readdir($handle)) !== false) {
        debug_event('theme', "Checking {$f}", 5);
        $cfg = get_theme($f);
        if ($cfg !== null) {
            $results[$cfg['name']] = $cfg;
        }
    }
    // end while directory
    // Sort by the theme name
    ksort($results);
    return $results;
}
开发者ID:cheese1,项目名称:ampache,代码行数:27,代码来源:themes.php


示例16: menu

function menu($maindownload)
{
    global $prefix, $user_adddownload, $module_name, $query;
    OpenTable();
    $ThemeSel = get_theme();
    if (file_exists("themes/{$ThemeSel}/images/down-logo.gif")) {
        echo "<br><center><a href=\"modules.php?name={$module_name}\"><img src=\"themes/{$ThemeSel}/images/down-logo.gif\" border=\"0\" alt=\"\"></a><br><br>";
    } else {
        echo "<br><center><a href=\"modules.php?name={$module_name}\"><img src=\"modules/{$module_name}/images/down-logo.gif\" border=\"0\" alt=\"\"></a><br><br>";
    }
    echo "<form action=\"modules.php?name={$module_name}&amp;d_op=search&amp;query={$query}\" method=\"post\">" . "<font class=\"content\"><input type=\"text\" size=\"25\" name=\"query\"> <input type=\"submit\" value=\"" . _SEARCH . "\"></font>" . "</form>";
    echo "<font class=\"content\">[ ";
    if ($maindownload > 0) {
        echo "<a href=\"modules.php?name={$module_name}\">" . _DOWNLOADSMAIN . "</a> | ";
    }
    if ($user_adddownload == 1) {
        echo "<a href=\"modules.php?name={$module_name}&amp;d_op=AddDownload\">" . _ADDDOWNLOAD . "</a>" . " | ";
    }
    echo "<a href=\"modules.php?name={$module_name}&amp;d_op=NewDownloads\">" . _NEW . "</a>" . " | <a href=\"modules.php?name={$module_name}&amp;d_op=MostPopular\">" . _POPULAR . "</a>" . " | <a href=\"modules.php?name={$module_name}&amp;d_op=TopRated\">" . _TOPRATED . "</a> ]" . "</font></center>";
    CloseTable();
}
开发者ID:rotvulpix,项目名称:php-nuke,代码行数:21,代码来源:index.php


示例17: my_scripts

 function my_scripts()
 {
     if (!is_admin()) {
         $theme = get_theme(get_current_theme());
         $css_loc = CHILD_URL . '/lib/css/';
         // CSS
         wp_register_style('flexslide', $css_loc . 'flexslider.css', array(), $theme['Version'], 'screen');
         wp_register_style('i140', $css_loc . '1140.css', array(), $theme['Version'], 'screen');
         //wp_register_style('ie',$css_loc.'ie.css', array(), $theme['Version'], 'screen');
         wp_enqueue_style('i140');
         //wp_enqueue_style('ie');
         wp_enqueue_style('flexslide');
         // Javascripts
         $js_loc = CHILD_URL . '/lib/js/';
         wp_register_script('flexslider', $js_loc . 'jquery.flexslider-min.js', array('jquery'), '1.8', false);
         wp_register_script('modernizr', $js_loc . 'modernizr.custom.97724.js', array('jquery'), '97724', false);
         wp_register_script('slide25', $js_loc . 'slide25.js', array('jquery'), '1.0', false);
         wp_enqueue_script('modernizr');
         wp_enqueue_script('flexslider');
         wp_enqueue_script('slide25');
     }
 }
开发者ID:ramseyp,项目名称:genesis-wp-presenter,代码行数:22,代码来源:functions.php


示例18: themearticle

function themearticle($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext)
{
    global $admin, $sid, $tipath;
    $ThemeSel = get_theme();
    if (file_exists("themes/{$ThemeSel}/images/topics/{$topicimage}")) {
        $t_image = "themes/{$ThemeSel}/images/topics/{$topicimage}";
    } else {
        $t_image = "{$tipath}{$topicimage}";
    }
    $posted = "" . _POSTEDON . " {$datetime} " . _BY . " ";
    $posted .= get_author($aid);
    if (!empty($notes)) {
        $notes = "<br><br><b>" . _NOTE . "</b> <i>{$notes}</i>\n";
    } else {
        $notes = "";
    }
    if ("{$aid}" == "{$informant}") {
        $content = "{$thetext}{$notes}\n";
    } else {
        if (!empty($informant)) {
            $content = "<a href=\"modules.php?name=Your_Account&amp;op=userinfo&amp;username={$informant}\">{$informant}</a> ";
        } else {
            $content = "{$anonymous} ";
        }
        $content .= "" . _WRITES . " <i>\"{$thetext}\"</i>{$notes}\n";
    }
    $tmpl_file = "themes/3D-Fantasy/story_page.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"" . $thefile . "\";";
    eval($thefile);
    print $r_file;
}
开发者ID:rotvulpix,项目名称:php-nuke,代码行数:33,代码来源:theme.php


示例19: jetpack_infinite_scroll_more_info

function jetpack_infinite_scroll_more_info()
{
    $support_text = sprintf(__('If you are a theme author, you can learn about adding support for Infinite Scroll at <a href="%1$s">%1$s</a>.', 'jetpack'), 'http://jetpack.me/support/infinite-scroll/');
    ?>

	<?php 
    if (!Jetpack::is_active() || Jetpack::is_active() && current_theme_supports('infinite-scroll')) {
        ?>
		<p><?php 
        esc_html_e('When you write great content, all you really want is people to find it, right?', 'jetpack');
        ?>
</p>

		<p><?php 
        esc_html_e("With the Infinite Scroll module and a supported theme, that's exactly what happens. Instead of the old way of navigating down a page by scrolling and then clicking a link to get to the next page, waiting for a page refresh&mdash;the document model of the web&mdash;infinite scrolling pulls the next set of posts automatically into view when the reader approaches the bottom of the page, more like an application.", 'jetpack');
        ?>
</p>

	<?php 
    } else {
        ?>
		<p><?php 
        echo esc_html(sprintf(__("At this time, your theme, %s, doesn't support Infinite Scroll. Unlike other Jetpack modules, Infinite Scroll needs information from your theme to function properly.", 'jetpack'), function_exists('wp_get_theme') ? wp_get_theme()->Name : get_current_theme()));
        ?>
</p>

		<p><?php 
        esc_html_e("Until your theme supports Infinite Scroll, you won't be able to activate this module.", 'jetpack');
        ?>
</p>

		<?php 
        if (current_user_can('update_themes')) {
            ob_start();
            theme_update_available(function_exists('wp_get_theme') ? wp_get_theme() : (object) get_theme(get_current_theme()));
            $theme_update_available = ob_get_clean();
            if (!empty($theme_update_available)) {
                ?>
				<p><?php 
                printf(__('There is an update available for your theme. You may wish to check if this update adds Infinite Scroll support by visiting the <a href="%s">WordPress Updates</a> page.', 'jetpack'), esc_url(admin_url('update-core.php')));
                ?>
</p>
			<?php 
            } else {
                ?>
				<p><?php 
                echo $support_text;
                ?>
</p>
			<?php 
            }
            ?>
		<?php 
        } else {
            ?>
			<p><?php 
            echo $support_text;
            ?>
</p>
		<?php 
        }
        ?>
	<?php 
    }
}
开发者ID:aarontgrogg,项目名称:aarontgrogg,代码行数:65,代码来源:module-info.php


示例20: OpenTable

     $r_options .= "&amp;mode={$cookie['4']}";
 }
 if (isset($cookie[5])) {
     $r_options .= "&amp;order={$cookie['5']}";
 }
 if (isset($cookie[6])) {
     $r_options .= "&amp;thold={$cookie['6']}";
 }
 OpenTable();
 echo "<center><font class=\"title\"><b>" . _ACTIVETOPICS . "</b></font><br>\n" . "<font class=\"content\">" . _CLICK2LIST . "</font><br><br>\n" . "<form action=\"modules.php?name=Search\" method=\"post\">" . "<input type=\"name\" name=\"query\" size=\"30\">&nbsp;&nbsp;" . "<input type=\"submit\" value=\"" . _SEARCH . "\">" . "</form></center><br><br>";
 while ($row = $db->sql_fetchrow($result)) {
     $topicid = intval($row['topicid']);
     $topicname = stripslashes($row['topicname']);
     $topicimage = stripslashes($row['topicimage']);
     $topictext = stripslashes(check_html($row['topictext'], "nohtml"));
     $ThemeSel = get_theme();
     if (@file_exists("themes/{$ThemeSel}/images/topics/{$topicimage}")) {
         $t_image = "themes/{$ThemeSel}/images/topics/{$topicimage}";
     } else {
         $t_image = "{$tipath}{$topicimage}";
     }
     $res = $db->sql_query("SELECT counter FROM " . $prefix . "_stories WHERE topic='{$topicid}'");
     $numrows = $db->sql_numrows($res);
     $reads = 0;
     while ($counting = $db->sql_fetchrow($res)) {
         $ccounter = $counting[counter];
         $reads = $reads + $ccounter;
     }
     title($topictext);
     echo "<table border=\"1\" width=\"100%\" align=\"center\" cellpadding=\"2\">\n" . "<tr><td valign=\"top\" width='25%'>\n" . "<a href=\"modules.php?name=News&amp;new_topic={$topicid}\"><img src=\"{$t_image}\" border=\"0\" alt=\"{$topictext}\" title=\"{$topictext}\" hspace='5' vspace='5'></a><br><br>\n" . "<font class=\"content\">\n" . "<big><strong>&middot;</strong></big>&nbsp;<b>" . _TOPIC . ":</b> {$topictext}<br>\n" . "<big><strong>&middot;</strong></big>&nbsp;<b>" . _TOTNEWS . ":</b> {$numrows}<br>\n" . "<big><strong>&middot;</strong></big>&nbsp;<b>" . _TOTREADS . ":</b> {$reads}</font>\n" . "</td>\n" . "<td valign='top'>";
     $result2 = $db->sql_query("SELECT sid, catid, title FROM " . $prefix . "_stories WHERE topic='{$topicid}' ORDER BY sid DESC LIMIT 0,10");
开发者ID:BackupTheBerlios,项目名称:domsmod-svn,代码行数:31,代码来源:index.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_theme_data函数代码示例发布时间:2022-05-15
下一篇:
PHP get_the_title_rss函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap