Help - Search - Members - Calendar
Full Version: Any existing tags like "DatePreviousEntry" or...
Movable Type Community Forum > Additional Resources > Tips and Tricks
Drakewl
"DateFollowingEntry" for further operations?

Hi guys, first all my compliments for this great community here, all united through the principles of blogging

now to my little problem, that is bugging me (an advanced newbie) for some time already.
I want to do some date-operations with the Date Compare Plugin (http://www.staggernation.com/mtplugins/DateTagsReadMe.html), but to improve its functionality for my purpose i would need 2 date variables, one for the entry before my current entry (previous one) and one for the entry after my current entry (following one).
Are there such variables or don't i see the forest due to all the trees in front of my face?

Something like the MTDateFooter would be even better, just with the difference that the content is displayed only if my current entry was posted on the same day than the following entry (entry after my current entry).

i would appreciate your help

with all possible greetings smile.gif *slime*
Drakewl
girlie
The only way of that I know to produce that information is through the MTEntryPrevious and MTEntryNext container tags.
Drakewl
thanks for your reply, girlie

so on the way to the possible solution of the problem i could process the values of

CODE
<MTEntryNext>
<$MTEntryDate$>
<MTEntryNext>


and

CODE
<MTEntryPrevious>
<$MTEntryDate$>
<MTEntryPrevious>


into the compare functions, but how do i set a custom variable that just uses the value (date in some format) of one of the code snippets i posted above.

like $predate = EntryDate-of-previous-Post

my final intention for all this stuff is the accomplishment of a news structure that consists of different vertical tileable graphics. When i get it to work sooner or later i will post the corresponding part of my template here.

thanks for your efforts
Drakewl
girlie
Maybe the SetVarBlock plugin will do the trick?
Drakewl
i see, never read manuals short before going to sleep (especially if you are near K.O.) or you will misread at least some important notes as it happened on my side wink.gif

i got it working alone with the compare plugin

just a little example

CODE
<MTIfEqual a="[MTEntryDate format='%d %m %y']" b="[MTEntryNext][MTEntryDate format='%d %m %y'][/MTEntryNext]">
<img src="./pics/gamedev_miniban.gif">
</MTIfEqual>


now i have to create a new graphic for the mid-news space and implement the new code into my news structure, voila.

will post all of my results here when finished, because its a handy method if you ask me

with greetings
Drakewl
Drakewl
ok it works perfectly

everytime 2 or more messages fall below the same date they will be summerized within one window, but with the little difference that the table structure (including a changing table-background) for one of the message titles is changed to be tileable with the upper and lower message graphics.

Since my code is structured very properly it extends the possible max width of this forum, that is why some lines are wrapped, sorry for this

Example IMG


CODE
<MTEntries>
     <tr>
         <td WIDTH="*" ALIGN="CENTER">
       <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="593" HEIGHT="" ALIGN="center" VALIGN="top">


<MTDateHeader>
           <tr>
         <td WIDTH="593" HEIGHT="53 ALIGN="LEFT" VALIGN="MIDDLE"">
             <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="305" HEIGHT="53" ALIGN="left" VALIGN="top">
           <tr>
           <td WIDTH="12"></td>
           <td WIDTH="293" HEIGHT="53" ALIGN="left" background="./p/datumsleiste.gif"><div class="datum"><$MTEntryDate format="%A, %d. %B %Y"$></div></td>
           </tr>
             </table>    
         </td>
           </tr>

           <tr><td HEIGHT="10"></td></tr>
           <tr>
         <td WIDTH="593" HEIGHT="73" background="./p/newswindow_1.gif">
             <div class="title"><$MTEntryTitle$><br>
             <span class="modify">
           <MTIfModified leeway="10">
               Aktualisiert am <$MTLastModified format="%A, %d. %B %Y um %X"$>
           </MTIfModified>
             </span>
             </div>
         </td>
           </tr>
</MTDateHeader>


<MTIfEqual a="[MTEntryDate format='%d %m %y']" b="[MTEntryNext][MTEntryDate format='%d %m %y'][/MTEntryNext]">
           <tr>
         <td HEIGHT="131" background="./p/newswindow_3.gif">
             <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="593" HEIGHT="131" ALIGN="center" VALIGN="top" BORDER="0">
           <tr>
           <td WIDTH="50%" HEIGHT="59" ALIGN="LEFT" VALIGN="MIDDLE">
<div style="font-size: 8pt; text-align: left; letter-spacing: 0px; margin-top: 12px; margin-left: 8px;">
    <MTEntryNext>
    <MTEntryIfAllowComments>
    <a href="<$MTCGIPath$><$MTCommentScript$>?entry_id=<$MTEntryID$>" onclick="OpenComments(this.href); return false" style="text-decoration: none;"><IMG SRC="./p/blase.gif" BORDER="0" WIDTH="30" HEIGHT="19"><br>[<$MTEntryCommentCount$>]</a>
    </MTEntryIfAllowComments>
    </MTEntryNext>
</div>
           </td>
           <td WIDTH="50%" ALIGN="right" VALIGN="MIDDLE">
<div class="author">von <a href="<MTEntryNext><$MTEntryAuthorEmail spam_protect="1"$></MTEntryNext>" target="_blank"><MTEntryNext><$MTEntryAuthor$></MTEntryNext></a><br>geschrieben um <a href="<MTEntryNext><$MTEntryPermalink$></MTEntryNext>"><MTEntryNext><$MTEntryDate format="%X"$></MTEntryNext></a></div>
           </td>
           </tr>
           <tr>
               <td WIDTH="593" HEIGHT="72" COLSPAN="2">
             <div class="title" style="margin: 3px 32px 0px 45px"><$MTEntryTitle$><br>
             <span class="modify">
             <MTIfModified leeway="10">
                 Aktualisiert am <$MTLastModified format="%A, %d. %B %Y um %X"$>
             </MTIfModified>
             </span>
             </div>
               </td>
           </tr>


             </table>

         </td>
           </tr>
</MTIfEqual>


           <tr>
         <td HEIGHT="*" background="./p/newswindow_2.gif">
             <div class="text">
<!-- *********** CONTENT MESSAGE BEREICH ANFANG ************ -->

    <$MTEntryBody$>
<p></p>
    <MTEntryIfExtended>
    <span class="extended"><a href="<$MTEntryPermalink$>#more">Weiter lesen... "<$MTEntryTitle$>"</a></span><br />
    </MTEntryIfExtended>
<p></p>

<!-- ************ CONTENT MESSAGE BEREICH ENDE************** -->
             </div>
         </td>
           </tr>


<MTDateFooter>
           <tr>
         <td HEIGHT="58" background="./p/newswindow_4.gif">
             <table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="593" HEIGHT="58" ALIGN="center" VALIGN="top" BORDER="0">
           <tr>
           <td WIDTH="50%" HEIGHT="58" ALIGN="LEFT" VALIGN="MIDDLE">
<div style="font-size: 8pt; text-align: left; letter-spacing: 0px; margin-top: 12px; margin-left: 8px;">
    <MTEntryIfAllowComments>
    <a href="<$MTCGIPath$><$MTCommentScript$>?entry_id=<$MTEntryID$>" onclick="OpenComments(this.href); return false" style="text-decoration: none;"><IMG SRC="./p/blase.gif" BORDER="0" WIDTH="30" HEIGHT="19"><br>[<$MTEntryCommentCount$>]</a>
    </MTEntryIfAllowComments>
</div>
           </td>
           <td WIDTH="50%" ALIGN="right" VALIGN="MIDDLE">
<div class="author">von <a href="<$MTEntryAuthorEmail spam_protect="1"$>" target="_blank"><$MTEntryAuthor$></a><br>geschrieben um <a href="<$MTEntryPermalink$>"><$MTEntryDate format="%X"$></a></div>
           </td>
           <tr>
             </table>

         </td>
           </tr>
           <tr><td HEIGHT="30"></td></tr>
</MTDateFooter>


       </table>
         </td>
     </tr>
</MTEntries>



greets
Drakewl
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.