Search

Phrase

Display

 

Category

   

Order

 

Pagesize

Results

If the result list is too large, please consider these hints

  • Reduce the number of websites.
  • Add more keywords.
  • Use quotes for building terms from keywords. For example, the phrase banner image searches for all articles containing both words. However, "banner image" searches for the exact two-word phrase.
191 hits12345678910

141. PHP Dirification

Movalog, Tutorials, 25 KB, 520 words

As I mentioned before, I ported a few plugins I was using to the dynamic system. The first of the plugins I ported was for dashify my urls (replaces the spaces with dashes rather than underscores like in dirify).

I mainly use the very simple Dashify plugin to dashify my titles so here's a php port - modifier.dashify.php however for those of you that prefer to use the more powerful DirifyPlus I've made a php port for it too - modifier.dirifyplus.php.

To ensure that the files are formatted correctly I recommend you right click the links and click save as. Upload them to your php/plugins/ directory to enable them.

Syntaxing remains the same e.g. <MTEntryTitle dashify="1"> or...

continue reading ...

142. What Are Your "Essential" Plugins?

Eat Drink Sleep MT, News, 18 KB, 499 words

There are gobs of plugins available for Movable Type. I'd bet that most people who use version 3.2 are using the SpamLookup and Nofollow plugins, and many of you probably have at least a few others installed.

Of all the plugins you use, what are the three most essential? (Yes, you have to narrow it down to three!) Which ones make your site run the way it does, provide you the options you want, or otherwise improve your Movable Type installation?

My favorite three? • SpamLookup is essential for keeping a site spam-free. It does a great job, but you probably already knew that. • SmartyPants provides typographically-correct punctuation: curly quotes, ellipsis, and em-dashes...

continue reading ...

143. Random Style Generator

Movalog, News, 24 KB, 497 words

When I first launched the Style Generator, the biggest request I got was to have some sort of colour scheme chooser or a random style generator. After a few attempts (and a lot of help from Brad Choate), I've finally managed to create the Random Styler. This random styler is capable of generating thousands of different Vicksburg variations with the click of a button (and some AJAX magic!). Some advanced features include: • Being able to change the number of columns (e.g. from a 2 column layout to a 3 column layout and so on) • The ability to edit the stylesheet generated - clicking the edit button will take you to the Style Generator where the stylesheet will be preloaded and you can tweak it...

continue reading ...

144. Tweaking MTCommentAuthorIdentity

Movalog, Tutorials, 27 KB, 682 words

There are several features of the <MTCommentAuthorIdentity> that annoys me.

target="_blank"

I absolutely hate links opening in new windows/tabs without my permission. My view on this is that if I want something to open in a new window/tab I will instruct it to do so! A bug with the developers (#1313) to remove the target="_blank" but its still not happened. So, in lib/MT/Template/Context.pm and php/lib/function.MTCommentAuthorLink.php search for

<a target="_blank" title="%s" href="%s%s?__mode=red;id=%d">%s</a>

and

<a target="_blank" title="%s" href="%s">%s</a>

and remove the target="_blank"

Redirecting

With MT-Blacklist protecting my Movable Type...

continue reading ...

145. Preview Release

Movalog, News, 25 KB, 505 words

UPDATE: The Directory seems to be having a lot of trouble so for the time being, although you can still use the directory, things may be broken....

Well after a lot of hard work, I've launched the Forums and Directory I talked about before. There may still be some lose ends (if you find any contact me)

So...

The Forums

The Directory

The directory and forums are integrated with each other, this means that if you register with the forums, you can login on the directory too. Logging in gives you extra advantages, like rating and commenting about weblogs listed in the directory. The directory doesn't currently require a reciprocal link (ie a link back) and I don't think that's going to...

continue reading ...

146. Feedback during Power Editing

Movalog, Tutorials, 31 KB, 897 words

Many people have asked me how to display the status of comments and trackbacks on the power edit entries screen. This hack will guide you through the process of adding two fields, as shown by the screenshot. One is a drop down menu for the comment status while the other is a checkbox for Trackback status.

First of all, open up lib/MT/App/CMS.pm and around line 2584 find my $row = $obj->column_values;

and add underneath it $row->{"allow_comments_" . $obj->allow_comments} = 1;

Next, around line 2688 find $entry->title(scalar $q->param('title_' . $id));

and add underneath it $entry->allow_comments($q->param('allow_comments_' . $id)); my $allow_pings = $q->param('allow_pings_' . $id) || '0'; $entry->allow_pings($allow_pings);...

continue reading ...

147. Variables and Conditional Display

Movalog, Tutorials, 26 KB, 654 words

Two of the most powerful and probably the least widely used tags in Movable Type are MTSetVar and MTGetVar. These tags allow you to set and get a variable like so <MTSetVar name="foo" value="bar"> <MTGetVar name="foo">

and can be used for a great variety of uses. If you use PHP, this can be done in a much easier way like so

<?php $foo = "bar"; ?>

and you can get the value of that variable by just using $foo within a block of PHP code (this method is more powerful than using MTSet/GetVar because you can use MT tags within PHP.)

Using MTSet/GetVar (or manually setting the variable in PHP) has several uses. Elise covered one of them with her tutorial on font colors but you can use them in several ways, especially in cases in which you would like a conditional display. A conditional display is a visual display that changes when certain conditions occur....

continue reading ...

148. Speed up

Movalog, Tutorials, 27 KB, 836 words

Here are some tips on how to optimize your weblog and make the page load times drop: • Sidebars: Sidebars are everything when you're talkin about page load. I have found that sidebars on the right decrease page load times dramatically. Having the sidebar on the right also allows the content to load first. The content is what your readers have come for and hence they can start reading even before the page has fully loaded. The default MT templates have the sidebars positioned to the right, to change your sidebar location you'll need to change the float element in the css: float:right;

or you may have to move around some of your markup (the template code) • Content: Although content is...

continue reading ...

149. Rebuild All Blogs

Movalog, Tutorials, 28 KB, 757 words

With MT 2.6x there was a really useful script called mt-rebuild-all.cgi that would rebuild all blogs. Unfortunately, this script didn't mix well with the MT 3.x interface.

So, I re-styled the script to fit in better with MT 3.x, the credit goes to the author ( -lc- on the forums). This is only compatible with MT 3.x and does not work in Opera (if you manage to figure this out drop me a line)

There is a major security risk with this script, as it doesn't use MT authentication, anyone can just execute the rebuild script.

Download mt-rebuild-all.zip or mt-rebuild-all.tar.gz

You can dump this file into your mt directory (the same location as mt.cgi) and it will extract the...

continue reading ...

150. Relative Dates

Movalog, Tutorials, 27 KB, 707 words

In a recent thread on the MT forums, a person asked how you could make the dates on entries relative to the current time. This means instead of "Posted on August 1st 2004" it would be "Posted 3 days ago." You could use the RelativeDate plugin but that would require you to rebuild your pages everyday (of course this can be done via a cron job).

Lucky I found this PHP script written by Kristine (kadyellebee on the forums). For this code to work, you will need to be using PHP enabled templates. Towards the top of your templates you should find a tag similar to <$MTEntryDate$>

Just replace that with <?php //offset is how many hours away you are from your server. $offset = "0";...

continue reading ...

151. Converting MT 2.x styles to MT 3

Movalog, Tutorials, 27 KB, 672 words

Learning Movable Type has a tutorial on how to apply MT 3 styles to a 2.x blog but what about the other way around ?

I scanned two similar stylesheets to see what changed, basically the only thing you need to change is the definitions names mostly, the actually style definitions can stay the same. I am assuming you are using the default MT 3 templates Here is what has changed with the CSS from MT 2.x to MT 3 styles - it may not be perfect but it'll be darn close. I have listed the MT 2.x definitions and then the MT 3 definition it needs to be changed to: • .description becomes #banner h2 • #content and .blogbody becomes .content • #links becomes #right • .title becomes .content h3 • .date becomes...

continue reading ...

152. Calendars with Movable Type 3.2

Movalog, Tutorials, 26 KB, 529 words

With v3.2 of Movable Type, Six Apart removed the calendar from the sidebar of the default templates citing rebuild times as the reason. They did post the code that was used in previous versions. However, many users found that simply pasting the code in didn't yield a properly formatted calendar. So after a little digging around, I've come up with the following code which will create a calendar that will be correctly formatted and fit in with your stylesheet. Simply copy the code and put it in your sidebar - a good location would be just above <div class="module-search module">

<div class="module-calendar module"> <h2 class="module-header"><$MTDate format="%B %Y"$><...

continue reading ...

153. Reset Templates

Movalog, Tutorials, 29 KB, 834 words

To reset templates within a blog browse to the following url http://www.mydomain.com/mt/mt.cgi?__mode=reset_blog_templates&blog_id=BLOGID

Replace the bits in red with your domain, path to MT and blogid (this can be found by logging into MT and going to the blog's menu and you'll see it in the address bar as &blog_id=X where X is the blogid)

continue reading ...

154. Drop Cash: MT Protect 1.0

Movalog, Tutorials, 27 KB, 746 words

I'm quite excited about this release because the featureset has been requested several times in the MT Support forums. I've created a new drop cash campaign. As with the previous one, once the target is met I'll release the plugin, and as with the previous one donors get priorty support. I have talked about the new release on the campaign page but in case you don't want to read, I've reproduced it here:

MT Protect is a plugin that allows you to protect entries and blogs (new to 1.0) in two main ways, password and Typekey protection. The former uses a simple password while the latter verifies the reader's identity.

1.0 also boasts several new features including Typekey groups, which...

continue reading ...

155. Updates to the Style Generator

Movalog, News, 28 KB, 806 words

At long last I've made some updates to the Style Generator to better fit with Six Apart's standard. This means that you can finally apply the tips discussed in this tutorial to stylesheets created using the style gen. Most of the other changes are mostly on the backend code so that it's easier for me to build on it in the future. The only real change on the frontend is the addition of a splash page that allows you to select the number of columns - as cool as the on-the-fly capability was it was a major pain to support. A big thank you to Six Apart for letting me use their images, I'm a terrible graphics designer!

The biggest feature I am working on right now is the ability to load...

continue reading ...

156. MT Protect 1.2

Movalog, Tutorials, 29 KB, 956 words

UPDATE: Version 1.21 has been released that fixes the password protection bug under static publishing. Please download the new version and re-enable protection on all your blogs.

MT Protect is a plugin that allows you to easily protect entries so only authorized users can read the entry, comments and trackbacks. This new version has been built for Movable Type 3.2 and is feature packed: • Cross-database compatibility - MT Protect is now compatible with PostGreSQL and SQLite. The only problem with using either of these two databases is that if you haven't got the necessary modules installed, you cannot use Password Protection (this is further explained in the docs) • OpenID Support - MT Protect now allows you to protect entries/weblogs using OpenID. Protecting an entry using OpenID works exactly like protecting an entry using Typekey and best of all is that you can create OpenID groups. You may also be interested to know that Movable Type 3.2 comes with OpenID support, look in the extras/ folder!M...

continue reading ...

157. Typekey Troubles

Movalog, Tutorials, 26 KB, 737 words

Many people have complained about Typekey, how it has lost them commenters. I am currently beta testing out the next MT-Blacklist, so my use of Typekey will be slightly different.

None-the-less, I have Typekey as a method by which commenters can be assured of seeing their comment immediately show up on my weblog. In the new Blacklist, there is something called "Typekey Free Pass." If enabled, comments by TypeKey-authenticated users will not be scanned for blacklist matches, old entry moderation or max URLs. In this way I am putting a lot of faith into the Typekey system. Un-authenticated users will still be able to post, by MT-Blacklist will check the comment for a variety of things...

continue reading ...

158. Iconize

Movalog, Tutorials, 27 KB, 656 words

Steve asks:

Quick question, how do you get the different icons to show up based on categories like you have in your personal site? Can you also do it by author?

This is quite simple to implement and can be done either with the use of plugins or doing it manually using MT Tags

Category Icons

You can either use TopicIcon to do this 'automatically' - just follow these instructions. Alternatively you can do it manually, add this code in your templates between the <MTEntries>...</MTEntries> tags.

<img src="http://www.movalog.com/images/cat_icons/<$MTEntryCategory dirify="1"$>.gif" alt="<MTEntryCategory>" />

So for example, if you had a category called...

continue reading ...

159. Movalog: MT Tabs Archives

Movalog, Tutorials, 21 KB, 578 words

Page: 1 1 Page.

Template Tags Bookmarklet for Safari

Safari users can now enjoy the Template Tag Bookmarklet by simple installing the Saft extension (which is a highly recommended extension), grabbing the template tags plugin and unpacking it into ~/Library/Application Support/Saft/Sidebar/. Alternatively, you can also open the destination folder...

Continue reading "Template Tags Bookmarklet for Safari"

Posted on 10/08/2005 | Permalink | Comments (1)

Updated Template Tag Reference

Some of you may remember the MT Tabs bookmarklet I had created oh so long ago that was quite simply a page that listed all the template tags available for...

continue reading ...

160. Multiple Categories and Hierarchies

Movalog, Tutorials, 29 KB, 825 words

After a lot of requests, its finally here. This hack will give you a more powerful listing whilst assigning multiple categories to an entry that includes the category hierarchies. As usual open up lib/MT/App/CMS.pm and around line 2772 find

$cats{ $cat->id } = $cat->label;

(make sure it is in the edit_placements subroutine) and replace it with

my @cats = $cat->parent_categories; @cats = ($cat, @cats); my $glue = " > "; my @res; while (my $c = pop @cats) { my $label = $c->label; push @res, $label; } $cats{ $cat->id } = join $glue, @res;

Finally open up tmpl/edit_placements.tmpl and replace the two occurances of style="width: 175px;" with style="min-width: 175px;"...

continue reading ...

Comments

You want to post some comment? Please use the announcement post on the Movable Type Weblog.

If you want to give some feedback concerning a specific query, please use the feedback button that is shown after a search has completed.

mgs | September 27th 2005