|
List Info
Thread: Re: Internal Aggregator in 3.1 (Help)
|
|
| Re: Internal Aggregator in 3.1 (Help) |
  United States |
2007-04-16 08:25:12 |
|
Again, you’ll just need to parse over the $BLOJSOM_ENTRIES. So, this would change:
#foreach ($entry in $BLOJSOM_ENTRIES)
#parse( "intagg.vm" )
#end
It̵7;s just when you want to print out a permalink to the item that you’ll need to actually get the blog URL from the list of BLOG objects for the particular entry as opposed to the BLOG object that has been requested.
On 4/16/07 1:04 AM, "Shalini Israni" <shaliny.i gmail.com> wrote:
Hi David,
Thanks for the help. 
But i don't quite understand where i am supposed to call these macros? As in which part f my intagg.vm should i replace?
Thanks
--Shalini
On 4/13/07, David Czarnecki <david blojsom.com> wrote:
The internal aggregator plugin in blojsom 3 replaces the entries with the ones from the aggregated blogs. So, you'll just be parsing over $BLOJSOM_ENTRIES.
There are also a couple of macros to help with displaying permalinks for the aggregated entries.
#**
* Sets a page variable, $entryLink, with a friendly permalink in $BLOG_URL/$category/yyyy/MM/dd/permalink format
*
* $entry Blog entry
*#
#macro(InternalAggregatorFriendlyPermalink $entry)
#set ($blog = $BLOJSOM_PLUGIN_AGGREGATOR_BLOGS.get($entry.getBlogId()))
#set ($categoryForEntry = $entry.getBlogCategory().getEncodedName())
#set ($entryLink = "$blog.getBlogURL()$categoryForEntry$entry.getDateAsFormat('yyyy')/$entry.getDateAsFormat('MM')/$entry.getDateAsFormat('dd')/$entry.getPostSlug()")#end
#**
* Sets a page variable, $entryLink, with a friendly permalink in $BLOG_URL/yyyy/MM/dd/permalink format
*
* $entry Blog entry
*#
#macro(SimpleInternalAggregatorFriendlyPermalink $entry)
#set ($blog = $BLOJSOM_PLUGIN_AGGREGATOR_BLOGS.get($entry.getBlogId()))
#set ($entryLink = "$blog.getBlogURL()/$entry.getDateAsFormat('yyyy')/$entry.getDateAsFormat('MM')/$entry.getDateAsFormat('dd')/$entry.getPostSlug()")
#end
Hope this helps.
On 4/13/07 9:19 AM, "Shalini Israni" <shaliny.i gmail.com> wrote:
Sorry typo belo....
Second bulleted point should be "where intagg.vm has the following contents :"
On 4/13/07, Shalini Israni < shaliny.i gmail.com shaliny.i gmail.com"><mailto:shaliny.i gmail.com> > wrote:
Hi,
I am trying to activate the Internal Aggregator Plugin in Blojsom 3.1. I am using the documentation of the older version at http://wiki.blojsom.com/wiki/display/blojsom/Internal+Aggregator+Plugin <http://wiki.blojsom.com/wiki/display/blojsom/Internal+Aggregator+Plugin>
What i have done so far is :
- Changed the ocean.vm of the Blog that i want should display the recent entries of all blogs in my Blojsom Installation by replacing the for loop that parses entries with this for loop
- #foreach ($entry in $BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_ENTRIES)
- #parse( "intagg.vm" )
- #end
- where intadd.vm has the following contents :
- <div class="post-content">
- #if($entryDate != $entry.getDateAsFormat('dd MM yyyy'))<h3>$entry.getDateAsFormat('EEEE, d MMMM yyyy')</h3>
- #set($entryDate = $entry.getDateAsFormat('dd MM yyyy'))#end
-
-
- <h3><a href="$entry.getMetaData().get("BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_URL")$entry.getBlogCategory()$entry.getDateAsFormat("yyyy")/$entry.getDateAsFormat("MM")/$entry.getDateAsFormat("dd")/$entry.getPermalink()")" title="$entry.getTitle()">$entry.getTitle()</a></h3> In Blog of <strong> <a href="$entry.getMetaData().get("BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_URL")">$entry.getMetaData().get("BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_NAME")</a></strong>
-
-
- <div class="commentslink">
- #if($BLOJSOM_COMMENTS_ENABLED.booleanValue() && $entry.supportsComments() && ($entry.getMetaData() && !$entry.getMetaData().containsKey("blog-entry-comments-disabled")))<span class="commentslink"><a href="$entry.getMetaData().get("BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_URL")$entry.getBlogCategory()$entry.getDateAsFormat("yyyy")/$entry.getDateAsFormat("MM")/$entry.getDateAsFormat("dd")/$entry.getPermalink()?page=comments")" title="Click here to see the comments on "$entry.getTitle()""><span></span>Comments: ($entry.getNumComments())</a></span>#end
-
-
- </div>
-
- #if($BLOJSOM_PERMALINK && $BLOJSOM_BLOG.getLinearNavigationEnabled()) #if ($BLOJSOM_PERMALINK_PREVIOUS_ENTRY) #friendlyPermalink($BLOJSOM_PERMALINK_PREVIOUS_ENTRY)<a href="$entryLink">&laquo;&nbsp;$!BLOJSOM_PERMALINK_PREVIOUS_ENTRY.getTitle()</a> | #end <a href="$BLOJSOM_BLOG.getBlogURL()">Main</a> #if ($BLOJSOM_PERMALINK_NEXT_ENTRY) | #friendlyPermalink($BLOJSOM_PERMALINK_NEXT_ENTRY) <a href="$entryLink">$!BLOJSOM_PERMALINK_NEXT_ENTRY.getTitle()&nbsp;»</a>#end#end
-
-
- <div class="post-content">
- $entry.getDescription()
- </div>
-
- </div>
- I have then used the Admin Console of THIS SAME blog to activate the internal aggregator plugin by adding the string "internal aggregator" the Plugins->Mappings->html
But i get wierd results :(
Pasting a single such below....
Entry One
In Blog of $entry.getMetaData().get("BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_NAME") <http://ps4396.persistent.co.in:8080/blojsom/blog/sopan_shewale/$entry.getMetaData%28%29.get%28>
Adding this to test the internal aggregator --shalini
So basically i am not getting the correct Blog displayed...... what am i doing wrong?????
Also the file seems to only be putting context.put(BLOJSOM_PLUGIN_AGGREGATOR_BLOGS, blogs); in context and not entries....
Exactly how does one enable the Plugin in Blojsom3.1...
I have visited the archives and found this http://sourceforge.net/mailarchive/message.php?msg_id=BDD00AE4.6501%25david%40blojsom.com <http://sourceforge.net/mailarchive/message.php?msg_id=BDD00AE4.6501%25david%40blojsom.com> <http://sourceforge.net/mailarchive/message.php?msg_id=BDD00AE4.6501%25david%40blojsom.com> <http://sourceforge.net/mailarchive/message.php?msg_id=BDD00AE4.6501%25david%40blojsom.com> but i dont really understand it... plus i know that the plugin works perfectly with earlier versions.........
Many thanks in advance.....
--
Shalini
--
David Czarnecki
http://www.blojsom.com/blog/ | http://blojsom.sf.net
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|