Text Wrap

| No Comments

From the original at LMT


This is a tutorial for using CSS or HTML to wrap text to the side of an image,  like so:

flower2.jpgPlaceholder Latin text - Vt enim quidam monumentis suis testati sunt, in Hispania pro consule et a sociis pecunias accepit emendicatas in auxilium aeris alieni et Lusitanorum quaedam oppida, quanquam nec imperata detrectarent et aduenienti portas patefacerent, diripuit hostiliter. Gallia fana templaque deum donis referta expilauit, urbes diruit saepius ob praedam quam ob delictum; unde factum, ut auro abundaret ternisque milibus nummum in libras promercale per Italiam prouinciasque diuenderet. In primo consulatu tria milia pondo auri furatus e Capitolio tantundem inaurati aeris reposuit. Gallia fana templaque deum donis referta expilauit, urbes diruit saepius ob praedam quam ob delictum; unde factum, ut auro abundaret ternisque milibus nummum in libras promercale per Italiam prouinciasque diuenderet.

Redirects

| No Comments

From original LMT post


Suppose you change the name of a file. But instead of deleting the old file that is on your server (that may have many sites already linked to it) you want to forward anyone who goes to the old file URL to the new one. There are three basic ways to do this - with PHP, htaccess, or a Meta Refresh tag.

PHP
If you have php enabled on your site and server, you can use the following code to redirect a visitor to a new page:

<?
Header( "HTTP/1.1 301 Moved Permanently" ); 
Header( "Location: http://www.new-url.com" ); 
?> 

You cannot do this method from within the Movable Type editing window. Download the file from your server using FTP software. Using a text editor (such as BBEdit for the Mac or Notepad for the PC), place the code at the very top of your page. Use FTP software to upload the file back up to your server.

1.  Create Custom Fields

In System Overview, select Preferences > Custom Fields

Select +New Field

2.  Edit Registration Form

Go to System Overview > Design > Templates > Registration Form

Add this code:

<mt:loop name="field_loop">
<mt:if name="__first__">
<input type="hidden" name="customfield_beacon" value="1" id="customfield_beacon" />
</mt:if>
<!-- start-customfield_<mt:var name="basename"> -->
<mtapp:setting
id="$field_id"
label="$name"
hint="$description"
shown="$show_field"
show_hint="$show_hint"
required="$required">
<mt:var name="field_html">
</mtapp:setting>
<!-- end-customfield_<mt:var name="basename"> -->
</mt:loop>

Then select Save.

3.  Edit Profile Form

Go to System Overview > Design > Templates > Profile Edit Form

Add the same code as above.

4.  If you only want to display one custom field in certain area on a form, and not all of them in a row, then use If statements.  Here's an example if the custom field you want to use is named "Website Name" with a basename of "website_name".

<mt:if name="field_id" eq="customfield_website_name">
</mt:if>

Your custom field's basename, preceded by "custom field".

Example:

<mt:loop name="field_loop">
<mt:if name="__first__">
<input type="hidden" name="customfield_beacon" value="1" id="customfield_beacon" />
</mt:if>
<!-- start-customfield_<mt:var name="basename"> -->
<mt:if name="field_id" eq="customfield_website_name">
<mtapp:setting
id="$field_id"
label="$name"
hint="$description"
shown="$show_field"
show_hint="$show_hint"
required="$required">
<mt:var name="field_html">
</mtapp:setting>
</mt:if>
<!-- end-customfield_<mt:var name="basename"> -->
</mt:loop>

Thanks to Aaron Vanderzwan for this last tip.


I just finished installing Movable Type 4!

| 1 Comment
Welcome to my new blog powered by Movable Type. This is the first post on my blog and was created for me automatically when I finished the installation process. But that is ok, because I will soon be creating posts of my own!

Recent Comments

  • Elise: This is from an email from Beau: In the View read more
  • Elise: Movable Type also created a comment for me as well read more

Recent Assets

  • flower2.jpg

Find recent content on the main index or look in the archives to find all content.