Recent Topics

1 Jun 04, 2006 06:23    

In my main blog page, the bottom of the sidebar has a list of links posted in my linkblog. I noticed that these have not been updated in a while.

How can I fix this (i.e. so the sidebar has the latest links posted to the linkblog)?

2 Jun 04, 2006 11:50

Find a line that looks something like this in skins/<skin name>/_linkblog.php and change the ASC to DESC

	$LinkblogList = & new ItemList( $linkblog, array(), '', '', '', $linkblog_cat, $linkblog_catsel, '', 'ASC', 'category title', '', '', '', '', '', '', '', '', $linkblog_limit, 'posts', $timestamp_min, $timestamp_max );

¥

3 Jun 04, 2006 17:24

The line specified did not appear in skins/<skin name>/_linkblog.php
but I found it in skins/_linkblog.php.

I made the change and it did alter the order, sort of. I see the order is alphabetical by link entry title, I want to order DESC by link entry date.

I took a simple guess and got a SQL error. What is the correct column name for the date?

4 Jun 04, 2006 18:22

ahh, forgot about that bit :p change 'category title' to 'issue_date'

¥

5 Jun 04, 2006 20:44

That's it!!

Now please help me understand.
It looks like the ItemList function passes parameters to another
function that then parses the parameters into a SQL query.

How do I figure out what calls ItemList and what the ending SQL is?

In other words, how does it work?

6 Jun 06, 2006 10:26

There's a manual around here somewhere but, what I normally do is crack open all the class and function files and take a look at the code itself, there's (usually) a bunch of comments that tell you what they do and what their parameters are.

ie/

	/**
	 * Constructor
	 *
	 * {@internal ItemList::ItemList(-)}}
	 *
	 * @param integer Blog ID
	 * @param array show_statuses
	 * @param mixed Specific post number to display
	 * @param mixed YearMonth(Day) to display
	 * @param mixed Week number. Note: uses mySQL's week numbering and mySQL default if applicable.
   * In mySQL < 4.0, WEEK() uses mode 0: Week starts on Sunday;
   * Value range is 0 to 53; week 1 is the first week that starts in this year
	 * @param mixed List of cats to restrict to
	 * @param array Array of cats to restrict to
	 * @param mixed List of authors to restrict to
	 * @param string sort order can be either ASC or DESC
	 * @param string space separated list of fields to order by. Possible list elements are: 
	 *               author issue_date mod_date status locale content title urltitle url ctageory
	 *               wordcount comments
	 * @param mixed # of posts to display on the page
	 * @param mixed List page number in paged display
	 * @param mixed Start results at this position
	 * @param mixed End results at this position
	 * @param string Search string
	 * @param mixed Search for sentence or for words
	 * @param mixed Require exact match of title or contents
	 * @param boolean Is this preview
	 * @param mixed 
	 * @param mixed 
	 * @param mixed Do not show posts before this timestamp, can be 'now'
	 * @param mixed Do not show posts after this timestamp, can be 'now'
	 * @param string urltitle of post to display
	 */
	function ItemList(

¥


Form is loading...