wordpress monthly navigation

Date: 25th October 2007 at 4:11 pm | Filed under: development, scripts, wordpress | Author: Sam Burdge

This article explains how to create a monthly navigation system for one or more categories in wordpress, or on the home page itself. By this I mean that on the first page it would display only posts from the current month. The next and previous page links would be replaced by next and previous month links.

To display the monthly content it is first necessary to create a custom query. This should be done before the loop begins. Here is an example of the custom query php:
Read on…

4 Responses to “wordpress monthly navigation”

  • Comment by hanslukas
    Date: May 12th, 2008 at 11:09 pm

    hi…
    it’s just what i was searching…

    I tried to use your solution pasting it on mi index.php, but don’t work…
    where my error please?

    Sorry for my english,I thank you
    regards

  • Comment by Minmin
    Date: November 27th, 2008 at 7:38 pm

    Thanks so much! You’re the best! :) It helped me so much.

  • Comment by Jack
    Date: March 24th, 2010 at 8:49 am

    Could you make this into a plugin? I’m looking for this for ages, using an old next/previous month plugin which works, but not with permalinks enabled. This is a link to that old plugin.

  • Comment by Weekly Links #13. | claudio schwarz – c.schwarz – claudioschwarz.com
    Date: March 25th, 2010 at 9:02 am

    [...] WordPress Montly Navigation Anstelle von Seite 1, 2 oder 3 (etc.) stünde bei dieser Programmierung ein Link zum vorherigen Monat. [...]

Leave a Comment

cookies and arrays in php

Date: 20th October 2007 at 1:27 am | Filed under: development, scripts | Author: Sam Burdge

How to store and retreive arrays using cookies with php:

The first step is to turn the array into a string with each array value seperated by a delimiter. I usually choose an unusual delimiter character such as a vertical bar, as the array values are more likely to contain characters such as comma or slashes. Example:
Read on…

4 Responses to “cookies and arrays in php”

  • Comment by c-received
    Date: November 6th, 2007 at 9:54 pm

    Blend your own recipe….

    $a = array(’bg’=>’red’,'tx’=>’blue’,'lk’=>’green’);
    print_r($a);

    $b = implode(”|”,array(’red’,'blue’,'green’));
    print_r($b);

    $c = explode(”|”,$b);
    print_r($c);

  • Comment by kuberan marimuthu
    Date: September 20th, 2009 at 7:52 am

    this is an expensive solution. PHP cookies, itself supports storing arrays check this link http://www.developertutorials.com/tutorials/php/articlename-050526/page5.html

  • Comment by Steve
    Date: November 1st, 2010 at 8:58 am

    That is soooo inefficient. Use the serialize() function thus:
    setcookie(”myarray”, serialize($myArray), time()+3600);
    and to get data out:
    if(isset($_COOKIE['myarray'])) $myArray=unserialize($_COOKIE['myarray']);

  • Comment by Filip Gorczynski
    Date: November 24th, 2010 at 12:58 pm

    So, what do You think about sth like this:
    <?php
    if(isset($_COOKIE['c'])) {
    $a = unserialize($_COOKIE['c']);
    $a[] = time();
    setcookie(’c', serialize($a), time() + 1000);
    } else {
    setcookie(’c', serialize(array(time())), time() + 1000);
    }

Leave a Comment

WP Digi Clock Plugin (0.1BETA)

Date: 19th October 2007 at 10:48 pm | Filed under: development, flash, plugins, wordpress | Author: Sam Burdge

A NEW VERSION OF THE PLUGIN HAS BEEN RELEASED!! Please follow this link: {{post id="wp-digi-clock-plugin-10-new-version" text="WP Digi Clock Version 1.0" target="_self"}}

[wp_digi_clock]This easy to use plugin will embed a flash digital clock into your wordpress blog, either in a post or page, or within your blog's template (in the sidebar / header / footer etc.). The background and font colours are managed via the options menu. The clock displays the time as set on the user's local machine. Server time and timezone offsets will be a feature of version 1 when it is released. For now please try it out and let me know of any issues etc. by commenting on this page.

Installation:

  1. Download the plugin file here: Follow the link at the top of this page to get the new version!!
  2. Upload the wp-digi-clock folder to your wp-content/plugins folder
  3. Activate the plugin from the plugins page
  4. Go to Options -> WP Digi Clock to choose your colour scheme

Usage:

To embed in a post or page:

type in [ wp_digi_clock ] (removing the spaces) anywhere in a post or page.

to embed in your page template (header, footer, sidebar):

use the function wp_digital_clock() for example:

 
<li>
<h2>TIME</h2>
</li>
<li><?php wp_digital_clock(); ?></li>
 

9 Responses to “WP Digi Clock Plugin (0.1BETA)”

  • Comment by chris
    Date: November 2nd, 2007 at 11:16 pm

    when trying to change the color, what numbers correspond with what color? is there any info on this?

  • Comment by Sam Burdge
    Date: November 2nd, 2007 at 11:23 pm

    Hi, as this is the very first release I haven’t had a chance to integrate the colour picker. Basically it works by hex codes e.g: #ffffff = white, #000000 = black. For a full list of colour codes you can visit: webmonkey

  • Comment by Hien
    Date: November 3rd, 2007 at 5:14 am

    Hi Sam:

    Just tried out you Digi Clock plugin (0.1BETA). Its a snap to use. I know that you probably have plans for other features so I won’t make any unreasonably unbearable requests. There is only one thing I’d like to bring to light… non-military time. The plugin, works great with my site color scheme right out of the box. I didn’t even have to change a thing. Thanks!

  • Comment by Shawn
    Date: November 5th, 2007 at 8:30 pm

    Hi Sam.. looks good.
    I would love, however, a “countdown” feature…
    allowing us to put a clock widget on the sidebar with a configurable title to provide countdown clocks .. ie.. “Time until election day”, “Time until vacation”, etc

  • Comment by Sam Burdge
    Date: November 5th, 2007 at 9:01 pm

    Hi Shawn, the closest thing I could find is this plugin: Countdown

  • Comment by Afzal Javed
    Date: November 6th, 2007 at 7:32 pm

    I still don’t know how to change the back ground color. Please let me know in which line of plugin-code should I change the code.

  • Comment by Sam Burdge
    Date: November 6th, 2007 at 9:42 pm

    Hi Afzal,
    In the options menu in wordpress you should see the tab for WP Digi Clock. Go to the WP Digi Clock options page and enter hex color codes for the background and text colours. If you dont see the colours change at first, try emptying your browser’s cache. Hope this helps…

  • Comment by WordPress 插件集锦系列 1-50套 « wordpress 非官方中文站——助力中文wordpress
    Date: May 2nd, 2009 at 3:07 am

    [...] WP DigiClock 在你的 WordPress 博客中,文章或者侧边拦,或者模板(侧边拦,页眉,页脚等)里面添加数字时钟。 [...]

  • Comment by aljuk
    Date: August 11th, 2010 at 3:21 pm

    Plugin is broken in WP3. Options don’t function, plugin doesn’t display. What a pity.

Leave a Comment

random timing and color actionscripts

Date: 19th October 2007 at 1:45 am | Filed under: actionscript, development | Author: Sam Burdge

Here are the actionscripts used in the {{post id="flash-mousetrails-with-random-flashes" text="example" target="_self"}} swf. First the random timing script:

Read on…

Leave a Comment