Plugins
: Global Listings 2.0.2
Jan 03 2003
| #
| C:44
Global Listings 2.0.2
January 3, 2003
- updated February 8, 2006
(Download)
This plugin allows you to list Entries, Comments, Categories and TrackBack pings across multiple blogs within one MovableType installation.
Important: If you want a page that contains <MTGlobal…> tags to be correctly rebuilt every time you update an entry or comment in a related blog, you must use the same template in each of the blogs. The easiest way to do this is to link the template to a file. All the affected blogs should link to the same file, so that you only have to edit it in one place.
General
MTGlobalListingsVersion
Returns the current version of the Global Listings plugin.
MTIfGlobalBlog
Conditional tag that is true if the current global object is not a member of the blog being built.
Used inside of MTGlobalObjects or MTGlobalObject tags.
MTIfNotGlobalBlog
Conditional tag that is true if the current global object is a member of the blog being built.
Used inside of MTGlobalObjects or MTGlobalObject tags.
MTGlobalObject
Container tag for the a specified object within any blog.
The following attributes are supported:
- id=”123”
Specifies the ID of the object.
MTGlobalObjects
Container tags that generates a listing of specified objects across multiple blogs.
In the context of a date-based archive, only object in the specified date range are listed.
The following attributes specify which blogs are included:
- include_blogs=”3,4,6”
Limits the objects to blogs specified in the attribute. The default behavior is to include all blogs.
- exclude_blogs=”3,4,6”
Excludes objects from blogs specified in the attribute. The include_blogs setting overrides the exclude_blogs setting.
MTGlobalObjectCount
Tag that returns a count of the specified object across multiple blogs.
In the context of a date-based archive, only object in the specified date range are counted.
The following attributes specify which blogs are included:
- include_blogs=”3,4,6”
Limits the objects to blogs specified in the attribute. The default behavior is to include all blogs.
- exclude_blogs=”3,4,6”
Excludes objects from blogs specified in the attribute. The include_blogs setting overrides the exclude_blogs setting.
Global Entries
- MTGlobalEntries
A container tag representing a list of entries/posts from multiple blogs in a MovableType installation. The actual list of posts can be configured using optional attributes to this tag. The default is to display the last 7 days of entries. This tag supports all the attributes of the MTEntries tag, with the exception of the category attribute.
In addition to the MTGlobalObjects attributes, you can also provide one of the following additional attributes:
- lastn_modified=”N”
Display the last N modified posts to this blog, where N is some number greater than 0. The lastn setting overrides the lastn_modified setting.
- MTGlobalEntryCount
Returns the number of entries in multiple blogs.
Accepts MTGlobalObjectCount attributes.
- MTGlobalEntry
Container for a single entry in any blog.
- id=”123”
Specifies the ID of the entry.
Global Comments
- MTGlobalComments
A container tag representing a list of comments across multiple blog. This tag supports all the attributes of the MTComments tag.
In addition to the MTGlobalObjects attributes, you can also provide one of the following additional attributes:
- MTGlobalCommentCount
Returns the number of comments in multiple blogs.
Accepts MTGlobalObjectCount attributes.
- MTGlobalComment
Container for a single comment in any blog.
- id=”123”
Specifies the ID of the comment.
Global Categories
Global Pings
- MTGlobalPings
A container tag representing a list of TrackBack pings across multiple blog. This tag supports all the attributes of the MTPings tag.
The tag accepts MTGlobalObjects attributes.
- MTGlobalPingCount
Returns the number of TrackBack pings in multiple blogs.
The tag accepts MTGlobalObjectCount attributes.
- MTGlobalPing
Container for a single TrackBack ping in any blog.
- id=”123”
Specifies the ID of the TrackBack ping.
Version History
- Version 2.0.2 - December 9 2003
Pin listings to date range inside of date-based archives.
Added listings: MTGlobalCategories,
MTGlobalPings.
Added counts: MTGlobalEntryCount,
MTGlobalCommentCount,
MTGlobalCategoryCount,
MTGlobalPingCount.
Added objects: MTGlobalEntry,
MTGlobalComment,
MTGlobalCategory,
MTGlobalPing.
Added MTIfGlobalBlog and MTIfNotGlobalBlog
conditional tags.
- Version 1.05 - September 9 2003
Fixed recently_commented_on.
- Version 1.04 - August 26 2003
Fixed sometimes-incorrect MTDateHeader, MTDateFooter, MTEntriesFooter when specifying include_blogs/exclude_blogs.
- Version 1.03 - July 28 2003
If lastn_modified is specified, default sort is modified_on.
- Version 1.02 - Jan 19 2003
Added lastn_modified attribute to MTGlobalEntries.
Fixed some warnings.
- Version 1.01 - Jan 16 2003
Added MTGlobalListingsVersion tag.
Fixed problem with categories not being present.
Added strict checking.
Version 1.0 - Jan 3 2003
Initial release.
-
1)
Thank You Stephen! Works beautifully!
-
2)
is it possible that include_bogs in the documentation a mispelling of include_blogs? I’m adding this to the Plugin directory now! :)
-
3)
I’m getting broken links — missing the category name.
http://enlighteneddreams.fanworks.net/joint_fiction//together/index.phtml
instead of
http://enlighteneddreams.fanworks.net/joint_fiction/times_of_change/together/index.phtml
the archive type is already specified:
$entrylink = “">”;
(this gets fed into a function that does some php processing on the entry)
I also just realized I’m losing /all/ the category info, none of the entry’s categories show…
-
4)
oops:
$entrylink = “<a href="<$MTEntryLink archive_type=”Individual” encode_php=”qq”$>"><$MTEntryTitle$></a>”;
-
5)
It works ok, but now I’d like to regenerate the “main blog” each time a new entry has been posted in each blog.
Which is the easiest and more convenient solution?
-
6)
The first paragraph in this plugin decumentation (the one that begins with “Note:”) describes how to do this…
-
7)
Hey Stepan, is it possible to have certain blog entries show different MTtags depending on blog id?
for example, let’s say I have 2 blogs- I want to do this:
<MTGlobalEntries include_blogs="1,2">
if blog_id=1 then show this:
<MTEntryBody><MTEntryBodyMore>
if blog_id=2 then show this
<MTEnryBody><MTEntryID><MTEntryTitle><MTEntryExcerpt>
Is there a way to do this, or finagle it somehow?
Let me know- Jai@brinkofski.com
-
8)
You should be able to achieve this using the Compare plugin.
-
9)
I’m using your plugin because I really like the lastn_modified feature. I was wondering if you’d considered creating a lastn_modified plugin for MTEntries. I’ve run into several places, such as category archives, where I want to use the lastn_modified feature, but I just can’t use MTGlobalEntries.
-
10)
Though the page says “This tag supports all the attributes of the MTEntries tag…” I replaced <MTEntries recently_commented_on=”10”> with <MTGlobalEntries include_blogs=”1,2,5” recently_commented_on=”10”> and saw everything between the opening and closing tag disappear in my output.
Is the “recently_commented_on” attribute supposed to work? If I replace the “recently_commented_on” with “lastn” I get output, though obviously not what I want in the end. ;)
-
11)
Good catch. I’ve fixed this in version 1.05.
-
12)
It works great now, thanks!
-
13)
[I posted this in the MT support forums already, but I wasn’t sure where you checked most often, so I’m also posting here. Sorry for the annoying duplication.]
I’ve been using this successfully to generate my index pages for some time, but I’ve only recently tried to incorporate MTGlobalEntries into my Monthly Archive pages. Rather than breaking up the archives by month, it dispays ALL the entries (not just the ones for that month). I tried replacing MTGlobalEntries with MTEntries to see if there was something else srewing with the monthly breakout, but MTEntries rendered the entries correctly into the different months.
I just have a very simple table-grid formatted list of blog name, category, date, entry title, author name. Any clue what I’m doing wrong? I posted the relevant part of my template in this thread at the MT forums: http://www.movabletype.org/support/index.php?act=ST&f=20&t=12604
Thanks in advance for your help — and thanks for the awesome plug-in!
-
14)
I have the same problem as previous poster. I`m currently trying to fix this by using MTIfEqual, but that’s painfull.
Can this functionality be added?
-
15)
I’m looking into a fix for this issue.
-
16)
Cool blog!
-
17)
Is there any way possible to wrap all the entries within <MTIfGlobalBlog></MTIfGlobalBlog> with something? I have my main blog, and an inline quicklinks blog and I’m trying to integrate the two using your plugin. The only problem I have had is that I want all the quicklinks (blog id=2) in between 2 posts on the main blog (id=1) to be wrapped in a <ul>.
Right now I have something like
<MTGlobalEntries>
<MTIfNotGlobalBlog>[templates for main blog posts]</MTIfNotGlobalBlog>
<ul><MTIfGlobalBlog include_blogs=”2”><li>….</li>
</MTIfGlobalBlog></ul>
</MTGlobalEntries>
any ideas? I just need to figure out how to get something to wrap around the MTIfGlobalBlog and everything inside it. The above wraps each entry that MTIfGlobalBlog pulls off blog 2 and wraps it in its own ul.
-
18)
good
-
19)
I currently use the following code to determine whether or not to display a link to an entry’s comments:
<MTEntryIfAllowComments>
<MTEntryIfCommentsOpen>
<h4><a href=”<$MTEntryPermalink$>#comment”>[comments (<$MTSimpleCommentCount$>)]</a></h4>
</MTEntryIfCommentsOpen>
</MTEntryIfAllowComments>
If I use <MTGlobalEntries> instead of <MTEntries>, this code doesn’t work properly. If the comments are set to “none” then it correctly hides the link. If, however, comments are simply closed, it displays the link. This is not the correct behavior. It works as expected when using <.MTEntries>
-
20)
Ok, I fixed my own problem. Here’s a diff to get it to work. I think this is pretty straightforward, but no warranty yadda yadda yadda…
@@ -72,6 +72,7 @@
EntryIfExtended => $_[0]->text_more ? 1 : 0,
EntryIfAllowComments => $_[0]->allow_comments,
+ EntryIfCommentsOpen => $_[0]->allow_comments eq ‘1’,
EntryIfAllowPings => $_[0]->allow_pings,
}});
});
@@ -242,6 +243,7 @@
DateFooter => $footer,
EntryIfExtended => $e->text_more ? 1 : 0,
EntryIfAllowComments => $e->allow_comments,
+ EntryIfCommentsOpen => $e->allow_comments eq ‘1’,
EntryIfAllowPings => $e->allow_pings,
EntriesHeader => !$i,
EntriesFooter => !defined $entries[$i+1],
Basically, it just seems like support for MTEntryIfCommentsOpen was omitted, so I added it :).
|
|