mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-21 00:00:13 +02:00
fixing/changing wiki image inline code
for local images hosted within DATA/HTDOCS git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1217 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
dbd6cc57dc
commit
c4dd39e8f2
|
@ -348,11 +348,13 @@ public class wikiCode {
|
|||
alt = " alt=\"" + kv + "\"";
|
||||
}
|
||||
|
||||
// replace incomplete URLs and make them point to http://peerip:port/share/...
|
||||
// replace incomplete URLs and make them point to http://peerip:port/...
|
||||
// with this feature you can acces an image in DATA/HTDOCS/share/yacy.gif
|
||||
// using the wikicode [[Image:share/yacy.gif]]
|
||||
// or an image DATA/HTDOCS/grafics/kaskelix.jpg with [[Image:grafics/kaskelix.jpg]]
|
||||
// you are free to use other sub-paths of DATA/HTDOCS
|
||||
if (!((kl.startsWith("http://"))||(kl.startsWith("ftp://")))) {
|
||||
final String ip = yacyCore.seedDB.mySeed.getAddress().trim();
|
||||
final String port = sb.getConfig("port", "8080").trim();
|
||||
kl = "http://" + ip + ":" + port + "/share/" + kl;
|
||||
kl = "http://" + yacyCore.seedDB.mySeed.getAddress().trim() + "/" + kl;
|
||||
}
|
||||
|
||||
result = result.substring(0, p0) + "<img src=\"" + kl + "\"" + align.trim() + alt.trim() + ">" + result.substring(p1 + 2);
|
||||
|
|
Loading…
Reference in New Issue
Block a user