Another plugin I wrote while testing MTMoreLikeThisFromOthers . As before, I figured people could get some use out of this.
Here is an example of its use:
<MTEntry id="118">
<$MTEntryTitle$><br />
<$MTEntryBody$>
</MTEntry>
Download entry.tar.gz or entry.zip, unpack it, and place entry.pl in your plugins directory.
MTEntry
- Container tag for one specified entry
- Arguments:
- id: the entry id to use ( required )
ChangeLog:
- Version 0.25: Now supports embeded MT Tags in the [MTTag attr="something"] format for the id argument
- Version 0.15: Fixed to work with MTEntryDate and MTEntryIf tags
- Version 0.12: Fixed to work with DB sites as well
- Version 0.1: First version
template_tags=MTEntry
So, is this basically doing the same thing as this use of the SQL plugin, but with less code, and without the need for mySQL? Can any of the MTEntry* tags be used, or just those used in your example?
Exactly. Any of the MTEntry tags should work. Just let me know if they don't, and I'll do what I can to fix it. :)
Where is the plugins directory?
I didn't find any .pl files anywhere
If you haven't installed any plugins before, then you probably don't have a plugins directory already. You'll need to create one in your Movable Type directory.
hi ... tried the plugin and it works ... but i got a "warning" during rebuilding...
MT::App::CMS=HASH(0x835158c) Use of uninitialized value in concatenation (.) at lib/MT/Template/Context.pm line 894.
anything wrong?
oh I will definitely be playing with this one this weekend!! thanks :)
>You'll need to create one in your Movable Type directory.
Hi, I was referred to this plugin by girlie. I'm new to this whole plugin thing. Where in my directory do I create the plugin directory? and do I need to set any permissions?
Thanks!
This is brilliant, it's exactly what I was looking for to post some permanent contnent to the front page of my blog. Thanks David.
Hey David, nice job. I have a question though- is there any way to make the id parameter dynamic? I am trying to use an ASP variable- my tag looks like this
">
But when I go to rebuild it in MT, I get an error saying that is not found (obviously it's not found, the MT rebuild is parsing without taking into account that there is a variable).
Is there any workaround to this?
Jai
Besides making it the id parameter dynamic, I was wondering if it's possible to have multiple ids in the parameter, separated by commas.
So <MTEntry id="45,46"> would return the two entries that have id 45 and 56 respectively.
That way you don't have to write two MTEntry lines.
I really want to use this plugin in combination with the processtags plugin in the other entry but for some reason this does not work. any thoughts?
YAY! YAY YAY YAY YAY YAY!!!
I've been combing every MT site i could find for a solution to the context on my comment preview and error pages being out of wack. The problem was that the entry date was showing the current date, which broke my image paths (which are based on the date of the entry). I tried wrapping the whole page in an tag but for some reason that was giving me more than one entry, even though the comment form was passing in an EntryID.
Anyway, long story short, this plugin provides the right context for my comment preview and error pages, so all my entry-related variables resolve properly and comments can be previewed in context. The syntax I used was:
yay! thank you so much!
Getting an error on Rebuilds:
Building entry 'LastEntryTitle' failed: Parse error in template 'Category Archive': with no
In my Category Archive template I have the following:
I've got a closing tag in the template, and have even tried adding more, but I still get this error on whatever the last entry is. Despite this error MT does process everything correctly, and the end result is fine. It seems to be this plug-in is the source of my trouble. Any advice?
oops code killed in previous post. See:
http://www.movabletype.org/support/index.php?act=ST&f=9&t=37410
I have downloaded entry.pl and then uploaded into public_html/mt/plugins. But I don't know how to make a post stick. The code displayed above in David's post (in black box)--where should that go?
I basically just want to render a post sticky, but only for one day. Is this possible? Thanks so much for any input.
Thanks. This is very much what I was looking for when I filed a feature request for MT and Tech Support sent me to this page.
The one thing I still want however is the ability to include a specific URL (not necessarily an MT entry id). That would be most cool.
wow.... after inoticing yr help pages so often i realize u make all the good plugins (well alot)..... ya wow.... thnx. yr sooooo great...... redtv luv U!
Writing If...Else statement in movabletype
Can someone please help me?
I am trying to determine how to identify my archive link so that I can then select which menu structure to show.
Example: url1="country/country_entertainment/" and url2="country/country_sports/"
If str(url) contains "entertainment"
then hilite (menu_ent)
elseif str(url) contains "sports"
then hilite (menu_spt)
I know there is a MTElse...but then how do I get the individual url1 and url2 without getting all the category urls?
And how do I check if the url returned have either "entertainment" or "sports"?
Ps. My name is Tun Kwan, student from Sabah Tshung Tsin Secondary School, Malaysia