AlanBarber.Org

Twitter Twitter Updates

Rocking out in cubicle land... http://t.co/trOKKOy5
Thu May 17, 2012 12:34 PM
New project to play with for the day. Writing a VS2010 plugin that runs on every build... this should be fun!
Thu May 17, 2012 11:48 AM
Today is *facepalm* day... Dev DB was rolled back without telling any developers. ugg!
Thu May 17, 2012 9:13 AM
Started watching Breaking Bad the other day. Little slow at first but it gets really good. Bryan Cranston turns into one serious badass :)
Wed May 16, 2012 8:52 PM

Follow me on TwitterTwitter

§ Blogging

Friday, October 08, 2004

ExpressionEngine modules I’m working on

This is really for my own use more than anything for the public… sorry smile

1) File Manager - A basic web based file manager that includes all your usual file and directory tools.  create, edit (text files like html, php, xml, css, etc), rename, delete, copy, move, upload, etc.

2) Page Counter - website stats system to track page hits on comments, monthly, daily, archives, etc.

3) Download Manager - provide functionality similar to places like fileplanet.  setup controlable downloads with restrictions based on members, number of concurent users, etc.

4) Live Chat / IM - some sort of live or semi-live text chat system to integrate into EE user system.  Not sure on this one.  Might require some java applet work????

5) ...

That’s what I have in the queue for right now.  The file manager is about 50% finished right now.  I hope to get my first beta out by end of next week.  That’s if everything goes good.

Posted by AlanBarber on 10/08/2004 at 09:48 AM
Bookmark and Share BloggingExpressionEngine • (1) CommentsPermalink

Friday, September 24, 2004

A new weblog worth reading for any techie

You might notice I’ve done a bit of organizing on the Weblog links on the right side of the main page.  Just thought I’d help people out by separating them into their general themes.  The weblogs listed are ones that i do visit regularly and it’s an evolving list.  I add and remove based on what I’m reading.  Since I’m a rather selective reader you can be assured these are worth visiting so please take a moment and check them out.

And now onto the reason for today’s post.  I added a new weblog to the technology sub-list.  Technically, the blog is called Bnoopy but the man behind the blog is Joe Kraus.  Joe Kraus was one of the founders of Excite.  Excite back in the day was a major player in the web.  They started first as a search engine but during the dot-com boom became a large portal site.  It’s had a rather rocky history and has been bought and sold a few times I believe and is currently property of Ask Jeeves.

Kraus is working on a new project and has started his blog to share the experiences of starting a new company.  This is a blog worth keeping on your must read lists folks.  Hopefully, Kraus will update the blog often with lots of really great info on his new startup.  It’ll be very neat to be able to follow the progress he makes and get a few insider stories about what it was like to startup Excite back in the day.  So please check out Bnoopy.

Posted by AlanBarber on 09/24/2004 at 07:15 AM
Bookmark and Share Computers & TechnologyBlogging • (0) CommentsPermalink

Tuesday, September 21, 2004

How to make an ExpressionEngine test site

How to make an ExpressionEngine test site for module and plugin testing

If you currently are or planning to do module and/or plugin development work for ExpressionEngine you really should have a dedicated private test installation of EE that you can work with.  While you could use your public installation it’s not a good idea.  Do you really want to have your public blog throwing out errors or completely being wiped out because of a bug in the module or plugin you were working on? 

This tutorial will walk you through step by step on how to setup a test installation.  The ultimate goal being that once you follow these steps you’ll have a clean install of EE that you can test your modules or plugins with.  The benefit of following this guide is that at any time you can do a complete rollback to the fresh installation in just seconds.  Should you accidentally blow up your database or mangle the configuration all you’ll have to do is run a simple command line script and bingo it’s just like new again!

A few things to point out before we begin.  First off, this should work fine for any *nix OS but I am using FreeBSD for my server.  Second, you will need command line access to your server. IE you’ll need to use telnet, ssh, or be working locally.  Third, this does need to be a clean, private install.  The install you do should be completely separate from anything else including the use of MySQL databases and server directories.  Fourth, I’m using my real world setup as the example in the tutorial just to help make it clearer.  You should change the names and directories where appropriate to match your setup.

Step 1: Installing EE
There really is no need to explain this.  Just do a normal fresh install of EE.  Create a new database and use a new directory structure separate from anything else.  I created a new MySQL database and user account called “ee_test_site”.  I installed EE in a separate folder “/home/abarber/public_html/ee_test_site” too.  Just copy the EE image, system and user_guide folders into this new folder.  IE “home/abarber/public_html/ee_test_site/images”.

Step 2: Configure and Setup the EE test site
Just go through and setup the test site.  Set all the admin configurations, build the templates, create a few sample members, create a few sample entries, etc.  Basically, you want to have the site setup just how you want it to look and act every time you do a rollback. 

This is the most crucial step!  You need to have everything exactly as you want it.  We’ll be making a backup of the entire installation and the rollback will totally wipe out everything and reset it to how it is from the backup. 

If for example you forget to set template cacheing on but really do want it on.  Every time you do a rollback you’ll have to go in and turn on template cacheing because the backup had it off!

So take a few extra minutes to thoroughly check every single thing.  Yes even the directory contents.  If there are files you do or do not want in the backup manage them now.  It’ll make life much easier later.

Step 3: Create backup directory
Someplace you should make a directory to hold and run the rollback from.  I prefer to make a folder called “rollback” in my home directory.  “/home/abarber/rollback”

Step 4: Make the MySQL backup
We’re going to use mysqldump program to create the backup.

At the command prompt type:
mysqldump -u ee_test_site -p[enter password]—add-drop-table—databases ee_test_site > /home/abarber/rollback/ee_test_site.sql

Step 5: Make the EE installation backup
We’re just going to make a simple tar gziped file with the contents of the website folder.  That means the actual EE files, images, etc.  Remember what I said above?  This is your last chance to make any changes to the files in the backup!

At the command prompt type:
tar cvzf /home/abarber/ rollback/ee_test_site.tar.gz /home/abarber/ public_html/ee_test_site

Step 6: Create the rollback script
I call it rollback.sh and place it in the “/home/abarber/backups/rollback” directory.

—copy below—
#/usr/bin/sh
echo Rolling back EE Test Site blog…

echo Reloading database defaults into MySQL…
mysqladmin -u ee_test_site -p[enter password] -f drop ee_test_site
mysql -u ee_test_site -p[enter password]

< /home/abarber/rollback_data/ee_test_site.sql

echo Reloading EE installation…
rm -rf /usr/home/abarber/public_html/ee_test_site
cd /
tar xfz /home/abarber/rollback/ee_test_site.tar.gz

echo Resetting file and folder permissions…
chmod 777 /home/abarber/public_html/ee_test_site/images/captchas
chmod 777 /home/abarber/public_html/ee_test_site/images/uploads
chmod 777 /home/abarber/public_html/ee_test_site/system/cache
chmod 666 /home/abarber/public_html/ee_test_site/system/config.php
chmod 666 /home/abarber/public_html/ee_test_site/system/config_bak.php
chmod 666 /home/abarber/public_html/ee_test_site/path.php

echo Rollback finished!
echo
-- copy above --

Note - Remember to chmod the "rollback.sh" script to give it execution permission.

Step 7: Test the rollback script
Make a few changes in the control panel such as delete a few entries or delete a template or change a category name.

Now go to the rollback directory and type “./rollback.sh” at the prompt.  Check the control panel again.  The missing entries and changed categories should be back.  If not we have a problem and need to figure out what we did wrong.

Now lets try something a bit more crazy.  Just go in and start randomly deleting files until the website no longer works.  Oh no!  The site is ruined.  Wait lets use the mighty rollback again!  Sit back and watch in amazement as the backups are reloaded and your site is saved.

So what’s the point of all this you might ask?  Software development is a science.  When you’re working on a module or plugin it’s nice to always have a fresh clean install to do your tests.  That way whenever you make changes to your software you can rollback the system and have identical test parameters. This helps to keep bugs from cropping up that are not a result of your software but the test environment being changed from a previous test.

This you may realize comes in very handy for module development since modules make changes to several database tables and probably create their own.  That way you don’t get errors or bugs showing up because you have already installed 3-4 different versions of the module before.  When you’re working on that module you know you have a fresh clean install every time you start testing it.  It’ll make it just that much easier to debug!

I hope people find this useful.  I’ll admit it’s probably not the clearest written tutorial but you should get the idea of how to set this up.  I’m using it and it works great.  I can screw around with the test site to my hearts content then just run the rollback script and it’s back to normal in 30 seconds.

Posted by AlanBarber on 09/21/2004 at 07:30 AM
Bookmark and Share BloggingExpressionEngine • (0) CommentsPermalink

Monday, September 13, 2004

Everything you wanted to know about blogging but were afraid to ask

This is a great little post I found just surfing from blog to blog.  Honestly, I’m not sure how I even ended up there!

I give you “Everything you wanted to know about blogging but were afraid to ask” at Simon World.

Here are my five favorite points from the list: (original quotes are in bold.  My response is in plain)
* If you think this blogging caper is a path to fame and fortune, give up now.
That’s the truth!  I’ve been doing this for over a year now and I’m still just as unknown and poor as when I started.  I have been lucky enough to have free hosting thanks to a good friend and even gtt a free license to Expression Engine.  Still I’ve paid plenty in for domain fees and hosting in the past.  Lets be honest here, the Google Ads, while great, aren’t going to let me retire anytime soon.

* It’s not fair. It never was and never will be. Deal with it.
This reminded me of how many bloggers start complaining when they start getting a lot of attention.  I’ve seen many a blog shut off comments or even kill the entire blog as soon as they get any negative attention.  If you don’t have the cajonies to take a little negative criticism then don’t start a blog people.  Not everyone is going to love you and what you believe in.  They even might tease and harass you but don’t go run and hide.  Stick it out.  You might have a bad week but remember we live in Internet time now.  You’re fame will pass just as fast as the star wars kid or that girl in the apple switch ads.  Don’t threaten lawsuits and other crap.  Just ride it out and you’ll end up fine in the end.

* Learn to spell or how to use a spell-checker.
It amazes me how many blogs I go to that have horrible spelling mistakes.  Let me put out a word of advice from a fellow blogger folks.  Write your posts in your favorite office application, be it Word, Open Office, StarOffice, etc.  They all have spell checkers!

* Forget what your schoolteachers told you. Form matters more than substance. If your blog is a hideous pink colour the best content in the world won’t get people coming back. Invest effort in your design, or get a pro to do it for you. People respond a lot better to good designs. The key is simple: if you think you right good stuff, keep the design simple. If you write cr@p, then use as many distractions as you can.
I’ve ranted about this before.  I can’t stand how many “blogs” I go to that have the more disgusting layouts and schemes in the world.  Let me give you another hint folks.  8 point purple text on a black background is not easy to read!  Take a second and open your favorite book or magazine.  Notice something?  See that black text on white pages?  They don’t do that because they’re not “hip” or “in style” people!  They do it because it’s easy on the eyes to read.  Try it!  You might just find people visit your site more when you don’t make their eyes bleed.

* There is no greater diversion than your own blog. You will spend hours getting the coding right, the format right, the content right, fixing links, trying to get readers, reading other blogs. You don’t get paid for it. In fact blogging is the one game where the more successful you are the more it costs you (e.g. in bandwidth charges). It really is a sucker’s game.
Heh… boy isn’t that the truth!  I wish I would keep track of how much time I spend tweaking and playing with my site.  I’ve probably wasted hundreds of hours.  I should know better but hey, long as it’s fun I’ll keep slogging at it.

Now go read the rest of the list.

Posted by AlanBarber on 09/13/2004 at 05:45 PM
Bookmark and Share Blogging • (1) CommentsPermalink

Monday, August 23, 2004

A Quick CSS Tip

Here’s something I just learned today…

When coding CSS for the pseudo-classes of the < a > tag, the states should always be coded in this specific order:

a:link
a:visited
a:focus
a:hover
a:active

If you don’t do it in this order it can cause issues with links in most browsers.  Including improper rendering or even failure to follow the CSS display settings for links.

I actually didn’t know it mattered.  However I know it does now.  The order of the link tags was wrong in the CSS for this site and I have had issues with link rendering.  Some links would not change colors when I would hover over them.  I had written it off as a stupid browser issue.  However, Sure enough soon as I changed the order in my CSS all the link problems went away.

A quick note that most of the included themes with ExpressionEngine do have improper ordering so all you EE users out there should go in and correct this.

But keep that in mind for all your web designers too.  Just a nice little tip to remember.

Posted by AlanBarber on 08/23/2004 at 10:09 PM
Bookmark and Share Computers & TechnologyTips & TricksBloggingExpressionEngine • (2) CommentsPermalink

Thursday, August 12, 2004

ExpressionEngine Version 1.1 Feature List

ExpressionEngine Version 1.1 is currently in beta testing right now.  Assuming test goes well this new version could be out as soon as next week.

There are over 50 new features and enhancements being released.  Below is the complete list which can also be found at http://www.pmachine.com/forum/threads.php?id=20023_0_13_0_C.

quote:


VERSION 1.1 NEW FEATURES

TEMPLATE FEATURES
- You can show/hide template groups for better organization.
- You can now adjust all of the preferences for all templates at once.
- Template Groups can now be cloned.
- Templates can now be saved as text files.  This allows programs like
  Dreamweaver to be used to upload changes via FTP rather than
  submitting the changes via the control panel.
  - Plugins can now be embedded inside other plugins.
  - EE tag variables can now be used as parameters in enclosed EE tags:
  {exp:weblog:entries}
  {exp:gravatar email=”{email}”}<img src=”{plugin_url}” />{/exp:gravatar}
  {/exp:weblog:entries}
- Custom 404 page. In the global template preferences page you can now
  specify a template to be served when someone tries to access an invalid URL.
- “On the fly” Variables. You can define global variables in each template
  using the {assign_variable} tag. These variables can be used to create
  generic templates that can be easily switched for each weblog.
- Added Template Export Feature.  You can now export entire template groups
  or combinations of templates.  NOTE:  The zip-encoded
  files generated by the export utility are not compatible with all
  zip decompression programs.  We’re trying to get to
  the bottom of this. In the mean time this feature is experimental.
- Templates can now be deleted by anyone with template editing
  privileges
- Template revision history is now viewable by anyone who has template
  editing privilege.

CATEGORY FEATURES
- Redesigned the Category Manager in the control panel.  You can now set
  your own custom order for categories.
- Added category description field in the control panel category
  manager.  This field is available in the following tags:
  {exp:weblog:category_heading}, {exp:weblog:categories},
  {exp:weblog:category_archives}.  Please consult user guide for more
  info.
- You can choose to display or not display categories that don’t contain data.
  This is done using the follwing parameter: show_empty=“yes” (or “no”)
  in these tags: {exp:weblog:categories} and {exp:weblog:category_archives}

PUBLISH PAGE FEATURES
- Added the capability to customize the layout of the control panel PUBLISH page.
  You can show/hide every element on the page now.
- Image thumb-nailing improvements:  The upload utility will now create
  a link to the full-size image.
- Added a DHTML Calendar in the PUBLISH page to make setting dates/times
  easier.
- Added “select all” button for ping servers (in publish page).
- Changed the logic so that the “ping server” checkboxes in the publish
  page will only be selected for new entries, not when editing existing
  entries.
- Replaced code in the Email button (PUBLISH page) with the encoded
  version {encode=“you@yoursite.com” title=“click me”}
- Added new global weblog preference:  Clear all caches when submitting
  new entries.

EDIT PAGE FEATURES
- Added search feature to control panel EDIT page.
- Added “per page” selection in EDIT page, allowing you to specify the
  number of results on a page

CONTROL PANEL HOME PAGE FEATURES
- Changed the behavior of the “recent entries” and “recent comment” table
  in the control panel home page. Based on the member group preferences
  of the particular member viewing the control panel, the list will either
  show only their own entries and comments of those of members as well.

WEBLOG MANAGEMENT FEATURES
- Added the ability to create new templates when creating a new weblog.

MEMBER PROFILE FEATURES
- Added a “subscription manager” in the member profile area, allowing
  you to manage any comments you are subscribed to.
- Added a “view all posts by this member” option in the public member
  profile page.
- Added a new tag: {exp:member:custom_profile_data}.  This tag allows
  custom profile information to be shown in any template. Please consult
  manual for more info. 

MEMBERSHIP FEATURES
- Added the ability to add a member login form in any template.
  Please consult manual for syntax.

SEARCH FEATURES
- Added {full_text} variable in the search results tag, allowing the
  complete result to be shown rather than only an excerpt.

WEBLOG FEATURES
- Added a new variable in the main weblog tag:  {member_search_path}.
  This variable creates a link that lets you search for all posts by a
  given member. Look in the parameters page of the manual for more info.
- Added {if no_results}{/if} variables in the {exp:weblog:entries} tag.
  This conditional variable lets you specify a message to be shown if
  the tag doesn’t return any data.
- Added a new parameter that allows entries posted in the future to show
  up: show_future_entries=“yes”  It is available in these tags:
  {exp:weblog:entries}, {exp:weblog:category_archive},
  {exp:weblog:next_entry}, and {exp:weblog:previous_entry}
- Added three new paths in the weblog preferences page.  These permit
  you to fine-tune where you would like search results, pings, and
  trackbacks pointed to.
- URL segments can now be used in conditional statements:
  {if segment_3 == “charlie”} {/if}
- Added “start_on” and “stop_before” variables in the
  {exp:weblog:entries} tag, allowing the weblog display to be limited by
  a date range.
- Added three new variables in the {exp:weblog:entries} tag, which
  permit you to build links to your comment pages.
  {comment_page_auto_path}
  {comment_url_title_auto_path}
  {comment_entry_id_auto_path}

COMMENTING FEATURES
- Added comment expiration feature.  You can define a master value in
  the Weblog Preferences page, or individual values when posting new
  entries. Comments will be closed when the date is met.
- Added {if no_results}{/if} variables in the {exp:comment:entries} tag.
  This conditional variable lets you specify a message to be shown if
  the tag doesn’t return any data.

SPAM PROTECTION FEATURES
- Added a new option that requires a valid IP addresses and User Agent
  when posting comments for better spam protection (Weblog Preferences
  page).
- Added an optional “rank denial” feature, providing another spam
  protection feature. This feature will prepend all links in comments
  so they point to an intermediary redirect server. (Admin > Session and
  Security page)
- Added “referrer throttling” feature, which will not allow the referrer
  page to accept more than 10 referrers a minute for any given IP address.

LOCALIZATION FEATURES
- Added a new preference (in My Account > Administrative Options) that
  allows the localization settings of any given member to be used as the
  site default for non-logged-in members.

MISCELLANEOUS NEW FEATURES
- Added a new option in the captcha prefs page:  Require Captcha with
  logged-in members
- Added several new CSS stylesheets that were contributed by our users.
- Changed the links in the {exp:weblog:category_archives} tag to utilize
  the url_title instead of the entry_id number.
- Made some CSS changes for better compatibility with Firefox 0.9 and
  Internet Explorer 5.5 Win.

NEW BLACKLIST MODULE
- New module based off of Referrer Blacklist.  Now used by Referrer Module
  and Trackback Module for blocking spam
- When updating the Blacklist, all new additions to the Blacklist will be
  used to delete any Trackbacks or Referrers matching the additions.
- Message explaining need for license number for pMachine Blacklist download
  if license number is not filled in

REFERRER MODULE
- Blacklist is its own module now
- Under View Referrers, you can select individual referrers to delete.
- When deleting individual referrers you have the option of adding their URL,
  IP Address, and User Agent to the blacklist automatically AND delete other
  referrers with similar values.

TRACKBACK MODULE
-  Now uses Blacklist Module to block incoming trackback spam.
- Sends trackbacks with pMCode rendered
- “Admin Notification of Trackbacks” email message template now allows three
  new variables: {trackback_ip}, IP of incoming trackback {delete_link},
  direct link for deleting trackback, {trackback_content}, the excerpt of
  the incoming trackback
- “Admin Notification of Trackbacks” email title template now allows all
  variables that email message template allows: {entry_title}, {comment_url},
  {sending_weblog_name}, {sending_entry_title}, {sending_weblog_url},
  {trackback_ip}, {delete_link}, {trackback_content}
- Word wrapping disabled for admin notification emails
- Bug fixed where {exp:trackbacks:entries} tag would not accept url_titles
  only entry_ids
- If trackbacks for an entry exist and yet trackbacks are not allowed
  (turned off at some point), trackbacks are still shown by
  {exp:trackbacks:entries} tag.

MOBLOG MODULE
- Older Windows server friendly.
- More compatibility with various phones and email clients
- Allows breaking up of email body content for various fields using
  {field:field_name format=“none”}Email content goes in here{/field:field_name}
  in the email.  Can also use greater than or lesser than:
 

.
- {entry_title}Moblog Email’s Title{/entry_title} or
 

Moblog Email’s Title

can be used in the email to specify
  the new entry’s title for the moblog.
- Fixed problem where Locked files were left on email server
- Email text is now corrected for email with format=flowed enabled
- Improved error messages
- Fixed a bug where the {exp:moblog:check} tag only checked one moblog at a time.
- Checking moblog is more efficient and uses up less PHP memory.



There are a lot of new features but more importantly many fixes to way things work.  Not to say EE was built wrong but many things didn’t work that should have.  Things like not being able to use many of the tag variables in the conditionals was very annoying.  You would instead have to use convoluted php code instead making things hard to work with.

Another great new feature that I’m glad to see is the comment expiration.  I was a big pusher for this feature when I first switched to EE.  I’m not to sure how they exactly have this feature set up but I hope they do let you set a day limit.  So you can for example have comments closed after 30 days.  It’s a great way to cut back on the comment spam since you don’t have to worry about having hundreds of open entries for spammers to attack.  Plus it’s just handy to keep people from posting to really old entries.  Although, a funny thing to point out.  I did make a big deal for this feature when I first switched becuase comment spam was so bad on my old MT blog.  However, since switching I’ve had almost no comment spam.  I think I’ve had maybe 3-4 obvious spam messages since I switched.  I really do think the spammers use automated bots that search out for the mt-comments.cgi scripts so my EE based blog flys under their radar.  *knock on wood*

Finally, the big thing that I’m happy to see if the creation of a Blacklist Module.  This new module will just provide a central place to store blacklisted domains and ip addresses.  The refererer and trackback modules have been rebuilt to use this blacklist module to block refererer and trackback spam.  Although I’m a bit surprised they haven’t also rebuilt the comment module to use the blacklist.  Still it’s a nice feature I’m happy to see.

Well I hope EE 1.1 gets released next week becuase I’ll be very happy to upgrade to it!

 

Posted by AlanBarber on 08/12/2004 at 06:50 PM
Bookmark and Share BloggingExpressionEngine • (0) CommentsPermalink
Page 1 of 5 pages  1 2 3 >  Last »