Archive

Posts Tagged ‘wordpress’

WordPress as a CMS – Useful URLs

July 30th, 2009 No comments

Many people are now considering using WordPress as a content management system (CMS). While that is not what WordPress was originally designed for, it can be an excellent CMS if used properly.

One of the problems for those trying to set up a CMS with WordPress is to try and have the URLs make sense. Imagine having a site with a root install (WordPress) and also wanting a forum (in /forum say). It wouldn’t make much sense to have links for blog posts coming from the root but yet having to go through a folder for a forum. At least, it doesn’t make much sense to me.

What I wanted to do was separate blog posts from the rest of WordPress. We want WordPress to run the whole show but we need to make the actual blog look like a separate entity.

As it turns out, this is rather simple. The permalink features of WordPress can sort it all out. To set this up you’ll need everything mentioned in the Codex Permalinks article.

On the permalinks screen, select the structure of your choice. A numerical indicator is recommended at least somewhere. You should have some content in the Custom Structure box by selecting one of the default options. Simply modify this to include the “subfolder” you want your blog to live (something like /blog/ would make sense, no?). You should be left with something like this: Picture 1Simply Save and your blog will now appear as if it is in a subdirectory. Much more logistical. Pages are unaffected by this change so you can add pages to your CMS to your hearts content. I’ve found this works well, although plugins may be affected.

Would be interested if anyone has done this differently.

Categories: Geeky Tags: ,

WordPress 2.7

December 11th, 2008 2 comments

It’s here!

I’ve not been too involved in the development side for most of my term at Uni and it just so happens to be now my holidays happen to coincide with the release of version 2.7.

If you take a look back at my posts on 2.7 I feel justified by my disclaimer concerning the potential for changes before the final release. The entire back end has been overhauled with a much more modern and professional layout. Judging by the tweets I’ve been reading it looks like most people are fairly impressed by it. Take a look at the official screencast if you haven’t seen it yet.

I’ve also updated my theme again. I didn’t really feel the previous one worked too well on here so it’s been switched to this – slightly more minimal – theme.

Next term (I guess that means next year) I’ll hopefully keep this slightly more up to date. We’ll see!

Categories: Geeky Tags: ,

More 2.7

September 17th, 2008 1 comment

About 3 weeks ago I wrote a post showing some new features for WordPress 2.7. Since then there has been a bit more developing going on and this post touches on a few more features.

As I mentioned back then, things can and very likely will change by the time this release is completed so don’t come back complaining to me when things don’t look the way the do here.

A excellent post on the Weblog Tools Collection has also appeared between these posts and this goes into some more detail about the major additional features. The comments on this post were an interesting read with many people split over yet another admin design change. Whilst I can understand where they’re coming from, 2.7 does make a few good changes that I know I’ll certainly find useful. My advice to critics therefore would be to give it a try and see what they think. If Subversion isn’t something you’re familiar with then feel free to ask for a bit of help.

Read more…

Categories: Featured, Geeky Tags: ,

Aiding WordPress devs – filter reference

September 3rd, 2008 1 comment

WordPress development, on a whole, is pretty simple. As someone who has come from a background working with IPB and a little bit of phpBB I was quite amazed at how unusual it is to edit the “core” WordPress files – those which are outside the wp-content folder and are distributed each release.

Instead WordPress relies on hooks that are either filters (which change something) or actions (which do something). These are quite simply littered throughout the code and any plugin can jump on these to do whatever is needed by the developer. However, the problem I’ve found is a lack of trying to find the right hook for the job. PHPXref, which is excellent for finding functions and variables doesn’t have the ability to find a hook which is usually in the format of:
do_action('name', $vars); or apply_filters('loginout', $output);

Read more…

Categories: Featured, Geeky Tags: , ,

New theme

September 1st, 2008 1 comment

So I’ve been working on this for most of today and I’m pretty happy with how it’s turned out. I’ve considerably edited a free theme which was designed for a magazine site to something acceptable for personal use.

Comments welcome, I’m particularly interested in whether anyone feels it needs improvement. If anyone can find any bugs then let me know.

Categories: Featured, Geeky Tags: ,

Quick look at WordPress to be

August 21st, 2008 No comments

So yesterday I noticed a big commit on the WordPress SVN where selected files from the “crazyhorse” branch were merged with trunk. This has resulted in a pretty different look to some of the admin sections. Because I know at least a few interested people read this, I’ve took a quick screencast of what it looks like at the moment.

As a disclaimer, I have no idea if this is technically “allowed”. However all of it is freely downloadable to those who care so I can’t really see any problem with it. I should also add that this is a highly developmental version and the entire thing could spout pink frilly things before it makes it to a release. You may notice a fair few bugs even in this video (which were not intentional but I’m not going to hide the fact it’s buggy). This is also located on my localhost which hasn’t been setup to allow the script to download and has no ftp which is why I stopped at those screens.

Screencast of WordPress Trunk

The crazyhorse branch has a few different widgets on the dashboard, including the ability to post directly from the dashboard.

If I see any more changes of note, I’ll make a similar post.

Looks good to me though.

Read more…

Categories: Featured, Geeky Tags: , ,

Documenting WordPress

August 18th, 2008 8 comments

As I mentioned in my last WordPress post I’ve been working on adding documentation to the core of WordPress, specifically the formatting.php file. This is quite a big file will upwards of 2000 lines of code and around 65 functions to document. It is used extensively in the formatting of pretty much every aspect of a blog. It surprised me therefore that when I started getting involved in developing WordPress this file (with the exception of may a dozen functions) completely lacked documentation.

Over the past number of weeks I’ve been (rather slowly, it’s quite a boring process) adding inline documentation to the file. So far I’ve got around 70-80% of the file done and plan on doing as much of the rest that I can. Unfortunately some of the functions are a bit difficult for me to understand and, at the risk of writing totally incorrect documentation, I’ve been leaving these.

However there is only one other developer actively documenting the code. New code is being documented as it is written but there is a great deal of code lacking any. Hopefully the 2.7 release will see a good deal more added. My contributions have already been committed to the Subversion trunk which I’m quite happy about.

Categories: General Tags: , ,

WordPress 2.6.1

August 15th, 2008 No comments

So WordPress 2.6.1 was released today. This marks the first release where I have contributed any code. Nothing big, just 3 bug fixes (#7366, #7336 and #7316) but I have to start somewhere. I’ve also done a bit of inline documenting for some of the functions (which is ironic because most of my own projects have chronically lacked documentation) and with any luck these will be included in the 2.7 release.

I’m quite looking forward to that release based on what I’ve seen being worked on including some very helpful features. I never really appreciated just how much goes into the development of WordPress before and I’m quite enjoying contributing on such an active project. Whether I’ll be able to keep it up when I go back to Uni or not I’m not sure, but here’s hoping.

Categories: Geeky Tags: , , , ,

Using HTML tags in PHPDoc blocks

June 25th, 2008 8 comments

As my involvement in the dev side of WordPress grows, I’ve been working on increasing the PHPDoc comments through the major parts of the code. A particular challenge I stumbled across today was trying to talk about certain HTML tags in the comments in a way that they wouldn’t then be turned into the actual tag when phpDocumentor ran.

So basically I wanted to say something like

This function returns a properly formatted <pre>…</pre> block

However I found that doing that caused the <pre> tag to be used as part of the page when the docs were transferred to the HTML format.

The solution I discovered was to reference the tags as <<pre>> or <<br />>. This seems to preserve the tag in the finished documentation as a comment and not part of the page.

I struggled to find this in google, so though a little blog post might just help someone.

Categories: PHP Tags: , ,

Quick test

June 22nd, 2008 1 comment

This should hopefully go to twitter?

——

Indeed it did. The plugins that finally got my setup here are Twitter Updater and Twitter Widget Pro. Took a while to find plugins that were 2.5.1 compatible but these do the trick.

——

Also, I’d highly recommend Fluency Admin which makes the wordpress admin screen a whole lot neater.

——

This also means the next post wasn’t result related. Oh well.

Categories: Geeky Tags: ,

Canonical URL by SEO No Duplicate WordPress Plugin