Search

Phrase

Display

 

Category

   

Order

 

Pagesize

Results

58 hits123

1. Build Conditions with the Compare Plugin

Movable Type Weblog, Tutorials, 22 KB, 1097 words

In Comparison needed for conditional Generation I showed how to use the Compare Plugin for managing variations of a page type. The plugin allows comparing values and optionally inserting one or the other code segment into the output stream. However, the simple condition "if one value equals another value" is just the beginning. We are also able to create complex conditions. It is not even that difficult.

Basics

The Compare Plugin offers a number of tags, as for example MTIfEqual, MTIfNotEqual, MTIfGreater, MTIfGreaterOrEqual, MTIfLess, etc. Most of them work the same way: they take at least two mandatory attributes, a and b. The plugin compares the values of those two...

continue reading ...

2. Compare

Staggernation, Plugins, 12 KB, 1043 words

This Movable Type plugin implements a set of template tags for displaying a portion of a template conditionally, depending on the results of a comparison between values. The values compared can be literal strings or numbers, or they can be pieces of MT template code that the plugin will build and evaluate, using the result in the comparison.

MT users have developed a number of techniques in PHP and JavaScript to implement various useful conditional-display features on MT-based sites. The tags in the Compare plugin should let you accomplish many of these same tasks within your MT templates, without using PHP or JavaScript tricks. For example: • Display different text in the Comments link for...

continue reading ...

3. PHP Dynamic Publishing: Developing Plugins

Six Apart Pronet Articles, Tutorials, 36 KB, 2180 words

Note: This tutorial was first published on October 29th for members of the Professional Network. If you'd like to get access to the benefits of membership in the network, sign up now.

Our last tutorial covering dynamic publishing provided a high-level technical overview of its implementation. In this tutorial, we will examine the way you create plugins for the PHP dynamic publishing model. It varies a bit from the Perl model, since we have built the template processing on top of Smarty, a popular and powerful templating engine for PHP.

Use the Source, Luke!

To get you started, there are a whole host of MT tags that have been ported from Perl to PHP. These would be the core...

continue reading ...

4. FAQ: Entries or Comments with alternating Style

Movable Type Weblog, Tutorials, 23 KB, 1171 words

Question

In Movable Type, entries or comments or other objects are often shown in lists. For example, the main index shows the most recent entries, a category archive also shows entries, or an individual entry archive shows comments. I preferred if not all items in such lists were styled the same. For example, there should be an alternating white / gray background. How can this be done?

Answer

Fortunately, the answer can be given in a generic way. The technique that I am going to show can be used with all types of objects (entries, comments, categories, etc.) and any number of different styles.

For showing the basic idea I will create a list of entries using 3 different styles....

continue reading ...

5. A Tag within a Tag

Movable Type Weblog, Tutorials, 21 KB, 1106 words

In Movable Type, we use tags for defining the flow within a template and for accessing the database. You can influence a tag's behavior with the help of attributes. These attributes define a value for some parameter.

Unfortunately, the value for an attribute may only be a constant. However, you will sometimes have the need for setting the value to the result of another tag. Movable Type will not support such a situation, but a plugin will help.

An Example

Suppose you have a template module that you want to include from many different places. For example, you want to call this module from both an individual entry archive and the main index. Inside the template, you then want to...

continue reading ...

6. alogblog's MTy plugins

alogblog, Plugins, 26 KB, 988 words

I'm happy I could provide this plugin to the MT community.

This plugin, BigTemplateWindow, is for a really big template editing window. The size of template editing box is only limited by that of your monitor. :) First I developed this just for a big template box. In the process of doing it, several useful features was added. I hope almost all MT users could be a little happy by using this.

Continue reading "BigTemplateWindow" »

continue reading ...

7. Grouping a List of Entries by Month

Movable Type Weblog, Tutorials, 29 KB, 1997 words

It is a common scenario to have a list of entries sorted by date of publication. As this list may be rather long, it is reasonable to group entries and mark each group with a distinct group header. If you want to group by day, you can use the MTDateHeader tag for this task. However, what can be done, if you prefer to group by months?

An example

Suppose you have a couple of entries. Then you might want to create a structured list as follows:

Jan 16th, 2005 - First entry from Jan 16th, 2005 - Second entry from Jan 16th, 2005 - Third entry from Jan 16th, 2005 Jan 20th, 2005 - First entry from Jan 20th, 2005 - Second entry from Jan 20th, 2005 Feb 3rd, 2005 - First entry from...

continue reading ...

8. Key Values Plugin

Brad Choate, Plugins, 101 KB, 4889 words

Yes, I realize Movable Type is not a general-purpose content management system, but if you're in a pinch it can do wonders. Especially with this plugin, which allows you to associate other bits of data with your entries which can be extracted conviently in your templates. (Click the more link for more information.)

Availability

You can download this plugin here: mtkeyvalues-1_53.zip

Installation

To install, place the...

continue reading ...

9. Building a Weighted Category List

Eat Drink Sleep MT, Tutorials, 27 KB, 1064 words

A while ago I read What's this blog about?, which showed a weighted list of keywords that appears on his site. I thought that was a cool idea, to show - based on font size - the most written-about topics.

What I put together isn't anywhere near that complex. The weighted category list simply assigns a font size to the category name based on the number of entries associated with that category. Here's a snapshot of danandsherree.com's weighted category list:

About Dan (Old Stuff) Boy Scouts Christmas Computers Crafts danandsherree.com News Elsewhere in our Life Girl Scouts Movable Type Music, Movies and Television Photography Pinball the Cat...

continue reading ...

10. Blendy - Blog Entry Distributor

alogblog, Plugins, 19 KB, 1170 words

I would categorize a BLOG content into mainly two groups. One for Broadcasting my opinion, which can be one about a social, political, technical, or entertainmental stuffs, to the world. I want as many people as possible to listen my voice. And the other is wholly for LOGging my personal affairs. I don't care who would see it or not.

Then, what means do I have in order to broadcate my post? How can I provide more opportunity for the world to take something from my posts? It can be possible by using meta blog sites, various syndication feeds, trackback pings or so. Are you satisfied?

...

continue reading ...

This plugin is for blocking feedback[ct(=comment) and tb(=trackback)] spams by adding an additional CCode(hidden ct input field) or adding TCode to original tb ID in tb URL, and then obfuscating that Code for the purpose of not easily guessing it.

MT 3.2's enforced anti-spam system is performed mainly after getting feedbacks. So if many spams are arrived, then it also uses system/MT user resourses when filtering, junking, unpublishing, and deleting spams although it becomes comparatively easy than pre 3.2.

CCode and TCode works in before saving spam feedbacks to MT system. CCode/TCode make it very difficult for spam-bots to guess tb URL and required ct input...

continue reading ...

12. Comment Highlighting: Static or Dynamic

MovableTweak, Tutorials, 30 KB, 1649 words

You've seen it before. An article gets hot and soon you have 50 to 60 comments attached to it. Getting in on the tail end of the conversation can be annoying with that many posts to wade through. So we create a handy little convention that will highlight (change the class of) the comments posted by the author of the post.

There are many, many ways this can be done (plugins, php, etc.) and even more ways to implement it (mutliple author highlighting, specific images for certain commenters, etc.), but we're going to look at two important facets: static and dynamic.

Static vs. Dynamic

This is a debate which we will leave to the professionals. I will only...

continue reading ...

13. Making the Most of SpamLookup

Learning Movable Type, Tutorials, 26 KB, 1619 words

This tutorial is written by LMT guest author Neil Turner and is cross-posted on Neil's World.

Since upgrading to Movable Type 3.2 I've dumped Jay Allen's MT-Blacklist and instead made SpamLookup handle comment/trackback spam on its own. The plugin is included by default on MT 3.2, and while it can do a good job as it is, you might like to try some tune-ups to make it more effective. Moderation and Junking

In Movable Type 2.x, comments just had one status - published. Any spam blocking system could only accept or deny comments and trackbacks. In MT 3.0x and 3.1x, comments gained an additional status - ‘moderated'. This was where comments could be held for human...

continue reading ...

14. MTTrackbackEntry v0.6 beta

MT-Hacks, Tutorials, 12 KB, 1016 words

For a complete list of the new features in v0.6, click here.

MTTrackbackEntry is a Movable Type plugin and hack that enables you to create new entries from the Trackbacks that you receive. In other words, it enables other people to post new entries in your blog, simply by pinging an entry or category on your blog. The title of this plugin/hack could just as easily be called TrackbackCrosspost, since it can act as a trackback-based cross-posting tool.

Currently, entries are created AND pings are received and recorded by default. In v0.6, actual ping entries can be optionally turned off. So if you turn off pings, TrackbackEntry will only record a new entry. Personally, I can't...

continue reading ...

15. Calculating Age

Brad Choate, Tutorials, 57 KB, 1974 words

Sometimes you would like to display the age of an entry as compared to a specific date. In the case, of my daughter's blog, I've displayed her actual age at the time of each post, based on her birth date and the authored-on date of the entry.

Updated to support time difference too.

Updated to correct date_delta function's accuracy.

This is a Movable Type/PHP tip. I haven't...

continue reading ...

16. WebCron - Pseudo cron scheduler for poor MT users like me

alogblog, Plugins, 22 KB, 1472 words

WebCron is a pseudo scheduler for emulating Unix's cron on MT 3.2 platform. Unix's cron or MS's scheduler enable you to run some tasks on your predefined interval. If you have your own server or buy a premium hosting service, then you can absoluetly enjoy "cron"ing your scheduled tasks. In MT, we can set "Post Status" of an entry to "Scheduled". If you do, publishing of that entry will be postponed until that setting time. As you may predict, this feature needs to use "cron-like-scheduler".

But to poor MT users like ME, these cron-needed-features are "Pie in the sky". Yes it's BIG pie... I even didn't know it's delicious or not because it is in the sky. So I...

continue reading ...

17. DateTags

Staggernation, Plugins, 34 KB, 3553 words

This Movable Type plugin implements a set of template tags related to calendar dates.

Note: The MTDaylightOrStandard tag, which was part of earlier versions of this plugin, is now part of its own plugin.

Required Modules

The DateTags code relies heavily on the Date::Calc Perl module. Depending on your or your ISP's installation, this may already be present on your system. To check whether Date::Calc is installed, open a shell connection to the host on which you're running Movable Type, and type: perl -e 'use Date::Calc'

Hit Enter. If this prints nothing, the module is installed. If it prints an error message, you'll need to install Date::Calc. (The MTIfDaysOfMonth and MTBirthstone tags do not require Date::Calc, so you should be able to use those without the module installed.)...

continue reading ...

18. FAQ: Different Templates for different Categories

Movable Type Weblog, Tutorials, 18 KB, 607 words

Question

I have a couple of categories. I preferred if entries belonging to one category were styled in a different way than entries belonging to another category. Can I have per category templates?

Answer

Movable Type does not allow this right out of the box. However, there are a couple of ways for achieving this behavior.

You can use the Supplemental Category Tags. This is a collection of several category-related tags. Among others, the collection also contains the »MTIfCategory« and »MTIfPrimaryCategory« tags for creating a condition based on an entry's category.

On MT Extensions, Per Category Templates you can read a tip about how to use the...

continue reading ...

19. Merging your blogs

Movalog, Tutorials, 31 KB, 1233 words

UPDATE: Multiblog 1.1 has been released which fixes bugs with the GlobalListings. I have updated the tags in this tutorial to correspond to MultiBlog only.

Have you got two or more blogs that you would like to 'merge.' By merge I mean show all entries on one page, chronologically and inline - for a greater understand take a look at my blog. The front page shows entries from the main blog plus the sideblog - the sideblog entries are formatted differently, the little bars !

The plugins you will need are: * MultiBlog * GlobalListings

Multiblog does have the GlobalListings plugin built into it, but at the time of writing this tutorial that section of the plugin didn't work. So I am using...

continue reading ...

20. Supplemental Category Tags

Brad Choate, Plugins, 109 KB, 3662 words

Here's a little plugin that provides some new Category tags for Movable Type.

Availability

You can download this plugin from here: mtcatx-1_5.zip

Requirements

The following are requirements for using this plugin: • Movable Type 2.21 or later • MT-Regex (if using the 'pattern' attribute of the IfCategory or IfPrimaryCategory tag).

Installation

To install, place the 'catx.pl' file in your Movable Type...

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