November 06, 2003
Install in Movable Type
Implementing the visually linked icons is practically the same as implementing smileys in Movable Type
, it can be done in different ways just choose the one that suites you.
I opted here to a mod (hack). I can use ";w;" next to a link to other web site and it will get automatically replaced by the corresponding little image next to the link.
I've adapted the code from here
passing by there
:
Open The file in MTdirectory/lib/MT/Util.pm
After making a backup for your file, look for:
"sub html_text_transform {
my $str = shift;
$str ||= '';"
and add those lines
- $str =~s/\;a;/<img src=\"http:\/\/YOURSITE.com\/FOLDER\/a.png\" width=\"20\" height=\"16\"border=\"0\" alt=\"Audio\"\/>/g;
- $str =~s/\;v;/<img src=\"http:\/\/YOURSITE.com\/FOLDER\/v.png\" width=\"20\" height=\"16\" border=\"0\" alt=\"Video\"\/>/g;
- $str =~s/\;p;/<img src=\"http:\/\/YOURSITE.com\/FOLDER\/p.png\" width=\"20\" height=\"16\" border=\"0\" alt=\"Photo\"\/>/g;
- $str =~s/\;w;/<img src=\"http:\/\/YOURSITE.com\/FOLDER\/w.png\" width=\"20\" height=\"16\" border=\"0\" alt=\"Website\"\/>/g;
Watch the escape "\" and don't forget to change "YOURSITE.com" "FOLDER" to their corresponding values or the image name if you're using your own images.
And now when typing ";a;" it get replaced by ![]()
- ";v;" by

- ":p;" by

- ";w;" by

Here is some other ways to get visuallly linked :
You can use MTinclude tag (to include a file that you created before where there is the img tag and the url for your images) with the aid of the ProcessTags so you can use MT tags inside posts.
Otherwise get the help of bradchoate MTMacro. And if you need a solution for Greymatter if not try javascript's .