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.
378 hits12345678910

21. PHP should not always be INCLUDED as your friend

StyleMonkey, Tutorials, 18 KB, 748 words

Using includes is a wonderful way to reuse code through modularity on your site. Elise over Learning MovableType has a great tutorial on using includes, and I suggest you read it if you haven't already since this article will take off where hers leaves off and discusses a problem that dynamic site owners encounter when trying to use includes.

In a dynamic environment most people feel that PHP includes is the way to go and generally they are right. When they try to include MovableType tags in a PHP include, however, a problem raises its ugly head. This article will explain why this happens, and how to fix it. NOTE: This article only applies to dynamically generated pages.

I won't go into how great PHP...

continue reading ...

22. PHP and MySQL for Dynamic Web Sites - Book Review

Learning Movable Type, Tutorials, 19 KB, 503 words

Some of the more interesting customizations you can do with your Movable Type weblog require using PHP scripts, either on their own or in conjunction with the MySQL database. Some scripts are easy enough to install and require very little configuration. Others, however, require that you know something about how the script works, or how your MT database is set-up, or both.

Larry Ullman's PHP and MySQL for Dynamic Web Sites is a well organized, fairly comprehensive, easy-to-follow introduction to PHP and MySQL. Ullman expects you to know basic HTML and have had some exposure to programming. I took a basic Pascal programming class 25 years ago, but that's about it and I still...

continue reading ...

23. Dirify in PHP

Six Apart ProNet Weblog, News, 14 KB, 124 words

This one's a handy reference: Dirify in PHP, courtesy of Adam Kalsey. If you've ever used the "dirify" attribute in a Movable Type template tag, this function performs the same text transformation, but in PHP.

It's somewhat underreported that in Movable Type 3.x, we're using cleaner URLs by default (in the format yyyy/mm/dd/dirified_post_title.html) but if you're migrating over a site from earlier versions of Movable Type, or just want to use compatible logic when creating your own PHP output, you'll definitely find Adam's code snippet handy.

Trackbacks:

Previous Entry: The Life & Times of Michmac

Next Entry: Learning Movable Type

continue reading ...

24. Converting to PHP

Six Apart Knowledgebase, Manuals, 27 KB, 516 words

Question

How can I switch my site to use PHP file extensions?

Answer

Update Archive Settings

Log into Movable Type and navigate to Settings > Publishing1. Locate the setting for File Extension for Archive Files under Publishing Preferences and enter php in the setting field (without a leading period).

Scroll down to Archive Mapping2, and check to see if any of the Archive File Template boxes are filled in - if so, change the extension to php there as well. Press the SAVE button.

Update Index Templates

Navigate to Templates. For each Index Template...

continue reading ...

25. php includes in cgi templates

geekmum {movable cafe}, Tutorials, 16 KB, 175 words

I wanted to use a php include in my Comment Listing Template, which is actually run inside comments.cgi. An ordinary php include wouldn't do the trick. Another plugin to the rescue... MTIncludePlus. This provided the perfect solution in the form of new container tag, MTIncludeURL. (FYI, this plugin also adds tags MTIncludeFile and MTIncludeModule.) Here's an example of what I used to call a rotating tagline into my banner in dynamic templates that run as cgi:

<MTIncludeURL timeout="15">http://domain.com/tagline/rotator.php</MTIncludeURL>

(obligatory reminder: code is all one line)

This also works in the default search templates.

Posted by kate on March 14, 2005 10:58...

continue reading ...

26. PHP passing a variable

PubHacks, Tutorials, 4 KB, 31 words

Required: PHP

http://www.faqts.com/knowledge_base/answer/versions/index.phtml?id=28719

Related Entries:

Posted by Iki at October 25, 2004 07:42 PM

Comments

continue reading ...

27. PHP Include'd Inline Comments For Movable Type

Eat Drink Sleep MT, Tutorials, 15 KB, 242 words

A few months back I implemented Inline Trackbacks using PHP as outlined in Learning Movable Type. The benefit is that Trackbacks become dynamic, not requiring a rebuild to be publicly visible - in other words, less work for me!

With that idea in mind, I've hacked the comments to work the exact same way. Just as detailed in Inline Trackbacks, copy the comment code into the Comment Listing template. In the Individual Archive template add <?php include('<$MTCGIPath$><$MTCommentScript$>?entry_id=<$MTEntryID$>'); ?> to make it all work. That's it! The main benefit of doing this is similar to Inline Trackbacks - when I delete comment spam a...

continue reading ...

28. Missing file - sidebar.php

StyleMonkey, News, 14 KB, 94 words

It seems I neglected to create a "sidebar.php" file for my script that serves the styles up to users. So there is an error on the page that serves them up. It doesn't effect the styles at all. You are given all the templates you need, it's just my nav sidebar that isn't appearing on the page. I'll get that fixed, but it probably won't be until Monday.

Posted by The Style Monkey at August 28, 2005 09:25 AM

continue reading ...

29. My PHP Output Files Need To Be Executable

Six Apart Knowledgebase, Manuals, 27 KB, 429 words

Question

My webserver requires that the permissions on my .php files be set to 755, but the files Movable Type generates have permissions set to 666.

Answer

The permissions on files created by Movable Type are determined by the HTMLPerms configuration default, which is 666. You can override this default in mt-config.cgi1: # HTMLPerms 0777

If you uncomment this setting2 in the file, default permissions for all files created by the system will then be set to 777.

Note that the setting for HTMLPerms will be adjusted by the the HTMLUmask setting in...

continue reading ...

30. Paged content using Movable Type!

Brad Choate, Tutorials, 46 KB, 1207 words

This is a test with paged "more" text... implemented using a couple of PHP tricks. :)

Read on to see it in action and to see how it's done.

The implementation of paged content is pretty simple. I'll use this test entry to explain how I did it. First of all, you'll need PHP 4 installed on your server. You can use this same technique with other server-side tools like ASP, ColdFusion, etc., but this...

continue reading ...

31. Smarty. MT. Dynamic

Movalog, Tutorials, 28 KB, 1017 words

Smarty Docs

Now that Smarty is built into MT, you've got a whole load of new features that you can use. Just have a look at the documentation everything discussed in those docs are available to MT users, the only difference is instead of single braces you need to use double, for example where in the Smarty docs it gives you a line like this {include file="sidebar.php"}

when you implement that into MT it will need to become {{include file="sidebar.php"}}

This was chosen over the single braces because the single braces can cause problems when you start writing Javascript. None-the-less if you really wish to use single braces, find in your mtview.php template the following line (thanks...

continue reading ...

32. Breaking Plugins

Movalog, Tutorials, 29 KB, 1118 words

UPDATED 09/10: There was a problem with the files as phps so I've zipped them UPDATED 09/04: To fix SmartyPants

So you've downloaded the very new 3.1 with all the amazing features but you've found one problem, your plugins no longer work with the dynamic templating. Well its not only plugins, text filters also no longer work.... Here are some methods by which you can combat this problem, some may not work in all cases but its better than nothing for other cases.

• Text Filters In a previous tutorial I had linked to PHP Markdown, but a few people have contacted me about Textile as well. So I have collected PHP versions of Markdown, Textile and SmartyPants Just download the following...

continue reading ...

34. Troubleshooting Smarty Errors

Learning Movable Type, Tutorials, 27 KB, 1605 words

This tutorial is written by LMT guest author Arvind Satyanarayan of Movalog. Tutorial cross posted on Movalog and Learning Movable Type

If you move from static publishing to dynamic publishing in Movable Type, you may encounter a variety of confusing error messages in Smarty, the system MT uses to create its dynamic pages. This tutorial will explore several of the errors you may experience, explain what they mean, and show you how to solve them. This is by no means a complete guide to every error you may experience; I will continue to add to this tutorial as I come by more of them.

The Basics

Many of the error messages you may see will take the format: Smarty Error: [in mt:##...

continue reading ...

35. Troubleshooting Smarty Errors

Movalog, Tutorials, 32 KB, 1577 words

Tutorial cross posted on Movalog and Learning Movable Type

If you move from static publishing to dynamic publishing in Movable Type, you may encounter a variety of confusing error messages in Smarty, the system MT uses to create its dynamic pages. This tutorial will explore several of the errors you may experience, explain what they mean, and show you how to solve them. This is by no means a complete guide to every error you may experience; I will continue to add to this tutorial as I come by more of them.

The Basics

Many of the error messages you may see will take the format: Smarty Error: [in mt:## line:##]

This error message provides useful information that can help you...

continue reading ...

36. Random Image Rotation

A List Apart, Tutorials, 11 KB, 1129 words

One of the challenges facing the modern web designer is to create sites that appear fresh and new every time a visitor shows up.

It's one thing if the site you're designing is a news site, for example, where stories or headlines will be updated on a regular basis, providing fresh content on the hour - or even more frequently. But what about those of us designing sites for clients with relatively static pages whose content changes infrequently? How can we provide fresh, changed content for our visitors on each subsequent visit, without relying on someone to generate this content on a daily or even hourly basis?

Changing the page only slightly and in...

continue reading ...

37. A Better Image Rotator

A List Apart, Tutorials, 15 KB, 1660 words

About a year ago, I wrote an article, introducing a method for displaying a random image every time someone visits a web page. Administration was simple: just add or remove images from a folder on the server, and they would appear (or disappear, respectively) from the pool of random images being displayed on that page.

There are many benefits to randomizing an image on a web page, one of the most significant being the feeling of freshness it can add to an otherwise static site. Visitors returning to the page feel that, although the content might not have been updated, something has changed, and the site might be worth revisiting again in the future.

The Downside

Although the implementation...

continue reading ...

38. Dynamic Site Design: Displaying Thumbnails with a Random Background

Eat Drink Sleep MT, Tutorials, 23 KB, 994 words

While we often talk about "dynamic" sites and site designs, let's face it, they're all rather static: the same basic templates are used with different content. "Fluid" designs allow for some variation, but most use the same computer to view every site, so they won't see the "fluidity" (if that's a word). For the most part, that's a fine thing - a connected, familiar view of every page makes your site more comfortable and easier to use.

I wanted to overcome some of the static-ness of most site designs with Scrapbook. Photos and photo galleries are a popular thing on danandsherree.com, so they were an obvious...

continue reading ...

39. 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 ...

40. Htaccess and Dynamic Publishing

Learning Movable Type, Tutorials, 29 KB, 1874 words

Co-authored by Arvind Satyanarayan and Elise Bauer Tutorial cross posted on Movalog and Learning Movable Type

With the release of Movable Type 3.1 comes a new and powerful feature - Dynamic Publishing. To take advantage of Dynamic Publishing, you need to edit or create a file on your Apache server called .htaccess as explained in the Movable Type Manual. htaccess files can give you extra control over your server, allowing you to password protect directories, enable server side includes, generate custom error messages, and block users by IP address among other things. (See this Guide to .htaccess for more information.)

Note: You should really know what you are doing before...

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