Archive for January, 2004

1/31/2004 ↓

Comprehensive guide to .htaccess 1comment

Author: Mark Ghosh Category: General

Thanks for visiting! We would like to serve you better. Please subscribe to our RSS feed for daily updates. This blog posts regular Wordpress news, updates of themes, plugins, ideas, hacks, quick fixes and everything about blogging, especially about Wordpress. You can also receive updates from this blog via email if you want that method of notification.

This is a very interesting and useful wesbite from ScrtiptyGoddess It talks about the benefits, drawbacks and the tweaks of .htaccess This is a tool which MUST belong in the quiver of an educated and accomplished blogger! Here is the link to the wonderful article.

Tags:

1/28/2004 ↓

BreadCrumbs hack for WordPress 1.01 2comments

Author: Mark Ghosh Category: WordPress Hack

Much like my breadcrumbs hack for WordPress which used cookies and text files to keep track os users while and after they were visiting your site, here is the Breadcrumbs for WordPress 1.01 hack. Very user friendly and nice. You can see it on Mindful Musings (with some extra modifications).

Tags:

Fixed width and centered WordPress 1.0+ Template 2comments

Here is a new template which is of fixed width and centered, but still retains the original design and colors of WordPress. Here is the an example of the template in action and here is the link to the new template CSS.

Tags:

1/27/2004 ↓

Wonderful tutorial on migrating from b2 to WordPress 1comment

Author: Mark Ghosh Category: General

This tutorial explains the nuances of migrating from b2 or Cafelog to WordPress. Here is the link to the tutorial. It is very well done!
The only question I have for him is….and you blog is in MT???

Tags:

WordPress 1.0.1 Changelog 3comments

Author: Mark Ghosh Category: General

This information can be found in the WordPress Wiki but some people might find it useful to help them make up their mind about upgrades (or migrations)

WordPress 1.0.1 Changelog:
* Several improvements related to the handling of international characters.
* “Future” blog posts should show up in the admin interface
* b2 import
* blogger import
* Calendar day titles are only showing the last post, not all posts separated.
* Calendar links to posts in the future
* Change installed check to use a different table than options, probably categories
* Check all importers
* Comment Moderation setting values
* comment out sending the unmodified header in rss/rdf feeds
* comment_tags_allowed bug
* Dublin Core in RSS feeds
* edit-showposts.php?
* Fix links-update-xml.php
* get_links_list should put descriptions in title attribute
* greymatter import
* fixed import-b2.php errors
* Make sure the bookmarklet works in Safari
* Modify upgrade.php to work from b2
* Month not showing up?
* Multi-word search strings cause errors
* Next/Previous Page links didn’t work w/ nice URLs
* Permalink bug w/ hyphens?
* Permanent redirects in RSS/RDF files should include QUERY_STRING
* previous_posts_link() and next_posts_link() are encoding already encoded chars
* Question marks and equal signs being stripped from comment_author_url
* Remove duplicate indicies, prevent future duplication
* Smilies replacement in comments rss is breaking the feed
* Support for double digit years/months
* textpattern
* Unescaped ampersand in template-functions.php
* Weird bug w/ posts paged and search
* wp-atom feed isn’t valid
* added id and classes to menu items for easier styling

Tags:

1/26/2004 ↓

Ping Yahoo RSS from WordPress and Moveable Type 5comments

Author: Mark Ghosh Category: General

Jeremy pointed out a method to ping Yahoo RSS crawler for Moveable Type blogs and he did a great job explaining it with pictures. So if you are using MT, check out his entry. I consequently wrote a little pinger for WordPress which does the same thing.

Add this function to your my-hacks.php:
// pings Yahoo.com RSS Crawler
function pingYahoo($blog_ID = 1) {
// original function by Dries Buytaert for Drupal
global $blogname,$siteurl,$blogfilename;
if ((!(($blogname==”my weblog”) && ($siteurl==”http://example.com”) && ($blogfilename==”wp.php”))) && (!preg_match(”/localhost\//”,$siteurl))) {
$client = new xmlrpc_client(”/RPC2″, “api.my.yahoo.com”, 80);
$message = new xmlrpcmsg(”weblogUpdates.ping”, array(new xmlrpcval($blogname), new xmlrpcval($siteurl.”/”.$blogfilename)));
$result = $client->send($message);
if (!$result || $result->faultCode()) {
return false;
}
return true;
} else {
return false;
}
}

Find these lines in your post.php (inside wp-admin folder) :
pingWeblogs($blog_ID);
pingBlogs($blog_ID);

And add this right after that:
pingYahoo($blog_ID);

All done and pingin!

Tags:

1/25/2004 ↓

WordPress CSS Styles Competition 0comments

To help grow the number of skins for the default WP template, I’m sponsoring a CSS Style Competition!

Get those creative juices flowing and send in your contributions. I can’t wait to see what you all come up with.

I highly encourage you all to blog about this (use the link above) to help get the word out. Thanks!

- From the WordPress Forums

Tags:

New WordPress Styles and built in Style Switcher hack 1comment

Alex King has done it again! He provides a hack for WordPress to build a really simple style switcher and includes four (?) different styles in the download. I personally really like his Golf Style. Test it out here and download it from here.
While you are visiting his site, check out the other hacks that he has worked on and thank him if you use his work. I use a bunch of them on this site and well as my main blog. Thanks a bunch Alex.

Tags:

WordPress Blacklist Comment SPAM Filteration System 11comments

Author: Mark Ghosh Category: WordPress Hack

I wrote a little script to fight comment SPAM much along the lines of Jay Allen’s MTBlacklist filter (but for WordPress). This really simple script is compatible with all versions of WordPress and uses a powerful master blacklist from Reflective Reality. I would really like to get some people to try and install it and see how well it works. So if you are using WordPress and have been receiving some SPAM in your comments, please help me in testing this script. WordPress 1.0+ will even allow you to view the SPAM comments without them ever being displayed on your blog (using moderation) which would mean that if you do receive SPAM and the filter catches it, you will know that the script is working. Here is a link to WPBlacklist.

Tags:

1/23/2004 ↓

Mozilla right click “Blog This!” contextual menu plug in for WordPress 0comments

Author: Mark Ghosh Category: WordPress Hack

I really wanted to see what was inside those .xpi files that I install as plugins for Mozilla and I hacked the Blog This plugin from Phil Ringnalda to be compatible with WordPress. The installation can be a little confusing, but it sure is worth it for me. I might write a php packaging script for WP if I get bored (much like YABBOB). In the meantime, enjoy the Blog This for Mozilla hack.

PS: Rightful credit goes to Ted Mielczarek for the original code and idea. Thank you!

Tags:

LiveJournal autoupdate script for WordPress (all versions) 31comments

Author: Mark Ghosh Category: WordPress Hack

[EDIT] In its present incarnation, it WILL NOT work with Wordpress 1.5

This script allows every post that you publish on your WordPress blog to also be reflected (or added) to your LiveJournal blog automatically. This script only emulates publishing to your LJ blog, you cannot edit LiveJournal entries once they are published (through the WP admin page). If there is enough interest, I could come up with edit functionality as well as others such as moods and music. Here is a link to the hack instructions.
The items sent to LiveJournal are your post title, your post content and the date and time of your post. Enjoy.
Please post bugs to http://weblogtoolscollection.com/

Tags:

1/21/2004 ↓

SprintPCS Moblog hack for WordPress 1.0 and above 19comments

Author: Mark Ghosh Category: General

Here is the link to the moblog script.

1) Upload this file to the root of your blog (rename it to sprint.php) and put in the username and password of your blog in the required places within sprint.php.

2) Setup your email blogging parameters within WordPress. Your security is going to be the email address that your blog is supposed to check, so make it complicated (or something)

3) Send your blog an email (to the email address you specified above). Go to your blog URL and add the sprint.php at the end (on a browser) to test how well the works. e.g. http://www.yourwebserver.com/wordpressdirectory/sprint.php
This should give you a very good understanding of what happens. If things work, you should see an entry in your blog with just that picture.

4) Now to make this automated, add a cron script to your webserver so this file gets run every so often (I have mine running twice every hour) The script is designed to check one email and then sleep until it is run again. It will delete the email of which it has made a successful post, so if you send many pictures to your phone at once, it will deal with them one at a time until all are done.

5) From your sprint phone: Take a picture, make a phonebook entry with your blog’s email address and “share” the picture with that entry in the phonebook. Do not add any message or any “voice attachment”. Do not send more than one picture per email. Test it out and see what works for you. Sprint does change the format of this email all the time, but I need to keep my own moblog working, so if things quit working, check my blog for updates.

Questions, comments, please email me.

*An Addition from Chris Chiles*
I modified some of your code to get the message and use it as the post title:
$ttl = explode(”<br />”, $content);
$fline = $ttl[0];
$sline = $ttl[2];
$sline = explode(”", $sline);
$post_title = trim($sline[0]);

Thanks Chris!

Tags:

WordPress 1.0+ “blog with right click in IE” fix 2comments

Author: Mark Ghosh Category: General

Here is a small temporary fix as emulated from the Nucleus site (one of their answers is flawed and their own code has bugs, oh well)

Create a new file on the root of your blog called rightclick.php and put the following in there (replace open(’http://… with your own servername):

<script type=”text/javascript” defer=”defer”>
doc=external.menuArguments.document;
lt=escape(doc.selection.createRange().text);
loglink=escape(external.menuArguments.location.href);
loglinktitle=escape(document.title);
open(’http://yourserver.com/yourweblogdirectory/wp-admin/bookmarklet.php?text=’+lt+
‘&trackback=1&pingback=1&popupurl=’+loglink+’&popuptitle=’+loglinktitle,’bookmarklet’,’
scrollbars=no,width=480,height=590,left=100,top=150,status=yes’)
</script>

Now create another file on your desktop called wordpress.reg and put the following in there (again replace the varibles please):

REGEDIT4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Post To &WP : Mindful Musings]
@=”http://yourserver.com/yourwordpressdirectory/rightclick.php”
“contexts”=hex:31″

Now double click on the wordpress.reg file to add the information to the registry and the right click in IE should work at that point.

Tags:

1/19/2004 ↓

Validate email regular expression bug in WordPress and other CMSs 4comments

Author: Mark Ghosh Category: Code

a ‘+’ symbol is a valid part of an email username, and can be used in debugging and SPAM control. I use username+websitepostedon@server.com (the real address being username@server.com) when I post my email on a site where it could get displayed for spam harvesters.

However, most CMSs use this regular expression in their email address checking algorithms.

"/^([a-z0-9_]|\-|\.)+@(([a-z0-9_]|\-)+\.)+[a-z]{2,4}\$/i"

Please replace that line with this so the plus sign gets recognized. That is a much better practice. Thank you!

"/^([a-z0-9_+]|\-|\.)+@(([a-z0-9_]|\-)+\.)+[a-z]{2,4}\$/i"

Another option from Phil :

I’ve always used these two in conjunction. The first one we don’t want, and the second one we do want.
(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)
^.+\@(\[?)[-a-zA-Z0-9\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$

Tags:

Web Design Tutorials 2comments

Author: Mark Ghosh Category: Weblog Add-Ons

While browsing through the WordPress forums, I came across a very nice site suggested by notthatugly (I dont know if notthatugly is the owner or not) but it deserves a mention on here. Web Design Tutorials has well written, lucid, versatile tutorials covering a variety of subjects, including

HTML
CSS
JavaScript
PHP
Photoshop
Illustrator
ImageReady
Paint Shop Pro
Flash
Miscellaneous

And has a download section which includes

Fonts
Scans
Templates: Buttons & Avatars
Patterns
Layouts

Most of the stuff on there is very high class and is centered around code (which makes it a source for blog-friendly web design help) Thank them profusely if you use anything from on there.

Tags:

Top 10 Posts hack for WordPress 9comments

Author: Mark Ghosh Category: WordPress Hack

I really liked the “Top 10 Posts” on Jeremy Zawodny’s Blog and wanted it for mine as well. So I wrote a small hack which keeps track of the number of times a particular post is clicked on (using the database) and then makes a list of these posts with the number of clickthroughs. You can see it in work on the sidebar. Here is a link to the hack instructions. This is WordPress 0.72 and 1.0+ compatible.

Tags:

1/18/2004 ↓

” Who is Online ” hack for WordPress and other PHP based sites 4comments

Author: Mark Ghosh Category: WordPress Hack

I was looking for a nice way to show how many people are looking at my site at a given time and I found a couple of different solutions, the easiest of which was not going to work in my case (because of caching and php accelerator). So I wrote a little hack for WordPress and other php based sites (using MySql) to tell “Who is Online right now?” Download the hack instructions here.

Tags:

1/15/2004 ↓

WordPress 1.01 Release Candidate 1comment

WordPress 1.01 Release Candidate is out. Get it here. It incorporates a lot of bugfixes and it addresses a lot of the installation and upgrade issues brought up in the last couple of weeks (since release of 1.0) Any help in testing this release candidate will be greatly appreciated.

Tags:

WordPress hacks from Alex King updated for 1.0 0comments

Author: Mark Ghosh Category: WordPress Hack

Most of the WordPress hacks that Alex had written have been upgraded by him to support WordPress 1.0 Platinum (and later releases). These include:

WordPress Mobile Edition - A PDA friendly interface for your blog. It’s (almost) XHTML compliant.
Since Last Visit - Shows the number of new posts and comments (including indicators showing what posts and comments are new) since a visitor last came to your blog.
WP Photos - This hack automates including photos with your blog posts.
WP Group - This hack is lets you group a selection of posts on a single page. This hack is compatible with WordPress .72 as well.

Send him a thank you if you use his work.

Tags:

1/14/2004 ↓

Photo Log Hack for WordPress 1comment

Author: Mark Ghosh Category: WordPress Hack

Matt (another Matt) has created a Photolog Hack for WordPress That gives MT another run for its’ money!

Tags:

Friends

Translate

Translate to German Translate to Spanish Translate to French Translate to Italian Translate to Portuguese Translate to Japanese Translate to Korean Translate to Russian Translate to Chinese

Latest Videos

S2