Help - Search - Members - Calendar
Full Version: Quick Links
Movable Type Community Forum > Additional Resources > Tips and Tricks
erinther
Hi there,
Ive used otherblog plugin sothat I can easily make a quicklink sidebar in my main weblog.But as you can see in kottke.org, quicklinks is not in sidebar,but it is between teh enteries.How is it possible to do this?
kadyellebee
I use the Global Listing plugin to display multiple blogs entries on one page, integrated together in order by date.

Kristine
erinther
Can you please write a sample?thank you
erinther
Thank you.I did it..!
erinther
I did it...but I have problem:smile.gif).How can I format them in a adifferent way from main blog's entries?For example different fonts and ...?
kadyellebee
You could create stylesheet classes based on your blog names -- like .blogbody1 and .blogbody2 for blog 1 and blog 2 respectively. Then use
CODE
<div class="blogbody<$MTBlogID$>">
instead of just class="blogbody".

That's one of many ways to do it, but probably the easiest. smile.gif

Hope that helps,
Kristine
nammer
Just for reference, in case anyone comes along and says "I want to do that too," the integrated quicklinks tutorial is right up your alley.

Donna
erinther
Hi Donna,
All the last night I worked with matt's tutorial and I don't know why I couldn't do it.Then I saw your comment.My quicklink blog is in subdirectory of main weblog.Then main weblog's id is 1 and the other is 10.But I don't get the result.Please tell me what to do step by step as if I'm a 6 years old!
erinther
My main blog's id is 1 and the otherone(quicklink blog) is 10.
How shal I configure this code?
CODE
<MTSetVar name="openedList" value="0">
<MTSQLEntries query="select entry_id, entry_blog_id, date_format(entry_created_on, '%Y.%m.%d') as mtdate, date_format(entry_created_on, '%h.%i.%S') as mttime FROM mt_entry where entry_blog_id in (1,2) and entry_status=2 order by mtdate desc, entry_blog_id desc, mttime desc limit 0,20" unfiltered="1">
<MTDateHeader>
 <h2 class="date"><$MTEntryDate format="%B %e, %Y"$></h2>
 <MTIfEqual a="[MTSQLColumn column='2']" b="2" numeric="1">
   <ul class="quicklinkBox">
   <MTSetVar name="openedList" value="1">
 </MTIfEqual>
</MTDateHeader>
<MTIfEqual a="[MTSQLColumn column='2']" b="1" numeric="1">
 <MTIfEqual a="[MTGetVar name='openedList']" b="1">
   </ul>
   <MTSetVar name="openedList" value="0">
 </MTIfEqual>
 <!-- regular weblog entry -->
 <div class="entry">
   <b class="entryTitle"><$MTEntryTitle$></b><br/>
   <$MTEntryBody$>
   <MTEntryIfExtended> <i><a href="<$MTEntryPermalink$>">Read More...</a></i></MTEntryIfExtended>
   <p class="entryPostscript"><$MTEntryDate format="%X"$>
     [<a href="<$MTEntryPermalink$>"><$MTEntryCommentCount$> comments</a>]
   </p>
 </div>
</MTIfEqual>
<MTIfEqual a="[MTSQLColumn column='2']" b="2" numeric="1">
 <!-- quicklink entry -->
 <li class="quicklink">
   <a href="<$MTEntryBody$>" class="quicklinkLink"><$MTEntryTitle$></a>
   <MTEntryIfExtended>: <$MTEntryMore$></MTEntryIfExtended>
   [<a href="<$MTEntryPermalink$>"><$MTEntryCommentCount$> comments</a>]
 </li>
</MTIfEqual>
<MTDateFooter>
 <MTIfEqual a="[MTGetVar name='openedList']" b="1" numeric="1">
   </ul>
   <MTSetVar name="openedList" value="0">
 </MTIfEqual>
</MTDateFooter>
</MTSQLEntries>
<MTIfEqual a="[MTGetVar name='openedList']" b="1" numeric="1"></ul></MTIfEqual>
kadyellebee
That looks like a pretty complex code... are you sure you need the MTSQL plugin to do this?

Here's the basics of how I use the GlobalListing plugin to do this, combined with my earlier suggestion of classes to determine the blog id.

CODE
<MTGlobalEntries include_blogs="1,10">
<MTDateHeader>
 <h2 class="date"><$MTEntryDate format="%x"$></h2>
</MTDateHeader>
<div class="blogbody<$MTBlogID$>">
    <h3 class="title"><$MTEntryTitle$></h3>
    
    <$MTEntryBody$>

    <div class="posted">Posted by <$MTEntryAuthor$> at <a href="<$MTEntryPermalink$>"><$MTEntryDate format="%X"$></a>
<!--insert any other MT code you want in the posted line like comments, trackbacks, and so on.... left out for space-saving -->
    </div>
</div>
</MTGlobalEntries>

and then in your stylesheet:
CODE
.blogbody1 {color:#000000; font-size: 100%;}
.blogbody10 {color:#333333; font-size: 90%; padding-left: 10px; padding-right: 10px; background-color:#cccccc; }


Hope that gives you a clearer look at what I was trying to explain before.

Kristine
girlie
The reason the code erinther posted is so complex is because the intent is for entries from each blog to not necessarily have different styles, but display the actual content differently.

The normal blog entries are displayed as, well, normal blog entries; the quicklink entries are grouped in an unordered list. The openedlist variable is keeping track of when the list may need to be closed before posting content from the main blog.

I played around with that code last weekend, and mine looks even more hairy than the above, because I merged three blogs. I used the first version of the tutorial, but with MTSQL instead of GlobalListings, so mine is a weird hybrid of the two. Ugh. It hurt, and I'm not sure I could even explain the code I ended up with to another living being. I'm not even sure I can explain it to myself. huh.gif

But erinther, try first replacing the 2s with 10 only where it says b=2 (not any of the column=2). See if that helps any.
erinther
Yes! I know .your code works very well and I tried it and also tried to use diferetn CSS but I could not figure out how I can do exactly how it is done in kottke.org.In any way thank you very much.I think your code is very handy and simple to work with.
girlie
My code? huh.gif

Or Kristine's??
erinther
yes!Kristine's code!But in any way I could do it as it is on kottke.
Thank both of you.You are wonderful!
LisaJill
I don't totally understand the MTSQL code posted above. However, I also use MTGlobalEntries to post 3 weblogs to my main weblog, I could easily add the quicklinks the way kottke does it.

I am combining several different content styles, especially the photoblog which uses a very different template. Here's the code that I use:

CODE
   
<MTMacroApply>
<MTGlobalEntries include_blogs="1,8,9" lastn="7">

    
<MTIfEqual a="[MTBlogID]" b="8" numeric="1">

    
<MTOtherBlog blog_id="1">
<$MTInclude module="Post Header"$>
</MTOtherBlog>

<img src="<MTBlogURL><MTEntryCategory dirify="1">/<$MTEntryBody$>.jpg" alt="<MTEntryMore encode_html="1">"  />
    <br /><br />
<div class="tinytext">    <$MTEntryMore$> </div>
    <br />

    <MTOtherBlog blog_id="1">
<$MTInclude module="Post Footer"$>
</MTOtherBlog>    <MTEntryCategories>
| <a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a>
</MTEntryCategories>

</div>
  </MTIfEqual>
<MTIfEqual a="[MTBlogID]" b="1" numeric="1">

    
<MTOtherBlog blog_id="1">
<$MTInclude module="Post Header"$>
<$MTInclude module="Post Body"$>
<$MTInclude module="Post Footer"$>
</MTOtherBlog>    

<MTEntryCategories>
| <a href="<$MTCategoryArchiveLink$>"><$MTCategoryLabel$></a>
</MTEntryCategories>

</div>
  </MTIfEqual>
<MTIfEqual a="[MTBlogID]" b="9" numeric="1">
    
<MTOtherBlog blog_id="1">
<$MTInclude module="Post Header"$>
<$MTInclude module="Post Body"$>
<$MTInclude module="Post Footer"$>
</MTOtherBlog>    

<MTEntryCategories>
| <$MTCategoryLabel$>
</MTEntryCategories>
    
</div>
  </MTIfEqual>
    </MTGlobalEntries>
</MTMacroApply>


as you can see, blog ID 8 (the top one) is the furthest from the other two, but both have slight differences. Adding my blogroll and showing its extended entry field, so that it was interspersed into the main weblog, would be only a minor issue, by adding another MTIfEqual statement and then creating how I want it to look. =)

If I wanted it indented the way he has his indented, I would simply add to my stylesheet a div container with a right and left margin (to emulate blockquote) and surround the entry code in that div. =)

If you want, I can write it up more explicity...

Just another option, hope it helps...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.