On 2/9/07, Allen Gilliland <[EMAIL PROTECTED]> wrote:



Matt Raible wrote:
> On 2/9/07, Matt Raible <[EMAIL PROTECTED]> wrote:
>>
>> I used the 3.0 JARs - they seem to work fine. Here's some issues I
>> encountered when upgrading from 2.3-incubating to 3.1-rc3:
>>
>> 1. #showCategoriesAsList('nil') is not resolved.  This is a custom
>> macro I
>> created. See resolution below.
>>
>> 2. #showCommentsCountAndLink - another custom macro. See resolution
>> below.
>>
>> 3. Smileys don't work. Don't have a resolution, explanation below.
>>
>> 4. CSS on Comment form is messed up. See resolution below.
>>
>> 5. Search Again box is center-aligned. See resolution and minor bug
>> below.
>>
>> Most of these were caused by the fact that I'm using a custom theme I
>> created for 2.x.
>>
>> I found workaround for these. First off, I replaced my _day.vm template
>> with the one from andreas08 in the java.net themes.
>>
>> With 3.1, showCategoriesAsList can be replaced with
>> #showWeblogCategoryLinksList in weblog.vm.  However, I made the
following
>> change:
>>
>> <li class="selected"><a
>> href="$url.category($cat.path)">$cat.name</a></li>
>>
>>
>> Instead of:
>>
>> <li class="selected">$cat.name</li>
>>
>> Personally, I don't like it when there's a selected category that I
can't
>> click on - or a link that turns into text in certain states. I think we
>> should make this change in Roller core. After making this change, my
>> selected category is highlighted in blue. Later I discovered I had to
>> change
>> this in another place in this macro. From:
>>
>> <li class="selected">$text.get("macro.weblog.allcategories")</li>
>>
>> to:
>>
>> <li class="selected"><a
>> href="$url.category($categoryObject.path)">$text.get("
>> macro.weblog.allcategories")</a></li>
>>
>> For #2, replacing it with the following works:
>>
>>         #set($commentCount = $entry.commentCount)
>>         #if($entry.commentsStillAllowed || $commentCount > 0)
>>             <a href="$url.comments($entry.anchor)"
>> class="commentsLink">$text.get("macro.weblog.comments
")[$commentCount]</a>
>>
>>         #end
>>
>> However, I don't like seeing "Comments[0]" so I changed it to display
>> "Add
>> a Comment" when there are none. So I changed it to:
>>
>>         #set($commentCount = $entry.commentCount)
>>         #if($entry.commentsStillAllowed || $commentCount > 0)
>>             <a href="$url.comments($entry.anchor)"
class="commentsLink">
>>             #if($commentCount == 0)
>>                 $text.get( "macro.weblog.addcomment" )
>>             #elseif($commentCount == 1)
>>                 $commentCount $text.get( "macro.weblog.comment " )
>>             #else
>>                 $commentCount $text.get( "macro.weblog.comments" )
>>             #end
>>             </a>
>>         #end
>>
>> I think we should make this change in all templates - it's in the "
>> day.vm"
>> page of andreas08.
>>
>> As far as the Smiley plugin, it looks like my class names are wrong.
The
>> "enabled plugins" section seems to be missing from the settings page.
>> I have
>> org.apache.roller.ui.rendering.plugins.smileys.SmileysPlugin in my
>> roller-custom.properties.
>>
>> Looking in the log files, it appears that the class names are wrong
>> for my
>> plugins. However, these are the names the following page recommends:
>>
>> http://wiki.java.net/bin/view/Javanet/JSPWikiPlugin
>>
>> ERROR 2007-02-09 10:27:04,625 PluginManagerImpl:loadPagePluginClasses -
>> ClassNotFoundException for
>>
org.apache.roller.ui.rendering.plugins.convertbreaks.ConvertLineBreaksPlugin
>>
>> ERROR 2007-02-09 10:27:04,629 PluginManagerImpl:loadPagePluginClasses -
>> ClassNotFoundException for
>> org.apache.roller.ui.rendering.plugins.topictag.TopicTagPlugin
>> ERROR 2007-02-09 10:27:04,633 PluginManagerImpl:loadPagePluginClasses -
>> ClassNotFoundException for
>> org.apache.roller.ui.rendering.plugins.search.WikipediaLinkPlugin
>> ERROR 2007-02-09 10:27:04,636 PluginManagerImpl:loadPagePluginClasses -
>> ClassNotFoundException for
>> org.apache.roller.ui.rendering.plugins.search.GoogleLinkPlugin
>> ERROR 2007-02-09 10:27:04,640 PluginManagerImpl:loadPagePluginClasses -
>> ClassNotFoundException for
>> org.apache.roller.ui.rendering.plugins.textile.TextilePlugin
>> ERROR 2007-02-09 10:27:04,644 PluginManagerImpl:loadPagePluginClasses -
>> ClassNotFoundException for
>> org.apache.roller.ui.rendering.plugins.acronyms.AcronymsPlugin
>> ERROR 2007-02-09 10:27:04,647 PluginManagerImpl:loadPagePluginClasses -
>> ClassNotFoundException for
>> org.apache.roller.ui.rendering.plugins.bookmarks.BookmarkPlugin
>> ERROR 2007-02-09 10:27:04,650 PluginManagerImpl:loadPagePluginClasses -
>> ClassNotFoundException for
>> org.apache.roller.ui.rendering.plugins.email.ObfuscateEmailPlugin
>> ERROR 2007-02-09 10:27:04,652 PluginManagerImpl:loadPagePluginClasses -
>> ClassNotFoundException for
>> org.apache.roller.ui.rendering.plugins.smileys.SmileysPlugin
>> ERROR 2007-02-09 10:27:04,654 PluginManagerImpl:loadPagePluginClasses -
>> ClassNotFoundException for
>> org.apache.roller.ui.rendering.plugins.readmore.ReadMorePlugin
>> ERROR 2007-02-09 10:27:04,656 PluginManagerImpl:loadPagePluginClasses -
>> ClassNotFoundException for
>> net.java.roller.plugins.weblogentry.jspwiki.WikiPlugin
>
>
> I fixed this by changing my roller-custom.properties to have:
>
> plugins.page=\
> org.apache.roller.ui.rendering.plugins.ConvertLineBreaksPlugin \
> ,org.apache.roller.ui.rendering.plugins.TopicTagPlugin \
> ,org.apache.roller.ui.rendering.plugins.WikipediaLinkPlugin \
> ,org.apache.roller.ui.rendering.plugins.GoogleLinkPlugin \
> ,org.apache.roller.ui.rendering.plugins.TextilePlugin \
> ,org.apache.roller.ui.rendering.plugins.AcronymsPlugin \
> ,org.apache.roller.ui.rendering.plugins.BookmarkPlugin \
> ,org.apache.roller.ui.rendering.plugins.ObfuscateEmailPlugin \
> ,org.apache.roller.ui.rendering.plugins.SmileysPlugin \
> ,net.java.roller.plugins.weblogentry.jspwiki.WikiPlugin
>
> One other issue I encountered, my entries' posted time is listed as:
>
> Posted in Java at 20070205
>
> When I'm used to:
>
> Posted in Java at Feb 09 2007, 08:02:54 AM MST
>
> Changing my _day.vm to have:
>
> $utils.formatDate($entry.pubTime, $text.get("
> macro.weblog.date.timestampFormat") )
>
> Instead of:
>
> $utils.formatDate($entry.pubTime, "yyyyMMdd")
>
> Fixed the problem. This seems like a friendlier default to me.
>
> I also discovered a couple more issues:
>
> 1. My custom "render the entry's title when viewing a single post" is no
> longer working.  Here's my logic:
>
> #set( $xmap = $pageModel.getRecentWeblogEntries(1,'nil') )
> #foreach( $day in $xmap.keySet() )
>   #set( $recentEntries = $xmap.get($day) )
>   #foreach ($var in $recentEntries)
>       #set ($title = $var.title)
>   #end
> #end
>    <title>#showWebsiteTitle() | #if ($requestParameters.isEmpty() &&
> $page.Name == "Weblog") Matt Raible's discussions on Java and Web
> Development #elseif ($req.getParameter($WEBLOGCATEGORYNAME_KEY) &&
> $page.Name == "Weblog")
> $req.getParameter($WEBLOGCATEGORYNAME_KEY).substring(1) Category #elseif
> ($page.Name == "Weblog") $title #else $page.Name #end</title>

I don't know why you are doing all of that, how aobu this ...

#if ($model.permalink)
         <title>$model.weblog.name: $model.weblogEntry.title</title>
     #else
         <title>$model.weblog.name</title>
     #end


That works - thanks!


> 2. My "switch the body class based on chosen category" logic is no
longer
> working:
>
> #if( $req.getParameter( $WEBLOGCATEGORYNAME_KEY ) )
>    #set( $chosenCat = $req.getParameter( $WEBLOGCATEGORYNAME_KEY ) )
>    #set( $chosenCat = $stringUtils.replace($chosenCat, " ",
> "").toLowerCase() )
>    #set( $chosenCat = $stringUtils.replace($chosenCat, "/", "") )
> #end
>
> <body id="page-#showPageName()"#if($chosenCat) class="$chosenCat"#end>

you don't need that request parameter mumbo jumbo, try this ...

#if ($model.weblogCategory)
   #set( $chosenCat = $model.weblogcategory.name )
   ## and any cleanup you want to do on the name
#end


There was a typo in the second line (Category should be capitalized) - but
this works too:

#if ($model.weblogCategory)
   #set( $chosenCat = $model.weblogCategory.name )
   #set( $chosenCat = $stringUtils.replace($chosenCat, " ",
"").toLowerCase() )
   #set( $chosenCat = $stringUtils.replace($chosenCat, "/", "") )
#end

Thanks!

Matt

-- Allen


>
> If I can fix these two issues, I think I'm good to upgrade.
>
> Thanks,
>
> Matt
>
> I though I could fix the  comment form CSS by copying the contents of
> css.vminto my
>> themes.css file.  My css.vm didn't contain a bunch of CSS like the
>> andreas08 theme does. Mine has:
>>
>> #set($theme = "andreas08" )
>> #parse("/WEB-INF/classes/themes/css.vm")
>>
>> Doing this didn't fix the problem - it just made my theme look like
>> Dave's. I then realized I should probably my Weblog.vm to have:
>>
>> <div class="entries">
>>     #set($pager = $model.getWeblogEntriesPager())
>>     <div class="next-previous">
>>         #if ($model.results)
>>             #showWeblogSearchAgainForm($model.weblog)
>>             #showNextPrevSearchControl($pager)
>>         #else
>>             #showNextPrevEntriesControl($pager)
>>         #end
>>     </div>
>>
>>     #showWeblogEntriesPager($pager)
>> </div>
>>
>>  #if ($model.permalink)
>>    #showWeblogEntryComments($entry)
>>    #showWeblogEntryCommentForm($entry)
>> #end
>>
>> instead of:
>>
>> #displayWeblogEntries()
>>
>> That fixed the problem, but my current site stretches the comment form
so
>> it's full width. I changed my forms.css (seems to be in css.vm in
>> Roller's
>> andreas08) to have:
>>
>> form textarea.large, form textarea.textarea{
>>     width: 100%;
>> }
>>
>> Instead of:
>>
>> form .large, form textarea.textarea{
>>     width: 340px;
>> }
>>
>> I fixed the searchBox issue by adding text-align: left to #searchAgain
in
>> andreas08.css. I did discover a bug - the title of the link on the
search
>> term has:
>>
>> title="Define {1} on Dictionary.com"
>>
>> That's it!  I'm ready to upgrade if I can get the plugins problem
fixed.
>>
>> It only took me 3 hours to write this e-mail. :-/
>>
>> Matt
>>
>> On 2/9/07, Matt Raible <[EMAIL PROTECTED]> wrote:
>> >
>> > Those are for 3.0. Has nothing changed with 3.1?
>> >
>> > Matt
>> >
>> > On 2/9/07, Nelson Carpentier < [EMAIL PROTECTED] > wrote:
>> > >
>> > > http://wiki.java.net/bin/view/Javanet/JSPWikiPlugin
>> > >
>> > > On 2/9/07, Matt Raible <[EMAIL PROTECTED]> wrote:
>> > > > I'm trying to upgrade to RC3 now - but I can't find the downloads
>> > > that are
>> > > > usually on java.net (for JSPWiki and Hibernate).  Are those
located
>> > > > somewhere or should I just build from head?
>> > > >
>> > > > Matt
>> > > >
>> > > > On 1/12/07, RW < [EMAIL PROTECTED] > wrote:
>> > > > >
>> > > > > Hi!
>> > > > >
>> > > > > I've upgraded from RC2 to RC3. The problems I've had with RC2
are
>> > > gone.
>> > > > > Now everything runs fine.
>> > > > >
>> > > > > Thanks to all contributors for this fine software!
>> > > > >
>> > > > > Greetings
>> > > > > Robert
>> > > > >
>> > > > > Dave wrote:
>> > > > > > How many folks have tested the 3.1 RCs so far?
>> > > > > > I think it's time to call for a 3.1 release vote.
>> > > > > >
>> > > > > > Apache Roller 3.1 RC3 (incubating) is available for testing:
>> > > > > > http://people.apache.org/~snoopdave/apache-roller-3.1/
>> > > <http://people.apache.org/%7Esnoopdave/apache-roller-3.1/>
>> > > > > >
>> > > > > > Required jars are available from the separate Roller Support
>> > > project:
>> > > > > > http://tinyurl.com/yds9wy
>> > > > > >
>> > > > > > We're tracking RC issues here:
>> > > > > > http://rollerweblogger.org/wiki/Wiki.jsp?page=Roller31Testing
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > > > --
>> > > > http://raibledesigns.com
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> > http://raibledesigns.com
>>
>>
>>
>>
>> --
>> http://raibledesigns.com
>
>
>
>




--
http://raibledesigns.com

Reply via email to