-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthew Toseland a écrit :
| Relative links don't work?
|
They do work, but they were hardcoded, so they pointed out to the wrong edition number after one reinsertion (not a big deal, but nextgent told me that it's faster to point to the same edition, because of the autocontainement (or something like that)). And there was an error due to a change I made some time ago in the Entry links.
| On Wednesday 16 April 2008 18:40, [EMAIL PROTECTED] wrote:
|> Author: dieppe
|> Date: 2008-04-16 17:40:18 +0000 (Wed, 16 Apr 2008)
|> New Revision: 19372
|>
|> Modified:
|>    trunk/apps/thingamablog/src/net/sf/thingamablog/blog/TBWeblog.java
|>    
| trunk/apps/thingamablog/src/net/sf/thingamablog/generator/BlogPageContainer.java
|> Log:
|> Fix the internals links (with the <$EditionNumber$> tag)
|> Fix the bookmark link, and the EditionNumber tag (pointed to the last
| edition, not the current one)
|>
|> Modified: trunk/apps/thingamablog/src/net/sf/thingamablog/blog/TBWeblog.java
|> ===================================================================
|> --- trunk/apps/thingamablog/src/net/sf/thingamablog/blog/TBWeblog.java    
| 2008-04-16 17:01:45 UTC (rev 19371)
|> +++ trunk/apps/thingamablog/src/net/sf/thingamablog/blog/TBWeblog.java    
| 2008-04-16 17:40:18 UTC (rev 19372)
|> @@ -602,16 +602,34 @@
|>      
|>      public String getUrlForEntry(BlogEntry b)
|>      {
|> +        if (getPublishTransport() instanceof FCPTransport) {
|> +            String url = ""> |> +            int firstSlash = url.indexOf('/');
|> +            url = "" + ((FCPTransport)
| getPublishTransport()).getSSKPath() + "/<$EditionNumber$>/";
|> +            return url + getEntryFileName(b);
|> +        }
|>         return getArchiveUrl() + getEntryPathPart(b) + getEntryFileName(b);
|>      }
|>      
|>      public String getUrlForCategory(String cat)
|>      {
|> +        if (getPublishTransport() instanceof FCPTransport) {
|> +            String url = ""> |> +            int firstSlash = url.indexOf('/');
|> +            url = "" + ((FCPTransport)
| getPublishTransport()).getSSKPath() + "/<$EditionNumber$>/";
|> +            return url + getCategoryFileName(cat);
|> +        }
|>          return getArchiveUrl() + getCategoryFileName(cat);
|>      }
|>      
|>      public String getUrlForArchive(ArchiveRange arc)
|>      {
|> +        if (getPublishTransport() instanceof FCPTransport) {
|> +            String url = ""> |> +            int firstSlash = url.indexOf('/');
|> +            url = "" + ((FCPTransport)
| getPublishTransport()).getSSKPath() + "/<$EditionNumber$>/";
|> +            return url + getArchiveFileName(arc);
|> +        }
|>          return getArchiveUrl() + getArchiveFileName(arc);
|>      }
|>      
|> @@ -625,6 +643,12 @@
|>              String url = ""> |>              String wurl = getWebFilesDirectory().toURL().toExternalForm();
|>              int s = url.indexOf(wurl) + wurl.length();
|> +            if (getPublishTransport() instanceof FCPTransport) {
|> +                String uri = getBaseUrl();
|> +                int firstSlash = uri.indexOf('/');
|> +                uri = uri.substring(0,firstSlash+1) + ((FCPTransport)
| getPublishTransport()).getSSKPath() + "/<$EditionNumber$>/";
|> +                return uri + url.substring(s, url.length());
|> +            }
|>              return getBaseUrl() +  url.substring(s, url.length());
|>          }
|>          catch(Exception ex)
|>
|> Modified:
| trunk/apps/thingamablog/src/net/sf/thingamablog/generator/BlogPageContainer.java
|> ===================================================================
|> ---
| trunk/apps/thingamablog/src/net/sf/thingamablog/generator/BlogPageContainer.java    
| 2008-04-16 17:01:45 UTC (rev 19371)
|> +++
| trunk/apps/thingamablog/src/net/sf/thingamablog/generator/BlogPageContainer.java    
| 2008-04-16 17:40:18 UTC (rev 19372)
|> @@ -67,9 +67,9 @@
|>          if (blog.getType().equals("internet")) {
|>              tagValues.put(new TextTag("RssLink"), blog.getBaseUrl() +
| blog.getRssFileName());        
|>          } else {
|> -            tagValues.put(new
| TextTag("RssLink"), "http://127.0.0.1:8888/?newbookmark=freenet:" +
| blog.getBaseUrl() + "&desc=" + blog.getDescription());        
|> +            tagValues.put(new TextTag("RssLink"), "/?newbookmark=freenet:"
| + blog.getBaseUrl() + "&desc=" + blog.getDescription());        
|>              if (blog.getPublishTransport() instanceof FCPTransport)
|> -                            tagValues.put(new TextTag("EditionNumber"),
| ((FCPTransport)blog.getPublishTransport()).getEdition()+"");        
|> +                            tagValues.put(new TextTag("EditionNumber"),
| (((FCPTransport)blog.getPublishTransport()).getEdition()+ 1) +"");        
|>          }
|>          tagValues.put(new TextTag("IndexPageLink"), blog.getBaseUrl() +
| blog.getArchiveIndexFileName());
|>          tagValues.put(curDateTag, new Date());
|>
|> _______________________________________________
|> cvs mailing list
|> [EMAIL PROTECTED]
|> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
|>
|>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgGjX4ACgkQQF3IcPQRZiBqIwCdGeG3Pm3huT102Bw7FIFYNRtT
LcgAni0Yq8xfw5vx5MAWGzl5+AHMyUqQ
=WRTJ
-----END PGP SIGNATURE-----

_______________________________________________
Devl mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to