GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Added bliki dependency and updated code · SemanticWebBuilder/SWBPortal@b291c12

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • pom.xml
  • src/main/java/org/semanticwb/portal/resources/wiki
    • WikiModel.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎pom.xml‎

Copy file name to clipboardExpand all lines: pom.xml
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@
199199
<version>1.9.5.4</version>
200200
</dependency>
201201
<dependency>
202-
<groupId>org.semanticwb.external</groupId>
203-
<artifactId>bliki</artifactId>
204-
<version>3.0.6</version>
202+
<groupId>info.bliki.wiki</groupId>
203+
<artifactId>bliki-core</artifactId>
204+
<version>3.1.0</version>
205205
</dependency>
206206
<dependency>
207207
<groupId>org.semanticwb.external</groupId>
Collapse file

‎src/main/java/org/semanticwb/portal/resources/wiki/WikiModel.java‎

Copy file name to clipboardExpand all lines: src/main/java/org/semanticwb/portal/resources/wiki/WikiModel.java
+33-32Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,91 +22,92 @@
2222
*/
2323
package org.semanticwb.portal.resources.wiki;
2424

25-
import info.bliki.wiki.filter.Encoder;
26-
import info.bliki.wiki.model.Configuration;
27-
import info.bliki.wiki.model.ImageFormat;
28-
import info.bliki.wiki.tags.WPATag;
2925
import java.util.Locale;
30-
import org.htmlcleaner.ContentToken;
26+
3127
import org.semanticwb.SWBPlatform;
3228
import org.semanticwb.model.WebPage;
3329
import org.semanticwb.portal.api.SWBParamRequest;
3430

31+
import info.bliki.htmlcleaner.ContentToken;
32+
import info.bliki.wiki.filter.Encoder;
33+
import info.bliki.wiki.model.Configuration;
34+
import info.bliki.wiki.model.ImageFormat;
35+
import info.bliki.wiki.tags.WPATag;
36+
3537
// TODO: Auto-generated Javadoc
3638
/**
3739
* The Class WikiModel.
38-
*
40+
*
3941
* @author Javier Solis Gonzalez
4042
*/
41-
public class WikiModel extends info.bliki.wiki.model.WikiModel
42-
{
43-
43+
public class WikiModel extends info.bliki.wiki.model.WikiModel {
44+
4445
/** The params request. */
4546
private SWBParamRequest paramsRequest;
46-
47+
4748
/** The request. */
4849
private javax.servlet.http.HttpServletRequest request;
49-
50+
5051
/**
5152
* Instantiates a new wiki model.
52-
*
53+
*
5354
* @param imageBaseURL the image base url
5455
* @param linkBaseURL the link base url
5556
*/
56-
public WikiModel(String imageBaseURL, String linkBaseURL)
57+
public WikiModel(String imageBaseURL, String linkBaseURL)
5758
{
5859
super(imageBaseURL, linkBaseURL);
5960
}
60-
61+
6162
/**
6263
* Instantiates a new wiki model.
63-
*
64+
*
6465
* @param request the request
6566
* @param paramsRequest the params request
6667
* @param imageBaseURL the image base url
6768
* @param linkBaseURL the link base url
6869
*/
6970
public WikiModel(javax.servlet.http.HttpServletRequest request, SWBParamRequest paramsRequest, String imageBaseURL, String linkBaseURL)
7071
{
71-
super(Configuration.DEFAULT_CONFIGURATION, new Locale(paramsRequest.getUser().getLanguage()), imageBaseURL, linkBaseURL);
72+
super(new Configuration(), new Locale(paramsRequest.getUser().getLanguage()), imageBaseURL, linkBaseURL);
7273
this.paramsRequest=paramsRequest;
7374
this.request=request;
74-
Configuration.DEFAULT_CONFIGURATION.addTokenTag("resource",new ResourceTag());
75+
addTokenTag("resource",new ResourceTag());
76+
//Configuration.addTokenTag("resource",new ResourceTag());
7577
}
7678

77-
79+
7880
/* (non-Javadoc)
7981
* @see info.bliki.wiki.model.WikiModel#appendInternalLink(java.lang.String, java.lang.String, java.lang.String)
8082
*/
8183
/**
8284
* Append internal link.
83-
*
85+
*
8486
* @param link the link
8587
* @param hashSection the hash section
8688
* @param linkText the link text
8789
*/
8890
@Override
89-
public void appendInternalLink(String link, String hashSection, String linkText)
90-
{
91+
public void appendInternalLink(String link, String hashSection, String linkText, String cssClass, boolean parseRecursive) {
9192
String encodedtopic="";
9293
WebPage topic=null;
9394
String lang="es";
9495
if(paramsRequest!=null)lang=paramsRequest.getUser().getLanguage();
9596
if(link.indexOf(':')>=0)
9697
{
97-
encodedtopic= Encoder.encodeTitleUrl(link);
98+
encodedtopic= Encoder.encodeTitleToUrl(link, false);
9899
}else
99100
{
100101
encodedtopic = SWBPlatform.getIDGenerator().getID(link,null,false);
101102
if(paramsRequest!=null)topic=paramsRequest.getWebPage().getWebSite().getWebPage(encodedtopic);
102103
}
103104

104-
if (replaceColon())
105+
if (replaceColon())
105106
{
106107
encodedtopic = encodedtopic.replaceAll(":", "/");
107108
}
108-
String hrefLink = fExternalWikiBaseURL.replace("${title}", encodedtopic);
109-
109+
String hrefLink = getWikiBaseURL().replace("${title}", encodedtopic);
110+
110111
WPATag aTagNode = new WPATag();
111112
append(aTagNode);
112113
aTagNode.addAttribute("id", "w", true);
@@ -119,17 +120,17 @@ public void appendInternalLink(String link, String hashSection, String linkText)
119120

120121
//System.out.println("link:"+link+" "+hashSection+" "+linkText);
121122
if(topic!=null && link.equals(linkText))linkText=topic.getDisplayName(lang);
122-
123+
123124
ContentToken text = new ContentToken(linkText);
124-
aTagNode.addChild(text);
125+
aTagNode.addChild(text);
125126
}
126-
127+
127128
/* (non-Javadoc)
128129
* @see info.bliki.wiki.model.AbstractWikiModel#appendInternalImageLink(java.lang.String, java.lang.String, info.bliki.wiki.model.ImageFormat)
129130
*/
130131
/**
131132
* Append internal image link.
132-
*
133+
*
133134
* @param hrefImageLink the href image link
134135
* @param srcImageLink the src image link
135136
* @param imageFormat the image format
@@ -146,7 +147,7 @@ public void appendInternalImageLink(String hrefImageLink, String srcImageLink, I
146147

147148
/**
148149
* Gets the params request.
149-
*
150+
*
150151
* @return the params request
151152
*/
152153
public SWBParamRequest getParamsRequest()
@@ -156,12 +157,12 @@ public SWBParamRequest getParamsRequest()
156157

157158
/**
158159
* Gets the request.
159-
*
160+
*
160161
* @return the request
161162
*/
162163
public javax.servlet.http.HttpServletRequest getRequest()
163164
{
164165
return request;
165166
}
166-
167+
167168
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.