Wednesday, August 29

WordPress Plugin: Member Only

To create member only pages, I deployed Chad Butler's WP-Members plugin. The original plugin only support Posts, not Pages. And Chad makes it very complicate. So I modified the program and deleted most of his codes to make it simple. Now the code only has 20 lines, while the original one has 1000 lines.

INSTALLATION PROCEDURE:

* Upload memberonly.php to your plugins directory
* Login to the WP admin
* Go to plugins tab and activate the plugin
* Any post or page whith < !-- more -- > tag will be blocked from anonymous visit.

Download


PS: (Aug 30, 2007)
The WP-Members plugin integrated a sidebar login widget.


But the Sidebar Login Widget from Mike Jolley is better. Basically, I don't like the style of Chad Butler, putting several things in one package.

Labels: , ,

Monday, August 27

Calendar Plugin of WordPress

After deploying Kieran O'Shea's calendar plugin in a WordPress site, I modified the code so that several calendars can be created in one site. To fit the requirement of my site, I setup some calendars can only be accessed by registered user only. Using this new package you can create thousands of calendars open for public, and another thousands of calendars open for registered users only.

Some bug in edit-calendar.php is also corrected.

If you already have original calendar plugin installed, you can update it by manually adding calendar_id INT(11) in WP_CALENDAR_TABLE of WP database using phpMyAdmin, then existed events will be treated as one calendar with Calendar_ID equals to 0(zero), and you can create calendars with other Calendar_IDs.

Download Please check the new version

Aug 27, 2007:
Updated the plugin to 1.2.3 by correcting a bug to show description in IE6.

Aug 10, 2009: I lost this plugin due to disk failure. So if you downloaded it before, please send a copy to me: ben(AT)fadshop.net. I appreciate it.

June 2, 2010: The wheel is re-invented. Visit http://benincampus.blogspot.com/2010/06/multi-calendar-plugin-of-wordpress.html for details.

Labels: ,

Hello

I tried this plugin revisited by you and i found a bug.
When you edit the rewrite.php file by adding the return line, you are not able to write another PAGE, in fact nothing it's written in the mysql table.
So when you want to view the page created, wordpress doesnt manage to find it.
 
Thanks for your reply. I agree that it is more cautious to use another approach( comment $wp_rewrite->flush_rules() in posts.php.)
I deleted that return part from README and uploaded using the same version number.

Please let me know how you think of it.
 
Hi Ben, I would like to know if you still have the modification of Kieran plugin available for download.

Greatly appreciated, thanks a lot!
 
I tried this plugin, but I can't find a way to display multiple calendars on one site, only categories in the same calendar.
How do I create a 2nd seperate calendar?
 
Never mind, found it in the readme.
Working perfect now. Thank you.
 

A simple HTML menu

In the blog Quirks Mode of Browsers I mentioned a " a pure CSS menu ". I figured out how to make it look the same in Firefox and IE7. But one week later I found it doesn't work in IE6, because IE6 doesn't support li:hover property.

The solution is to add javascript to modify the class from li to li:hover when the mouse is over:

< ul>
< li onmouseover="this.className+=' over';" onmouseout="this.className=this.className.replace(' over', '');">< a href="#" >File< /a>
< ul >

< li>< a href="#" >New< /a>< /li>
< li>< a href="#" >Open< /a>< /li>
< li>< a href="#">Close< /a>< /li>
< li>< a href="#">Save< /a>< /li>
< li>< a href="#">Save As< /a>< /li>
< li>< a href="#">Exit< /a>< /li>

< /ul>
< /li>
< li onmouseover="this.className+=' over';" onmouseout="this.className=this.className.replace(' over', '');">< a href="#">Edit< /a>
< ul>
< li>< a href="#">Undo< /a>< /li>
< li>< a href="#">Redo< /a>< /li>
....




then it works in all browsers.

Labels: ,

Wednesday, August 1

Tap Water

According to CTV, all these bottle waters are from tap water:


Coca-Cola's Dasani

Pepsi's Aquafina

Danone's Evian

Nestle's Poland Spring and Pure Life