WPMu Development for Education

Making WPMU work in education, one hack at a time

Archive for the 'database' Category

WP – collecting user feedback

Posted by Randy on 8th February 2010

Just yesterday I had a request to create a tool to collect some follow-up responses from our staff regarding a recent university-wide workplace survey.   So we need something simple, easy to maintain, quick to launch AND that collects the responses in a format that permits easy and flexible reporting.  As I recently demonstrated our WordPress MU installation makes it easy to launch a project-specific site which includes user-login tied to the school’s central user authentication system.  So simple-easy-quick — doing this through WordPress gets me at least half-way there.  And I remembered a recent suggestion in my Twitter feed to look at the WordPress Surveys plugin.

The plugin is pretty simple and written clearly enough to make adjustments easy.  And most importantly it utilizes a table structure that is normalized, and well structured, which will work well for the eventual reporting needs.  I did do some hacking around in the code to change some of the default behavior — mostly just commenting out features we didn’t want.  These would lend themselves well to some additional options in the plug-in settings — maybe I’ll get around to adding those in at some point.  When it comes to the reports I’ll also go into the background, using PHPMyAdmin to grab the tables directly — again it wouldn’t take much to add more flexibility into the WordPress admin panel options for the plug-in, but I’m still running in the quick/simple mode here.  And with the help of the Plaintxt theme it is up and running.

The plugin could be quite useful for all sorts of user feedback on a site, not just surveys.  The nicely structured data collected in plugin-specific tables would make reporting really flexible.

WordPress › Surveys « WordPress Plugins

The Surveys WordPress plugin lets you add surveys to you blog. You can let the vistors take surveys and see the result from the admin side.

Related Posts

Posted in Data, PHP, PLE, Plug-in, Technology, Twitter, WordPress, blog, database, hacking, plugin, plugins, project | Comments Off

SharDB update

Posted by Ron on 24th January 2010

I updated SharDB (Download) for WordPress MU 2.9.1.1 and added support for the comment meta table.

 

© ahome for WPMU Tutorials, 2010. | Permalink | 4 comments | Add to del.icio.us
Post tags: , , , ,

Need real genuine helpful support? MU Support.

Feed enhanced by Better Feed from Ozh

Posted in WordPressMU, database, multiple, plugins, shard, wpmu | Comments Off

Scaling WordPress MU with multiple databases

Posted by Ron on 28th December 2009

Our larger WordPress MU install, Homeschool Journal has been running on multiple databases for about 3 years. Technically, it’s possible to have thousands of blogs in a single database install. Usually where people running MU start to have issues with the number of blogs is with getting complete backups of the database.

Upgrades with multiple databases have always been more work and many people running multiple databases typically did not upgrade until the .1 release of whatever version of MU. When I upgraded Homeschool Journal to MU 2.7.1, it was two weeks before I had found and repaired all of the database issues (via several plugins). I decided I wasn’t going to go through that again.

With the number of blogs at WordPress.com, Automattic must be using a database plugin that supports WordPress MU better. So, over a couple of weekends, I tweaked HyperDB to use the same MD5 hash based sharding structure that we were using.

I released SharDB (Download) last week as a beta release intended for larger WordPress MU installs using an existing 1-3 character MD5 hash (by blog id) based multi-database sharding structure. (Other structures will be added in early 2010.) The alpha testing of SharDB was carried out this fall with the help of a few people who I knew were using the same multi-database that we were. SharDB has been powering live sites since early October.

SharDB has been tested with over 50 plugins including BuddyPress 1.1 through 1.1.3, domain mapping (both Donncha’s and my version) and my multi-site plugin. I have not found any issues with any of the tested plugins. It should support any plugin that accesses data via the $wpdb object. It has been used to upgrade live sites from 2.7.1 through to 2.8.6 and I’ve upgraded a test site to the WordPress MU 2.9 release candidate tagged 2009/12/21. (Note: I used the plugin in this post to create the commentmeta tables before updating MU from 2.8.6 to 2.9RC.)

One of the features that I really like about SharDB is that I don’t need to edit the database config when adding plugins (a feature inherited from HyperDB). Also, I haven’t had issues with plugins failing to create tables. As an added bonus, I added a handy column to the site admin blog screen so that you can see which database a blog’s tables are in.

 

© ahome for WPMU Tutorials, 2009. | Permalink | 19 comments | Add to del.icio.us
Post tags: , , , ,

Need real genuine helpful support? MU Support.

Feed enhanced by Better Feed from Ozh

Posted in WordPressMU, database, multiple, plugins, shard, wpmu | Comments Off

Do we still need Microsoft Office?

Posted by Randy on 30th November 2009

These days, with regular blog posts and in the course of a typical work week, I find myself doing a fair amount of writing.  But what struck me recently is how rarely I use Microsoft Word to assist with that writing.  When writing something that requires thought I normally start in a simple text editor.  I find the lack of options helps me focus — and when it comes time to move it to an email, blog post, or even a Word file, it is easy to copy and paste the text.  MS Word’s tendency to drag along boat-loads of non-standard formatting is such a pain I actively avoid using it for any writing destined for web delivery.  Start collaborating with a tool like Google Docs and Word becomes superfluous.

In our department alone we’d save $5,000 annually in licensing by ditching office — tempting in these tight financial times.  At home Ethan and Leo both use OpenOffice for all their school work with no difficulties. – they have word processing, presentation and spreadsheet capabilities.    For my part I currently use Microsoft Access, Visio and Excel for database work quite a bit.  But a move to MySQL and other open source tools (OpenOffice’s Base) could cure this need.  So I can definitely see a near-future office environment that does not include MS Office coming.

Who needs Microsoft Office? Freeware puts twists on old apps | Workers’ Edge – CNET News

Most people become so accustomed to using Microsoft Office that they never consider its alternatives. But there are more than one way to process words and spreadsheets: Word and Excel aren’t the only games in town.

Removing extra tags in a Word Web document

Word has the ability to turn your document into a web page. However, it has the reputation for creating bloated pages that contain a lot of extraneous code. For this reason, many experts suggest using an alternate program for creating web pages. But, you can get around this.

Related Posts

Posted in Data, Lifestyle, Microsoft, PLE, Tag, Web, access, blog, database, email, games | Comments Off

Flickr starts its own APP Store

Posted by Randy on 9th November 2009

Flickr, the coolest on-line photo site there is, has always encouraged outside developers to build their own applications that utilize the massive Flickr public database.  I have had a Flickr account like forever, before Yahoo bought them — and have used some WordPress – Flickr plug-ins that utilized the API.  But the problem was you had to find the apps yourself, spread around on developers own web pages.  Well Flickr just launched a new page that provides an easy way to find apps.  I found a cool Facebook app that will display my latest Flickr uploads on my Facebook page — very handy.

The App Garden « Flickr Blog

If you’re looking for neat ways to do more with your photos, developers are beginning to seed the App Garden and showcase their applications. We hope you’ll enjoy new ways to browse, view, upload, download, analyze and make stuff (whew!) with your photos as much as we do.

Flickr Photosets on Flickr – Application Sharing!

Flickr Photosets brings together Flickr and Facebook. With Flickr Photosets you’ll be able to showcase your Flickr photos to your Facebook friends, without them ever having to leave Facebook!

Related Posts

Posted in Data, Plug-in, Plug-ins, Technology, Web, WordPress, Yahoo!, application, applications, blog, database, facebook, flickr, photo | Comments Off

Setbacks

Posted by Reverend on 27th October 2009

Some of you may have noticed that your site is missing posts. Others of you may notice that your blog is completely gone. Both are the result of a very unfortunate accident that occurred when the Systems Group tried to restore the Voices site to its state at 6 AM this morning.

As you know we were upgrading the software this morning. This afternoon it was discovered by Dr. Hayward that some users could not post to their blogs and we began investigating the issue. In the process it was decided that a reversion might be necessary. When the Systems Group restored the database containing all the user and post information, they discovered it was corrupt. As they looked for a clean backup they discovered that all backups after Sept. 10 were corrupt and so the earliest version they could restore to is Sept 10.

We are aware that roughly 40 users and hence 40 blogs were lost in this incident. Unfortunately it looks like there is no way to recover the lost users and blogs. It also means that all posts written between Sept. 10 and this morning are gone. We know that this means that several class assignments that were written as blog entries are also gone. We will continue to work with the Systems Group to try to recover as much data as possible, but be aware that it is not likely any more data will be recovered.

In the coming days we will be working with the Systems Group to develop procedures to ensure that such an accident does not occur in the future. Once these procedures have been determined we will post them to this site for the community’s benefit.

Posted in Data, backup, blogs, courses, database, loss, site, users | Comments Off

Hardening WordPress and scanning for past exploits

Posted by Randy on 26th October 2009

The WordPress Exploit Scanner plugin scans system files, posts/comments and plug-ins for suspicious stuff.  If you have a blog site that you think may have been compromised it can’t hurt to give it a try.  I ran it on a couple of blogs I administer and I’m happy to report that everything looks fine.  One of the things the plug-in looks for is hidden code in your site, especially hidden style elements. This is a way that spammers can insert code into your site — but there are lots of legitimate reasons for these elements too. So the report can look a little alarming or overwhelming at first, so run it when you have some time to scan over the output report.  A good tool to keep handy for when needed.

WordPress Exploit Scanner

This plugin searches the files and database of your website for signs of suspicious activity. It will not stop someone hacking into your site, but it may help you find any uploaded or compromised files left by the hacker.

WordPress › Blog » WordPress 2.8.5: Hardening Release

We recommend that all sites are upgraded to this new version of WordPress to ensure that you have the best available protection…If you think your site may have been hit by one of the recent exploits and you would like to make sure that you have cleared out all traces of the exploit then we would recommend that you take a look at the WordPress Exploit Scanner.

Post to Twitter

Related Posts

Posted in Data, PLE, Technology, Web, WordPress, blog, database, plugin | Comments Off

OpenCalais semantic extraction service

Posted by Randy on 21st October 2009

What is OpenCalais, and what is this semantic web stuff all about?  Sure I watched the video on their site, and read through the documentation.  Somehow this all will make web content in general, and these blog posts in particular, easier to find and link with other relevant information.  Which all sounds good, but I want to see it in action.  So I installed their Tagaroo WordPress plug-in.

The most immediate change is the addtion of the tagaroo tag area, which suggest tags based on the post content.  It is pretty cool too, as it dynamically updates and suggest new tags as you add content.  It also has a Flickr image suggestion bar, which isn’t working at the moment, but also doesn’t hold any interest for me — I don’t see how random Flickr image additions enhance this content.  I went back to a recently published post and added in all of the suggest semantic tags.  When looking at the page mark-up I don’t see any indication of tagaroo/opencalais’ presence.  Maybe it is posting information back to the OpenCalais servers?  I did need to register for an API key.  I’ll play with it a little more, but if it helps make this content more semantic, then why not?

How Does Calais Work? | OpenCalais

We want to make all the world’s content more accessible, interoperable and valuable. Some call it Web 2.0, Web 3.0, the Semantic Web or the Giant Global Graph – we call our piece of it Calais.

Oracle Database integrates OpenCalais | OpenCalais

Tight integration empowers Oracle Spatial 11g Release 2 users to deploy production-strength semantic solutions with unprecedented speed.

wordpress | OpenCalais

Tagaroo provides automated tag generation and image location for WordPress bloggers. We like Tagaroo so much that we gave him his own website. If you’re a WordPress blogger and would like to integrate Calais functionality directly within your blogging life then hop on over to Tagaroo.

Tagaroo » Make blogging better!

Tagaroo is designed to make your WordPress blog better for you, better for your readers and more accessible to search engines. As you’re writing, Tagaroo analyzes the text in your post and suggests intelligent tags for the things and events you’re writing about.

Post to Twitter

Related Posts

Posted in Data, Design, Technology, Web, Web 2.0, WordPress, access, blog, blogging, content, database | Comments Off

Changing the domain

Posted by andrea on 24th September 2009

Sometimes this happens, you’ve built the site and have to or want to change the domain it’s on. Or you did dev work on a different domain and now it’s time to go live.

The domain name is actually stored in numerous places in the database, as well as one line in wp-config.php. Every single one of these will need to be changed.

Before you do anything, backup. Go to phpMyAdmin, select your database, and choose Export. Save it to your computer. We’ll be making a copy of this and working on the copy. This way, if anything goes wrong, we still have our backup.

The database information – table structure, content, everything really – is stored in a file with the extension .sql. This can be read and edited in a simple text editor. If you’re a Windows user, try NotePad++ instead of the default Notepad.

Simple do a find and replace on olddomain.com to newdomain.com. Save your copy.

Method #1:
- on the live site, verify you have that backup, then drop all the tables in the database.
- import your edited sql file with the new domain name in it. (phpMyAdmin -> Import tab.)
- edit wp-config.php with the new domain name
- change the DNS records for the domain so the new one points to the right spot on your server if you haven’t done it already.

Method #2:
- create an entirely new database. Use an existing db user & password, or create a new one – your choice, as long as they have ALL privileges on this database.
- import your edited sql file with the new domain name in it. (phpMyAdmin -> Import tab.)
- edit wp-config.php with the new domain name AND the new database name, plus the new db user & pass if you did this.
- make sure your new domain is pointing to the right spot.

Do whatever you like with the old domain. :)

 


© andrea for WPMU Tutorials, 2009. |
Permalink |
No comment |
Add to
del.icio.us


Post tags: , , , , , , ,

Need real genuine helpful support? MU Support.

Feed enhanced by Better Feed from Ozh

Posted in WordPressMU, change, database, domain, edit, how to, move, name, wpmu | Comments Off

Fooling around with AJAX for a web app

Posted by Reverend on 10th September 2009

Fooling around with AJAX has been on my web programming to-do list for quite some time — like years.  I’ve read bits and pieces on it, but I never had the right project come along at the right time.  Finally the planets aligned. With a series of 15 google calendars, and my task is to make one web page that will allow users to easily navigate between them.  You can see the first working prototype here.  I created a table in MySQL that holds the information on each of the calendars, and a PHP script that delivers the proper Google embed code based which calendar is selected.

One of the things that kept me from trying AJAX was the idea that it would be too complex — boy was I wrong there.   I struggled most with the Javascript (I just find PHP so much easier to work with!)  The html page and javascript on the client end are matched with PHP on the server.  In my past work I used PHP to deliver full pages — now it just delivers whatever content is needed to fill in some element on the page.  It is actually less work than feeding full pages.  Very cool.  If you’ve been holding off yourself here are some examples to get your started.  Always remember to sanitize your user input — even if you don’t accept user input directly any POST or GET call is an opportunity for the injection of bad stuff.

Build an Ajax Dropdown Menu – Webmonkey

In the course of this tutorial, we’re going to look at what Ajax can do. Then we’ll use a JavaScript class to simplify your first steps toward the ultimate in speedy user interactivity.

PHP Example AJAX and MySQL

The following example will demonstrate how a web page can fetch information from a database with AJAX technology.

How to sanitize your php input

A php class that makes sure your php input is clean…Never trust user input, it may be malicious, always check your php input.

Related Posts

Posted in Data, PHP, PLE, SQL, Technology, Web, Yale, database, project | Comments Off