WordPress - StatCounter Plugin April 17, 2006
Posted by Lucanos in : programming, php, wordpress , 31 commentsI developed this (my first WordPress plugin) based extensively on the works of Ronald Heft, Jr. and his terrific WordPress Plugin “Google Analyticator“.
I learnt a fair bit whilst adapting his plugin to the StatCounter tracking system, and I am sure that any further developments on my part will surely incorporate some of teh terrific ideas used by Ronald in his plugin. No point re-inventing the wheel, after all…
Instructions:
- Click HERE for a zipped version of the file.
- Unzip this file and upload the enclosed PHP file into your “wp-content/plugins” folder.
- Go to your Plugin screen in your WordPress admin console.
- Fill out the details, as per the instructions.
- Switch the plugin over to Enabled.
- Watch your StatCounter counters start ticking over.
- Enjoy!
Any suggestions, feedback, ideas, complaints, virgin offerings are more than welcome.
CSS Order Of Precedence April 8, 2006
Posted by Lucanos in : programming, CSS , add a commentJust thought I would share this tidbit, as I was unaware of it, and couldn’t find it when I did a quick search of the net…
When processing CSS rules, it seems that the styles are applied in the following order of precedence:
- Style
- ID
- Class
So any CSS coding applied via the Style attribute will over-write and out-rank any styling applied via the ID. And so forth.
But, this is just the results of my testing. So if anyone knows any better, please do let me know.
TextPattern Hack - Tags in CSS April 7, 2006
Posted by Lucanos in : programming, php, textpattern , add a commentI was recently put onto TextPattern, an Open-Source Content Management System, by one of my workmates. I have been working on a project for my employer, and, as I was already somewhat familiar with this CMS, we developed the internal website using this package.
One of the aspects of the TextPattern CMS which I found lacking, was that the CSS data, stored within the database, was unable to be dynamically changed and interacted with using the TextPattern markup language, plugins and/or PHP, even though that functionality is available within the page content and articles themselves.
As a result I have hacked the css.php file, used by TextPattern to render the CSS information.
Instructions:
- Download this file - css.zip
- Unzip it into the “/textpattern” subdirectory of your TextPattern installation.
(It will need to replace a file called “css.php” in order to work) - Enjoy!
Any problems, let me know.
TextPattern Plugin - les_rss2html
Posted by Lucanos in : programming, php, textpattern , add a commentMy first plugin… {sigh}.
Well, maybe not my first, but the first one I have decided to publicly release.
This one allows for RSS Feeds to be processed and inserted into a webpage, using replacement tags.
It’s actually a ported version of one I found from FeedForAll, who offer a free PHP script called RSS2HTML(download) which does this work. I simply modified it so as to use the TextPattern plugin format - for those people who would prefer to work with it that way…
Here it is. Help is included within the Plugin itself.