boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hack on a Hack (Dodo's Archives)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    boardom Forum Index -> Feature requests
View previous topic :: View next topic  
Author Message
qingshuo



Joined: 03 Jan 2003
Posts: 10
Location: Edina-Bloomington/MN/USA

PostPosted: Fri Jan 03, 2003 10:59 pm    Post subject: Hack on a Hack (Dodo's Archives) Reply with quote

I have modified Dodo's expanded archiver. I've titled it simply b2archivesExpandex.php and runs as an alternate archiving system (not replacement.

For comparison, this is Dodo's archive page:
http://pure-essence.net/b2archives.php
and here is mine:
http://qingshuo.net/b2/view_b2archivesExpanded.php

Here are the new features:

- Option to display all years (set by default)
- When sorting by title, there are no longer month headings, but alphabetical headings. (fixes the "month jumping" bug)
- month headings now include the year
- Month and year are not displayed before each post in sort by date because the heading already has this info.
- sort by ID is removed. This is impractical, and blogs that have imported from other systems often times do not have IDs that reflect any type of systematic order.
- choosing sort by date will automatically swap the sort menu to descending, choosing sort by title will automatically swap the sort menu to ascending. This is just javascript convenience, the user still has the ability to choose otherwise.
- a bit more style control if you play around a bit

Thanks to Dodo of course for original creation!

Edit:
---------------------------------
Sorry, wrong section, please move to Hacks section, thanks

~Q

Source:
--------------------------------------------------------------------------------------

<?php
// What's the default list order?
$defaultorderby = "post_date";
// Default to ascending to descending?
$defaultorder = "DESC";
// What's your blog file name?
$blogfilename = "index.php";
// What's your site url? (no trailing slash)
$siteurl = "http://yoursite.com/b2";
// What's the name of the table for your posts?
$tablename = "b2posts";
// What's the first year you started your b2?
$first_year = "2000";

$this_year = date("Y");
$pagenow = explode("/", $PHP_SELF);
$pagenow = trim($pagenow[(sizeof($pagenow)-1)]);

if ($pagenow == "b2archivesExpanded.php")
include ("blog.header.php");
if(!$way)
$way = $defaultorderby;
if(!$order)
$order = $defaultorder;
if(!$year)
$year = "all_years";

$archive_mode = "postbypost";
if($year != "all_years") {
$request = " SELECT * FROM $tablename WHERE post_date LIKE '$year%' ORDER BY $way $order";
}
else {
$request = " SELECT * FROM $tablename WHERE post_date ORDER BY $way $order";
}

$result = mysql_query($request);

######################################################
# Feel free to modify the following
######################################################

?>

<script language="javascript" type="text/javascript">

function Chose(whichSort) {
if(!whichSort.selectedIndex) document.getElementById("asc_desc").selectedIndex = 1;
else document.getElementById("asc_desc").selectedIndex = 0;
}

</script>

<div style="align:center">
<form action="<?=$PHP_SELF?>" method="post">
Order by
<select class="form" name="way" style="width:80px;" onchange="Chose(this);">
<?

if($way == "post_date")
echo '<option value="post_date" selected>date</option>\n';
else
echo '<option value="post_date">date</option>\n';
if($way == "post_title")
echo '<option value="post_title" selected>title</option>\n';
else
echo '<option value="post_title">title</option>\n';

?>
</select>

<select class="form" name="order" style="width:120px;" id="asc_desc">
<?
if($order == "ASC")
echo '<option value="ASC" selected>Ascending</option>\n';
else
echo '<option value="ASC">Ascending</option>\n';

if($order == "DESC")
echo '<option value="DESC" selected>Descending</option>\n';
else
echo '<option value="DESC">Descending</option>\n';
?>
</select>

<select class="form" name="year" style="width:100px;">
<?

for($i = $first_year; $i <= $this_year; $i++) {
if($year == $i)
echo "<option value=\"$i\" selected>$i</option>\n";
else
echo "<option value=\"$i\">$i</option>\n";
}
if($year == "all_years")
echo "<option value=\"all_years\" selected>All Years</option>\n";
else
echo "<option value=\"all_years\">All Years</option>\n";

?>
</select>
<input type="submit" name="submit" value="sort" />
</form>
</div>
<?php

while($row=mysql_fetch_object($result)) {

$postdata = get_postdata2($row->ID);
$thismonth = mysql2date("Y\-m", $postdata["Date"]);
$thisyear = mysql2date("Y", $postdata["Date"]);
$linkmonth = mysql2date("Ym", $postdata["Date"]);
$thisletter = substr(ucfirst($postdata["Title"]),0,1);
$i = "/".$thismonth."/";

$setHead = 0;
if($way == "post_date") {
if( $thismonth != $previousmonth && preg_match($i,$postdata["Date"]) ) {
$setHead = 1;
}
}
else {
if($thisletter != $previousletter) {
$setHead = 1;
}
}

// There are some divs adapted to style my webpage, please do change these

if ($setHead) {
if ($previousmonth || $previousletter) echo "</div>"; // this ENDS the style div of the previous header
echo "<div class=\"blogDate\" style=\"margin-top:20px;\">.:: "; // begins a header style div
if ($way == "post_date") echo "<a href=\"$siteurl/".$blogfilename."?m=$linkmonth\">".$thisyear." ".$month[substr($thismonth,5,2)]."</a>";
else echo $thisletter;
echo "</div>\n";
echo "<div class=\"blogTitleLine\" style=\"font-size:75%;\">"; // begin style div of post listings
}

$previousmonth = $thismonth;
$previousletter = $thisletter;
$postdata = get_postdata2($row->ID);
if ($way != "post_title") echo mysql2date("d h:i a", $postdata["Date"]);
else echo mysql2date("m/d/y h:i a", $postdata["Date"]);
echo " - <a href=\"$siteurl/".$blogfilename."?p=".$row->ID."&c=1"."\">";
if ($postdata["Title"]) {
$postdata["Title"] = stripslashes($postdata["Title"]);
echo $postdata["Title"];
} else {
echo $postdata["ID"];
}
echo "</a>";
echo "<br />\n";

}


?>
Back to top
View user's profile Send private message Visit poster's website AIM Address
Mister44



Joined: 31 Oct 2002
Posts: 237
Location: Philadelphia, PA, USA

PostPosted: Sat Jan 04, 2003 2:21 am    Post subject: Reply with quote

this is great! I was thinking about doing pretty much exactly this, and just hadn't gotten around to it.
Back to top
View user's profile Send private message Visit poster's website
GamerZ



Joined: 15 May 2002
Posts: 537
Location: Singapore

PostPosted: Sat Jan 04, 2003 7:33 am    Post subject: Reply with quote

nicely done

ps: ur site looks cool
_________________

++ GamerZ.Per.Sg - Complex Simplicity
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
GamerZ



Joined: 15 May 2002
Posts: 537
Location: Singapore

PostPosted: Sat Jan 04, 2003 8:36 am    Post subject: Reply with quote

oh ya remmebr to add[php:1:3168868e4a]$way = $_POST['way'];
$year = $_POST['year'];
$order = $_POST['order'];[/php:1:3168868e4a] at the top is register globals is off
_________________

++ GamerZ.Per.Sg - Complex Simplicity
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
SlackerAPM



Joined: 09 Nov 2002
Posts: 12

PostPosted: Sun Feb 02, 2003 2:16 pm    Post subject: Reply with quote

Is there a way to configure this hack so it only displays an archive of posts from a specific category? I don't want users to be able to chose which category posts are displayed from, more like I want to actually specify it.

I've made a seperate blog file for displaying articles on my site. This articles page displays all posts from category 2 however when I include an archive below the main content the archive displays posts from both category 1 and 2.
Back to top
View user's profile Send private message
qingshuo



Joined: 03 Jan 2003
Posts: 10
Location: Edina-Bloomington/MN/USA

PostPosted: Mon Feb 03, 2003 2:41 pm    Post subject: Reply with quote

I've changed the source alot since then, so I'll upload it here later today. The new source will support Qstrings, which will override POST data. Thus, all you do is remove the drop-down menu for categories and stick ?cat=# in the href=""
Back to top
View user's profile Send private message Visit poster's website AIM Address
SlackerAPM



Joined: 09 Nov 2002
Posts: 12

PostPosted: Mon Feb 03, 2003 8:34 pm    Post subject: Reply with quote

Awesome, sounds like just what I need. When you do post it could you show exactly how to display from selected categories? This just saves me asking in the future
Back to top
View user's profile Send private message
qingshuo



Joined: 03 Jan 2003
Posts: 10
Location: Edina-Bloomington/MN/USA

PostPosted: Tue Feb 04, 2003 4:25 am    Post subject: Reply with quote

Here it is:

Code:

<?

// What's the default list order?
$defaultorderby = "post_date";
// Default to ascending to descending?
$defaultorder = "DESC";
// What's your blog file name?
$blogfilename = "index.php";
// What's your site url? (no trailing slash)
$siteurl = "http://qingshuo.net/b2";
// What's the name of the table for your posts?
$tablename = "qnetb2posts";
// What's the first year you started your b2?
$first_year = "2002";

$this_year = date("Y");
$pagenow = explode("/", $PHP_SELF);
$pagenow = trim($pagenow[(sizeof($pagenow)-1)]);

$way = isset($_GET['way']) ? $_GET['way'] : ((isset($_POST['way'])) ? $_POST['way'] : $defaultorderby);
$year = isset($_GET['year']) ? $_GET['year'] : ((isset($_POST['year'])) ? $_POST['year'] : $this_year);
$order = isset($_GET['order']) ? $_GET['order'] : ((isset($_POST['order'])) ? $_POST['order'] : $defaultorder);
$cat = isset($_GET['cat']) ? $_GET['cat'] : ((isset($_POST['cat'])) ? $_POST['cat'] : "all_cats");

$archive_mode = "postbypost";

// Grab Results

$request = " SELECT * FROM $tablename";

$firstWHEREcond = 1;

if($year != "all_years") {
   if($firstWHEREcond) $request .= ' WHERE ';
   else $request .= ' and ';
   $request .= " post_date LIKE '$year%' ";
   $firstWHEREcond = 0;
}
if($cat != "all_cats") {
   if($firstWHEREcond) $request .= ' WHERE ';
   else $request .= ' and ';
   $request .= " post_category=$cat ";
   $firstWHEREcond = 0;
}

$sqlway = $way;

$request .= " ORDER BY $sqlway $order";

$result = mysql_query($request);


######################################################
#  Feel free to modify the following
######################################################

?>

<script language="javascript" type="text/javascript">

function Chose(whichSort) {
   if(!whichSort.selectedIndex || whichSort.selectedIndex==2) document.getElementById("asc_desc").selectedIndex = 1;
   else document.getElementById("asc_desc").selectedIndex = 0;
}

</script>

<div style="align:center">
<form  action="<?=$PHP_SELF?>" method="post">
Sort By:
<select class="form" name="way" style="width:90px;"  onchange="Chose(this);">
<?

if($way == "post_date")
   echo '<option value="post_date" selected="selected">date</option>';
else
   echo '<option value="post_date">date</option>';
if($way == "post_title")
   echo '<option value="post_title" selected="selected">title</option>';
else
   echo '<option value="post_title">title</option>';

?>
</select>

<select class="form" name="order" style="width:100px;" id="asc_desc">
<?
if($order == "ASC")
   echo '<option value="ASC" selected="selected">Ascending</option>';
else
   echo '<option value="ASC">Ascending</option>';

if($order == "DESC")
   echo '<option value="DESC" selected="selected">Descending</option>';
else
   echo '<option value="DESC">Descending</option>';
?>
</select>

<select class="form" name="year" style="width:80px;">
<?

for($i = $first_year; $i <= $this_year; $i++) {
   if($year == $i)
      echo "<option value=\"$i\" selected=\"selected\">$i</option>";
   else
      echo "<option value=\"$i\">$i</option>";
}
if($year == "all_years")
   echo "<option value=\"all_years\" selected=\"selected\">All Years</option>";
else
   echo "<option value=\"all_years\">All Years</option>";

?>
</select>

<select class="form" name="cat" style="width:110px;">
<?

$catsResult = mysql_query(" SELECT * FROM qnetb2categories ");

while ( $catRow = mysql_fetch_array($catsResult) ) {
   echo '<option value="'.$catRow["cat_ID"].'"';
   if($cat == $catRow["cat_ID"])
      echo ' selected="selected"';
   echo '>'.$catRow["cat_name"]."</option>\n";
}

echo '<option value="all_cats"';
if($cat == "all_cats")
   echo ' selected="selected"';
echo ">All Categories</option>\n";

?>
</select>

<input type="submit" name="submit" value="sort" style="width:35px;" />
</form>
</div>
<?php

while($row=mysql_fetch_object($result)) {

   $postdata = get_postdata2($row->ID);
   
   if($way=='post_date') {
      $thismonth = mysql2date("Y\-m", $postdata["Date"]);
      $thisyear = mysql2date("Y", $postdata["Date"]);
      $linkmonth = mysql2date("Ym", $postdata["Date"]);
      $i = "/".$thismonth."/";
   }
   else if($way=='post_title') $thisletter = substr(ucfirst($postdata["Title"]),0,1);
   
   
   $setHead = 0;
   if($way=='post_date') {
      if( $thismonth != $previousmonth && preg_match($i,$postdata["Date"]) )
         $setHead = 1;
   }
   else if($way=='post_title'){
      if($thisletter != $previousletter)
         $setHead = 1;
   }
   
   if ($setHead) {
      if ($previousmonth || $previousletter ) echo "</div>";
      echo "<div class=\"blogDate\" style=\"margin-top:20px;\">.:: ";
      if ($way=='post_date') echo "<a href=\"$siteurl/".$blogfilename."?m=$linkmonth\">".$thisyear." ".$month[substr($thismonth,5,2)]."</a>";
      else if($way=='post_title') echo $thisletter;
      echo "</div>\n";
      echo "<div class=\"blogTitleLine\" style=\"font-size:75%;\">";
   }

   if($way=='post_date') $previousmonth = $thismonth;
   else if($way=='post_title') $previousletter = $thisletter;
   $postdata = get_postdata2($row->ID);
   
   if($way=='post_date') echo mysql2date("d h:i a", $postdata["Date"]);
   else if($way=='post_title') echo mysql2date("m/d/y", $postdata["Date"]);
   
   echo " - <a href=\"$siteurl/".$blogfilename."?p=".$row->ID."&c=1"."\">";
   if ($postdata["Title"]) {
      $postdata["Title"] = stripslashes($postdata["Title"]);
      echo $postdata["Title"];
   } else {
      echo $postdata["ID"];
   }
   echo "</a>";
   echo "<br />\n";

}

echo "</div>";

?>


To disable categories selection, remove the <select name="cat"> blog of HTML code. Request/include the page with &cat=# and it'll work out.
Back to top
View user's profile Send private message Visit poster's website AIM Address
SlackerAPM



Joined: 09 Nov 2002
Posts: 12

PostPosted: Wed Feb 05, 2003 12:24 am    Post subject: Reply with quote

Hmmm, I've got the removal of the <select name "cat"> bit done and sorted but when I include the page with the &cat=2 it doesn't seem to work. I get this:

Warning: Failed opening 'articles_archive(new).php&cat=2' for inclusion (include_path='') in /home/ebcou/public_html/3ebnews/articles.php on line 61
Back to top
View user's profile Send private message
SlackerAPM



Joined: 09 Nov 2002
Posts: 12

PostPosted: Wed Feb 05, 2003 12:33 pm    Post subject: Reply with quote

I'm an idiot. Got it sorted Smile

One thing, is it possible to php include a page with the cat=2?

*edit*

Also, I can get the archive page displaying fine if I call it http://www.3eb.co.uk/3ebnews/articles.php?cat=2 but then if I click a link from the archive to display a new post I get a page displaying the selected post along with the archive of every category below it, instead of just category 2. If I then click a link from that archive that isn't in category 2 I don't get any content, just an archive.

I'm not sure I explained that very well but if you click the link you'll get the idea.
Back to top
View user's profile Send private message
SlackerAPM



Joined: 09 Nov 2002
Posts: 12

PostPosted: Sun Feb 09, 2003 4:11 pm    Post subject: Reply with quote

Anyone? Sad
Back to top
View user's profile Send private message
macshack



Joined: 17 Jul 2002
Posts: 1204
Location: Phoenix, Az

PostPosted: Sun Feb 09, 2003 5:43 pm    Post subject: Reply with quote

Hi SlackerAPM,

I think we may need to see some code. I tried to follow your description, but I get lost. Not sure what should or should not be rendered and when. So could you post the "articales" code, then may be we might understand.
_________________
Kind Regards,
Michael e
Back to top
View user's profile Send private message Send e-mail
SlackerAPM



Joined: 09 Nov 2002
Posts: 12

PostPosted: Sun Feb 09, 2003 6:19 pm    Post subject: Reply with quote

OK, here's the code for articles.php, it's basically just my index.php with a few small graphical changes:

Code:
<?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1; $cat=2; include ("blog.header.php"); ?>

<head>
<title><?php bloginfo('name') ?><?php single_post_title(' :: ') ?><?php single_cat_title(' :: ') ?><?php single_month_title(' :: ') ?></title>
<script src="http://www.3eb.co.uk/3ebjava.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="reply-to" content="<?php bloginfo('admin_email'); ?>" />
<meta http-equiv="imagetoolbar" content="no" />
<meta content="TRUE" name="MSSmartTagsPreventParsing" />

<style type="text/css" media="screen">
@import url( layout2b.css );
</style>
<?php comments_popup_script() ?>

</head>
<body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<table border="0" cellpadding="0" cellspacing="0" class="titlebox" align="center">
  <tr>
        <td width="100%">
          <table border="0" cellpadding="0"
    cellspacing="0" width="100%">
      <tr>
        <td valign="middle" align="left"><img src="http://www.3eb.co.uk/images/title_left.jpg" width="68"
        height="55"></td>
        <td valign="middle" align="center"><img src="http://www.3eb.co.uk/images/title_articles.jpg" width="225"
        height="55"></td>
        <td valign="middle" align="right"><img src="http://www.3eb.co.uk/images/title_right.jpg" width="68"
        height="55"></td>
      </tr>
    </table>
    </td>
  </tr>
</table>

<p align="center">All the news, as soon as we hear about it will be added here. 
  If it happens, it will be posted.  If you have any news you think we've
  missed please <a
href="mailto:[email protected]">e-mail us</a>.  Updated at different times daily.<br>
  Times are GMT unless stated:</p>
<!-- // b2 loop start -->
   <?php while($row = mysql_fetch_object($result)) { start_b2(); ?>

<?php permalink_anchor(); ?>
     <table width="99%" border="0" class="au-bg" cellpadding="4" cellspacing="1>
        <tr class="sub-header">
          <td height="22" class="sub-header"><b><?php the_title(); ?></b> <span class="small-normal">(Posted <?php the_time("l F jS, Y") ?> @ <?php the_time() ?> by <a href="mailto:<?php the_author_email() ?>"><?php the_author() ?></a>)</span></td>
        </tr>
      </table>
      <p><?php the_content(); ?></p>
      <blockquote><p align="right"><?php comments_popup_link("Comments (0)", "Comments (1)", "Comments (%)") ?></p></blockquote>
<!-- // this is just the end of the motor - don't touch that line either :) -->
   <?php } ?>

<table width="99%" border="0" cellspacing="0" cellpadding="0">
              <tr>
               
    <td class="sub-header"><img src="http://www.3eb.co.uk/images/sub-section_archive.jpg" width="200" height="18"></td>
              </tr>
            </table>
<?php include("articles_archive.php"); ?>
<br />
<p align="center">[<b>3eb.co.uk's</b> Articles are powered by <a href="http://cafelog.com" target="_blank"><b>b2</b></a>.]
</p>
</body>
</html>


Also, here's the actualy archive page I'm trying to include's ("articles_archive.php") code:

Code:
<?

// What's the default list order?
$defaultorderby = "post_date";
// Default to ascending to descending?
$defaultorder = "DESC";
// What's your blog file name?
$blogfilename = "articles.php";
// What's your site url? (no trailing slash)
$siteurl = "http://www.3eb.co.uk/3ebnews";
// What's the name of the table for your posts?
$tablename = "b2posts";
// What's the first year you started your b2?
$first_year = "1995";

$this_year = date("Y");
$pagenow = explode("/", $PHP_SELF);
$pagenow = trim($pagenow[(sizeof($pagenow)-1)]);

$way = isset($_GET['way']) ? $_GET['way'] : ((isset($_POST['way'])) ? $_POST['way'] : $defaultorderby);
$year = isset($_GET['year']) ? $_GET['year'] : ((isset($_POST['year'])) ? $_POST['year'] : $this_year);
$order = isset($_GET['order']) ? $_GET['order'] : ((isset($_POST['order'])) ? $_POST['order'] : $defaultorder);
$cat = isset($_GET['cat']) ? $_GET['cat'] : ((isset($_POST['cat'])) ? $_POST['cat'] : "all_cats");

$archive_mode = "postbypost";

// Grab Results

$request = " SELECT * FROM $tablename";

$firstWHEREcond = 1;

if($year != "all_years") {
   if($firstWHEREcond) $request .= ' WHERE ';
   else $request .= ' and ';
   $request .= " post_date LIKE '$year%' ";
   $firstWHEREcond = 0;
}
if($cat != "all_cats") {
   if($firstWHEREcond) $request .= ' WHERE ';
   else $request .= ' and ';
   $request .= " post_category=$cat ";
   $firstWHEREcond = 0;
}

$sqlway = $way;

$request .= " ORDER BY $sqlway $order";

$result = mysql_query($request);


######################################################
#  Feel free to modify the following
######################################################

?>

<script language="javascript" type="text/javascript">

function Chose(whichSort) {
   if(!whichSort.selectedIndex || whichSort.selectedIndex==2) document.getElementById("asc_desc").selectedIndex = 1;
   else document.getElementById("asc_desc").selectedIndex = 0;
}

</script>

<div style="align:center">
<form  action="<?=$PHP_SELF?>" method="post">
Sort By:
<select class="form" name="way" style="width:90px;"  onchange="Chose(this);">
<?

if($way == "post_date")
   echo '<option value="post_date" selected="selected">date</option>';
else
   echo '<option value="post_date">date</option>';
if($way == "post_title")
   echo '<option value="post_title" selected="selected">title</option>';
else
   echo '<option value="post_title">title</option>';

?>
</select>

<select class="form" name="order" style="width:100px;" id="asc_desc">
<?
if($order == "ASC")
   echo '<option value="ASC" selected="selected">Ascending</option>';
else
   echo '<option value="ASC">Ascending</option>';

if($order == "DESC")
   echo '<option value="DESC" selected="selected">Descending</option>';
else
   echo '<option value="DESC">Descending</option>';
?>
</select>

<select class="form" name="year" style="width:80px;">
<?

for($i = $first_year; $i <= $this_year; $i++) {
   if($year == $i)
      echo "<option value=\"$i\" selected=\"selected\">$i</option>";
   else
      echo "<option value=\"$i\">$i</option>";
}
if($year == "all_years")
   echo "<option value=\"all_years\" selected=\"selected\">All Years</option>";
else
   echo "<option value=\"all_years\">All Years</option>";

?>
</select>

<input type="submit" name="submit" value="sort" style="width:35px;" />
</form>
</div>
<?php

while($row=mysql_fetch_object($result)) {

   $postdata = get_postdata2($row->ID);
   
   if($way=='post_date') {
      $thismonth = mysql2date("Y\-m", $postdata["Date"]);
      $thisyear = mysql2date("Y", $postdata["Date"]);
      $linkmonth = mysql2date("Ym", $postdata["Date"]);
      $i = "/".$thismonth."/";
   }
   else if($way=='post_title') $thisletter = substr(ucfirst($postdata["Title"]),0,1);
   
   
   $setHead = 0;
   if($way=='post_date') {
      if( $thismonth != $previousmonth && preg_match($i,$postdata["Date"]) )
         $setHead = 1;
   }
   else if($way=='post_title'){
      if($thisletter != $previousletter)
         $setHead = 1;
   }
   
   if ($setHead) {
      if ($previousmonth || $previousletter ) echo "</div>";
      echo "<div class=\"blogDate\"><b><font color=\"#aa0000\">.::</font></b> ";
      if ($way=='post_date') echo "<a href=\"$siteurl/".$blogfilename."?m=$linkmonth\">".$thisyear." ".$month[substr($thismonth,5,2)]."</a>";
      else if($way=='post_title') echo $thisletter;
      echo "</div><br>\n";
      echo "<div class=\"blogTitleLine\">";
   }

   if($way=='post_date') $previousmonth = $thismonth;
   else if($way=='post_title') $previousletter = $thisletter;
   $postdata = get_postdata2($row->ID);
   
   if($way=='post_date') echo mysql2date("M jS @ h:i a", $postdata["Date"]);
   else if($way=='post_title') echo mysql2date("m/d/y", $postdata["Date"]);
   
   echo " - <a href=\"$siteurl/".$blogfilename."?p=".$row->ID."&c=2"."\">";
   if ($postdata["Title"]) {
      $postdata["Title"] = stripslashes($postdata["Title"]);
      echo $postdata["Title"];
   } else {
      echo $postdata["ID"];
   }
   echo "</a>";
   echo "<br />\n";

}

echo "</div>";

?>


Thanks for any help you can provide Smile
Back to top
View user's profile Send private message
qingshuo



Joined: 03 Jan 2003
Posts: 10
Location: Edina-Bloomington/MN/USA

PostPosted: Tue Feb 11, 2003 1:56 am    Post subject: Reply with quote

$cat = isset($_GET['cat']) ? $_GET['cat'] : ((isset($_POST['cat'])) ? $_POST['cat'] : "all_cats");

This line grabs $cat from either POST or GET, both of which are missing. Since $cat is already defined at the top, just leave out this line (comment out or delete)
Back to top
View user's profile Send private message Visit poster's website AIM Address
SlackerAPM



Joined: 09 Nov 2002
Posts: 12

PostPosted: Tue Feb 11, 2003 8:38 am    Post subject: Reply with quote

Thankyou! Works perfectly now Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Feature requests All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group