Alexa's Blog

Reliable $1 Web Hosting by 3iX

Reliable $1 Web Hosting by 3iX

SoMuch.com: Internet Links Directory



ArticleMs Sitemap Generator

May 5th, 2007

Hi guys,

Here is a sitemap generator for the ArticleMs CMS.He generates Google valid sitemaps based on your database structure.The sitemap is generated starting with the category structure, pages then articles.He use your ArticleMs database entries so is pretty fast.I didn´t tested it yet with a big number of categories and articles, because I don´t have them :) , but give´ it a try and let me know how is it working.

Installation in your ArticleMs CMS

This is pretty simple.You just have to copy the file in your ArticleMs root directory, then call from the browser at http://www.yourdomain.com/sitemap_cron.php . One more thing. You must have write permissions on the sitemap.xml file.To accomplish this, create an empty file named sitemap.xml in your ArticleMS root installation folder(if you don´t have one already), then change the access on it to chmod 777.That will make it work.
After the sitemap is generated he can ping Google and let it know that you have some changes in your website.For me works well. You jusy need to call the url by adding the ping=1 parameter in url.Something like this:
www.yourdomain.com/sitemap_cron.php?ping=1

If you wan to make the process in an automatic way, you can set a cron and calling the script with the following command:

curl http://www.yourdomain.com/sitemap_cron.php?ping=1

Set the interval as you like.I think best is once/day.

That´s it.If you have any troubles let´me a comment.You can do it also if you like´it or have any ideas :)

Download the file here

Enjoy!

Php Programming-Free Ft template class

April 26th, 2007

Hi fellows,

Here is a class I wrote some years ago (2003). It´s a PHP template class which allow you to separate the html code from the php one.

Initially was published on the phpclasses.org website, it is still there but because is much easy for me to keep track and help users on my own blog, I decided to make it available here also. Many people have contacted me directly with different questions and this was another reason for which I add the template class here.

Php is one of the scripting languages I liked most and I wrote this class as a replacement for the FastTemplate which I was used for a while in my php projects. As in most of the cases, with one of the projects I noticed a big hit in the performance and because the template engine was the reason I have decided to write my own. The result was 10 times faster on the same data set and I have added support for nested dynamic blocks which didn´t worked well in the original FastTemplate class.

From that time, over 4 years have past and new engines have been created. I think the most used one is Smarty but is one of the engines I never liked.Don´t ask me why :) . So I still use this in all my company projects and in all those years was nothing I can´t do with my FT template class.More than that, the only changes added have been a function which allow you to assign a template from a variable(coming from database in most of the cases) and a small fix that solve some problems on PHP5.
If you need a light(400 lines) php template engine, fast and easy to play with, you are free to download it from the end of this post. If you have any questions, don´t hesitate to ask or express your opinions because I will enjoy by any feedback I get. Nobody asked for a tutorial yet, but if someone needs one, I will write one.

Get ft class and Enjoy!

Your Ad Here