You could change the logic in that macro so that it doesn̵7;t pull any date information from the calendar and just prints out a list of monthly archive links from a fixed start month/year through the current month/year.
On 11/1/06 11:02 AM, "Milos Topic" <topicm mail.montclair.edu> wrote:
This works wonderfully! Thank you! Have just one more question regarding this. Now when I click on let’s say July 2006 it goes to that month, but on the right hand side under archives only provides links from July 2006 backwards – no newer months (August-November) are available. Can it also be changed so that it shows all links/months on any of the selected pages?
Thanks,
Milos
-
--
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein.
From: blojsom-users-bounces lists.sourceforge.net [ blojsom-users-bounces lists.sourceforge.net]">mailto:blojsom-users-bounces lists.sourceforge.net] On Behalf Of David Czarnecki
Sent: Wednesday, November 01, 2006 10:07 AM
To: blojsom-users
Subject: Re: [Blojsom-users] Monthly Archives on OS 10.4.8
Replace #BlogUrl() with $BLOJSOM_BLOG.getBlogURL(). I guess the Apple deployment doesn̵7;t contain or doesn̵7;t load the page macros where the #BlogURL() macro is defined.
On 11/1/06 8:38 AM, "Milos Topic" <topicm mail.montclair.edu> wrote:
I think we are getting somewhere, but it’s not working yet. J The monthly archives are now displayed, but when I click on any of the links (let’;s use October as an example) the URL is http://servername.montclair.edu/weblog/blog-id/#BlogURL()2006/10/ and it doesn̵7;t go anywhere as this #Blog() part is not what it should look like I assume? Any suggestions, as it seems as if it is a simple change which I am not seeing.
Thanks,
Milos
-
--
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein.
From: blojsom-users-bounces lists.sourceforge.net [ blojsom-users-bounces lists.sourceforge.net]">mailto:blojsom-users-bounces lists.sourceforge.net] blojsom-users-bounces lists.sourceforge.net%5d"><mailto:blojsom-users-bounces lists.sourceforge.net%5d> On Behalf Of David Czarnecki
Sent: Tuesday, October 31, 2006 3:58 PM
To: blojsom-users
Subject: Re: [Blojsom-users] Monthly Archives on OS 10.4.8
Right, that’;s just defining the macro. But, if that works when placed at the top of one of your templates, you should be able to use, for example:
#MonthlyArchive(1 2006)
at some place later in the page to have it print the archive list.
On 10/31/06 3:53 PM, "Milos Topic" <topicm mail.montclair.edu> wrote:
Now, the code
#macro(MonthlyArchive $startingMonth $startingYear)
<ul>
#set ($currentMonth = $BLOJSOM_CALENDAR.getCurrentMonth() + 1)
#set ($totalMonths = 12)
#set ($currentYear = $BLOJSOM_CALENDAR.getCurrentYear())
#set ($padding = 0)
#foreach ($year in [$currentYear..$startingYear])
#set ($monthIndex = 1)
#if ($year == $startingYear)
#set($monthIndex = $startingMonth)
#end
#if ($year == $currentYear)
#set($totalMonths = $currentMonth)
#else
#set ($totalMonths = 12)
#end
#foreach ($month in [$totalMonths..$monthIndex])
#set ($calMonth = $month - 1)
<li><a href="#BlogURL()$year/#if($month < 10)$padding#end$month/">$BLOJSOM_CALENDAR.getMonthName($calMonth) $year</a></li>
#end
#end
</ul>
#end
Doesn’t do anything, it doesn̵7;t interfere with the blog, but it doesn̵7;t display anything new at all. Very strange.
Thanks,
Milos
--
-
http://newton.montclair.edu/weblog/topicm/
-
--
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein.
From: blojsom-users-bounces lists.sourceforge.net [ blojsom-users-bounces lists.sourceforge.net]">mailto:blojsom-users-bounces lists.sourceforge.net] blojsom-users-bounces lists.sourceforge.net%5d"><mailto:blojsom-users-bounces lists.sourceforge.net%5d> blojsom-users-bounces lists.sourceforge.net%5d"><mailto:blojsom-users-bounces lists.sourceforge.net%5d> On Behalf Of David Czarnecki
Sent: Tuesday, October 31, 2006 11:24 AM
To: blojsom-users
Subject: Re: [Blojsom-users] Monthly Archives on OS 10.4.8
The only thing I can think is that one of the calendar methods below isn’t present on the calendar object for the version of blojsom that’;s included. Though, that doesn̵7;t seem likely. You could try adding the lines in one-by-one (or as a group in the case of the if statements) to see if it’s an error in the syntax, though I tried that on a local install and it the macro was OK.
On 10/30/06 10:04 PM, "Milos Topic" <topicm mail.montclair.edu> wrote:
It didn’;t work, it actually displayed “#MonthlyArchive(1 2006)” as a plain text on the page where I have added it. Nothing in the log file (literally, when I go to /Library/Tomcat/logs – there̵7;s nothing there). On the other hand, when I go to /Library/Tomcat/blojsom_root/logs the last log file is localhost_log.2006-10-23.txt with no errors in it.
Thanks,
Milos
-
--
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein.
From: blojsom-users-bounces lists.sourceforge.net [ blojsom-users-bounces lists.sourceforge.net]">mailto:blojsom-users-bounces lists.sourceforge.net] blojsom-users-bounces lists.sourceforge.net%5d"><mailto:blojsom-users-bounces lists.sourceforge.net%5d> blojsom-users-bounces lists.sourceforge.net%5d"><mailto:blojsom-users-bounces lists.sourceforge.net%5d> blojsom-users-bounces lists.sourceforge.net%5d"><mailto:blojsom-users-bounces lists.sourceforge.net%5d> On Behalf Of David Czarnecki
Sent: Monday, October 30, 2006 9:01 PM
To: blojsom-users
Subject: Re: [Blojsom-users] Monthly Archives on OS 10.4.8
Hmmmm, that’;s the macro that’;s in the page macros included with blojsom. Are you able to use the following in a page?
#MonthlyArchive(1 2006)
If not, what gets printed in the Tomcat log file?
On 10/30/06 8:16 PM, "Milos Topic" <topicm mail.montclair.edu> wrote:
Does anyone know how to setup MonthlyArchive on entries on Apple̵7;s rendition of Blojsom?
I have used the below code as found on one of the Apple̵7;s open source sites, but it doesn̵7;t work…;it actually prevents the blogs from loading completely.
#macro(MonthlyArchive $startingMonth $startingYear)
<ul>
#set ($currentMonth = $BLOJSOM_CALENDAR.getCurrentMonth() + 1)
#set ($totalMonths = 12)
#set ($currentYear = $BLOJSOM_CALENDAR.getCurrentYear())
#set ($padding = 0)
#foreach ($year in [$currentYear..$startingYear])
#set ($monthIndex = 1)
#if ($year == $startingYear)
#set($monthIndex = $startingMonth)
#end
#if ($year == $currentYear)
#set($totalMonths = $currentMonth)
#else
#set ($totalMonths = 12)
#end
#foreach ($month in [$totalMonths..$monthIndex])
#set ($calMonth = $month - 1)
<li><a href="#BlogURL()$year/#if($month < 10)$padding#end$month/">$BLOJSOM_CALENDAR.getMonthName($calMonth) $year</a></li>
#end
#end
</ul>
#end
I am sure that there has to be a simpler way or doing this that actually works.
Thanks,
Milos
-
--
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&amp;bid=263057&dat=121642> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&amp;bid=263057&dat=121642> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&amp;bid=263057&dat=121642> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&amp;bid=263057&dat=121642>
_______________________________________________
Blojsom-users mailing list
Blojsom-users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-users
--
David Czarnecki
http://www.blojsom.com/blog/ | http://blojsom.sf.net
|