Current project

April 29th, 2007

This Planet – Currently in development, this site is dedicated to providing the public with information on agencies and organizations, whose purpose is to inform, preserve and restore planet Earth and its natural life and resources. Visit http://thisplanet.info for more information.

Jutiagroup – work on my brother’s site continues. Work should have been completed a while back, but for the moment it is down to only performing maintenance tasks. The site is dedicated to social events, politics, the stock market and money management. Authors are in need. So if you have a topic you would like to write articles on, even if it is not one of the main ones from above, visit the contact page and express your interest.

Bad SPAM, Bad - this one was spur of the moment. I started it yesterday after I came home and had to deal with the daily doze of SPAM. I wrote a “bit” more about it here - http://badspambad.com.

Popularity: 52% [?]

Latest Posts v1.0 by Cypher

August 21st, 2006

While looking for plugins for Jutia Group I stumbled upon Latest Posts v1.0. It is on the left side, under “10 Newest Entries”.

I needed some more functionality out of it so I took the liberty to modify the code a bit. Just to make it a tad more flexible.

I started by changing the function call for inside the template. I changed it from:

<?php cypher_latestposts(); ?>

to

<?php if (function_exists('cypher_latestposts')) cypher_latestposts(); ?>

What this does is, before the function is called its existence will be verified. This will prevent your theme from braking and your pages loading halfway and then displaying errors when the function is called:

  • if you disable the plugin (now you can turn on and off the plugin without the visitors getting page errors)
  • the plugin file is moved, corrupted or deleted

In other words, if something happens to the plugin and you are unaware of the problem, your site will not brake. This of course is bad, but it will not have a negative effect on your site.

My next change was to make the number of posts being displayed flexible. With other plugins and the ability to call the function in any page or post you might want to display different number of posts at different places.

I started by deleting the variable

$max_posts

from the global declaration.

Then I placed that variable in the function declaration.

Old

function cypher_latestposts($before='', $after='<br>')

New

function cypher_latestposts($max_posts, $before='', $after='<br>')

Now when you call your function you can set the number of post to be displayed at the function call location. Like this:

<?php if (function_exists('cypher_latestposts')) cypher_latestposts('10'); ?>

In this example I want 10 posts. You can change this number to anything you want.

Here is an extra. Some of you might want to display your links in a list, others separated by a comma (no idea why), slashes, hyphens or as in the original just with a line breaker. So what you will do is change the function declaration like this:
From

function cypher_latestposts($max_posts, $before='', $after='<br>')

to

function cypher_latestposts($max_posts, $before, $after)

When you call your function just insert what you want to separate the links with. Here are some examples:

<?php if (function_exists('cypher_latestposts')) cypher_latestposts('10','<li>','</li>'); ?>
<?php if (function_exists('cypher_latestposts')) cypher_latestposts('10','+','<br />'); ?>
<?php if (function_exists('cypher_latestposts')) cypher_latestposts('10','','/'); ?>
<?php if (function_exists('cypher_latestposts')) cypher_latestposts('10','==','=='); ?>

Popularity: 77% [?]

Gallery on TFnet - coming soon.

April 8th, 2005

Tfnet’s gallery is around the corner! For a long time now I have been saying that “soon” I will have a gallery on the site with all kinds of pictures. Well, I finally got around installing a gallery on the web site last night. I have used Gallery in the past and I am still using it on the Clan MP web site, but i have also come across many web sites which use Coppermine Gallery. So, instead of going the old fashioned way, I decided to give Coppermine a test. I did that only because it uses an SQL database as part of the gallery’s structure. This is an upcoming feature with version 2 of the Galley. At the moment Galley 2 is in its beta status and from reading on its web site i understand that the beta does not even have all the features, which already existing in Gallery 1, active/working. The above is another reason why I decided to test Coppermine. I wanted to see what it can provide me with, while I am waiting for the final or close to final release of Gallery.

Continue reading »

Popularity: 17% [?]

ClanMP.us source code updated.

January 26th, 2005

Early, early this morning I finished up with the source code update of the clan Menkey Playhouse’s website. I was too tired to make a post about it when I was done and I was busy today, so here it is now.

I finished with the update of my site about the same time yesterday morning is I did with the updated of the clan MP site today. Read more about it here. Up to last night the site was structured just like mine was before, separate files for each page. Each one of which containing a template, which had to be updated every time one of the others was modified. Well, now only one file, an “if else” statement to maintain and some content files.

I will redesign the site right after I am done with the redesign of mine. :)

Popularity: 11% [?]

Website source code updated!

January 25th, 2005

After half a dozen completion attempts and numerous changes to the code I have completed the reconstruction of the website’s pervious multiple page structure to a single page with “if else” statements. This structure is not exactly what I wanted it to be. For one I am not using the SQL database like I had planed before I started. Two I am using a lot more include now, which is opposite of what I wanted to do, if you remember from my post yesterday.
Continue reading »

Popularity: 31% [?]