Ever run into this situation?
Start out with a nice clean test install named something unremarkable like "ezwebin".
Then play with it until it fleshes out into something of substance, to the point it is useful. A hearing museum in this case.
Feel stuck with this unremarkable and not descriptive name for a remarkable new project?
I know there are many eZ provided facilities to achieve the results and move an installation. For me, this makes sense on my local OS X testbed, and takes little more time to perform than it does to read.
This is the most minimalist way I have found to rename my eZ projects. These steps tested and proven on ezwebin extension at eZ Publish revision 4.3.
Assumes log in as a user with sufficient privileges.
General Info -- The httpdocs directory in OS X is /Library/Webserver/Documents
Make a Copy
cd /Library/Webserver/Documents
cp -Rp <existing folder> <new folder> in this case cp -Rp ezwebin com_hearingmuseum
cd com_hearingmuseum
Make the Necessary Changes to eZ files just Copied.
- settings/override/site.ini.append.php -- replace "ezewbin" with "com_hearingmuseum"
- Search the /setttings/siteaccess/* directory structure and edit any site.ini.append lines that reference the old path to reflect the path change. Same as step 1.
Change some Database entries, in this case 7 places in two different tables.
- Search the database for the old path "localhost/ezwebin" and replace with "localhost/com_hearingmuseum" I use phpMyAdmin for this step.
Manually clear the caches by deleting all files in these directories
/Library/Webserver/Documents/com_hearingmuseum
- /var/cache/
- var/ezwebin/cache
Spotlight search the com_hearingmuseum folder structure for "localhost/ezwebin" inside files.
In this case, found one at:
/var/storage/packages/local/images/ezcontentclass/class-image.xml
Replaced that text with "localhost/com_hearingmuseum"
Load up http://localhost/com_hearingmuseum
Hope this works as well for any interested as it does for me.
http://share.ez.no/blogs/doug-brethower/rename-an-ez-publish-installation-on-os-x
Tweets are the original Web answer to "What are you doing right now?".
Besides an amusing diversion for the self-absorbed, they can be a wonderful time tracker for those trying to get stuff done.
When watching the return value, the instant Web publishing hit can be more than a little addictive. It can become an end unto itself, even a business, think Guy Kawasaki and alltop.com.
Working at the command line interface (cli), keeps it clean and fast to keep your day moving without cognizant interruption. Think, and thank, Binny VA. binnyva.blogspot.com
Happy muddling along for 3 plus years with a fast clean curl implementation came to an end September 2010. Twitter no longer allows the --basic authentication that made that possible. It once was one line, broken into three here for clear display.
curl --basic --user "name:password" --data-ascii
"status=`echo $@|tr ' ' '+'`"
"http://twitter.com/statuses/update.json"
Saved as "tw" in a location on the users PATH, call it from cli passing the tweet as the only necessary parameter, like this:
Difficult to imagine a cleaner more straightforward mechanism for cli types to tweet.
oauth
The new way to authenticate, oauth, is better for twitter. Will surely be better for all twitter users in the long run. But it breaks anything that still depends on --basic authentication. Like the simple one line script above.
Twitter has apparently been warning developers for months. Those of us just running simple hacks were caught unaware on September 02, 2010, when basic authentication just stopped working.
The Fix
I know most will thrill to the intricacies of oauth as much as me. Don't know, don't care, just tell me something that will fix what is broken.
What You Need - Registration Required
Four essential pieces of information and a small library to handle the oauth connection.
The consumer key and consumer secret are provided by twitter when the developer registers an app with them. Anybody accessing the twitter api is now forced to be a registered developer. Better for advance notifications for sure!
The name of this app registered with twitter is wpm-tw-api-localtracker. The app name displays as the source any time status messages are sent to the twitter servers and displayed online. My pet name for the app when it was a command line script was twittertracker, because it saved a copy to a local database for quick future reference to every tweet ever made. So much for history, on with the details.
Raj Deut article on sitepoint explains getting those four pieces of information and the oauth libraries better than I could ever hope to.
- consumer_key
- consumer_secret
- accessToken
- accessTokenSecret
The accessToken and accessTokenSecret are specific to each user. Each user must already have a twitter account.
So two items per app, two items per user, then ready to oauthenticate using two files, the bottom two in the image below, in what is called the twitteroauth library by Abraham Williams available here.. There is a lot more stuff in the download, but those two files are the essence.
All that remains is to make the oauth call into the library with the 4 crucial pieces of information, then when authenticated, send the tweet.
Authenticated=Good, verify user name, if that checks out, send a tweet, a "status" update in twitter api terms.
-----twittersaver.php file for testing------------------------
require_once("abraham/twitteroauth/twitteroauth.php");
$oauth = new TwitterOAuth(consumer_key, consumer_secret, accessToken, accessTokenSecret);
$credentials = $oauth->get("account/verify_credentials");
echo "Connected as @" . $credentials->screen_name;
$oauth->post('statuses/update', array('status' => "Thanks Raj Deut Sitepoint, very nicely done."));?>
-----------------------------------------------------
When this is working, remove the "echo" line and switch 'status' => "Thanks Raj Deut Sitepoint, very nicely done.", to 'status' => $_REQUEST[status]
Then make a curl call from cli to script tw, the text entered will fill in a the echo location, and ultimately the _REQUEST[status]
curl --data-ascii "status=`echo $@|tr ' ' '+'`"
"http://localhost/twittersaver.php"
