Removed global $siteurl and $blogfilename, use get_settings. Syntax fix for wp-db.
git-svn-id: http://svn.automattic.com/wordpress/trunk@945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
59da7f3f13
commit
8927968849
|
@ -15,7 +15,7 @@ require_once('wp-blog-header.php');
|
||||||
|
|
||||||
define( 'NODISPLAY', false );
|
define( 'NODISPLAY', false );
|
||||||
|
|
||||||
$wpsmarty->assign( 'siteurl', $siteurl );
|
$wpsmarty->assign( 'siteurl', get_settings('siteurl') );
|
||||||
$wpsmarty->assign( 'b2_version', $wp_version );
|
$wpsmarty->assign( 'b2_version', $wp_version );
|
||||||
|
|
||||||
if($posts)
|
if($posts)
|
||||||
|
|
12
index.php
12
index.php
|
@ -15,10 +15,10 @@ require('wp-blog-header.php');
|
||||||
<meta name="generator" content="WordPress <?php echo $wp_version; ?>" /> <!-- leave this for stats -->
|
<meta name="generator" content="WordPress <?php echo $wp_version; ?>" /> <!-- leave this for stats -->
|
||||||
|
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
@import url( <?php echo $siteurl; ?>/wp-layout.css );
|
@import url( <?php echo get_settings('siteurl'); ?>/wp-layout.css );
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" media="print" href="<?php echo $siteurl; ?>/print.css" />
|
<link rel="stylesheet" type="text/css" media="print" href="<?php echo get_settings('siteurl'); ?>/print.css" />
|
||||||
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
|
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
|
||||||
<link rel="alternate" type="application/rdf+xml" title="RDF" href="<?php bloginfo('rdf_url'); ?>" />
|
<link rel="alternate" type="application/rdf+xml" title="RDF" href="<?php bloginfo('rdf_url'); ?>" />
|
||||||
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
|
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
|
||||||
|
@ -32,7 +32,7 @@ require('wp-blog-header.php');
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="rap">
|
<div id="rap">
|
||||||
<h1 id="header"><a href="<?php echo $siteurl; ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
|
<h1 id="header"><a href="<?php echo get_settings('siteurl'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
|
||||||
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<?php if ($posts) { foreach ($posts as $post) { start_wp(); ?>
|
<?php if ($posts) { foreach ($posts as $post) { start_wp(); ?>
|
||||||
|
@ -76,7 +76,7 @@ require('wp-blog-header.php');
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li id="search">Search:
|
<li id="search">Search:
|
||||||
<form id="searchform" method="get" action="<?php echo $PHP_SELF; /*$siteurl."/".$blogfilename*/ ?>">
|
<form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>">
|
||||||
<div>
|
<div>
|
||||||
<input type="text" name="s" size="15" /><br />
|
<input type="text" name="s" size="15" /><br />
|
||||||
<input type="submit" name="submit" value="search" />
|
<input type="submit" name="submit" value="search" />
|
||||||
|
@ -93,8 +93,8 @@ require('wp-blog-header.php');
|
||||||
</li>
|
</li>
|
||||||
<li id="other">Other:
|
<li id="other">Other:
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="<?php echo $siteurl; ?>/wp-login.php">login</a></li>
|
<li><a href="<?php echo get_settings('siteurl'); ?>/wp-login.php">login</a></li>
|
||||||
<li><a href="<?php echo $siteurl; ?>/wp-register.php">register</a></li>
|
<li><a href="<?php echo get_settings('siteurl'); ?>/wp-register.php">register</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li id="meta">Meta:
|
<li id="meta">Meta:
|
||||||
|
|
|
@ -4,12 +4,12 @@ require_once('../wp-config.php');
|
||||||
|
|
||||||
/* Checking login & pass in the database */
|
/* Checking login & pass in the database */
|
||||||
function veriflog() {
|
function veriflog() {
|
||||||
global $HTTP_COOKIE_VARS,$cookiehash;
|
global $cookiehash;
|
||||||
global $tableusers, $wpdb;
|
global $tableusers, $wpdb;
|
||||||
|
|
||||||
if (!empty($HTTP_COOKIE_VARS["wordpressuser_".$cookiehash])) {
|
if (!empty($_COOKIE['wordpressuser_' . $cookiehash])) {
|
||||||
$user_login = $HTTP_COOKIE_VARS["wordpressuser_".$cookiehash];
|
$user_login = $_COOKIE['wordpressuser_' . $cookiehash];
|
||||||
$user_pass_md5 = $HTTP_COOKIE_VARS["wordpresspass_".$cookiehash];
|
$user_pass_md5 = $_COOKIE['wordpresspass_' . $cookiehash];
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -37,10 +37,10 @@ if ( !veriflog() ) {
|
||||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||||
header('Cache-Control: no-cache, must-revalidate');
|
header('Cache-Control: no-cache, must-revalidate');
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
if (!empty($HTTP_COOKIE_VARS["wordpressuser_".$cookiehash])) {
|
if (!empty($_COOKIE['wordpressuser_' . $cookiehash])) {
|
||||||
$error="<strong>Error</strong>: wrong login or password.";
|
$error="<strong>Error</strong>: wrong login or password.";
|
||||||
}
|
}
|
||||||
$redir = "Location: $siteurl/wp-login.php?redirect_to=" . urlencode($HTTP_SERVER_VARS["REQUEST_URI"]);
|
$redir = 'Location: ' . get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']);
|
||||||
header($redir);
|
header($redir);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,9 @@ require_once('auth.php');
|
||||||
get_currentuserinfo();
|
get_currentuserinfo();
|
||||||
|
|
||||||
if (0 == $user_level) {
|
if (0 == $user_level) {
|
||||||
$redirect_to = $siteurl . '/wp-admin/profile.php';
|
$redirect_to = get_settings('siteurl') . '/wp-admin/profile.php';
|
||||||
} else {
|
} else {
|
||||||
$redirect_to = $siteurl . '/wp-admin/post.php';
|
$redirect_to = get_settings('siteurl') . '/wp-admin/post.php';
|
||||||
}
|
}
|
||||||
header ("Location: $redirect_to");
|
header ("Location: $redirect_to");
|
||||||
?>
|
?>
|
|
@ -676,7 +676,7 @@ $guessurl = str_replace('/wp-admin/install.php?step=2', '', 'http://' . $HTTP_HO
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$url = $HTTP_POST_VARS['url'];
|
$url = $_POST['url'];
|
||||||
if (isset($url)) {
|
if (isset($url)) {
|
||||||
$query= "UPDATE $tableoptions set option_value='$url' where option_id=1"; //siteurl
|
$query= "UPDATE $tableoptions set option_value='$url' where option_id=1"; //siteurl
|
||||||
$q = $wpdb->query($query);
|
$q = $wpdb->query($query);
|
||||||
|
|
|
@ -237,7 +237,7 @@ No</label></td>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<p>You can drag <a href="javascript:void(linkmanpopup=window.open('<?php echo $siteurl; ?>/wp-admin/link-add.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();" title="Link add bookmarklet">Link This</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you're on to your links! Right now this only works on Mozilla or Netscape, but we're working on it.</p>
|
<p>You can drag <a href="javascript:void(linkmanpopup=window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/link-add.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();" title="Link add bookmarklet">Link This</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you're on to your links! Right now this only works on Mozilla or Netscape, but we're working on it.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -21,6 +21,7 @@ foreach ($menu as $item) {
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<li><a href="<?php echo "$siteurl/$blogfilename"; ?>" title="View your site">View site</a></li>
|
<li><a href="<?php echo get_settings('siteurl') . '/' . get_settings('blogfilename'); ?>" title="View your site">View site</a></li>
|
||||||
<li class="last"><a href="<?php echo $siteurl ?>/wp-login.php?action=logout" title="Logout of this account">Logout (<?php echo stripslashes($user_nickname) ?>)</a></li>
|
<li class="last"><a href="<?php echo get_settings('siteurl')
|
||||||
|
?>/wp-login.php?action=logout" title="Logout of this account">Logout (<?php echo stripslashes($user_nickname) ?>)</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -96,7 +96,7 @@ default:
|
||||||
?>
|
?>
|
||||||
<p>Using the permalink structure value you currently have, <code><?php echo $permalink_structure; ?></code>, these are the mod_rewrite rules you should have in your <code>.htaccess</code> file.</p>
|
<p>Using the permalink structure value you currently have, <code><?php echo $permalink_structure; ?></code>, these are the mod_rewrite rules you should have in your <code>.htaccess</code> file.</p>
|
||||||
<?php
|
<?php
|
||||||
$site_root = str_replace('http://', '', trim($siteurl));
|
$site_root = str_replace('http://', '', trim(get_settings('siteurl')));
|
||||||
$site_root = preg_replace('|([^/]*)(.*)|i', '$2', $site_root);
|
$site_root = preg_replace('|([^/]*)(.*)|i', '$2', $site_root);
|
||||||
if ('/' != substr($site_root, -1)) $site_root = $site_root . '/';
|
if ('/' != substr($site_root, -1)) $site_root = $site_root . '/';
|
||||||
|
|
||||||
|
|
|
@ -424,7 +424,7 @@ switch($action) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$sendback = $HTTP_SERVER_VARS['HTTP_REFERER'];
|
$sendback = $HTTP_SERVER_VARS['HTTP_REFERER'];
|
||||||
if (strstr($sendback, 'post.php')) $sendback = $siteurl .'/wp-admin/post.php';
|
if (strstr($sendback, 'post.php')) $sendback = get_settings('siteurl') .'/wp-admin/post.php';
|
||||||
header ('Location: ' . $sendback);
|
header ('Location: ' . $sendback);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -472,14 +472,14 @@ switch($action) {
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<p>Are you sure you want to do that?</p>\n";
|
echo "<p>Are you sure you want to do that?</p>\n";
|
||||||
|
|
||||||
echo "<form action=\"$siteurl/wp-admin/post.php\" method=\"get\">\n";
|
echo "<form action='".get_settings('siteurl')."/wp-admin/post.php' method='get'>\n";
|
||||||
echo "<input type=\"hidden\" name=\"action\" value=\"deletecomment\" />\n";
|
echo "<input type=\"hidden\" name=\"action\" value=\"deletecomment\" />\n";
|
||||||
echo "<input type=\"hidden\" name=\"p\" value=\"$p\" />\n";
|
echo "<input type=\"hidden\" name=\"p\" value=\"$p\" />\n";
|
||||||
echo "<input type=\"hidden\" name=\"comment\" value=\"$comment\" />\n";
|
echo "<input type=\"hidden\" name=\"comment\" value=\"$comment\" />\n";
|
||||||
echo "<input type=\"hidden\" name=\"noredir\" value=\"1\" />\n";
|
echo "<input type=\"hidden\" name=\"noredir\" value=\"1\" />\n";
|
||||||
echo "<input type=\"submit\" value=\"Yes\" />";
|
echo "<input type=\"submit\" value=\"Yes\" />";
|
||||||
echo " ";
|
echo " ";
|
||||||
echo "<input type=\"button\" value=\"No\" onClick=\"self.location='$siteurl/wp-admin/edit.php?p=$p&c=1#comments';\" />\n";
|
echo "<input type=\"button\" value=\"No\" onClick=\"self.location='". get_settings('siteurl') ."/wp-admin/edit.php?p=$p&c=1#comments';\" />\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|
||||||
|
@ -514,7 +514,7 @@ switch($action) {
|
||||||
if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) {
|
if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) {
|
||||||
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
|
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
|
||||||
} else {
|
} else {
|
||||||
header('Location: '.$siteurl.'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -542,7 +542,7 @@ switch($action) {
|
||||||
if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) {
|
if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) {
|
||||||
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
|
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
|
||||||
} else {
|
} else {
|
||||||
header('Location: '.$siteurl.'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -567,7 +567,7 @@ switch($action) {
|
||||||
echo "<div class=\"wrap\">\n";
|
echo "<div class=\"wrap\">\n";
|
||||||
echo "<p>Comment has been approved.</p>\n";
|
echo "<p>Comment has been approved.</p>\n";
|
||||||
|
|
||||||
echo "<form action=\"$siteurl/wp-admin/edit.php?p=$p&c=1#comments\" method=\"get\">\n";
|
echo "<form action=\"". get_settings('siteurl') ."/wp-admin/edit.php?p=$p&c=1#comments\" method=\"get\">\n";
|
||||||
echo "<input type=\"hidden\" name=\"p\" value=\"$p\" />\n";
|
echo "<input type=\"hidden\" name=\"p\" value=\"$p\" />\n";
|
||||||
echo "<input type=\"hidden\" name=\"c\" value=\"1\" />\n";
|
echo "<input type=\"hidden\" name=\"c\" value=\"1\" />\n";
|
||||||
echo "<input type=\"submit\" value=\"Ok\" />";
|
echo "<input type=\"submit\" value=\"Ok\" />";
|
||||||
|
@ -602,7 +602,7 @@ switch($action) {
|
||||||
if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) {
|
if (($HTTP_SERVER_VARS['HTTP_REFERER'] != "") && (false == $noredir)) {
|
||||||
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
|
header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']);
|
||||||
} else {
|
} else {
|
||||||
header('Location: '.$siteurl.'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
header('Location: '. get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -706,12 +706,12 @@ $bookmarklet_height= ($use_trackback) ? 460 : 420;
|
||||||
|
|
||||||
if ($is_NS4 || $is_gecko) {
|
if ($is_NS4 || $is_gecko) {
|
||||||
?>
|
?>
|
||||||
<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}void(window.open('<?php echo $siteurl ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'WordPress bookmarklet','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes'));">Press It
|
<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}void(window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'WordPress bookmarklet','scrollbars=yes,width=600,height=460,left=100,top=150,status=yes'));">Press It
|
||||||
- <?php echo $blogname ?></a>
|
- <?php echo $blogname ?></a>
|
||||||
<?php
|
<?php
|
||||||
} else if ($is_winIE) {
|
} else if ($is_winIE) {
|
||||||
?>
|
?>
|
||||||
<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo $siteurl ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">Press it
|
<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(btw=window.open('<?php echo get_settings('siteurl') ?>/wp-admin/bookmarklet.php?text='+escape(Q)+'<?php echo $bookmarklet_tbpb ?>&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">Press it
|
||||||
- <?php echo $blogname ?></a>
|
- <?php echo $blogname ?></a>
|
||||||
<script type="text/javascript" language="JavaScript">
|
<script type="text/javascript" language="JavaScript">
|
||||||
<!--
|
<!--
|
||||||
|
@ -727,12 +727,12 @@ function oneclickbookmarklet(blah) {
|
||||||
<?php
|
<?php
|
||||||
} else if ($is_opera) {
|
} else if ($is_opera) {
|
||||||
?>
|
?>
|
||||||
<a href="javascript:void(window.open('<?php echo $siteurl ?>/wp-admin/bookmarklet.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));">Press it
|
<a href="javascript:void(window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));">Press it
|
||||||
- <?php echo $blogname ?></a>
|
- <?php echo $blogname ?></a>
|
||||||
<?php
|
<?php
|
||||||
} else if ($is_macIE) {
|
} else if ($is_macIE) {
|
||||||
?>
|
?>
|
||||||
<a href="javascript:Q='';if(top.frames.length==0);void(btw=window.open('<?php echo $siteurl ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">Press it
|
<a href="javascript:Q='';if(top.frames.length==0);void(btw=window.open('<?php echo get_settings('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title)+'<?php echo $bookmarklet_tbpb ?>','bookmarklet','scrollbars=yes,width=600,height=<?php echo $bookmarklet_height ?>,left=100,top=150,status=yes'));btw.focus();">Press it
|
||||||
- <?php echo $blogname ?></a>
|
- <?php echo $blogname ?></a>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,7 +191,7 @@ case 'IErightclick':
|
||||||
|
|
||||||
<p>To have a one-click bookmarklet, just copy and paste this<br />into a new text file:</p>
|
<p>To have a one-click bookmarklet, just copy and paste this<br />into a new text file:</p>
|
||||||
<?php
|
<?php
|
||||||
$regedit = "REGEDIT4\r\n[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Post To &WP : ".$blogname."]\r\n@=\"javascript:doc=external.menuArguments.document;Q=doc.selection.createRange().text;void(btw=window.open('".$siteurl."/wp-admin/bookmarklet.php?text='+escape(Q)+'".$bookmarklet_tbpb."&popupurl='+escape(doc.location.href)+'&popuptitle='+escape(doc.title),'bookmarklet','scrollbars=no,width=480,height=".$bookmarklet_height.",left=100,top=150,status=yes'));btw.focus();\"\r\n\"contexts\"=hex:31\"";
|
$regedit = "REGEDIT4\r\n[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Post To &WP : ".$blogname."]\r\n@=\"javascript:doc=external.menuArguments.document;Q=doc.selection.createRange().text;void(btw=window.open('". get_settings('siteurl') ."/wp-admin/bookmarklet.php?text='+escape(Q)+'".$bookmarklet_tbpb."&popupurl='+escape(doc.location.href)+'&popuptitle='+escape(doc.title),'bookmarklet','scrollbars=no,width=480,height=".$bookmarklet_height.",left=100,top=150,status=yes'));btw.focus();\"\r\n\"contexts\"=hex:31\"";
|
||||||
?>
|
?>
|
||||||
<pre style="margin: 20px; background-color: #cccccc; border: 1px dashed #333333; padding: 5px; font-size: 12px;"><?php echo $regedit; ?></pre>
|
<pre style="margin: 20px; background-color: #cccccc; border: 1px dashed #333333; padding: 5px; font-size: 12px;"><?php echo $regedit; ?></pre>
|
||||||
<p>Save it as wordpress.reg, and double-click on this file in an Explorer<br />
|
<p>Save it as wordpress.reg, and double-click on this file in an Explorer<br />
|
||||||
|
@ -323,7 +323,7 @@ default:
|
||||||
function addPanel()
|
function addPanel()
|
||||||
{
|
{
|
||||||
if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
|
if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
|
||||||
window.sidebar.addPanel("WordPress Post: <?php echo $blogname ?>","<?php echo $siteurl ?>/wp-admin/sidebar.php","");
|
window.sidebar.addPanel("WordPress Post: <?php echo $blogname ?>","<?php echo get_settings('siteurl'); ?>/wp-admin/sidebar.php","");
|
||||||
else
|
else
|
||||||
alert('No Sidebar found! You must use Mozilla 0.9.4 or later!');
|
alert('No Sidebar found! You must use Mozilla 0.9.4 or later!');
|
||||||
}
|
}
|
||||||
|
@ -333,7 +333,8 @@ function addPanel()
|
||||||
<?php } elseif (($is_winIE) || ($is_macIE)) { ?>
|
<?php } elseif (($is_winIE) || ($is_macIE)) { ?>
|
||||||
<strong>SideBar</strong><br />
|
<strong>SideBar</strong><br />
|
||||||
Add this link to your favorites:<br />
|
Add this link to your favorites:<br />
|
||||||
<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(_search=open('<?php echo $siteurl ?>/wp-admin/sidebar.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'_search'))">WordPress
|
<a href="javascript:Q='';if(top.frames.length==0)Q=document.selection.createRange().text;void(_search=open('<?php echo get_settings('siteurl');
|
||||||
|
?>/wp-admin/sidebar.php?text='+escape(Q)+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title),'_search'))">WordPress
|
||||||
Sidebar</a>.
|
Sidebar</a>.
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -66,8 +66,8 @@ default:
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('' == $file) {
|
if ('' == $file) {
|
||||||
if ('' != $blogfilename) {
|
if ('' != get_settings('blogfilename')) {
|
||||||
$file = $blogfilename;
|
$file = get_settings('blogfilename');
|
||||||
} else {
|
} else {
|
||||||
$file = 'index.php';
|
$file = 'index.php';
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,7 +258,7 @@ echo "\n<tr $style>
|
||||||
} ?>
|
} ?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2>Add User</h2>
|
<h2>Add User</h2>
|
||||||
<p>Users can <a href="<?php echo $siteurl ?>/wp-register.php">register themselves</a> or you can manually create users here.</p>
|
<p>Users can <a href="<?php echo get_settings('siteurl'); ?>/wp-register.php">register themselves</a> or you can manually create users here.</p>
|
||||||
<form action="" method="post" name="adduser" id="adduser">
|
<form action="" method="post" name="adduser" id="adduser">
|
||||||
<table border="0" cellspacing="5" cellpadding="3">
|
<table border="0" cellspacing="5" cellpadding="3">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -81,11 +81,11 @@ if (!isset($doing_rss) || !$doing_rss) {
|
||||||
@header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
|
@header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
|
||||||
@header("Cache-Control: post-check=0, pre-check=0", false);
|
@header("Cache-Control: post-check=0, pre-check=0", false);
|
||||||
@header("Pragma: no-cache"); // HTTP/1.0
|
@header("Pragma: no-cache"); // HTTP/1.0
|
||||||
@header ("X-Pingback: $siteurl/xmlrpc.php");
|
@header ('X-Pingback: '. get_settings('siteurl') . '/xmlrpc.php');
|
||||||
} else {
|
} else {
|
||||||
// We're showing a feed, so WP is indeed the only thing that last changed
|
// We're showing a feed, so WP is indeed the only thing that last changed
|
||||||
@header('Last Modified: ' . gmdate(get_lastpostmodified()));
|
@header('Last Modified: ' . gmdate(get_lastpostmodified()));
|
||||||
@header ("X-Pingback: $siteurl/xmlrpc.php");
|
@header ('X-Pingback: ' . get_settings('siteurl') . '/xmlrpc.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Getting settings from db */
|
/* Getting settings from db */
|
||||||
|
|
|
@ -23,7 +23,7 @@ foreach ($posts as $post) { start_wp();
|
||||||
|
|
||||||
<h2 id="comments">Comments</h2>
|
<h2 id="comments">Comments</h2>
|
||||||
|
|
||||||
<p><a href="<?php echo $siteurl; ?>/wp-commentsrss2.php?p=<?php echo $post->ID; ?>">RSS feed for comments on this post.</a></p>
|
<p><a href="<?php echo get_settings('siteurl'); ?>/wp-commentsrss2.php?p=<?php echo $post->ID; ?>">RSS feed for comments on this post.</a></p>
|
||||||
|
|
||||||
<?php if ('open' == $post->ping_status) { ?>
|
<?php if ('open' == $post->ping_status) { ?>
|
||||||
<p>The <acronym title="Uniform Resource Identifier">URI</acronym> to TrackBack this entry is: <em><?php trackback_url() ?></em></p>
|
<p>The <acronym title="Uniform Resource Identifier">URI</acronym> to TrackBack this entry is: <em><?php trackback_url() ?></em></p>
|
||||||
|
@ -58,7 +58,7 @@ if (!empty($commentstatus->post_password) && $HTTP_COOKIE_VARS['wp-postpass_'.$c
|
||||||
<h2>Leave a Comment</h2>
|
<h2>Leave a Comment</h2>
|
||||||
<p>Line and paragraph breaks automatic, website trumps email, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
|
<p>Line and paragraph breaks automatic, website trumps email, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
|
||||||
|
|
||||||
<form action="<?php echo $siteurl; ?>/wp-comments-post.php" method="post" id="commentform">
|
<form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
||||||
<p>
|
<p>
|
||||||
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
||||||
<label for="author">Name</label>
|
<label for="author">Name</label>
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
<?php if ('open' == $post->comment_status) { ?>
|
<?php if ('open' == $post->comment_status) { ?>
|
||||||
<p>Line and paragraph breaks automatic, website trumps email, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
|
<p>Line and paragraph breaks automatic, website trumps email, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
|
||||||
|
|
||||||
<form action="<?php echo $siteurl; ?>/wp-comments-post.php" method="post" id="commentform">
|
<form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
||||||
<p>
|
<p>
|
||||||
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
||||||
<label for="author">Name</label>
|
<label for="author">Name</label>
|
||||||
|
|
|
@ -203,8 +203,9 @@ function get_usernumposts($userid) {
|
||||||
// examine a url (supposedly from this blog) and try to
|
// examine a url (supposedly from this blog) and try to
|
||||||
// determine the post ID it represents.
|
// determine the post ID it represents.
|
||||||
function url_to_postid($url = '') {
|
function url_to_postid($url = '') {
|
||||||
global $wpdb, $tableposts, $siteurl;
|
global $wpdb, $tableposts;
|
||||||
|
|
||||||
|
$siteurl = get_settings('siteurl');
|
||||||
// Take a link like 'http://example.com/blog/something'
|
// Take a link like 'http://example.com/blog/something'
|
||||||
// and extract just the '/something':
|
// and extract just the '/something':
|
||||||
$uri = preg_replace("#$siteurl#i", '', $url);
|
$uri = preg_replace("#$siteurl#i", '', $url);
|
||||||
|
@ -536,10 +537,12 @@ function timer_stop($display=0,$precision=3) { //if called like timer_stop(1), w
|
||||||
// pings Weblogs.com
|
// pings Weblogs.com
|
||||||
function pingWeblogs($blog_ID = 1) {
|
function pingWeblogs($blog_ID = 1) {
|
||||||
// original function by Dries Buytaert for Drupal
|
// original function by Dries Buytaert for Drupal
|
||||||
global $use_weblogsping, $blogname,$siteurl,$blogfilename;
|
global $use_weblogsping, $blogname;
|
||||||
if ((!(($blogname=="my weblog") && ($siteurl=="http://example.com") && ($blogfilename=="wp.php"))) && (!preg_match("/localhost\//",$siteurl)) && ($use_weblogsping)) {
|
if ((!(($blogname=="my weblog") && (get_settings('siteurl')=="http://example.com") && (get_settings('blogfilename') == "wp.php"))) && (!preg_match("/localhost\//", get_settings('siteurl'))) && ($use_weblogsping)) {
|
||||||
$client = new xmlrpc_client("/RPC2", "rpc.weblogs.com", 80);
|
$client = new xmlrpc_client("/RPC2", "rpc.weblogs.com", 80);
|
||||||
$message = new xmlrpcmsg("weblogUpdates.ping", array(new xmlrpcval($blogname), new xmlrpcval($siteurl."/".$blogfilename)));
|
$message = new xmlrpcmsg("weblogUpdates.ping", array(new xmlrpcval($blogname),
|
||||||
|
new xmlrpcval(get_settings('siteurl') . '/' . get_settings('blogfilename')
|
||||||
|
)));
|
||||||
$result = $client->send($message);
|
$result = $client->send($message);
|
||||||
if (!$result || $result->faultCode()) {
|
if (!$result || $result->faultCode()) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -568,8 +571,8 @@ function pingWeblogsRss($blog_ID = 1, $rss_url) {
|
||||||
|
|
||||||
// pings CaféLog.com
|
// pings CaféLog.com
|
||||||
function pingCafelog($cafelogID,$title='',$p='') {
|
function pingCafelog($cafelogID,$title='',$p='') {
|
||||||
global $use_cafelogping, $blogname, $siteurl, $blogfilename;
|
global $use_cafelogping, $blogname;
|
||||||
if ((!(($blogname=="my weblog") && ($siteurl=="http://example.com") && ($blogfilename=="wp.php"))) && (!preg_match("/localhost\//",$siteurl)) && ($use_cafelogping) && ($cafelogID != '')) {
|
if ((!(($blogname=="my weblog") && (get_settings('siteurl') == "http://example.com") && (get_settings('blogfilename')=="wp.php"))) && (!preg_match("/localhost\//", get_settings('siteurl'))) && ($use_cafelogping) && ($cafelogID != '')) {
|
||||||
$client = new xmlrpc_client("/xmlrpc.php", "cafelog.tidakada.com", 80);
|
$client = new xmlrpc_client("/xmlrpc.php", "cafelog.tidakada.com", 80);
|
||||||
$message = new xmlrpcmsg("b2.ping", array(new xmlrpcval($cafelogID), new xmlrpcval($title), new xmlrpcval($p)));
|
$message = new xmlrpcmsg("b2.ping", array(new xmlrpcval($cafelogID), new xmlrpcval($title), new xmlrpcval($p)));
|
||||||
$result = $client->send($message);
|
$result = $client->send($message);
|
||||||
|
@ -584,12 +587,12 @@ function pingCafelog($cafelogID,$title='',$p='') {
|
||||||
|
|
||||||
// pings Blo.gs
|
// pings Blo.gs
|
||||||
function pingBlogs($blog_ID="1") {
|
function pingBlogs($blog_ID="1") {
|
||||||
global $use_blodotgsping, $blodotgsping_url, $use_rss, $blogname, $siteurl, $blogfilename;
|
global $use_blodotgsping, $blodotgsping_url, $use_rss, $blogname;
|
||||||
if ((!(($blogname=='my weblog') && ($siteurl=='http://example.com') && ($blogfilename=='wp.php'))) && (!preg_match('/localhost\//',$siteurl)) && ($use_blodotgsping)) {
|
if ((!(($blogname=='my weblog') && (get_settings('siteurl')=='http://example.com') && (get_settings('blogfilename')=='wp.php'))) && (!preg_match('/localhost\//',get_settings('siteurl'))) && ($use_blodotgsping)) {
|
||||||
$url = ($blodotgsping_url == 'http://example.com') ? $siteurl.'/'.$blogfilename : $blodotgsping_url;
|
$url = ($blodotgsping_url == 'http://example.com') ? get_settings('siteurl').'/'.get_settings('blogfilename') : $blodotgsping_url;
|
||||||
$client = new xmlrpc_client('/', 'ping.blo.gs', 80);
|
$client = new xmlrpc_client('/', 'ping.blo.gs', 80);
|
||||||
if ($use_rss) {
|
if ($use_rss) {
|
||||||
$message = new xmlrpcmsg('weblogUpdates.extendedPing', array(new xmlrpcval($blogname), new xmlrpcval($url), new xmlrpcval($url), new xmlrpcval($siteurl.'/b2rss.xml')));
|
$message = new xmlrpcmsg('weblogUpdates.extendedPing', array(new xmlrpcval($blogname), new xmlrpcval($url), new xmlrpcval($url), new xmlrpcval(get_settings('siteurl').'/b2rss.xml')));
|
||||||
} else {
|
} else {
|
||||||
$message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($blogname), new xmlrpcval($url)));
|
$message = new xmlrpcmsg('weblogUpdates.ping', array(new xmlrpcval($blogname), new xmlrpcval($url)));
|
||||||
}
|
}
|
||||||
|
@ -657,7 +660,6 @@ function trackback_response($error = 0, $error_message = '') {
|
||||||
}
|
}
|
||||||
|
|
||||||
function make_url_footnote($content) {
|
function make_url_footnote($content) {
|
||||||
global $siteurl;
|
|
||||||
preg_match_all('/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches);
|
preg_match_all('/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches);
|
||||||
$j = 0;
|
$j = 0;
|
||||||
for ($i=0; $i<count($matches[0]); $i++) {
|
for ($i=0; $i<count($matches[0]); $i++) {
|
||||||
|
@ -668,7 +670,7 @@ function make_url_footnote($content) {
|
||||||
$link_url = $matches[2][$i];
|
$link_url = $matches[2][$i];
|
||||||
$link_text = $matches[4][$i];
|
$link_text = $matches[4][$i];
|
||||||
$content = str_replace($link_match, $link_text.' '.$link_number, $content);
|
$content = str_replace($link_match, $link_text.' '.$link_number, $content);
|
||||||
$link_url = (strtolower(substr($link_url,0,7)) != 'http://') ? $siteurl.$link_url : $link_url;
|
$link_url = (strtolower(substr($link_url,0,7)) != 'http://') ? get_settings('siteurl') . $link_url : $link_url;
|
||||||
$links_summary .= "\n".$link_number.' '.$link_url;
|
$links_summary .= "\n".$link_number.' '.$link_url;
|
||||||
}
|
}
|
||||||
$content = strip_tags($content);
|
$content = strip_tags($content);
|
||||||
|
@ -735,7 +737,7 @@ function debug_fclose($fp) {
|
||||||
|
|
||||||
function pingback($content, $post_ID) {
|
function pingback($content, $post_ID) {
|
||||||
// original code by Mort (http://mort.mine.nu:8080)
|
// original code by Mort (http://mort.mine.nu:8080)
|
||||||
global $siteurl, $blogfilename, $wp_version;
|
global $wp_version;
|
||||||
$log = debug_fopen('./pingback.log', 'a');
|
$log = debug_fopen('./pingback.log', 'a');
|
||||||
$post_links = array();
|
$post_links = array();
|
||||||
debug_fwrite($log, 'BEGIN '.time()."\n");
|
debug_fwrite($log, 'BEGIN '.time()."\n");
|
||||||
|
@ -1014,7 +1016,7 @@ function wp_get_comment_status($comment_id) {
|
||||||
function wp_notify_postauthor($comment_id, $comment_type='comment') {
|
function wp_notify_postauthor($comment_id, $comment_type='comment') {
|
||||||
global $wpdb, $tablecomments, $tableposts, $tableusers;
|
global $wpdb, $tablecomments, $tableposts, $tableusers;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
global $blogfilename, $blogname, $siteurl, $blog_charset;
|
global $blogname, $blog_charset;
|
||||||
|
|
||||||
$comment = $wpdb->get_row("SELECT * FROM $tablecomments WHERE comment_ID='$comment_id' LIMIT 1");
|
$comment = $wpdb->get_row("SELECT * FROM $tablecomments WHERE comment_ID='$comment_id' LIMIT 1");
|
||||||
$post = $wpdb->get_row("SELECT * FROM $tableposts WHERE ID='$comment->comment_post_ID' LIMIT 1");
|
$post = $wpdb->get_row("SELECT * FROM $tableposts WHERE ID='$comment->comment_post_ID' LIMIT 1");
|
||||||
|
@ -1075,7 +1077,7 @@ function wp_notify_postauthor($comment_id, $comment_type='comment') {
|
||||||
function wp_notify_moderator($comment_id) {
|
function wp_notify_moderator($comment_id) {
|
||||||
global $wpdb, $tablecomments, $tableposts, $tableusers;
|
global $wpdb, $tablecomments, $tableposts, $tableusers;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
global $blogfilename, $blogname, $siteurl, $blog_charset;
|
global $blogname, $blog_charset;
|
||||||
|
|
||||||
$comment = $wpdb->get_row("SELECT * FROM $tablecomments WHERE comment_ID='$comment_id' LIMIT 1");
|
$comment = $wpdb->get_row("SELECT * FROM $tablecomments WHERE comment_ID='$comment_id' LIMIT 1");
|
||||||
$post = $wpdb->get_row("SELECT * FROM $tableposts WHERE ID='$comment->comment_post_ID' LIMIT 1");
|
$post = $wpdb->get_row("SELECT * FROM $tableposts WHERE ID='$comment->comment_post_ID' LIMIT 1");
|
||||||
|
@ -1090,10 +1092,10 @@ function wp_notify_moderator($comment_id) {
|
||||||
$notify_message .= "URL : $comment->comment_author_url\r\n";
|
$notify_message .= "URL : $comment->comment_author_url\r\n";
|
||||||
$notify_message .= "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$comment->comment_author_IP\r\n";
|
$notify_message .= "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$comment->comment_author_IP\r\n";
|
||||||
$notify_message .= "Comment:\r\n".stripslashes($comment->comment_content)."\r\n\r\n";
|
$notify_message .= "Comment:\r\n".stripslashes($comment->comment_content)."\r\n\r\n";
|
||||||
$notify_message .= "To approve this comment, visit: $siteurl/wp-admin/post.php?action=mailapprovecomment&p=".$comment->comment_post_ID."&comment=$comment_id\r\n";
|
$notify_message .= "To approve this comment, visit: " . get_settings('siteurl') . "/wp-admin/post.php?action=mailapprovecomment&p=".$comment->comment_post_ID."&comment=$comment_id\r\n";
|
||||||
$notify_message .= "To delete this comment, visit: $siteurl/wp-admin/post.php?action=confirmdeletecomment&p=".$comment->comment_post_ID."&comment=$comment_id\r\n";
|
$notify_message .= "To delete this comment, visit: " . get_settings('siteurl') . "/wp-admin/post.php?action=confirmdeletecomment&p=".$comment->comment_post_ID."&comment=$comment_id\r\n";
|
||||||
$notify_message .= "Currently $comments_waiting comments are waiting for approval. Please visit the moderation panel:\r\n";
|
$notify_message .= "Currently $comments_waiting comments are waiting for approval. Please visit the moderation panel:\r\n";
|
||||||
$notify_message .= "$siteurl/wp-admin/moderation.php\r\n";
|
$notify_message .= get_settings('siteurl') . "/wp-admin/moderation.php\r\n";
|
||||||
|
|
||||||
$subject = '[' . stripslashes($blogname) . '] Please approve: "' .stripslashes($post->post_title).'"';
|
$subject = '[' . stripslashes($blogname) . '] Please approve: "' .stripslashes($post->post_title).'"';
|
||||||
$admin_email = get_settings("admin_email");
|
$admin_email = get_settings("admin_email");
|
||||||
|
@ -1278,9 +1280,8 @@ function get_search_query_terms($engine = 'google') {
|
||||||
}
|
}
|
||||||
|
|
||||||
function is_referer_search_engine($engine = 'google') {
|
function is_referer_search_engine($engine = 'google') {
|
||||||
global $siteurl;
|
$siteurl = get_settings('siteurl');
|
||||||
|
$referer = urldecode($_SERVER['HTTP_REFERER']);
|
||||||
$referer = urldecode($_SERVER[HTTP_REFERER]);
|
|
||||||
//echo "referer is: $referer<br />";
|
//echo "referer is: $referer<br />";
|
||||||
if ( ! $engine ) {
|
if ( ! $engine ) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -16,18 +16,18 @@ function get_the_category() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_category_link($echo = false, $category_id, $category_nicename) {
|
function get_category_link($echo = false, $category_id, $category_nicename) {
|
||||||
global $wpdb, $tablecategories, $post, $querystring_start, $querystring_equal, $siteurl, $blogfilename, $cache_categories;
|
global $wpdb, $tablecategories, $post, $querystring_start, $querystring_equal, $cache_categories;
|
||||||
$cat_ID = $category_id;
|
$cat_ID = $category_id;
|
||||||
$permalink_structure = get_settings('permalink_structure');
|
$permalink_structure = get_settings('permalink_structure');
|
||||||
|
|
||||||
if ('' == $permalink_structure) {
|
if ('' == $permalink_structure) {
|
||||||
$file = "$siteurl/$blogfilename";
|
$file = get_settings('siteurl') . '/' . get_settings('blogfilename');
|
||||||
$link = $file.$querystring_start.'cat'.$querystring_equal.$cat_ID;
|
$link = $file.$querystring_start.'cat'.$querystring_equal.$cat_ID;
|
||||||
} else {
|
} else {
|
||||||
if ('' == $category_nicename) $category_nicename = $cache_categories[$category_id]->category_nicename;
|
if ('' == $category_nicename) $category_nicename = $cache_categories[$category_id]->category_nicename;
|
||||||
// Get any static stuff from the front
|
// Get any static stuff from the front
|
||||||
$front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
|
$front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
|
||||||
$link = $siteurl . $front . 'category/';
|
$link = get_settings('siteurl') . $front . 'category/';
|
||||||
if ($parent=$cache_categories[$category_id]->category_parent) $link .= get_category_parents($parent, FALSE, '/', TRUE);
|
if ($parent=$cache_categories[$category_id]->category_parent) $link .= get_category_parents($parent, FALSE, '/', TRUE);
|
||||||
$link .= $category_nicename . '/';
|
$link .= $category_nicename . '/';
|
||||||
}
|
}
|
||||||
|
@ -37,12 +37,12 @@ function get_category_link($echo = false, $category_id, $category_nicename) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_category_rss_link($echo = false, $category_id, $category_nicename) {
|
function get_category_rss_link($echo = false, $category_id, $category_nicename) {
|
||||||
global $querystring_start, $querystring_equal, $siteurl;
|
global $querystring_start, $querystring_equal;
|
||||||
$cat_ID = $category_id;
|
$cat_ID = $category_id;
|
||||||
$permalink_structure = get_settings('permalink_structure');
|
$permalink_structure = get_settings('permalink_structure');
|
||||||
|
|
||||||
if ('' == $permalink_structure) {
|
if ('' == $permalink_structure) {
|
||||||
$file = "$siteurl/wp-rss2.php";
|
$file = get_settings('siteurl') . '/wp-rss2.php';
|
||||||
$link = $file . $querystring_start . 'cat' . $querystring_equal . $category_id;
|
$link = $file . $querystring_start . 'cat' . $querystring_equal . $category_id;
|
||||||
} else {
|
} else {
|
||||||
$link = get_category_link(0, $category_id, $category_nicename);
|
$link = get_category_link(0, $category_id, $category_nicename);
|
||||||
|
@ -185,9 +185,9 @@ function dropdown_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_
|
||||||
$optiondates = 0, $optioncount = 0, $hide_empty = 1, $optionnone=FALSE,
|
$optiondates = 0, $optioncount = 0, $hide_empty = 1, $optionnone=FALSE,
|
||||||
$selected=0, $hide=0) {
|
$selected=0, $hide=0) {
|
||||||
global $tablecategories, $tableposts, $tablepost2cat, $wpdb;
|
global $tablecategories, $tableposts, $tablepost2cat, $wpdb;
|
||||||
global $pagenow, $siteurl, $blogfilename;
|
global $pagenow;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
if (($file == 'blah') || ($file == '')) $file = "$siteurl/$blogfilename";
|
if (($file == 'blah') || ($file == '')) $file = get_settings('siteurl') . '/' . get_settings('blogfilename');
|
||||||
if (!$selected) $selected=$cat;
|
if (!$selected) $selected=$cat;
|
||||||
$sort_column = 'cat_'.$sort_column;
|
$sort_column = 'cat_'.$sort_column;
|
||||||
|
|
||||||
|
@ -252,11 +252,11 @@ function wp_list_cats($args = '') {
|
||||||
|
|
||||||
function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=FALSE, $child_of=0, $categories=0, $recurse=0) {
|
function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=FALSE, $child_of=0, $categories=0, $recurse=0) {
|
||||||
global $tablecategories, $tableposts, $tablepost2cat, $wpdb;
|
global $tablecategories, $tableposts, $tablepost2cat, $wpdb;
|
||||||
global $pagenow, $siteurl, $blogfilename;
|
global $pagenow;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
// Optiondates now works
|
// Optiondates now works
|
||||||
if ('' == $file) {
|
if ('' == $file) {
|
||||||
$file = "$siteurl/$blogfilename";
|
$file = "$siteurl/" . get_settings('blogfilename');
|
||||||
}
|
}
|
||||||
if (intval($categories)==0){
|
if (intval($categories)==0){
|
||||||
$sort_column = 'cat_'.$sort_column;
|
$sort_column = 'cat_'.$sort_column;
|
||||||
|
|
|
@ -60,7 +60,7 @@ function comments_popup_script($width=400, $height=400, $file='wp-comments-popup
|
||||||
|
|
||||||
function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') {
|
function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Comments', $CSSclass='', $none='Comments Off') {
|
||||||
global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS, $cookiehash;
|
global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb, $tablecomments, $HTTP_COOKIE_VARS, $cookiehash;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator, $siteurl;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
global $comment_count_cache, $single;
|
global $comment_count_cache, $single;
|
||||||
if (!$single) {
|
if (!$single) {
|
||||||
if ('' == $comment_count_cache["$id"]) {
|
if ('' == $comment_count_cache["$id"]) {
|
||||||
|
@ -80,7 +80,7 @@ function comments_popup_link($zero='No Comments', $one='1 Comment', $more='% Com
|
||||||
}
|
}
|
||||||
echo '<a href="';
|
echo '<a href="';
|
||||||
if ($wpcommentsjavascript) {
|
if ($wpcommentsjavascript) {
|
||||||
echo $siteurl.'/'.$wpcommentspopupfile.$querystring_start.'p'.$querystring_equal.$id.$querystring_separator.'c'.$querystring_equal.'1';
|
echo get_settings('siteurl') . '/' . $wpcommentspopupfile.$querystring_start.'p'.$querystring_equal.$id.$querystring_separator.'c'.$querystring_equal.'1';
|
||||||
//echo get_permalink();
|
//echo get_permalink();
|
||||||
echo '" onclick="wpopen(this.href); return false"';
|
echo '" onclick="wpopen(this.href); return false"';
|
||||||
} else {
|
} else {
|
||||||
|
@ -227,12 +227,12 @@ function comment_time($d='') {
|
||||||
|
|
||||||
function comments_rss_link($link_text='Comments RSS', $commentsrssfilename = 'wp-commentsrss2.php') {
|
function comments_rss_link($link_text='Comments RSS', $commentsrssfilename = 'wp-commentsrss2.php') {
|
||||||
global $id;
|
global $id;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator, $siteurl;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
|
|
||||||
if ('' != get_settings('permalink_structure')) {
|
if ('' != get_settings('permalink_structure')) {
|
||||||
$url = trailingslashit(get_permalink()) . 'rss2/';
|
$url = trailingslashit(get_permalink()) . 'rss2/';
|
||||||
} else {
|
} else {
|
||||||
$url = $siteurl.'/'.$commentsrssfilename.$querystring_start.'p'.$querystring_equal.$id;
|
$url = get_settings('siteurl') . '/' . $commentsrssfilename.$querystring_start.'p'.$querystring_equal.$id;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<a href='$url'>$link_text</a>";
|
echo "<a href='$url'>$link_text</a>";
|
||||||
|
@ -284,8 +284,8 @@ function trackback_url($display = true) {
|
||||||
|
|
||||||
|
|
||||||
function trackback_rdf($timezone = 0) {
|
function trackback_rdf($timezone = 0) {
|
||||||
global $siteurl, $id, $HTTP_SERVER_VARS;
|
global $id;
|
||||||
if (!stristr($HTTP_SERVER_VARS['HTTP_USER_AGENT'], 'W3C_Validator')) {
|
if (!stristr($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator')) {
|
||||||
echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
|
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
|
||||||
|
|
|
@ -22,57 +22,57 @@ function bloginfo_unicode($show='') {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_bloginfo($show='') {
|
function get_bloginfo($show='') {
|
||||||
global $siteurl, $blogfilename, $blogname, $blogdescription, $siteurl, $admin_email;
|
global $blogname, $blogdescription, $admin_email;
|
||||||
|
|
||||||
$do_perma = 0;
|
$do_perma = 0;
|
||||||
$feed_url = $siteurl;
|
$feed_url = get_settings('siteurl');
|
||||||
$comment_feed_url = $siteurl;
|
$comment_feed_url = get_settings('siteurl');
|
||||||
|
|
||||||
if ('' != get_settings('permalink_structure')) {
|
if ('' != get_settings('permalink_structure')) {
|
||||||
$do_perma = 1;
|
$do_perma = 1;
|
||||||
$feed_url = $siteurl . '/feed';
|
$feed_url = get_settings('siteurl') . '/feed';
|
||||||
$comment_feed_url = $siteurl . '/comments/feed';
|
$comment_feed_url = get_settings('siteurl') . '/comments/feed';
|
||||||
}
|
}
|
||||||
|
|
||||||
switch($show) {
|
switch($show) {
|
||||||
case 'url':
|
case 'url':
|
||||||
$output = $siteurl.'/'.$blogfilename;
|
$output = get_settings('siteurl') .'/'. get_settings('blogfilename');
|
||||||
break;
|
break;
|
||||||
case 'description':
|
case 'description':
|
||||||
$output = $blogdescription;
|
$output = $blogdescription;
|
||||||
break;
|
break;
|
||||||
case 'rdf_url':
|
case 'rdf_url':
|
||||||
$output = $siteurl.'/wp-rdf.php';
|
$output = get_settings('siteurl') .'/wp-rdf.php';
|
||||||
if ($do_perma) {
|
if ($do_perma) {
|
||||||
$output = $feed_url . '/rdf/';
|
$output = $feed_url . '/rdf/';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'rss_url':
|
case 'rss_url':
|
||||||
$output = $siteurl.'/wp-rss.php';
|
$output = get_settings('siteurl') .'/wp-rss.php';
|
||||||
if ($do_perma) {
|
if ($do_perma) {
|
||||||
$output = $feed_url . '/rss/';
|
$output = $feed_url . '/rss/';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'rss2_url':
|
case 'rss2_url':
|
||||||
$output = $siteurl.'/wp-rss2.php';
|
$output = get_settings('siteurl') .'/wp-rss2.php';
|
||||||
if ($do_perma) {
|
if ($do_perma) {
|
||||||
$output = $feed_url . '/rss2/';
|
$output = $feed_url . '/rss2/';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'atom_url':
|
case 'atom_url':
|
||||||
$output = $siteurl.'/wp-atom.php';
|
$output = get_settings('siteurl') .'/wp-atom.php';
|
||||||
if ($do_perma) {
|
if ($do_perma) {
|
||||||
$output = $feed_url . '/atom/';
|
$output = $feed_url . '/atom/';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'comments_rss2_url':
|
case 'comments_rss2_url':
|
||||||
$output = $siteurl.'/wp-commentsrss2.php';
|
$output = get_settings('siteurl') .'/wp-commentsrss2.php';
|
||||||
if ($do_perma) {
|
if ($do_perma) {
|
||||||
$output = $comment_feed_url . '/rss2/';
|
$output = $comment_feed_url . '/rss2/';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'pingback_url':
|
case 'pingback_url':
|
||||||
$output = $siteurl.'/xmlrpc.php';
|
$output = get_settings('siteurl') .'/xmlrpc.php';
|
||||||
break;
|
break;
|
||||||
case 'admin_email':
|
case 'admin_email':
|
||||||
$output = $admin_email;
|
$output = $admin_email;
|
||||||
|
@ -204,7 +204,7 @@ function get_archives_link($url, $text, $format = "html", $before = "", $after =
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_archives($type='', $limit='', $format='html', $before = "", $after = "", $show_post_count = false) {
|
function get_archives($type='', $limit='', $format='html', $before = "", $after = "", $show_post_count = false) {
|
||||||
global $tableposts, $time_difference, $siteurl, $blogfilename;
|
global $tableposts, $time_difference;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator, $month, $wpdb, $start_of_week;
|
global $querystring_start, $querystring_equal, $querystring_separator, $month, $wpdb, $start_of_week;
|
||||||
|
|
||||||
if ('' == $type) {
|
if ('' == $type) {
|
||||||
|
@ -219,9 +219,9 @@ function get_archives($type='', $limit='', $format='html', $before = "", $after
|
||||||
$archive_week_separator = '–';
|
$archive_week_separator = '–';
|
||||||
|
|
||||||
// archive link url
|
// archive link url
|
||||||
$archive_link_m = $siteurl.'/'.$blogfilename.$querystring_start.'m'.$querystring_equal; # monthly archive;
|
$archive_link_m = get_settings('siteurl').'/'.get_settings('blogfilename').$querystring_start.'m'.$querystring_equal; # monthly archive;
|
||||||
$archive_link_w = $siteurl.'/'.$blogfilename.$querystring_start.'w'.$querystring_equal; # weekly archive;
|
$archive_link_w = get_settings('siteurl').'/'.get_settings('blogfilename').$querystring_start.'w'.$querystring_equal; # weekly archive;
|
||||||
$archive_link_p = $siteurl.'/'.$blogfilename.$querystring_start.'p'.$querystring_equal; # post-by-post archive;
|
$archive_link_p = get_settings('siteurl').'/'.get_settings('blogfilename').$querystring_start.'p'.$querystring_equal; # post-by-post archive;
|
||||||
|
|
||||||
// over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride
|
// over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride
|
||||||
$archive_date_format_over_ride = 0;
|
$archive_date_format_over_ride = 0;
|
||||||
|
@ -283,7 +283,7 @@ function get_archives($type='', $limit='', $format='html', $before = "", $after
|
||||||
$arc_week = get_weekstartend($arcresult->yyyymmdd, $start_of_week);
|
$arc_week = get_weekstartend($arcresult->yyyymmdd, $start_of_week);
|
||||||
$arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']);
|
$arc_week_start = date_i18n($archive_week_start_date_format, $arc_week['start']);
|
||||||
$arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']);
|
$arc_week_end = date_i18n($archive_week_end_date_format, $arc_week['end']);
|
||||||
$url = sprintf('%s/%s%sm%s%s%sw%s%d', $siteurl, $blogfilename, $querystring_start,
|
$url = sprintf('%s/%s%sm%s%s%sw%s%d', get_settings('siteurl'), get_settings('blogfilename'), $querystring_start,
|
||||||
$querystring_equal, $arc_year, $querystring_separator,
|
$querystring_equal, $arc_year, $querystring_separator,
|
||||||
$querystring_equal, $arcresult->week);
|
$querystring_equal, $arcresult->week);
|
||||||
$text = $arc_week_start . $archive_week_separator . $arc_week_end;
|
$text = $arc_week_start . $archive_week_separator . $arc_week_end;
|
||||||
|
|
|
@ -35,13 +35,12 @@ function permalink_single($file = '') {
|
||||||
}
|
}
|
||||||
|
|
||||||
function permalink_single_rss($file = '') {
|
function permalink_single_rss($file = '') {
|
||||||
global $siteurl;
|
|
||||||
echo get_permalink();
|
echo get_permalink();
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_permalink($id=false) {
|
function get_permalink($id=false) {
|
||||||
global $post, $wpdb, $tableposts;
|
global $post, $wpdb, $tableposts;
|
||||||
global $siteurl, $blogfilename, $querystring_start, $querystring_equal;
|
global $querystring_start, $querystring_equal;
|
||||||
|
|
||||||
$rewritecode = array(
|
$rewritecode = array(
|
||||||
'%year%',
|
'%year%',
|
||||||
|
@ -60,9 +59,9 @@ function get_permalink($id=false) {
|
||||||
$post->post_name,
|
$post->post_name,
|
||||||
$post->ID
|
$post->ID
|
||||||
);
|
);
|
||||||
return $siteurl . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure'));
|
return get_settings('siteurl') . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure'));
|
||||||
} else { // if they're not using the fancy permalink option
|
} else { // if they're not using the fancy permalink option
|
||||||
return $siteurl . '/' . $blogfilename.$querystring_start.'p'.$querystring_equal.$post->ID;
|
return get_settings('siteurl') . '/' . get_settings('blogfilename').$querystring_start.'p'.$querystring_equal.$post->ID;
|
||||||
}
|
}
|
||||||
} else { // if an ID is given
|
} else { // if an ID is given
|
||||||
$idpost = $wpdb->get_row("SELECT post_date, post_name FROM $tableposts WHERE ID = $id");
|
$idpost = $wpdb->get_row("SELECT post_date, post_name FROM $tableposts WHERE ID = $id");
|
||||||
|
@ -75,15 +74,15 @@ function get_permalink($id=false) {
|
||||||
$idpost->post_name,
|
$idpost->post_name,
|
||||||
$id
|
$id
|
||||||
);
|
);
|
||||||
return $siteurl . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure'));
|
return get_settings('siteurl') . str_replace($rewritecode, $rewritereplace, get_settings('permalink_structure'));
|
||||||
} else {
|
} else {
|
||||||
return $siteurl . '/' . $blogfilename.$querystring_start.'p'.$querystring_equal.$id;
|
return get_settings('siteurl') . '/' . get_settings('blogfilename').$querystring_start.'p'.$querystring_equal.$id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_month_link($year, $month) {
|
function get_month_link($year, $month) {
|
||||||
global $siteurl, $blogfilename, $querystring_start, $querystring_equal;
|
global $querystring_start, $querystring_equal;
|
||||||
if (!$year) $year = date('Y', time()+($time_difference * 3600));
|
if (!$year) $year = date('Y', time()+($time_difference * 3600));
|
||||||
if (!$month) $month = date('m', time()+($time_difference * 3600));
|
if (!$month) $month = date('m', time()+($time_difference * 3600));
|
||||||
if ('' != get_settings('permalink_structure')) {
|
if ('' != get_settings('permalink_structure')) {
|
||||||
|
@ -94,14 +93,14 @@ function get_month_link($year, $month) {
|
||||||
$monthlink = str_replace('%year%', $year, $monthlink);
|
$monthlink = str_replace('%year%', $year, $monthlink);
|
||||||
$monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink);
|
$monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink);
|
||||||
$monthlink = str_replace('%post_id%', '', $monthlink);
|
$monthlink = str_replace('%post_id%', '', $monthlink);
|
||||||
return $siteurl . $monthlink;
|
return get_settings('siteurl') . $monthlink;
|
||||||
} else {
|
} else {
|
||||||
return $siteurl.'/'.$blogfilename.$querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2);
|
return get_settings('siteurl') .'/'. get_settings('blogfilename') .$querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_day_link($year, $month, $day) {
|
function get_day_link($year, $month, $day) {
|
||||||
global $siteurl, $blogfilename, $querystring_start, $querystring_equal;
|
global $querystring_start, $querystring_equal;
|
||||||
if (!$year) $year = date('Y', time()+($time_difference * 3600));
|
if (!$year) $year = date('Y', time()+($time_difference * 3600));
|
||||||
if (!$month) $month = date('m', time()+($time_difference * 3600));
|
if (!$month) $month = date('m', time()+($time_difference * 3600));
|
||||||
if (!$day) $day = date('j', time()+($time_difference * 3600));
|
if (!$day) $day = date('j', time()+($time_difference * 3600));
|
||||||
|
@ -114,14 +113,14 @@ function get_day_link($year, $month, $day) {
|
||||||
$daylink = str_replace('%monthnum%', zeroise(intval($month), 2), $daylink);
|
$daylink = str_replace('%monthnum%', zeroise(intval($month), 2), $daylink);
|
||||||
$daylink = str_replace('%day%', zeroise(intval($day), 2), $daylink);
|
$daylink = str_replace('%day%', zeroise(intval($day), 2), $daylink);
|
||||||
$daylink = str_replace('%post_id%', '', $daylink);
|
$daylink = str_replace('%post_id%', '', $daylink);
|
||||||
return $siteurl . $daylink;
|
return get_settings('siteurl') . $daylink;
|
||||||
} else {
|
} else {
|
||||||
return $siteurl.'/'.$blogfilename.$querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2).zeroise($day, 2);
|
return get_settings('siteurl') .'/'. get_settings('blogfilename') .$querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2).zeroise($day, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function edit_post_link($link = 'Edit This', $before = '', $after = '') {
|
function edit_post_link($link = 'Edit This', $before = '', $after = '') {
|
||||||
global $user_level, $post, $siteurl;
|
global $user_level, $post;
|
||||||
|
|
||||||
get_currentuserinfo();
|
get_currentuserinfo();
|
||||||
|
|
||||||
|
@ -134,12 +133,12 @@ function edit_post_link($link = 'Edit This', $before = '', $after = '') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$location = "$siteurl/wp-admin/post.php?action=edit&post=$post->ID";
|
$location = get_settings('siteurl') . "/wp-admin/post.php?action=edit&post=$post->ID";
|
||||||
echo "$before <a href=\"$location\">$link</a> $after";
|
echo "$before <a href=\"$location\">$link</a> $after";
|
||||||
}
|
}
|
||||||
|
|
||||||
function edit_comment_link($link = 'Edit This', $before = '', $after = '') {
|
function edit_comment_link($link = 'Edit This', $before = '', $after = '') {
|
||||||
global $user_level, $post, $comment, $siteurl;
|
global $user_level, $post, $comment;
|
||||||
|
|
||||||
get_currentuserinfo();
|
get_currentuserinfo();
|
||||||
|
|
||||||
|
@ -152,7 +151,7 @@ function edit_comment_link($link = 'Edit This', $before = '', $after = '') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$location = "$siteurl/wp-admin/post.php?action=editcomment&comment=$comment->comment_ID";
|
$location = get_settings('siteurl') . "/wp-admin/post.php?action=editcomment&comment=$comment->comment_ID";
|
||||||
echo "$before <a href=\"$location\">$link</a> $after";
|
echo "$before <a href=\"$location\">$link</a> $after";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,7 @@ function link_pages($before='<br />', $after='<br />', $next_or_number='number',
|
||||||
|
|
||||||
|
|
||||||
function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
|
function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
|
||||||
global $tableposts, $id, $post, $siteurl, $blogfilename, $wpdb;
|
global $tableposts, $id, $post, $wpdb;
|
||||||
global $p, $posts, $posts_per_page, $s, $single;
|
global $p, $posts, $posts_per_page, $s, $single;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ function previous_post($format='%', $previous='previous post: ', $title='yes', $
|
||||||
}
|
}
|
||||||
|
|
||||||
function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
|
function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
|
||||||
global $tableposts, $p, $posts, $id, $post, $siteurl, $blogfilename, $wpdb;
|
global $tableposts, $p, $posts, $id, $post, $wpdb;
|
||||||
global $time_difference, $single;
|
global $time_difference, $single;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
if(($p) || ($posts==1) || 1 == $single) {
|
if(($p) || ($posts==1) || 1 == $single) {
|
||||||
|
@ -339,7 +339,7 @@ function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat=
|
||||||
}
|
}
|
||||||
|
|
||||||
function next_posts($max_page = 0) { // original by cfactor at cooltux.org
|
function next_posts($max_page = 0) { // original by cfactor at cooltux.org
|
||||||
global $HTTP_SERVER_VARS, $siteurl, $blogfilename, $p, $paged, $what_to_show, $pagenow;
|
global $HTTP_SERVER_VARS, $p, $paged, $what_to_show, $pagenow;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
if (empty($p) && ($what_to_show == 'paged')) {
|
if (empty($p) && ($what_to_show == 'paged')) {
|
||||||
$qstr = $HTTP_SERVER_VARS['QUERY_STRING'];
|
$qstr = $HTTP_SERVER_VARS['QUERY_STRING'];
|
||||||
|
@ -358,7 +358,7 @@ function next_posts($max_page = 0) { // original by cfactor at cooltux.org
|
||||||
if (!$paged) $paged = 1;
|
if (!$paged) $paged = 1;
|
||||||
$nextpage = intval($paged) + 1;
|
$nextpage = intval($paged) + 1;
|
||||||
if (!$max_page || $max_page >= $nextpage) {
|
if (!$max_page || $max_page >= $nextpage) {
|
||||||
echo $siteurl.'/'.$pagenow.$querystring_start.
|
echo get_settings('siteurl') .'/'.$pagenow.$querystring_start.
|
||||||
($qstr == '' ? '' : $qstr.$querystring_separator) .
|
($qstr == '' ? '' : $qstr.$querystring_separator) .
|
||||||
'paged'.$querystring_equal.$nextpage;
|
'paged'.$querystring_equal.$nextpage;
|
||||||
}
|
}
|
||||||
|
@ -392,7 +392,7 @@ function next_posts_link($label='Next Page »', $max_page=0) {
|
||||||
|
|
||||||
|
|
||||||
function previous_posts() { // original by cfactor at cooltux.org
|
function previous_posts() { // original by cfactor at cooltux.org
|
||||||
global $HTTP_SERVER_VARS, $siteurl, $blogfilename, $p, $paged, $what_to_show, $pagenow;
|
global $HTTP_SERVER_VARS, $p, $paged, $what_to_show, $pagenow;
|
||||||
global $querystring_start, $querystring_equal, $querystring_separator;
|
global $querystring_start, $querystring_equal, $querystring_separator;
|
||||||
if (empty($p) && ($what_to_show == 'paged')) {
|
if (empty($p) && ($what_to_show == 'paged')) {
|
||||||
$qstr = $HTTP_SERVER_VARS['QUERY_STRING'];
|
$qstr = $HTTP_SERVER_VARS['QUERY_STRING'];
|
||||||
|
@ -410,7 +410,7 @@ function previous_posts() { // original by cfactor at cooltux.org
|
||||||
}
|
}
|
||||||
$nextpage = intval($paged) - 1;
|
$nextpage = intval($paged) - 1;
|
||||||
if ($nextpage < 1) $nextpage = 1;
|
if ($nextpage < 1) $nextpage = 1;
|
||||||
echo $siteurl.'/'.$pagenow.$querystring_start.
|
echo get_settings('siteurl') .'/'.$pagenow.$querystring_start.
|
||||||
($qstr == '' ? '' : $qstr.$querystring_separator) .
|
($qstr == '' ? '' : $qstr.$querystring_separator) .
|
||||||
'paged'.$querystring_equal.$nextpage;
|
'paged'.$querystring_equal.$nextpage;
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,7 @@ $pagenow = trim($pagenow[(sizeof($pagenow)-1)]);
|
||||||
$pagenow = explode('?', $pagenow);
|
$pagenow = explode('?', $pagenow);
|
||||||
$pagenow = $pagenow[0];
|
$pagenow = $pagenow[0];
|
||||||
if (($querystring_start == '/') && ($pagenow != 'post.php')) {
|
if (($querystring_start == '/') && ($pagenow != 'post.php')) {
|
||||||
$pagenow = $siteurl.'/'.$blogfilename;
|
$pagenow = get_settings('siteurl') . '/' . get_settings('blogfilename');
|
||||||
}
|
}
|
||||||
|
|
||||||
# browser detection
|
# browser detection
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
// ==================================================================
|
// ==================================================================
|
||||||
// Select a DB (if another one needs to be selected)
|
// Select a DB (if another one needs to be selected)
|
||||||
|
|
||||||
function select($db)x{
|
function select($db) {
|
||||||
if ( !@mysql_select_db($db,$this->dbh)) {
|
if ( !@mysql_select_db($db,$this->dbh)) {
|
||||||
die("
|
die("
|
||||||
<p>We're having a little trouble selecting the proper database for WordPress.</p>
|
<p>We're having a little trouble selecting the proper database for WordPress.</p>
|
||||||
|
@ -237,7 +237,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the output is an object then return object using the row offset..
|
// If the output is an object then return object using the row offset..
|
||||||
if ( $output == OBJECT ) b{
|
if ( $output == OBJECT ) {
|
||||||
return $this->last_result[$y]?$this->last_result[$y]:null;
|
return $this->last_result[$y]?$this->last_result[$y]:null;
|
||||||
}
|
}
|
||||||
// If the output is an associative array then return row as such..
|
// If the output is an associative array then return row as such..
|
||||||
|
|
12
wp-login.php
12
wp-login.php
|
@ -163,7 +163,7 @@ case 'lostpassword':
|
||||||
<head>
|
<head>
|
||||||
<title>WordPress › Lost password ?</title>
|
<title>WordPress › Lost password ?</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset; ?>" />
|
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset; ?>" />
|
||||||
<link rel="stylesheet" href="<?php echo $siteurl; ?>/wp-admin/wp-admin.css" type="text/css" />
|
<link rel="stylesheet" href="<?php echo get_settings('siteurl'); ?>/wp-admin/wp-admin.css" type="text/css" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function focusit() {
|
function focusit() {
|
||||||
// focus on first input field
|
// focus on first input field
|
||||||
|
@ -211,7 +211,7 @@ case 'retrievepassword':
|
||||||
$wpdb->query("UPDATE $tableusers SET user_pass = MD5('$user_pass') WHERE user_login = '$user_login'");
|
$wpdb->query("UPDATE $tableusers SET user_pass = MD5('$user_pass') WHERE user_login = '$user_login'");
|
||||||
$message = "Login: $user_login\r\n";
|
$message = "Login: $user_login\r\n";
|
||||||
$message .= "Password: $user_pass\r\n";
|
$message .= "Password: $user_pass\r\n";
|
||||||
$message .= "Login at: $siteurl/wp-login.php";
|
$message .= 'Login at: ' . get_settings('siteurl') . '/wp-login.php';
|
||||||
|
|
||||||
$m = mail($user_email, "[$blogname] Your weblog's login/password", $message);
|
$m = mail($user_email, "[$blogname] Your weblog's login/password", $message);
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ default:
|
||||||
<head>
|
<head>
|
||||||
<title>WordPress > <?php bloginfo('name') ?> > Login form</title>
|
<title>WordPress > <?php bloginfo('name') ?> > Login form</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset; ?>" />
|
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset; ?>" />
|
||||||
<link rel="stylesheet" href="<?php echo $siteurl; ?>/wp-admin/wp-admin.css" type="text/css" />
|
<link rel="stylesheet" href="<?php echo get_settings('siteurl'); ?>/wp-admin/wp-admin.css" type="text/css" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function focusit() {
|
function focusit() {
|
||||||
// focus on first input field
|
// focus on first input field
|
||||||
|
@ -280,11 +280,11 @@ default:
|
||||||
|
|
||||||
<div id="login">
|
<div id="login">
|
||||||
<p>
|
<p>
|
||||||
<a href="<?php echo $siteurl?>" title="Are you lost?">Back to blog?</a><br />
|
<a href="<?php echo get_settings('siteurl'); ?>" title="Are you lost?">Back to blog?</a><br />
|
||||||
<?php if ($users_can_register) { ?>
|
<?php if ($users_can_register) { ?>
|
||||||
<a href="<?php echo $siteurl; ?>/wp-register.php" title="Register to be an author">Register?</a><br />
|
<a href="<?php echo get_settings('siteurl'); ?>/wp-register.php" title="Register to be an author">Register?</a><br />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<a href="<?php echo $siteurl; ?>/wp-login.php?action=lostpassword" title="Password Lost and Found">Lost your password?</a>
|
<a href="<?php echo get_settings('siteurl'); ?>/wp-login.php?action=lostpassword" title="Password Lost and Found">Lost your password?</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -150,7 +150,7 @@ case 'disabled':
|
||||||
<div id="login">
|
<div id="login">
|
||||||
<h2>Registration Disabled</h2>
|
<h2>Registration Disabled</h2>
|
||||||
<p>User registration is currently not allowed.<br />
|
<p>User registration is currently not allowed.<br />
|
||||||
<a href="<?php echo $siteurl.'/'.$blogfilename; ?>" title="Go back to the blog">Home</a>
|
<a href="<?php echo get_settings('siteurl') .'/'. get_settings('blogfilename'); ?>" title="Go back to the blog">Home</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,6 @@ require_once (ABSPATH . WPINC . '/kses.php');
|
||||||
// get_settings() wherever these are needed OR
|
// get_settings() wherever these are needed OR
|
||||||
// accessing a single global $all_settings var
|
// accessing a single global $all_settings var
|
||||||
if (!strstr($_SERVER['REQUEST_URI'], 'install.php') && !strstr($_SERVER['REQUEST_URI'], 'wp-admin/import')) {
|
if (!strstr($_SERVER['REQUEST_URI'], 'install.php') && !strstr($_SERVER['REQUEST_URI'], 'wp-admin/import')) {
|
||||||
$siteurl = get_settings('siteurl');
|
|
||||||
$blogfilename = get_settings('blogfilename');
|
|
||||||
$blogname = get_settings('blogname');
|
$blogname = get_settings('blogname');
|
||||||
$blogdescription = get_settings('blogdescription');
|
$blogdescription = get_settings('blogdescription');
|
||||||
$admin_email = get_settings('admin_email');
|
$admin_email = get_settings('admin_email');
|
||||||
|
@ -102,7 +100,7 @@ if (!strstr($_SERVER['REQUEST_URI'], 'install.php') && !strstr($_SERVER['REQUEST
|
||||||
$querystring_separator = '&';
|
$querystring_separator = '&';
|
||||||
//}
|
//}
|
||||||
// Used to guarantee unique cookies
|
// Used to guarantee unique cookies
|
||||||
$cookiehash = md5($siteurl);
|
$cookiehash = md5(get_settings('siteurl'));
|
||||||
|
|
||||||
} //end !$_wp_installing
|
} //end !$_wp_installing
|
||||||
|
|
||||||
|
|
2
wp.php
2
wp.php
|
@ -15,7 +15,7 @@ require_once("wp-blog-header.php");
|
||||||
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
|
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 id="header"><a href="<?php echo $siteurl; ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
|
<h1 id="header"><a href="<?php echo get_settings('siteurl'); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
|
||||||
|
|
||||||
<!-- // loop start -->
|
<!-- // loop start -->
|
||||||
<?php foreach ($posts as $post) { start_wp(); ?>
|
<?php foreach ($posts as $post) { start_wp(); ?>
|
||||||
|
|
Loading…
Reference in New Issue