WordPress Blog Add On for Carterlake/AJAX/PHP Templates Now Available

I must be a little thick. #-o How do I modify these files?

The files I had to edit to modify the header and footer section were: archive.php archives.php attachment.php comments.php index.php page.php search.php single.php
I am not currently using php on any of my sites. I do not currently have a header.php or footer.php. I have made a blank template that the blog can be inserted into. [http://www.cavecountryweather.com/wordpress/](http://www.cavecountryweather.com/wordpress/)Is this possible or am I going about it all the wrong way?

Also what do I need to do to get the ajax working?

Just let me know if this can be done or am I in over my head. :wink:

I think you are very, very close! Hang in there!

Looking at your coding… I think this the ajax stuff is maybe simply a path issue. Try this… In your index.php, change this:

<!-- ##### start of AJAX gizmo mods part 1 of 3 ##### -->
  <script type="text/javascript" src="http://www.cavecountryweather.com/ajaxWDwx.js"></script>
  <!-- AJAX updates by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
  <script type="text/javascript" src="http://www.cavecountryweather.com/ajaxgizmo.js"></script>
  <!-- AJAX gizmo by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
  <!-- ##### end of AJAX gizmo mods part 1 of 3 ##### -->

to this…

  <!-- ##### start of AJAX gizmo mods part 1 of 3 ##### -->
  <script type="text/javascript" src="../ajaxWDwx.js"></script>
  <!-- AJAX updates by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
  <script type="text/javascript" src="../ajaxgizmo.js"></script>
  <!-- AJAX gizmo by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
  <!-- ##### end of AJAX gizmo mods part 1 of 3 ##### -->

And then, change this:

<link rel="stylesheet" type="text/css" href="http://www.cavecountryweather.com/weather-screen.css" media="screen" title="screen" />
<link rel="stylesheet" type="text/css" href="http://www.cavecountryweather.com/weather-print.css" media="print" />
<link rel="stylesheet" type="text/css" href="http://www.cavecountryweather.com/tswnavbar.css" />

To this:

<link rel="stylesheet" type="text/css" href="../weather-screen.css" media="screen" title="screen" />
<link rel="stylesheet" type="text/css" href="../weather-print.css" media="print" />
<link rel="stylesheet" type="text/css" href="../tswnavbar.css" />

Basically changing from URL references to relative. Maybe that will do the trick. With as far as you have gotten, once we get the ajax issue resolved getting the blog to appear should be easy.

Tony

MCHALLIS,

If you enable comments, you should enable this plugin called Akismet

What did you change to get the “comments” alive again, I think I’ll try it on my site. I have the Akismet working already.

Thanks,

Jack

I had to edit the wordpress code on some of the template files and add in the comment relevant sections. I will make a zip file of the distro with the comment code in there and attach it here. Give me a little time to prepare it. Also I have some other fixes, like if you turn on the pretty permalinks the link to the blog index works properly… and I fixed all the html validation errors in the templates.
Edit: all included in the download now

Tony,
Thanks for the input and encouragement! Both the kids were gone tonight and just the wife and I were home :wink:, so I didn’t get a chance to get to it. I will try tomorrow at work if things are slow.

I made some changes to the wordpres theme (mainly it adds the comment feature back in)

Edit: now included in the official download:
(download and follow instructions at link below, also edit your top-level2.php with the code below)

http://www.thorntonweather.com/downloads/wordpress.php

If you use these wordpress files to overwrite your existing files, be sure to backup your files first! in case you have any issues.

Changes/Fixes: Edit: all included in the download now

  1. added in the wordpress code needed for the comment feature
  2. html validation fixes (moved section from sidebar.php to in top-level2.php)
  3. added “Blog Index” url to the top of most of the blog pages (this url is from a wordpress php tag for compatibility with pretty permalinks)
  4. fixed tag to be a wordpress php tag
  5. fixed a line break issue between calendar and categories in sidebar.php
  6. added
    to sidebar so it does not print
  7. added wordpress metatags (see fix below)

One more fix not currently in the instructions:
change the contents of your top-level2.php to this: (fixes 2, 4, and 7 above)


<?php
############################################################################
#	This document uses Tab 4 Settings
############################################################################
require_once("Settings.php");
require_once("common.php");
global	$TITLE;
############################################################################
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php include_once($SITE['WXtags']); ?>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!-- ##### start AJAX mods ##### -->
    <script type="text/javascript" src="http://yourwebsite.com/ajaxWDwx.js"></script>
    <!-- AJAX updates by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
<?php if (isset($showGizmo) and $showGizmo) { ?>
    <script type="text/javascript" src="http://yourwebsite.com/ajaxgizmo.js"></script>
<?php if (!$SITE['UV']) {  // turn gizmo uv display off ?>
    <script type="text/javascript"> showUV = false; </script>
<?php   }  // end of turn gizmo uv display off ?>
    <!-- AJAX gizmo by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
    <!-- ##### end of AJAX gizmo mods part 1 of 3 ##### -->
<?php } ?>

    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
    <link rel="stylesheet" type="text/css" href="http://yourwebsite.com/<?php echo $SITE['CSSscreen']; ?>" media="screen" title="screen" />
    <link rel="stylesheet" type="text/css" href="http://yourwebsite.com/<?php echo $SITE['CSSprint']; ?>" media="print" />
    <link rel="shortcut icon" href="http://yourwebsite.com/favicon.ico" type="image/x-icon" />
    <link rel="icon" href="http://yourwebsite.com/favicon.ico" type="image/x-icon" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head(); ?>
<style type="text/css">
<!--
.style1 {
    font-size: 12px;
    font-weight: bold;
}
.style2 {font-size: 12px}
-->
</style>
<?php

if (isset($SITE['flyoutmenu']) and $SITE['flyoutmenu'] or
	isset($_REQUEST['menu']) and strtolower($_REQUEST['menu']) == 'test' ) {
  $SITE['flyoutmenu'] = true;
  $PrintFlyoutMenu = false;
  $genDiv =false;
  global $FlyoutCSS, $FlyoutMenuText;
  include_once('flyout-menu.php');
  print $FlyoutCSS;
}

?>
<!-- WD-USA template from http://saratoga-weather.org/ -->
<!-- end of top -->


note: there is no meta description because if you install the “all in one seo pack” plugin, then they are generated automatically.
note: be sure to change “http://yourwebsite.com/” to what ever your real web site is

Something a little screwy with mine Mike. Can you see what is wrong? i lost the “center” look of the page.

http://stillweather.com/wordpress/

Jack

Your top-level2.php is messed up
(I see more than one thing wrong)
If you post it I can take a look, or just check it again

I thought it might be…

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!-- ##### start AJAX mods ##### -->
    <script type="text/javascript" src="http://stillweather.com/ajaxWDwx.js"></script>
    <!-- AJAX updates by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
<?php if (isset($showGizmo) and $showGizmo) { ?>
    <script type="text/javascript" src="http://stillweather.com/ajaxgizmo.js"></script>
<?php if (!$SITE['UV']) {  // turn gizmo uv display off ?>
    <script type="text/javascript"> showUV = false; </script>
<?php   }  // end of turn gizmo uv display off ?>
    <!-- AJAX gizmo by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
    <!-- ##### end of AJAX gizmo mods part 1 of 3 ##### -->
<?php } ?>

    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
    <meta name="description" content="Weather Blog." />
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=<?php echo $SITE['charset']; ?>" />
    <link rel="stylesheet" type="text/css" href="http://stillweather.com/<?php echo $SITE['CSSscreen']; ?>" media="screen" title="screen" />
    <link rel="stylesheet" type="text/css" href="http://stillweather.com/<?php echo $SITE['CSSprint']; ?>" media="print" />
    <link rel="shortcut icon" href="http://stillweather.com/favicon.ico" type="image/x-icon" />
    <link rel="icon" href="http://stillweather.com/favicon.ico" type="image/x-icon" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head(); ?>
<style type="text/css">
<!--
.style1 {
    font-size: 12px;
    font-weight: bold;
}
.style2 {font-size: 12px}
-->
</style>
<?php

if( isset ($TITLE) ) {
    echo "    <title>" . $TITLE . "</title>\n";
} else {
    echo "    <title>" . $SITE['organ'] . "</title>\n";
}

if (isset($SITE['flyoutmenu']) and $SITE['flyoutmenu'] or
    isset($_REQUEST['menu']) and strtolower($_REQUEST['menu']) == 'test' ) {
  $SITE['flyoutmenu'] = true;
  $PrintFlyoutMenu = false;
  $genDiv =false;
  global $FlyoutCSS, $FlyoutMenuText;
  include_once('flyout-menu.php');
  print $FlyoutCSS;
}

?>
<!-- WD-USA template from http://saratoga-weather.org/ -->
<!-- end of top -->

BTW if I take the title out it gets worse!

Thx.

Jack

It was missing all the stuff above the opening <html
PS I changed my post above to make the top-level2.php easier to get working.

Not sure why but it is still the same?

actually we are getting closer…
the problem that remains is the “Branford Weather and More” that is printing at the very top of the HTML code

standby, new zip on the way…

It was my fault … sorry
OK, I fixed the bug I had in the template files, please download my wxblog_style-with-comments.zip again and replace the files.
Edit: fix included in the download now

I must be not understanding something. I got all the above instructions and started in on adding my blog. I took Mike’s advise and just concentrated on getting index.php working first. After I did I found that’s all I had to do. There’s nothing in my theme folder but index.php, rtl.css, searchforum.php, sidebar.php & style.css. Everything seems to work. What am I missing here? Why do you have to modify the other 7 files?

See it here:
http://www.sohiweather.com/blog

Mike

That did it Mike, thanks for your patience and most of all thanks for the new updates…Very Cool!

Regards,

Jack

Jack, I have one more fix for the “Blog index” link, please stand by for one last zip file.

OK, zip updated, re-download and install.
Edit: fix included in the download now

What style is selected in your wordpress admin panel?

This one.

Current Theme
Weather Display Blog by Tony Hake & Jack Ahern by Tony Hake & Jack Ahern

A WordPress theme for WD / AJAX / PHP based websites.

All of this theme

I made the changes but still no luck. It seems that this thread is going in two directions. Should I start another one for this issue?
Dave

I made the changes but still no luck.

Okay, I am comparing the coding of your site’s main page (index.html) and that of the index.php in the WordPress template. There are considerable differences in it and I think that is part of it. So, let’s try this. In the WordPress index.php, delete out everything ABOVE the line that says

Then, at the start of the file, let’s paste in the coding from your main index.html, except with the paths modified. Paste this at the top:

<!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" xml:lang="en" lang="en-US">
  <head>

<link rel="SHORTCUT ICON" href="http://scrtc.com/~dcfs/favicon.ico" /><!-- ##### start AJAX mods ##### -->

    <script type="text/javascript" src="../ajaxWDwx.js"></script>
    <!-- AJAX updates by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
    <script type="text/javascript">
    <!--
    useKnots = false; // set =true; to force use of knots as wind speed
    ajax_set_units('E'); // use 'E' for USA(english) units or 'M' for Metric
    //-->
    </script>
    <!-- ##### Note: AJAX mods are also included around many WD tags with data in clientraw.txt with -->
    <!-- <span class="ajax" id="ajax..."></span> tags .. see page below for details                  -->
    <!-- ##### end AJAX mods ##### -->

<!-- ##### CHANGE  title to your site ##### -->
<title>Cave Country Weather KY</title>
<!-- ##### CHANGE  description to your site ##### -->
<meta name="Cave Country Weather Station KY" content="Cave Country KY Personal weather station KY." />
<meta http-equiv="content-type" content="Cave City Forecast, Cave Country Weather, Glasgow Weather Forecast, Horse Cave Weather, Barren County Weather, cavecountryweather, Cave Country Forecast, weather cave country, Weather Forecast, Cave Weather Forecast, cave country conditions, Cave City Weather, Weather Cave City, weather station, Barren County Weather Live, Cave City Weather Live, 42127 Weather, Cave Country Weather Forecast, Cave City Weather Forecast, Kentucky Weather Forecast, Horse Cave Weather Forecast, Barren County Weather Forecast, KY Weather Forecast, Park City Weather Forecast, Mammoth Cave Weather Forecast, Live Weather Forecast, 42127, Current Conditions" />
<meta name="verify-v1" content="24nkZLqbRwthzcocZoNOdWshBML2mlPu/SS/9Obo/nE=" />
<meta http-equiv="content-type" content="application/xhtml+xml; charset=ISO-8859-1" />
    <link rel="stylesheet" type="text/css" href="../weather-screen.css" media="screen" title="screen" />
    <link rel="stylesheet" type="text/css" href="../weather-print.css" media="print" />
<link rel="stylesheet" type="text/css" href="http://www.cavecountryweather.com/tswnavbar.css" />
<style type="text/css">
/*<![CDATA[*/
 


 table.c14 {border-collapse: collapse}
 div.c13 {clear: both;}
 p.c12 {color: #CC0000}
 span.c11 {color: #CC0000}
 span.c10 {font-size: 120%}
 span.c9 {font-size: 10px;}
 span.c8 {text-transform: capitalize}
 span.c7 {text-transform: uppercase}
 span.c6 {color: #111111}
 span.c5 {font-size: 14px;}
 li.c4 {list-style: none}
 span.c3 {color: #ADD8E6}
 span.c2 {font-size: 80%}
 div.c1 {text-align: center}
/*]]>*/
</style>
</head>
<body background="clouds.JPG">    <!-- For non-visual user agents: -->
      <div id="top"><a href="#main-copy" class="doNotDisplay doNotPrint">Skip to main content.</a></div>

    <!-- ##### Header ##### -->

<!-- ##### CHANGE  title to your site ##### -->

<div class="c1"><center><img src="Cavecom.png" alt="cavecountryweather.com" /></center></div>

    <div id="header">
      <h1 class="headerTitle">
        <a href="http://www.cavecountryweather.com/wdlive.html">Current Conditions</a>
      </h1>

	<div class="headerTemp"><span class="doNotPrint">
		<span class="ajax" id="ajaxbigtemp">68&deg;F</span></span>
	</div>

    <!-- ##### CHANGE  location to your location, avoid abbreviations ##### -->

      <div class="subHeader">
        Cave City, Kentucky, USA

      </div>

      <div class="subHeaderRight"><span class="ajax" id="ajaxindicator">Updated</span>: <span class="ajax" id="ajaxdate">08/06/08</span> <span class="ajax" id="ajaxtime">06:56 AM</span></div>

    </div>

    <div id="side-bar">

      <!-- ##### Left Sidebar ##### -->

      <div class="leftSideBar">
        <p class="sideBarTitle">Navigation</p>
<div id="tswcssbuttons">
        <ul>
          <li><b>Home</b></li>
          <li><a href="../wx2.html" title="5-day Forecast">Forecast</a></li>
          <li><a href="../wx3.html" title="Radar">Radar</a></li>
          <li><a href="../wx10.html" title="Web Cam">Web Cam</a></li>
          <li><a href="../wx4.html" title="Watches, Warnings, Advisories">Advisories</a></li>
          <li><a href="../wx5.html" title="Daily weather statistics">Daily Stats</a></li>
          <li><a href="../wx6.html" title="Graphs">Graphs</a></li>
          <li><a href="../wx7.html" title="Sun and Moon Data">Astronomy</a></li>
          <li><a href="../wx8.html" title="Useful Links">Links</a></li>
          <li><a href="../wx11.html" title="Web Stickers">Stickers</a></li>
          <li><a href="../wx9.html" title="About This Site">About Us</a></li>
<li class="c4"><strong><span class="c3"><span class="c2">Cave Country, Cave City Weather Forecast, Glasgow Weather Forecast, Kentucky, Horse Cave, Barren County, KY, Park City Weather Forecast, Mammoth Cave, Live, 42127, Current Conditions</span></span></strong></li>



        </ul>
</div>
      </div>

    </div><!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" xml:lang="en" lang="en-US">
  <head>

<link rel="SHORTCUT ICON" href="http://scrtc.com/~dcfs/favicon.ico" /><!-- ##### start AJAX mods ##### -->

    <script type="text/javascript" src="../ajaxWDwx.js"></script>
    <!-- AJAX updates by Ken True - http://saratoga-weather.org/scripts-WD-AJAX.php 13-Dec-2006 -->
    <script type="text/javascript">
    <!--
    useKnots = false; // set =true; to force use of knots as wind speed
    ajax_set_units('E'); // use 'E' for USA(english) units or 'M' for Metric
    //-->
    </script>
    <!-- ##### Note: AJAX mods are also included around many WD tags with data in clientraw.txt with -->
    <!-- <span class="ajax" id="ajax..."></span> tags .. see page below for details                  -->
    <!-- ##### end AJAX mods ##### -->

<!-- ##### CHANGE  title to your site ##### -->
<title>Cave Country Weather KY</title>
<!-- ##### CHANGE  description to your site ##### -->
<meta name="Cave Country Weather Station KY" content="Cave Country KY Personal weather station KY." />
<meta http-equiv="content-type" content="Cave City Forecast, Cave Country Weather, Glasgow Weather Forecast, Horse Cave Weather, Barren County Weather, cavecountryweather, Cave Country Forecast, weather cave country, Weather Forecast, Cave Weather Forecast, cave country conditions, Cave City Weather, Weather Cave City, weather station, Barren County Weather Live, Cave City Weather Live, 42127 Weather, Cave Country Weather Forecast, Cave City Weather Forecast, Kentucky Weather Forecast, Horse Cave Weather Forecast, Barren County Weather Forecast, KY Weather Forecast, Park City Weather Forecast, Mammoth Cave Weather Forecast, Live Weather Forecast, 42127, Current Conditions" />
<meta name="verify-v1" content="24nkZLqbRwthzcocZoNOdWshBML2mlPu/SS/9Obo/nE=" />
<meta http-equiv="content-type" content="application/xhtml+xml; charset=ISO-8859-1" />
    <link rel="stylesheet" type="text/css" href="../weather-screen.css" media="screen" title="screen" />
    <link rel="stylesheet" type="text/css" href="../weather-print.css" media="print" />
<link rel="stylesheet" type="text/css" href="http://www.cavecountryweather.com/tswnavbar.css" />
<style type="text/css">
/*<![CDATA[*/
 


 table.c14 {border-collapse: collapse}
 div.c13 {clear: both;}
 p.c12 {color: #CC0000}
 span.c11 {color: #CC0000}
 span.c10 {font-size: 120%}
 span.c9 {font-size: 10px;}
 span.c8 {text-transform: capitalize}
 span.c7 {text-transform: uppercase}
 span.c6 {color: #111111}
 span.c5 {font-size: 14px;}
 li.c4 {list-style: none}
 span.c3 {color: #ADD8E6}
 span.c2 {font-size: 80%}
 div.c1 {text-align: center}
/*]]>*/
</style>
</head>
<body background="clouds.JPG">    <!-- For non-visual user agents: -->
      <div id="top"><a href="#main-copy" class="doNotDisplay doNotPrint">Skip to main content.</a></div>

    <!-- ##### Header ##### -->

<!-- ##### CHANGE  title to your site ##### -->

<div class="c1"><center><img src="Cavecom.png" alt="cavecountryweather.com" /></center></div>

    <div id="header">
      <h1 class="headerTitle">
        <a href="http://www.cavecountryweather.com/wdlive.html">Current Conditions</a>
      </h1>

	<div class="headerTemp"><span class="doNotPrint">
		<span class="ajax" id="ajaxbigtemp">68&deg;F</span></span>
	</div>

    <!-- ##### CHANGE  location to your location, avoid abbreviations ##### -->

      <div class="subHeader">
        Cave City, Kentucky, USA

      </div>

      <div class="subHeaderRight"><span class="ajax" id="ajaxindicator">Updated</span>: <span class="ajax" id="ajaxdate">08/06/08</span> <span class="ajax" id="ajaxtime">06:56 AM</span></div>

    </div>

    <div id="side-bar">

      <!-- ##### Left Sidebar ##### -->

      <div class="leftSideBar">
        <p class="sideBarTitle">Navigation</p>
<div id="tswcssbuttons">
        <ul>
          <li><b>Home</b></li>
          <li><a href="../wx2.html" title="5-day Forecast">Forecast</a></li>
          <li><a href="../wx3.html" title="Radar">Radar</a></li>
          <li><a href="../wx10.html" title="Web Cam">Web Cam</a></li>
          <li><a href="../wx4.html" title="Watches, Warnings, Advisories">Advisories</a></li>
          <li><a href="../wx5.html" title="Daily weather statistics">Daily Stats</a></li>
          <li><a href="../wx6.html" title="Graphs">Graphs</a></li>
          <li><a href="../wx7.html" title="Sun and Moon Data">Astronomy</a></li>
          <li><a href="../wx8.html" title="Useful Links">Links</a></li>
          <li><a href="../wx11.html" title="Web Stickers">Stickers</a></li>
          <li><a href="../wx9.html" title="About This Site">About Us</a></li>
<li class="c4"><strong><span class="c3"><span class="c2">Cave Country, Cave City Weather Forecast, Glasgow Weather Forecast, Kentucky, Horse Cave, Barren County, KY, Park City Weather Forecast, Mammoth Cave, Live, 42127, Current Conditions</span></span></strong></li>



        </ul>
</div>
      </div>

    </div>

I think I got all the paths right and this will now match what you use on the main page. This really should work - I hope!

Tony