Author: dieppe
Date: 2008-06-11 20:38:55 +0000 (Wed, 11 Jun 2008)
New Revision: 20271

Modified:
   
trunk/apps/thingamablog/src/net/sf/thingamablog/generator/BlogPageContainer.java
   
trunk/apps/thingamablog/src/net/sf/thingamablog/gui/app/ThingamablogFrame.java
Log:
ThingamablogFrame : fix 2 bugs : the view blog button was oppening the 
edition+1 blog; the options were not set the first time we run the 
application, but only after a restart (so when the node config poped (?) 
up, the default values weren't shown).
BlogPageContainer : a few changes that change nothing for now, but maybe 
in the future if I'm not too lazy to update the templates.



Modified: 
trunk/apps/thingamablog/src/net/sf/thingamablog/generator/BlogPageContainer.java
===================================================================
--- 
trunk/apps/thingamablog/src/net/sf/thingamablog/generator/BlogPageContainer.java
    2008-06-11 18:59:57 UTC (rev 20270)
+++ 
trunk/apps/thingamablog/src/net/sf/thingamablog/generator/BlogPageContainer.java
    2008-06-11 20:38:55 UTC (rev 20271)
@@ -65,9 +65,13 @@
         tagValues.put(new HyperTextTag("BlogDescription"), 
blog.getDescription());
         tagValues.put(new TextTag("FrontPageLink"), blog.getBaseUrl() + 
blog.getFrontPageFileName());
         if (blog.getType().equals("internet")) {
+            tagValues.put(new TextTag("MetaDescription"),"");
             tagValues.put(new TextTag("RssLink"), blog.getBaseUrl() + 
blog.getRssFileName());        
+            tagValues.put(new TextTag("SyndicateMessage"), "Syndicate this 
site !");
         } else {
+            tagValues.put(new TextTag("MetaDescription"), "<meta 
name=\"description\" content=" + blog.getDescription());
             tagValues.put(new TextTag("RssLink"), "/?newbookmark=freenet:" + 
blog.getBaseUrl() + "&desc=" + blog.getDescription());        
+            tagValues.put(new TextTag("SyndicateMessage"), "Bookmark this site 
!");
             if (blog.getPublishTransport() instanceof FCPTransport)
                             tagValues.put(new TextTag("EditionNumber"), 
(((FCPTransport)blog.getPublishTransport()).getEdition()+ 1) +"");        
         }

Modified: 
trunk/apps/thingamablog/src/net/sf/thingamablog/gui/app/ThingamablogFrame.java
===================================================================
--- 
trunk/apps/thingamablog/src/net/sf/thingamablog/gui/app/ThingamablogFrame.java  
    2008-06-11 18:59:57 UTC (rev 20270)
+++ 
trunk/apps/thingamablog/src/net/sf/thingamablog/gui/app/ThingamablogFrame.java  
    2008-06-11 20:38:55 UTC (rev 20271)
@@ -522,6 +522,8 @@

                if(r == JOptionPane.YES_OPTION)
                        createNewDatabase();                            
+                TBGlobals.saveProperties();
+                TBGlobals.loadProperties();
        }

        private void createNewDatabase()
@@ -3565,7 +3567,12 @@
                                     } else {
                                         nodeHostname = 
TBGlobals.getProperty("NODE_HOSTNAME");
                                     }
-                                    BrowserLaunch.launch("http://"; + 
nodeHostname + ":" + port + "/" + curSelWeblog.getFrontPageUrl());
+                                    String url = curSelWeblog.getBaseUrl();
+                                    int firstSlash = url.indexOf('/');
+                                    int edition = ((FCPTransport) 
curSelWeblog.getPublishTransport()).getEdition();
+                                    String path = ((FCPTransport) 
curSelWeblog.getPublishTransport()).getSSKPath();
+                                    url = url.substring(0,firstSlash+1) + path 
+ "/" + edition + "/";  
+                                    BrowserLaunch.launch("http://"; + 
nodeHostname + ":" + port + "/" + url);
                                 }
                                 catch(Exception ex)
                                 {


Reply via email to