List Info

Thread: Re: Internal Aggregator in 3.1 (Help)




Re: Internal Aggregator in 3.1 (Help)
country flaguser name
United States
2007-04-13 11:17:43
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&quot; <shaliny.igmail.com&gt; wrote:

Sorry typo belo....

Second bulleted point should be "where intagg.vm has the following contents :"

On 4/13/07, Shalini Israni < shaliny.igmail.com shaliny.igmail.com"><mailto:shaliny.igmail.com&gt; > 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&gt;  

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  &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;
  • where intadd.vm has the following contents :
    • <div class=&quot;post-content"&gt;
    • #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&quot;)$entry.getBlogCategory()$entry.getDateAsFormat(&quot;yyyy&quot;)/$entry.getDateAsFormat("MM")/$entry.getDateAsFormat("dd&quot;)/$entry.getPermalink()")" title=&quot;$entry.getTitle()&quot;>$entry.getTitle()</a>;</h3>; In Blog of <strong> <a href=";$entry.getMetaData().get("BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_URL&quot;)">$entry.getMetaData().get(&quot;BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_NAME")&lt;/a><;/strong>;
    • <div class=&quot;commentslink"&gt;
    • #if($BLOJSOM_COMMENTS_ENABLED.booleanValue() && $entry.supportsComments() && ($entry.getMetaData() && !$entry.getMetaData().containsKey("blog-entry-comments-disabled")))<span class=&quot;commentslink"&gt;<a href=";$entry.getMetaData().get("BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_URL&quot;)$entry.getBlogCategory()$entry.getDateAsFormat(&quot;yyyy&quot;)/$entry.getDateAsFormat("MM")/$entry.getDateAsFormat("dd&quot;)/$entry.getPermalink()?page=comments&quot;)" title=&quot;Click here to see the comments on &quot;$entry.getTitle()&quot;"><span></span>Comments: ($entry.getNumComments())</a&gt;</span>#end
    • </div&gt;
    •  &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   
    • #if($BLOJSOM_PERMALINK && $BLOJSOM_BLOG.getLinearNavigationEnabled()) #if ($BLOJSOM_PERMALINK_PREVIOUS_ENTRY) #friendlyPermalink($BLOJSOM_PERMALINK_PREVIOUS_ENTRY)&lt;a href=";$entryLink">&amp;laquo;&amp;nbsp;$!BLOJSOM_PERMALINK_PREVIOUS_ENTRY.getTitle()&lt;/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;&raquo;</a>#end#end
    • <div class=&quot;post-content"&gt;
    •  &nbsp; $entry.getDescription()
    • </div&gt;
    •  &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   
    • </div&gt;
  • 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-&gt;Mappings->html
But i get wierd results :(

Pasting a single such below....

Entry One
&nbsp;In Blog of $entry.getMetaData().get("BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_NAME&quot;) <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>  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
Re: Internal Aggregator in 3.1 (Help)
user name
2007-04-16 00:04:12
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 < davidblojsom.com">davidblojsom.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.

#**
&nbsp;* Sets a page variable, $entryLink, with a friendly permalink in $BLOG_URL/$category/yyyy/MM/dd/permalink format
&nbsp;*
&nbsp;* $entry Blog entry
&nbsp;*#
#macro(InternalAggregatorFriendlyPermalink $entry)
  ; &nbsp;#set ($blog = $BLOJSOM_PLUGIN_AGGREGATOR_BLOGS.get($entry.getBlogId()))
 ; &nbsp; #set ($categoryForEntry = $entry.getBlogCategory().getEncodedName())
 &nbsp; &nbsp;#set ($entryLink = "$blog.getBlogURL()$categoryForEntry$entry.getDateAsFormat(&#39;yyyy9;)/$entry.getDateAsFormat('MM')/$entry.getDateAsFormat(&#39;dd')/$entry.getPostSlug()&quot;)#end

#**
 * Sets a page variable, $entryLink, with a friendly permalink in $BLOG_URL/yyyy/MM/dd/permalink format
&nbsp;*
&nbsp;* $entry Blog entry
&nbsp;*#
#macro(SimpleInternalAggregatorFriendlyPermalink $entry)
  ; &nbsp;#set ($blog = $BLOJSOM_PLUGIN_AGGREGATOR_BLOGS.get($entry.getBlogId()))
 ; &nbsp; #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&quot; < shaliny.igmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">shaliny.igmail.com> wrote:

Sorry typo belo....

Second bulleted point should be "where intagg.vm has the following contents :"

On 4/13/07, Shalini Israni < shaliny.igmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">shaliny.igmail.com shaliny.igmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> &lt;mailto:shaliny.igmail.com&gt; > 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  &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp;
  • where intadd.vm has the following contents :
    • <div class=&quot;post-content"&gt;
    • #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&quot;)$entry.getBlogCategory()$entry.getDateAsFormat(&quot;yyyy&quot;)/$entry.getDateAsFormat("MM")/$entry.getDateAsFormat("dd&quot;)/$entry.getPermalink()")" title=&quot;$entry.getTitle()&quot;>$entry.getTitle()</a>;</h3>; In Blog of <strong> <a href=";$entry.getMetaData().get("BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_URL&quot;)">$entry.getMetaData().get(&quot;BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_NAME")&lt;/a><;/strong>;

    • <div class=&quot;commentslink"&gt;
    • #if($BLOJSOM_COMMENTS_ENABLED.booleanValue() && $entry.supportsComments() && ($entry.getMetaData() && !$entry.getMetaData().containsKey("blog-entry-comments-disabled")))<span class=&quot;commentslink"&gt;<a href=";$entry.getMetaData().get("BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_URL&quot;)$entry.getBlogCategory()$entry.getDateAsFormat(&quot;yyyy&quot;)/$entry.getDateAsFormat("MM")/$entry.getDateAsFormat("dd&quot;)/$entry.getPermalink()?page=comments&quot;)" title=&quot;Click here to see the comments on &quot;$entry.getTitle()&quot;"><span></span>Comments: ($entry.getNumComments())</a&gt;</span>#end

    • </div&gt;
    •  &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   
    • #if($BLOJSOM_PERMALINK && $BLOJSOM_BLOG.getLinearNavigationEnabled()) #if ($BLOJSOM_PERMALINK_PREVIOUS_ENTRY) #friendlyPermalink($BLOJSOM_PERMALINK_PREVIOUS_ENTRY)&lt;a href=";$entryLink">&amp;laquo;&amp;nbsp;$!BLOJSOM_PERMALINK_PREVIOUS_ENTRY.getTitle()&lt;/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;&raquo;</a>#end#end

    • <div class=&quot;post-content"&gt;
    •  &nbsp; $entry.getDescription()
    • </div&gt;
    •  &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   
    • </div&gt;
  • 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-&gt;Mappings->html
But i get wierd results :(

Pasting a single such below....

Entry One
&nbsp;In Blog of $entry.getMetaData().get("BLOJSOM_PLUGIN_INTERNAL_AGGREGATOR_BLOG_NAME&quot;) <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>  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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&;p=sourceforge&CID=DEVDEV
_______________________________________________
Blojsom-users mailing list
lists.sourceforge.net"> Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-users




--
YesterdayI played a blank tape at full blast. The mime next door went nuts.
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )