Migration to get_settings

git-svn-id: http://svn.automattic.com/wordpress/trunk@956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-03-01 06:13:32 +00:00
parent 9e718aff7a
commit b6aa1f6807
30 changed files with 109 additions and 155 deletions

View File

@ -11,7 +11,7 @@ require('wp-blog-header.php');
<head> <head>
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title> <title><?php bloginfo('name'); ?><?php wp_title(); ?></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 get_settings('blog_charset'); ?>" />
<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">

View File

@ -57,7 +57,7 @@ if ($standalone == 0) {
<title>WordPress &rsaquo; <?php bloginfo('name') ?> &rsaquo; <?php echo $title; ?></title> <title>WordPress &rsaquo; <?php bloginfo('name') ?> &rsaquo; <?php echo $title; ?></title>
<link rel="stylesheet" href="wp-admin.css" type="text/css" /> <link rel="stylesheet" href="wp-admin.css" type="text/css" />
<link rel="shortcut icon" href="../wp-images/wp-favicon.png" /> <link rel="shortcut icon" href="../wp-images/wp-favicon.png" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset ?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
<?php <?php
if ($redirect==1) { if ($redirect==1) {
?> ?>

View File

@ -71,7 +71,7 @@ window.close()
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>WordPress > Bookmarklet</title> <title>WordPress > Bookmarklet</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 get_settings('blog_charset'); ?>" />
<link rel="stylesheet" href="wp-admin.css" type="text/css" /> <link rel="stylesheet" href="wp-admin.css" type="text/css" />
<link rel="shortcut icon" href="../wp-images/wp-favicon.png" /> <link rel="shortcut icon" href="../wp-images/wp-favicon.png" />
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">

View File

@ -2,7 +2,7 @@
<div class="wrap"> <div class="wrap">
<?php <?php
$allowed_users = explode(" ", trim($fileupload_allowedusers)); $allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers')));
$submitbutton_text = 'Save'; $submitbutton_text = 'Save';
$toprow_title = 'Editing Post #' . $postdata['ID']; $toprow_title = 'Editing Post #' . $postdata['ID'];
@ -11,7 +11,7 @@ $form_extra = "' />\n<input type='hidden' name='post_ID' value='$post->ID";
$colspan = 2; $colspan = 2;
$form_pingback = '<input type="hidden" name="post_pingback" value="0" />'; $form_pingback = '<input type="hidden" name="post_pingback" value="0" />';
$form_prevstatus = '<input type="hidden" name="prev_status" value="'.$post_status.'" />'; $form_prevstatus = '<input type="hidden" name="prev_status" value="'.$post_status.'" />';
if ($use_trackback) { if (get_settings('use_trackback')) {
$form_trackback = '<p><label for="trackback"><a href="http://wordpress.org/docs/reference/post/#trackback" title="Help on trackbacks"><strong>TrackBack</strong> an <acronym title="Uniform Resource Locator">URL</acronym></a></label> $form_trackback = '<p><label for="trackback"><a href="http://wordpress.org/docs/reference/post/#trackback" title="Help on trackbacks"><strong>TrackBack</strong> an <acronym title="Uniform Resource Locator">URL</acronym></a></label>
(Separate multiple <acronym title="Uniform Resource Locator">URL</acronym>s with spaces.)<br /> (Separate multiple <acronym title="Uniform Resource Locator">URL</acronym>s with spaces.)<br />
<input type="text" name="trackback_url" style="width: 415px" id="trackback" tabindex="7" value="'. str_replace("\n", ' ', $to_ping) .'" /></p>'; <input type="text" name="trackback_url" style="width: 415px" id="trackback" tabindex="7" value="'. str_replace("\n", ' ', $to_ping) .'" /></p>';

View File

@ -1,6 +1,6 @@
<?php <?php
$allowed_users = explode(" ", trim($fileupload_allowedusers)); $allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers')));
$submitbutton_text = 'Edit this!'; $submitbutton_text = 'Edit this!';
$toprow_title = 'Editing Comment # '.$commentdata['comment_ID']; $toprow_title = 'Editing Comment # '.$commentdata['comment_ID'];

View File

@ -2,20 +2,20 @@
<div class="wrap"> <div class="wrap">
<?php <?php
$allowed_users = explode(" ", trim($fileupload_allowedusers)); $allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers')));
$submitbutton_text = 'Blog this!'; $submitbutton_text = 'Blog this!';
$toprow_title = 'New Post'; $toprow_title = 'New Post';
$form_action = 'post'; $form_action = 'post';
$form_extra = ''; $form_extra = '';
if ($use_pingback) { if (get_settings('use_pingback')) {
$form_pingback = '<input type="checkbox" class="checkbox" name="post_pingback" value="1" '; $form_pingback = '<input type="checkbox" class="checkbox" name="post_pingback" value="1" ';
if ($post_pingback) $form_pingback .= 'checked="checked" '; if ($post_pingback) $form_pingback .= 'checked="checked" ';
$form_pingback .= 'tabindex="7" id="pingback" /> <label for="pingback"><strong>PingBack</strong> the <acronym title="Uniform Resource Locators">URL</acronym>s in this post</label> <a href="http://wordpress.org/docs/reference/post/#pingback" title="Help on Pingbacks">?</a><br />'; $form_pingback .= 'tabindex="7" id="pingback" /> <label for="pingback"><strong>PingBack</strong> the <acronym title="Uniform Resource Locators">URL</acronym>s in this post</label> <a href="http://wordpress.org/docs/reference/post/#pingback" title="Help on Pingbacks">?</a><br />';
} else { } else {
$form_pingback = ''; $form_pingback = '';
} }
if ($use_trackback) { if (get_settings('use_trackback')) {
$form_trackback = '<p><label for="trackback"><a href="http://wordpress.org/docs/reference/post/#trackback" title="Help on trackbacks"><strong>TrackBack</strong> an <acronym title="Uniform Resource Locator">URL</acronym></a>:</label> (Separate multiple <acronym title="Uniform Resource Locator">URL</acronym>s with spaces.)<br /> $form_trackback = '<p><label for="trackback"><a href="http://wordpress.org/docs/reference/post/#trackback" title="Help on trackbacks"><strong>TrackBack</strong> an <acronym title="Uniform Resource Locator">URL</acronym></a>:</label> (Separate multiple <acronym title="Uniform Resource Locator">URL</acronym>s with spaces.)<br />
<input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>'; <input type="text" name="trackback_url" style="width: 360px" id="trackback" tabindex="7" /></p>';
if ('' != $pinged) { if ('' != $pinged) {

View File

@ -419,7 +419,6 @@ $option_data = array(
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(25,'rss_use_excerpt', 2, '1', 'use the excerpt field for rss feed.', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(25,'rss_use_excerpt', 2, '1', 'use the excerpt field for rss feed.', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(26,'use_weblogsping', 2, '0', 'set this to true if you want your site to be listed on http://weblogs.com when you add a new post', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(26,'use_weblogsping', 2, '0', 'set this to true if you want your site to be listed on http://weblogs.com when you add a new post', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(27,'use_blodotgsping', 2, '0', 'set this to true if you want your site to be listed on http://blo.gs when you add a new post', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(27,'use_blodotgsping', 2, '0', 'set this to true if you want your site to be listed on http://blo.gs when you add a new post', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(28,'blodotgsping_url', 3, 'http://example.com', 'You shouldn\'t need to change this.', 8, 30)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(29,'use_trackback', 2, '1', 'set this to 0 or 1, whether you want to allow your posts to be trackback\'able or not note: setting it to zero would also disable sending trackbacks', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(29,'use_trackback', 2, '1', 'set this to 0 or 1, whether you want to allow your posts to be trackback\'able or not note: setting it to zero would also disable sending trackbacks', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(30,'use_pingback', 2, '1', 'set this to 0 or 1, whether you want to allow your posts to be pingback\'able or not note: setting it to zero would also disable sending pingbacks', 8, 20)", "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(30,'use_pingback', 2, '1', 'set this to 0 or 1, whether you want to allow your posts to be pingback\'able or not note: setting it to zero would also disable sending pingbacks', 8, 20)",
//file upload //file upload
@ -700,8 +699,6 @@ $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);
$query= "UPDATE $tableoptions set option_value='$url' where option_id=28"; //blodotgsping_url
$q = $wpdb->query($query);
$query= "UPDATE $tableoptions set option_value='$url/wp-images/smilies' where option_id=17"; //smilies_directory $query= "UPDATE $tableoptions set option_value='$url/wp-images/smilies' where option_id=17"; //smilies_directory
$q = $wpdb->query($query); $q = $wpdb->query($query);
} }

View File

@ -99,7 +99,7 @@ switch ($step) {
} }
else // try to get the upload file. else // try to get the upload file.
{ {
$uploaddir = $fileupload_realpath; $uploaddir = get_settings('fileupload_realpath');
$uploadfile = $uploaddir.'/'.$_FILES['userfile']['name']; $uploadfile = $uploaddir.'/'.$_FILES['userfile']['name'];
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile))

View File

@ -13,8 +13,8 @@ foreach ($menu as $item) {
$self = str_replace('/wp-admin/', '', $PHP_SELF); $self = str_replace('/wp-admin/', '', $PHP_SELF);
if ((substr($self, -20) == substr($item[1], -20) && empty($parent_file)) || ($parent_file && ($item[1] == $parent_file))) $class = ' class="current"'; if ((substr($self, -20) == substr($item[1], -20) && empty($parent_file)) || ($parent_file && ($item[1] == $parent_file))) $class = ' class="current"';
if ($user_level >= $item[0]) { if ($user_level >= $item[0]) {
if (('upload.php' == $item[1] && $use_fileupload && ($user_level >= $fileupload_minlevel) if (('upload.php' == $item[1] && get_settings('use_fileupload') && ($user_level >= get_settings('fileupload_minlevel'))
&& (in_array($user_login, explode(' ', $allowed_users)) || (trim($fileupload_allowedusers)==""))) || 'upload.php' != $item[1]) && (in_array($user_login, explode(' ', $allowed_users)) || (trim(get_settings('fileupload_allowedusers'))==''))) || 'upload.php' != $item[1])
echo "\n\t<li><a href='{$item[1]}'$class>{$item[2]}</a></li>"; echo "\n\t<li><a href='{$item[1]}'$class>{$item[2]}</a></li>";
} }
} }

View File

@ -707,17 +707,17 @@ switch($action) {
<p> <p>
<?php <?php
$bookmarklet_height= ($use_trackback) ? 460 : 420; $bookmarklet_height= (get_settings('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 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 <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 get_settings('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 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 <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 get_settings('blogname'); ?></a>
<script type="text/javascript" language="JavaScript"> <script type="text/javascript" language="JavaScript">
<!-- <!--
function oneclickbookmarklet(blah) { function oneclickbookmarklet(blah) {
@ -733,12 +733,12 @@ function oneclickbookmarklet(blah) {
} else if ($is_opera) { } else if ($is_opera) {
?> ?>
<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 <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 get_settings('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 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 <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 get_settings('blogname'); ?></a>
<?php <?php
} }
?> ?>

View File

@ -178,9 +178,9 @@ break;
case 'IErightclick': case 'IErightclick':
$bookmarklet_tbpb = ($use_trackback) ? '&trackback=1' : ''; $bookmarklet_tbpb = (get_settings('use_trackback')) ? '&trackback=1' : '';
$bookmarklet_tbpb .= ($use_pingback) ? '&pingback=1' : ''; $bookmarklet_tbpb .= (get_settings('use_pingback')) ? '&pingback=1' : '';
$bookmarklet_height= ($use_trackback) ? 590 : 550; $bookmarklet_height= (get_settings('use_trackback')) ? 590 : 550;
?> ?>
@ -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('". 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\""; $regedit = "REGEDIT4\r\n[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Post To &WP : ". get_settings('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 />
@ -216,9 +216,9 @@ default:
include_once('admin-header.php'); include_once('admin-header.php');
$profiledata=get_userdata($user_ID); $profiledata=get_userdata($user_ID);
$bookmarklet_tbpb = ($use_trackback) ? '&trackback=1' : ''; $bookmarklet_tbpb = (get_settings('use_trackback')) ? '&trackback=1' : '';
$bookmarklet_tbpb .= ($use_pingback) ? '&pingback=1' : ''; $bookmarklet_tbpb .= (get_settings('use_pingback')) ? '&pingback=1' : '';
$bookmarklet_height= ($use_trackback) ? 480 : 440; $bookmarklet_height= (get_settings('use_trackback')) ? 480 : 440;
?> ?>
<?php if ($updated) { ?> <?php if ($updated) { ?>
@ -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 get_settings('siteurl'); ?>/wp-admin/sidebar.php",""); window.sidebar.addPanel("WordPress Post: <?php echo get_settings('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!');
} }

View File

@ -196,7 +196,6 @@ $guessurl = preg_replace('|/wp-admin/.*|i', '', 'http://' . $HTTP_HOST . $REQUES
"25" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (25,'rss_use_excerpt', 2, '1', 'use the excerpt field for rss feed.', 8, 20)", "25" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (25,'rss_use_excerpt', 2, '1', 'use the excerpt field for rss feed.', 8, 20)",
"26" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (26,'use_weblogsping', 2, '0', 'set this to true if you want your site to be listed on http://weblogs.com when you add a new post', 8, 20)", "26" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (26,'use_weblogsping', 2, '0', 'set this to true if you want your site to be listed on http://weblogs.com when you add a new post', 8, 20)",
"27" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (27,'use_blodotgsping', 2, '0', 'set this to true if you want your site to be listed on http://blo.gs when you add a new post', 8, 20)", "27" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (27,'use_blodotgsping', 2, '0', 'set this to true if you want your site to be listed on http://blo.gs when you add a new post', 8, 20)",
"28" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (28,'blodotgsping_url', 3, 'http://example.com', 'You shouldn\'t need to change this.', 8, 30)",
"29" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (29,'use_trackback', 2, '1', 'set this to false or true, whether you want to allow your posts to be trackback\'able or not note: setting it to false would also disable sending trackbacks', 8, 20)", "29" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (29,'use_trackback', 2, '1', 'set this to false or true, whether you want to allow your posts to be trackback\'able or not note: setting it to false would also disable sending trackbacks', 8, 20)",
"30" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (30,'use_pingback', 2, '1', 'set this to false or true, whether you want to allow your posts to be pingback\'able or not note: setting it to false would also disable sending pingbacks', 8, 20)", "30" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (30,'use_pingback', 2, '1', 'set this to false or true, whether you want to allow your posts to be pingback\'able or not note: setting it to false would also disable sending pingbacks', 8, 20)",
//file upload //file upload

View File

@ -6,10 +6,10 @@ require_once('admin-header.php');
if ($user_level == 0) //Checks to see if user has logged in if ($user_level == 0) //Checks to see if user has logged in
die ("Cheatin' uh ?"); die ("Cheatin' uh ?");
if (!$use_fileupload) //Checks if file upload is enabled in the config if (!get_settings('use_fileupload')) //Checks if file upload is enabled in the config
die ("The admin disabled this function"); die ("The admin disabled this function");
$allowed_types = explode(' ', trim($fileupload_allowedtypes)); $allowed_types = explode(' ', trim(get_settings('fileupload_allowedtypes')));
if ($HTTP_POST_VARS['submit']) { if ($HTTP_POST_VARS['submit']) {
$action = 'upload'; $action = 'upload';
@ -17,7 +17,7 @@ if ($HTTP_POST_VARS['submit']) {
$action = ''; $action = '';
} }
if (!is_writable($fileupload_realpath)) if (!is_writable(get_settings('fileupload_realpath')))
$action = 'not-writable'; $action = 'not-writable';
?> ?>
@ -27,7 +27,7 @@ if (!is_writable($fileupload_realpath))
switch ($action) { switch ($action) {
case 'not-writable': case 'not-writable':
?> ?>
<p>It doesn't look like you can use the file upload feature at this time because the directory you have specified (<code><?php echo $fileupload_realpath; ?></code>) doesn't appear to be writable by WordPress. Check the permissions on the directory and for typos.</p> <p>It doesn't look like you can use the file upload feature at this time because the directory you have specified (<code><?php echo $get_settings('fileupload_realpath'); ?></code>) doesn't appear to be writable by WordPress. Check the permissions on the directory and for typos.</p>
<?php <?php
break; break;
@ -42,7 +42,7 @@ case '':
<p> <p>
<label for="img1">File:</label> <label for="img1">File:</label>
<br /> <br />
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $fileupload_maxk * 1024 ?>" /> <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo get_settings('fileupload_maxk') * 1024 ?>" />
<input type="file" name="img1" id="img1" size="35" class="uploadform" /></p> <input type="file" name="img1" id="img1" size="35" class="uploadform" /></p>
<p> <p>
<label for="imgdesc">Description:</label><br /> <label for="imgdesc">Description:</label><br />
@ -96,10 +96,10 @@ case 'upload':
} }
if (strlen($imgalt)) { if (strlen($imgalt)) {
$pathtofile = $fileupload_realpath."/".$imgalt; $pathtofile = get_settings('fileupload_realpath')."/".$imgalt;
$img1 = $HTTP_POST_VARS['img1']; $img1 = $HTTP_POST_VARS['img1'];
} else { } else {
$pathtofile = $fileupload_realpath."/".$img1_name; $pathtofile = get_settings('fileupload_realpath')."/".$img1_name;
$img1 = $HTTP_POST_FILES['img1']['tmp_name']; $img1 = $HTTP_POST_FILES['img1']['tmp_name'];
} }
@ -118,8 +118,8 @@ case 'upload':
} }
if (file_exists($pathtofile) && !strlen($imgalt)) { if (file_exists($pathtofile) && !strlen($imgalt)) {
$i = explode(" ",$fileupload_allowedtypes); $i = explode(' ', get_settings('fileupload_allowedtypes'));
$i = implode(", ",array_slice($i, 1, count($i)-2)); $i = implode(', ',array_slice($i, 1, count($i)-2));
$moved = move_uploaded_file($img1, $pathtofile2); $moved = move_uploaded_file($img1, $pathtofile2);
// if move_uploaded_file() fails, try copy() // if move_uploaded_file() fails, try copy()
if (!$moved) { if (!$moved) {
@ -138,7 +138,7 @@ case 'upload':
<p> filename '<?php echo $img1; ?>' moved to '<?php echo "$pathtofile2 - $img2_name"; ?>'</p> <p> filename '<?php echo $img1; ?>' moved to '<?php echo "$pathtofile2 - $img2_name"; ?>'</p>
<p>Confirm or rename:</p> <p>Confirm or rename:</p>
<form action="upload.php" method="post" enctype="multipart/form-data"> <form action="upload.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $fileupload_maxk*1024 ?>" /> <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo get_settings('fileupload_maxk') *1024 ?>" />
<input type="hidden" name="img1_type" value="<?php echo $img1_type;?>" /> <input type="hidden" name="img1_type" value="<?php echo $img1_type;?>" />
<input type="hidden" name="img1_name" value="<?php echo $img2_name;?>" /> <input type="hidden" name="img1_name" value="<?php echo $img2_name;?>" />
<input type="hidden" name="img1_size" value="<?php echo $img1_size;?>" /> <input type="hidden" name="img1_size" value="<?php echo $img1_size;?>" />
@ -197,9 +197,9 @@ die();
if ( ereg('image/',$img1_type)) { if ( ereg('image/',$img1_type)) {
$piece_of_code = "&lt;img src=&quot;$fileupload_url/$img1_name&quot; alt=&quot;$imgdesc&quot; /&gt;"; $piece_of_code = "&lt;img src=&quot;". get_settings('fileupload_url') ."/$img1_name&quot; alt=&quot;$imgdesc&quot; /&gt;";
} else { } else {
$piece_of_code = "&lt;a href=&quot;$fileupload_url/$img1_name&quot; title=&quot;$imgdesc&quot; /&gt;$imgdesc&lt;/a&gt;"; $piece_of_code = "&lt;a href=&quot;". get_settings('fileupload_url') . "/$img1_name&quot; title=&quot;$imgdesc&quot; /&gt;$imgdesc&lt;/a&gt;";
}; };
?> ?>

View File

@ -86,10 +86,10 @@ case 'adduser':
$stars .= '*'; $stars .= '*';
} }
$message = "New user registration on your blog $blogname:\r\n\r\n"; $message = 'New user registration on your blog ' . get_settings('blogname') . ":\r\n\r\n";
$message .= "Login: $user_login\r\n\r\nE-mail: $user_email"; $message .= "Login: $user_login\r\n\r\nE-mail: $user_email";
@mail($admin_email, "[$blogname] New User Registration", $message); @mail($admin_email, '[' . get_settings('blogname') . '] New User Registration', $message);
header('Location: users.php'); header('Location: users.php');
break; break;

View File

@ -7,15 +7,12 @@ if (! $feed) {
header('Content-type: application/atom+xml', true); header('Content-type: application/atom+xml', true);
if (!isset($rss_language)) { $rss_language = 'en'; }
if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
?> ?>
<?php echo '<?xml version="1.0"?'.'>'; ?> <?php echo '<?xml version="1.0"?'.'>'; ?>
<feed version="0.3" <feed version="0.3"
xmlns="http://purl.org/atom/ns#" xmlns="http://purl.org/atom/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xml:lang="<?php echo $rss_language ?>"> xml:lang="<?php echo get_settings('rss_language'); ?>">
<title><?php bloginfo_rss('name') ?></title> <title><?php bloginfo_rss('name') ?></title>
<link rel="alternate" type="text/html" href="<?php bloginfo_rss('url') ?>" /> <link rel="alternate" type="text/html" href="<?php bloginfo_rss('url') ?>" />
<tagline><?php bloginfo_rss("description") ?></tagline> <tagline><?php bloginfo_rss("description") ?></tagline>
@ -34,17 +31,17 @@ if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_leng
<modified><?php the_time('Y-m-d\TH:i:s\Z'); ?></modified> <modified><?php the_time('Y-m-d\TH:i:s\Z'); ?></modified>
<issued><?php the_time('Y-m-d\TH:i:s\Z'); ?></issued> <issued><?php the_time('Y-m-d\TH:i:s\Z'); ?></issued>
<?php the_category_rss('rdf') ?> <?php the_category_rss('rdf') ?>
<?php $more = 1; if ($rss_use_excerpt) { <?php $more = 1; if (get_settings('rss_use_excerpt')) {
?> ?>
<summary type="text/html" mode="escaped"><?php the_excerpt_rss($rss_excerpt_length, 2) ?></summary> <summary type="text/html" mode="escaped"><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></summary>
<?php <?php
} else { // use content } else { // use content
?> ?>
<summary type="text/html"><?php the_content_rss('', 0, '', $rss_excerpt_length, 2) ?></summary> <summary type="text/html"><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), 2) ?></summary>
<?php <?php
} // end else use content } // end else use content
?> ?>
<content type="text/html" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content> <content type="text/html" mode="escaped" xml:base="<?php permalink_single_rss() ?>"><![CDATA[<?php the_content('', 0, '') ?>]]></content>
</entry> </entry>
<?php $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?> <?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
</feed> </feed>

View File

@ -8,9 +8,9 @@ foreach ($posts as $post) { start_wp();
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title><?php echo $blogname ?> - Comments on "<?php the_title() ?>"</title> <title><?php echo get_settings('blogname'); ?> - Comments on "<?php the_title() ?>"</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 get_settings('blog_charset'); ?>" />
<style type="text/css" media="screen"> <style type="text/css" media="screen">
@import url( wp-layout.css ); @import url( wp-layout.css );
body { margin: 3px; } body { margin: 3px; }
@ -19,7 +19,7 @@ foreach ($posts as $post) { start_wp();
</head> </head>
<body id="commentspopup"> <body id="commentspopup">
<h1 id="header"><a href="" title="<?php echo $blogname ?>"><?php echo $blogname ?></a></h1> <h1 id="header"><a href="" title="<?php echo get_settings('blogname'); ?>"><?php echo get_settings('blogname'); ?></a></h1>
<h2 id="comments">Comments</h2> <h2 id="comments">Comments</h2>

View File

@ -39,7 +39,7 @@ $commentstatus = $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID
if ('closed' == $commentstatus) if ('closed' == $commentstatus)
die('Sorry, comments are closed for this item.'); die('Sorry, comments are closed for this item.');
if ($require_name_email && ($email == '' || $author == '')) { //original fix by Dodo, and then Drinyth if (get_settings('require_name_email') && ($email == '' || $author == '')) { //original fix by Dodo, and then Drinyth
die('Error: please fill the required fields (name, email).'); die('Error: please fill the required fields (name, email).');
} }
if ($comment == 'comment' || $comment == '') { if ($comment == 'comment' || $comment == '') {
@ -101,7 +101,7 @@ if ($ok) { // if there was no comment from this IP in the last 10 seconds
wp_notify_moderator($comment_ID); wp_notify_moderator($comment_ID);
} }
if (($comments_notify) && ($approved)) { if ((get_settings('comments_notify')) && ($approved)) {
wp_notify_postauthor($comment_ID, 'comment'); wp_notify_postauthor($comment_ID, 'comment');
} }

View File

@ -5,7 +5,6 @@ if (! $feed) {
header('Content-type: text/xml'); header('Content-type: text/xml');
if (!isset($rss_language)) { $rss_language = 'en'; }
echo '<?xml version="1.0"?'.'>'; echo '<?xml version="1.0"?'.'>';
?> ?>
<!-- generator="wordpress/<?php echo $wp_version ?>" --> <!-- generator="wordpress/<?php echo $wp_version ?>" -->
@ -21,7 +20,7 @@ foreach ($posts as $post) { start_wp();
<title><?php if (isset($_REQUEST["p"]) || isset($_REQUEST["name"])) { echo "Comments on: "; the_title_rss(); } else { bloginfo_rss("name"); echo " Comments"; } ?></title> <title><?php if (isset($_REQUEST["p"]) || isset($_REQUEST["name"])) { echo "Comments on: "; the_title_rss(); } else { bloginfo_rss("name"); echo " Comments"; } ?></title>
<link><?php (isset($_REQUEST["p"]) || isset($_REQUEST["name"])) ? permalink_single_rss() : bloginfo_rss("url") ?></link> <link><?php (isset($_REQUEST["p"]) || isset($_REQUEST["name"])) ? permalink_single_rss() : bloginfo_rss("url") ?></link>
<description><?php bloginfo_rss("description") ?></description> <description><?php bloginfo_rss("description") ?></description>
<language><?php echo $rss_language ?></language> <language><?php echo get_settings('rss_language'); ?></language>
<pubDate><?php echo gmdate('r'); ?></pubDate> <pubDate><?php echo gmdate('r'); ?></pubDate>
<generator>http://wordpress.org/?v=<?php echo $wp_version ?></generator> <generator>http://wordpress.org/?v=<?php echo $wp_version ?></generator>
@ -33,14 +32,14 @@ foreach ($posts as $post) { start_wp();
LEFT JOIN $tableposts ON comment_post_id = id WHERE comment_post_ID = '$id' LEFT JOIN $tableposts ON comment_post_id = id WHERE comment_post_ID = '$id'
AND $tablecomments.comment_approved = '1' AND $tableposts.post_status = 'publish' AND $tablecomments.comment_approved = '1' AND $tableposts.post_status = 'publish'
AND post_date < '".date("Y-m-d H:i:s")."' AND post_date < '".date("Y-m-d H:i:s")."'
ORDER BY comment_date LIMIT $posts_per_rss"); ORDER BY comment_date LIMIT " . get_settings('posts_per_rss') );
} else { // if no post id passed in, we'll just ue the last 10 comments. } else { // if no post id passed in, we'll just ue the last 10 comments.
$comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email, $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_author_email,
comment_author_url, comment_date, comment_content, comment_post_ID, comment_author_url, comment_date, comment_content, comment_post_ID,
$tableposts.ID, $tableposts.post_password FROM $tablecomments $tableposts.ID, $tableposts.post_password FROM $tablecomments
LEFT JOIN $tableposts ON comment_post_id = id WHERE $tableposts.post_status = 'publish' LEFT JOIN $tableposts ON comment_post_id = id WHERE $tableposts.post_status = 'publish'
AND $tablecomments.comment_approved = '1' AND post_date < '".date("Y-m-d H:i:s")."' AND $tablecomments.comment_approved = '1' AND post_date < '".date("Y-m-d H:i:s")."'
ORDER BY comment_date DESC LIMIT $posts_per_rss"); ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') );
} }
// this line is WordPress' motor, do not delete it. // this line is WordPress' motor, do not delete it.
if ($comments) { if ($comments) {

View File

@ -81,13 +81,13 @@ function sanitize_title($title) {
} }
function convert_chars($content, $flag='obsolete attribute left there for backwards compatibility') { // html/unicode entities output function convert_chars($content, $flag='obsolete attribute left there for backwards compatibility') { // html/unicode entities output
global $use_htmltrans, $wp_htmltrans, $wp_htmltranswinuni; global $wp_htmltrans, $wp_htmltranswinuni;
// removes metadata tags // removes metadata tags
$content = preg_replace('/<title>(.+?)<\/title>/','',$content); $content = preg_replace('/<title>(.+?)<\/title>/','',$content);
$content = preg_replace('/<category>(.+?)<\/category>/','',$content); $content = preg_replace('/<category>(.+?)<\/category>/','',$content);
if ($use_htmltrans) { if (get_settings('use_htmltrans')) {
// converts lone & characters into &#38; (a.k.a. &amp;) // converts lone & characters into &#38; (a.k.a. &amp;)
$content = preg_replace('/&[^#](?![a-z]*;)/ie', '"&#38;".substr("\0",1)', $content); $content = preg_replace('/&[^#](?![a-z]*;)/ie', '"&#38;".substr("\0",1)', $content);
// converts HTML-entities to their display values in order to convert them again later // converts HTML-entities to their display values in order to convert them again later
@ -124,9 +124,8 @@ function convert_chars($content, $flag='obsolete attribute left there for backwa
1.0 First Version 1.0 First Version
*/ */
function balanceTags($text, $is_comment = 0) { function balanceTags($text, $is_comment = 0) {
global $use_balanceTags;
if ($use_balanceTags == 0) { if (get_settings('use_balanceTags') == 0) {
return $text; return $text;
} }

View File

@ -85,7 +85,7 @@ function get_weekstartend($mysqlstring, $start_of_week) {
$day = mktime(0,0,0, $md, $mm, $my); $day = mktime(0,0,0, $md, $mm, $my);
$weekday = date('w',$day); $weekday = date('w',$day);
$i = 86400; $i = 86400;
while ($weekday > $start_of_week) { while ($weekday > get_settings('start_of_week')) {
$weekday = date('w',$day); $weekday = date('w',$day);
$day = $day - 86400; $day = $day - 86400;
$i = 0; $i = 0;
@ -565,10 +565,9 @@ 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; if ((!((get_settings('blogname')=="my weblog") && (get_settings('siteurl')=="http://example.com") && (get_settings('blogfilename') == "wp.php"))) && (!preg_match("/localhost\//", get_settings('siteurl'))) && (get_settings('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), $message = new xmlrpcmsg("weblogUpdates.ping", array(new xmlrpcval(get_settings('blogname')),
new xmlrpcval(get_settings('siteurl') . '/' . get_settings('blogfilename') new xmlrpcval(get_settings('siteurl') . '/' . get_settings('blogfilename')
))); )));
$result = $client->send($message); $result = $client->send($message);
@ -583,10 +582,10 @@ function pingWeblogs($blog_ID = 1) {
// pings Weblogs.com/rssUpdates // pings Weblogs.com/rssUpdates
function pingWeblogsRss($blog_ID = 1, $rss_url) { function pingWeblogsRss($blog_ID = 1, $rss_url) {
global $use_weblogsrssping, $blogname, $rss_url; global $use_weblogsrssping, $rss_url;
if ($blogname != 'my weblog' && $rss_url != 'http://example.com/b2rdf.php' && $use_weblogsrssping) { if (get_settings('blogname') != 'my weblog' && $rss_url != 'http://example.com/b2rdf.php' && $use_weblogsrssping) {
$client = new xmlrpc_client('/RPC2', 'rssrpc.weblogs.com', 80); $client = new xmlrpc_client('/RPC2', 'rssrpc.weblogs.com', 80);
$message = new xmlrpcmsg('rssUpdate', array(new xmlrpcval($blogname), new xmlrpcval($rss_url))); $message = new xmlrpcmsg('rssUpdate', array(new xmlrpcval(get_settings('blogname')), new xmlrpcval($rss_url)));
$result = $client->send($message); $result = $client->send($message);
if (!$result || $result->faultCode()) { if (!$result || $result->faultCode()) {
return false; return false;
@ -599,8 +598,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; global $use_cafelogping;
if ((!(($blogname=="my weblog") && (get_settings('siteurl') == "http://example.com") && (get_settings('blogfilename')=="wp.php"))) && (!preg_match("/localhost\//", get_settings('siteurl'))) && ($use_cafelogping) && ($cafelogID != '')) { if ((!((get_settings('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);
@ -615,14 +614,14 @@ 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; global $use_rss;
if ((!(($blogname=='my weblog') && (get_settings('siteurl')=='http://example.com') && (get_settings('blogfilename')=='wp.php'))) && (!preg_match('/localhost\//',get_settings('siteurl'))) && ($use_blodotgsping)) { if ((!((get_settings('blogname')=='my weblog') && (get_settings('siteurl')=='http://example.com') && (get_settings('blogfilename')=='wp.php'))) && (!preg_match('/localhost\//',get_settings('siteurl'))) && (get_settings('use_blodotgsping'))) {
$url = ($blodotgsping_url == 'http://example.com') ? get_settings('siteurl').'/'.get_settings('blogfilename') : $blodotgsping_url; $url = get_settings('siteurl').'/'.get_settings('blogfilename');
$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(get_settings('siteurl').'/b2rss.xml'))); $message = new xmlrpcmsg('weblogUpdates.extendedPing', array(new xmlrpcval(get_settings('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(get_settings('blogname')), new xmlrpcval($url)));
} }
$result = $client->send($message); $result = $client->send($message);
if (!$result || $result->faultCode()) { if (!$result || $result->faultCode()) {
@ -637,10 +636,10 @@ function pingBlogs($blog_ID="1") {
// Send a Trackback // Send a Trackback
function trackback($trackback_url, $title, $excerpt, $ID) { function trackback($trackback_url, $title, $excerpt, $ID) {
global $blogname, $wpdb, $tableposts; global $wpdb, $tableposts;
$title = urlencode(stripslashes($title)); $title = urlencode(stripslashes($title));
$excerpt = urlencode(stripslashes($excerpt)); $excerpt = urlencode(stripslashes($excerpt));
$blog_name = urlencode(stripslashes($blogname)); $blog_name = urlencode(stripslashes(get_settings('blogname')));
$tb_url = $trackback_url; $tb_url = $trackback_url;
$url = urlencode(get_permalink($ID)); $url = urlencode(get_permalink($ID));
$query_string = "title=$title&url=$url&blog_name=$blog_name&excerpt=$excerpt"; $query_string = "title=$title&url=$url&blog_name=$blog_name&excerpt=$excerpt";
@ -971,9 +970,8 @@ function getRemoteFile($host,$path) {
} }
function pingGeoURL($blog_ID) { function pingGeoURL($blog_ID) {
global $blodotgsping_url;
$ourUrl = $blodotgsping_url."/index.php?p=".$blog_ID; $ourUrl = get_settings('siteurl') ."/index.php?p=".$blog_ID;
$host="geourl.org"; $host="geourl.org";
$path="/ping/?p=".$ourUrl; $path="/ping/?p=".$ourUrl;
getRemoteFile($host,$path); getRemoteFile($host,$path);
@ -1044,7 +1042,6 @@ 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 $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");
@ -1054,7 +1051,7 @@ function wp_notify_postauthor($comment_id, $comment_type='comment') {
$comment_author_domain = gethostbyaddr($comment->comment_author_IP); $comment_author_domain = gethostbyaddr($comment->comment_author_IP);
$blogname = stripslashes($blogname); $blogname = stripslashes(get_settings('blogname'));
if ('comment' == $comment_type) { if ('comment' == $comment_type) {
$notify_message = "New comment on your post #$comment->comment_post_ID \"".stripslashes($post->post_title)."\"\r\n\r\n"; $notify_message = "New comment on your post #$comment->comment_post_ID \"".stripslashes($post->post_title)."\"\r\n\r\n";
@ -1090,7 +1087,7 @@ function wp_notify_postauthor($comment_id, $comment_type='comment') {
$message_headers = "MIME-Version: 1.0\r\n" $message_headers = "MIME-Version: 1.0\r\n"
. "$from\r\n" . "$from\r\n"
. "Content-Type: text/plain; charset=\"$blog_charset\"\r\n"; . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
@mail($user->user_email, $subject, $notify_message, $message_headers); @mail($user->user_email, $subject, $notify_message, $message_headers);
@ -1105,7 +1102,6 @@ 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 $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");
@ -1125,13 +1121,13 @@ function wp_notify_moderator($comment_id) {
$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 .= get_settings('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(get_settings('blogname')) . '] Please approve: "' .stripslashes($post->post_title).'"';
$admin_email = get_settings("admin_email"); $admin_email = get_settings("admin_email");
$from = "From: $admin_email"; $from = "From: $admin_email";
$message_headers = "MIME-Version: 1.0\r\n" $message_headers = "MIME-Version: 1.0\r\n"
. "$from\r\n" . "$from\r\n"
. "Content-Type: text/plain; charset=\"$blog_charset\"\r\n"; . "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\r\n";
@mail($admin_email, $subject, $notify_message, $message_headers); @mail($admin_email, $subject, $notify_message, $message_headers);

View File

@ -22,7 +22,7 @@ function bloginfo_unicode($show='') {
} }
function get_bloginfo($show='') { function get_bloginfo($show='') {
global $blogname, $admin_email; global $admin_email;
$do_perma = 0; $do_perma = 0;
$feed_url = get_settings('siteurl'); $feed_url = get_settings('siteurl');
@ -79,7 +79,7 @@ function get_bloginfo($show='') {
break; break;
case 'name': case 'name':
default: default:
$output = $blogname; $output = get_settings('blogname');
break; break;
} }
return $output; return $output;
@ -205,7 +205,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; 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;
if ('' == $type) { if ('' == $type) {
$type = get_settings('archive_mode'); $type = get_settings('archive_mode');
@ -270,9 +270,7 @@ function get_archives($type='', $limit='', $format='html', $before = "", $after
} }
} }
} elseif ('weekly' == $type) { } elseif ('weekly' == $type) {
if (!isset($start_of_week)) { $start_of_week = get_settings('start_of_week');
$start_of_week = 1;
}
$arcresults = $wpdb->get_results("SELECT DISTINCT WEEK($wp_posts_post_date_field, $start_of_week) AS `week`, YEAR($wp_posts_post_date_field) AS yr, DATE_FORMAT($wp_posts_post_date_field, '%Y-%m-%d') AS yyyymmdd FROM $tableposts WHERE post_date < '$now' AND post_status = 'publish' ORDER BY post_date DESC" . $limit); $arcresults = $wpdb->get_results("SELECT DISTINCT WEEK($wp_posts_post_date_field, $start_of_week) AS `week`, YEAR($wp_posts_post_date_field) AS yr, DATE_FORMAT($wp_posts_post_date_field, '%Y-%m-%d') AS yyyymmdd FROM $tableposts WHERE post_date < '$now' AND post_status = 'publish' ORDER BY post_date DESC" . $limit);
$arc_w_last = ''; $arc_w_last = '';
if ($arcresults) { if ($arcresults) {
@ -280,7 +278,7 @@ function get_archives($type='', $limit='', $format='html', $before = "", $after
if ($arcresult->week != $arc_w_last) { if ($arcresult->week != $arc_w_last) {
$arc_year = $arcresult->yr; $arc_year = $arcresult->yr;
$arc_w_last = $arcresult->week; $arc_w_last = $arcresult->week;
$arc_week = get_weekstartend($arcresult->yyyymmdd, $start_of_week); $arc_week = get_weekstartend($arcresult->yyyymmdd, get_settings('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', get_settings('siteurl'), get_settings('blogfilename'), $querystring_start, $url = sprintf('%s/%s%sm%s%s%sw%s%d', get_settings('siteurl'), get_settings('blogfilename'), $querystring_start,

View File

@ -15,14 +15,14 @@ for ($i = $start; $i >= 0; $i--) {
<latitude><?php print_Lat() ?></latitude> <latitude><?php print_Lat() ?></latitude>
<longitude><?php print_Lon() ?></longitude> <longitude><?php print_Lon() ?></longitude>
<?php <?php
if ($rss_use_excerpt) { if (get_settings('rss_use_excerpt')) {
?> ?>
<note><?php the_content_rss('', 0, '', $rss_excerpt_length, $rss_encoded_html) ?> <note><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), get_settings('rss_encoded_html')) ?>
</note> </note>
<?php <?php
} else { // use content } else { // use content
?> ?>
<note><?php the_excerpt_rss('', 0, '', $rss_excerpt_length, $rss_encoded_html) ?></note> <note><?php the_excerpt_rss('', 0, '', get_settings('rss_excerpt_length'), get_settings('rss_encoded_html')) ?></note>
<?php <?php
} // end else use content } // end else use content
?> ?>

View File

@ -162,7 +162,7 @@ case 'lostpassword':
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>WordPress &rsaquo; Lost password ?</title> <title>WordPress &rsaquo; 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 get_settings('blog_charset'); ?>" />
<link rel="stylesheet" href="<?php echo get_settings('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() {
@ -213,7 +213,7 @@ case 'retrievepassword':
$message .= "Password: $user_pass\r\n"; $message .= "Password: $user_pass\r\n";
$message .= 'Login at: ' . get_settings('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, '[' . get_settings('blogname') . "] Your weblog's login/password", $message);
if ($m == false) { if ($m == false) {
echo "<p>The email could not be sent.<br />\n"; echo "<p>The email could not be sent.<br />\n";
@ -223,7 +223,7 @@ case 'retrievepassword':
echo "<p>The email was sent successfully to $user_login's email address.<br /> echo "<p>The email was sent successfully to $user_login's email address.<br />
<a href='wp-login.php' title='Check your email first, of course'>Click here to login!</a></p>"; <a href='wp-login.php' title='Check your email first, of course'>Click here to login!</a></p>";
// send a copy of password change notification to the admin // send a copy of password change notification to the admin
mail($admin_email, "[$blogname] Password Lost/Change", "Password Lost and Changed for user: $user_login"); mail($admin_email, '[' . get_settings('blogname') . "] Password Lost/Change", "Password Lost and Changed for user: $user_login");
die(); die();
} }
@ -266,7 +266,7 @@ default:
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<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 get_settings('blog_charset'); ?>" />
<link rel="stylesheet" href="<?php echo get_settings('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() {

View File

@ -22,7 +22,6 @@ header("Etag: " . $cetag, true);
*/ */
add_filter('the_content', 'trim'); add_filter('the_content', 'trim');
if (!isset($rss_language)) { $rss_language = 'en'; }
?> ?>
<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?".">"; ?> <?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?".">"; ?>
<!-- generator="wordpress/<?php echo $wp_version ?>" --> <!-- generator="wordpress/<?php echo $wp_version ?>" -->
@ -38,7 +37,7 @@ if (!isset($rss_language)) { $rss_language = 'en'; }
<title><?php bloginfo_rss('name') ?></title> <title><?php bloginfo_rss('name') ?></title>
<link><?php bloginfo_rss('url') ?></link> <link><?php bloginfo_rss('url') ?></link>
<description><?php bloginfo_rss('description') ?></description> <description><?php bloginfo_rss('description') ?></description>
<dc:language><?php echo $rss_language ?></dc:language> <dc:language><?php echo get_settings('rss_language'); ?></dc:language>
<dc:date><?php echo gmdate('Y-m-d\TH:i:s'); ?></dc:date> <dc:date><?php echo gmdate('Y-m-d\TH:i:s'); ?></dc:date>
<dc:creator><?php echo antispambot($admin_email) ?></dc:creator> <dc:creator><?php echo antispambot($admin_email) ?></dc:creator>
<admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $wp_version ?>"/> <admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $wp_version ?>"/>
@ -50,7 +49,7 @@ if (!isset($rss_language)) { $rss_language = 'en'; }
<rdf:Seq> <rdf:Seq>
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
<rdf:li rdf:resource="<?php permalink_single_rss() ?>"/> <rdf:li rdf:resource="<?php permalink_single_rss() ?>"/>
<?php $wp_items[] = $row; $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?> <?php $wp_items[] = $row; $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
</rdf:Seq> </rdf:Seq>
</items> </items>
</channel> </channel>
@ -61,13 +60,13 @@ if (!isset($rss_language)) { $rss_language = 'en'; }
<dc:date><?php the_time('Y-m-d\TH:i:s'); ?></dc:date> <dc:date><?php the_time('Y-m-d\TH:i:s'); ?></dc:date>
<dc:creator><?php the_author() ?> (mailto:<?php the_author_email() ?>)</dc:creator> <dc:creator><?php the_author() ?> (mailto:<?php the_author_email() ?>)</dc:creator>
<?php the_category_rss('rdf') ?> <?php the_category_rss('rdf') ?>
<?php $more = 1; if ($rss_use_excerpt) { <?php $more = 1; if (get_settings('rss_use_excerpt')) {
?> ?>
<description><?php the_excerpt_rss($rss_excerpt_length, 2) ?></description> <description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></description>
<?php <?php
} else { // use content } else { // use content
?> ?>
<description><?php the_content_rss('', 0, '', $rss_excerpt_length, 2) ?></description> <description><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), 2) ?></description>
<?php <?php
} // end else use content } // end else use content
?> ?>

View File

@ -104,17 +104,17 @@ case 'register':
$stars .= '*'; $stars .= '*';
} }
$message = "New user registration on your blog $blogname:\r\n\r\n"; $message = 'New user registration on your blog ' . get_settings('blogname') . ":\r\n\r\n";
$message .= "Login: $user_login\r\n\r\nE-mail: $user_email"; $message .= "Login: $user_login\r\n\r\nE-mail: $user_email";
@mail($admin_email, "[$blogname] New User Registration", $message); @mail($admin_email, '[' . get_settings('blogname') . '] New User Registration', $message);
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>WordPress &raquo; Registration Complete</title> <title>WordPress &raquo; Registration Complete</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 get_settings('blog_charset'); ?>" />
<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" /> <link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" />
</head> </head>
<body> <body>
@ -142,7 +142,7 @@ case 'disabled':
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>WordPress &raquo; Registration Currently Disabled</title> <title>WordPress &raquo; Registration Currently Disabled</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 get_settings('blog_charset'); ?>">
<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css"> <link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css">
</head> </head>
@ -168,7 +168,7 @@ default:
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>WordPress &raquo; Registration Form</title> <title>WordPress &raquo; Registration 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 get_settings('blog_charset'); ?>" />
<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" /> <link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" />
</head> </head>

View File

@ -22,9 +22,6 @@ header("Last-Modified: " . $clast, true);
header("Etag: " . $cetag, true); header("Etag: " . $cetag, true);
*/ */
if (!isset($rss_language)) { $rss_language = 'en'; }
if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
?> ?>
<?php echo "<?xml version=\"1.0\"?".">"; ?> <?php echo "<?xml version=\"1.0\"?".">"; ?>
<!-- generator="wordpress/<?php echo $wp_version ?>" --> <!-- generator="wordpress/<?php echo $wp_version ?>" -->
@ -37,7 +34,7 @@ if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_leng
<docs>http://backend.userland.com/rss092</docs> <docs>http://backend.userland.com/rss092</docs>
<managingEditor><?php echo antispambot($admin_email) ?></managingEditor> <managingEditor><?php echo antispambot($admin_email) ?></managingEditor>
<webMaster><?php echo antispambot($admin_email) ?></webMaster> <webMaster><?php echo antispambot($admin_email) ?></webMaster>
<language><?php echo $rss_language ?></language> <language><?php echo get_settings('rss_language'); ?></language>
<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
<item> <item>
@ -47,18 +44,18 @@ if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_leng
// so that it doesn't appear at all in the RSS // so that it doesn't appear at all in the RSS
// echo "<category>"; the_category_unicode(); echo "</category>"; // echo "<category>"; the_category_unicode(); echo "</category>";
$more = 1; $more = 1;
if ($rss_use_excerpt) { if (get_settings('rss_use_excerpt')) {
?> ?>
<description><?php the_excerpt_rss($rss_excerpt_length, $rss_encoded_html) ?></description> <description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), get_settings('rss_encoded_html')) ?></description>
<?php <?php
} else { // use content } else { // use content
?> ?>
<description><?php the_content_rss('', 0, '', $rss_excerpt_length, $rss_encoded_html) ?></description> <description><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), get_settings('rss_encoded_html')) ?></description>
<?php <?php
} // end else use content } // end else use content
?> ?>
<link><?php permalink_single_rss() ?></link> <link><?php permalink_single_rss() ?></link>
</item> </item>
<?php $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?> <?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
</channel> </channel>
</rss> </rss>

View File

@ -21,9 +21,6 @@ header("Last-Modified: " . $clast, true);
header("Etag: " . $cetag, true); header("Etag: " . $cetag, true);
*/ */
if (!isset($rss_language)) { $rss_language = 'en'; }
if (!isset($rss_encoded_html)) { $rss_encoded_html = 0; }
if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_length = 0; }
?> ?>
<?php echo '<?xml version="1.0"?'.'>'; ?> <?php echo '<?xml version="1.0"?'.'>'; ?>
<!-- generator="wordpress/<?php echo $wp_version ?>" --> <!-- generator="wordpress/<?php echo $wp_version ?>" -->
@ -48,18 +45,18 @@ if (!isset($rss_excerpt_length) || ($rss_encoded_html == 1)) { $rss_excerpt_leng
<author><?php the_author() ?> (mailto:<?php the_author_email() ?>)</author> <author><?php the_author() ?> (mailto:<?php the_author_email() ?>)</author>
<?php the_category_rss() ?> <?php the_category_rss() ?>
<guid isPermaLink="false"><?php echo $id; ?>@<?php bloginfo_rss("url") ?></guid> <guid isPermaLink="false"><?php echo $id; ?>@<?php bloginfo_rss("url") ?></guid>
<?php $more = 1; if ($rss_use_excerpt) { <?php $more = 1; if (get_settings('rss_use_excerpt')) {
?> ?>
<description><?php the_excerpt_rss($rss_excerpt_length, 2) ?></description> <description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></description>
<?php <?php
} else { // use content } else { // use content
?> ?>
<description><?php the_content_rss('', 0, '', $rss_excerpt_length, 2) ?></description> <description><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), 2) ?></description>
<?php <?php
} // end else use content } // end else use content
?> ?>
<content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded> <content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
</item> </item>
<?php $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?> <?php $items_count++; if (($items_count == get_settings('posts_per_rss')) && empty($m)) { break; } } } ?>
</channel> </channel>
</rss> </rss>

View File

@ -49,31 +49,7 @@ 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')) {
$blogname = get_settings('blogname');
$admin_email = get_settings('admin_email'); $admin_email = get_settings('admin_email');
$blog_charset = get_settings('blog_charset');
$start_of_week = get_settings('start_of_week');
$use_htmltrans = get_settings('use_htmltrans');
$use_balanceTags = get_settings('use_balanceTags');
$use_fileupload = get_settings('use_fileupload');
$fileupload_realpath = get_settings('fileupload_realpath');
$fileupload_url = get_settings('fileupload_url');
$fileupload_allowedtypes = get_settings('fileupload_allowedtypes');
$fileupload_maxk = get_settings('fileupload_maxk');
$fileupload_minlevel = get_settings('fileupload_minlevel');
$fileupload_allowedusers = get_settings('fileupload_allowedusers');
$posts_per_rss = get_settings('posts_per_rss');
$rss_language = get_settings('rss_language');
$rss_encoded_html = get_settings('rss_encoded_html');
$rss_excerpt_length = get_settings('rss_excerpt_length');
$rss_use_excerpt = get_settings('rss_use_excerpt');
$use_weblogsping = get_settings('use_weblogsping');
$use_blodotgsping = get_settings('use_blodotgsping');
$blodotgsping_url = get_settings('blodotgsping_url');
$use_trackback = get_settings('use_trackback');
$use_pingback = get_settings('use_pingback');
$require_name_email = get_settings('require_name_email');
$comments_notify = get_settings('comments_notify');
$use_smilies = get_settings('use_smilies'); $use_smilies = get_settings('use_smilies');
$smilies_directory = get_settings('smilies_directory'); $smilies_directory = get_settings('smilies_directory');
$mailserver_url = get_settings('mailserver_url'); $mailserver_url = get_settings('mailserver_url');

View File

@ -25,7 +25,7 @@ if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$tb_u
@header('Content-Type: text/xml'); @header('Content-Type: text/xml');
if (!$use_trackback) if (!get_settings('use_trackback'))
trackback_response(1, 'Sorry, this weblog does not allow you to trackback its posts.'); trackback_response(1, 'Sorry, this weblog does not allow you to trackback its posts.');
$pingstatus = $wpdb->get_var("SELECT ping_status FROM $tableposts WHERE ID = $tb_id"); $pingstatus = $wpdb->get_var("SELECT ping_status FROM $tableposts WHERE ID = $tb_id");
@ -84,7 +84,7 @@ if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$tb_u
die ("There is an error with the database, it can't store your comment...<br />Please contact the <a href='mailto:$admin_email'>webmaster</a>."); die ("There is an error with the database, it can't store your comment...<br />Please contact the <a href='mailto:$admin_email'>webmaster</a>.");
} else { } else {
$comment_ID = $wpdb->get_var('SELECT last_insert_id()'); $comment_ID = $wpdb->get_var('SELECT last_insert_id()');
if ($comments_notify) if (get_settings('comments_notify'))
wp_notify_postauthor($comment_ID, 'trackback'); wp_notify_postauthor($comment_ID, 'trackback');
trackback_response(0); trackback_response(0);
} }

2
wp.php
View File

@ -7,7 +7,7 @@ require_once("wp-blog-header.php");
<head> <head>
<title><?php bloginfo('name') ?><?php single_post_title(' :: ') ?><?php single_cat_title(' :: ') ?><?php single_month_title(' :: ') ?></title> <title><?php bloginfo('name') ?><?php single_post_title(' :: ') ?><?php single_cat_title(' :: ') ?><?php single_month_title(' :: ') ?></title>
<!-- Change charset if needed(?) But please do not remove this metatag --> <!-- Change charset if needed(?) But please do not remove this metatag -->
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $blog_charset; ?>" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_settings('blog_charset'); ?>" />
<meta name="generator" content="WordPress <?php $wp_version ?>" /> <!-- leave this for stats --> <meta name="generator" content="WordPress <?php $wp_version ?>" /> <!-- leave this for stats -->
<meta http-equiv="reply-to" content="you@somewhere.zzz" /> <meta http-equiv="reply-to" content="you@somewhere.zzz" />
<link rel="alternate" type="text/xml" title="RDF" href="<?php bloginfo('rdf_url'); ?>" /> <link rel="alternate" type="text/xml" title="RDF" href="<?php bloginfo('rdf_url'); ?>" />