Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Adding Vimeo tag to wiki commands to embedd Video video with id
Copro3ea83809597d
diff --git a/htroot/WikiHelp.html b/htroot/WikiHelp.htmlindex 9a2f7b004..f1ea257f5 100644--- a/htroot/WikiHelp.html+++ b/htroot/WikiHelp.html@@ -123,7 +123,8 @@<tr valign="top"><td class="tt">- [url]<br />[url description]+ [url]<br />+ [url description]</td><td>This tag creates links to external websites.@@ -144,10 +145,12 @@<tr valign="top"><td class="tt"><span class="tt" style="white-space: nowrap;">[[Youtube:id]]</span><br />+ <span class="tt" style="white-space: nowrap;">[[Vimeo:id]]</span><br /></td><td>- This tag displays a Youtube video with the id specified and fixed width 425 pixels and height 350 pixels.- i.e. use [[Youtube:QZsWG4-7Qfk]] to embedd this video: https://www.youtube.com/watch?v=QZsWG4-7Qfk+ This tag displays a Youtube or Vimeo video with the id specified and fixed width 425 pixels and height 350 pixels.<br />+ i.e. use [[Youtube:QZsWG4-7Qfk]] to embedd this video: https://www.youtube.com/watch?v=QZsWG4-7Qfk<br />+ i.e. use [[Vimeo:32200946]] to embedd this video: http://vimeo.com/32200946<br /></td></tr>diff --git a/locales/de.lng b/locales/de.lngindex 660b9c2b2..008c511a8 100644--- a/locales/de.lng+++ b/locales/de.lng@@ -3240,7 +3240,7 @@ pagename==Seitennamedescription\]\]==Beschreibung]]This tag creates links to other pages of the wiki.==Dieser Tag erzeugt einen Link zu einer anderen Seite im Wiki.This tag displays an image, it can be aligned left, right or center.==Dieser Tag fügt ein Bild ein, es kann links (left), rechts (right) oder mittig (center) ausgerichtet werden.-This tag displays a Youtube video with the id specified and fixed width 425 pixels and height 350 pixels.==Dieser Tag fügt ein Youtube Video mit der angegeben id und einer fixen Höhe von 425 Pixeln und einer fixen Breite von 350 Pixeln ein.+This tag displays a Youtube or Vimeo video with the id specified and fixed width 425 pixels and height 350 pixels.==Dieser Tag fügt ein Youtube oder Vimeo Video mit der angegeben id und einer fixen Höhe von 425 Pixeln und einer fixen Breite von 350 Pixeln ein.i.e. use==z.B. wird mitto embedd this video:==dieses Video eingebunden:These tags create a table, whereas the first marks the beginning of the table, the second starts==Diese Tags erstellen eine Tabelle, wobei der erste den Anfang der Tabelle markiert, der zweite beginnt@@ -3249,7 +3249,7 @@ closes the table.==schließt die Tabelle.#The escape tags will cause all tags in the text between the starting and the closing tag to not be treated as wiki-code.==Durch diesen Tag wird der Text, der zwischen den Klammern steht, nicht interpretiert und unformatiert als normaler Text ausgegeben.A text between these tags will keep all the spaces and linebreaks in it. Great for ASCII-art and program code.==Ein Text zwischen diesen Tags wird alle Leerzeichen und Zeilenumbrüche beinhalten. Gut geeignet für ASCII-Kunst und Programm Code.If a line starts with a space, it will be displayed in a non-proportional font.==Wenn eine Zeile mit einem Leerzeichen anfängt, wird diese als nicht-proportionale Schriftart dargestellt.-url description==URL Beschreibung+url description==url BeschreibungThis tag creates links to external websites.==Dieser Tag erstellt einen Link zu einer externen Internetseite.alt text==alt Beschreibung#-----------------------------diff --git a/source/net/yacy/data/wiki/WikiCode.java b/source/net/yacy/data/wiki/WikiCode.javaindex ce9fd296e..44c84149b 100644--- a/source/net/yacy/data/wiki/WikiCode.java+++ b/source/net/yacy/data/wiki/WikiCode.java@@ -114,7 +114,8 @@ public class WikiCode extends AbstractWikiParser implements WikiParser {private static final String WIKI_CLOSE_PRE_ESCAPED = "</pre>";private static final String WIKI_HR_LINE = "----";private static final String WIKI_IMAGE = "Image:";- private static final String WIKI_YOUTUBE = "Youtube:";+ private static final String WIKI_VIDEO_YOUTUBE = "Youtube:";+ private static final String WIKI_VIDEO_VIMEO = "Vimeo:";private static final String WIKI_OPEN_PRE_ESCAPED = "<pre>";private static final char ASTERISK = '*';@@ -132,7 +133,8 @@ public class WikiCode extends AbstractWikiParser implements WikiParser {private static final int LEN_WIKI_OPEN_LINK = WIKI_OPEN_LINK.length();private static final int LEN_WIKI_CLOSE_LINK = WIKI_CLOSE_LINK.length();private static final int LEN_WIKI_IMAGE = WIKI_IMAGE.length();- private static final int LEN_WIKI_YOUTUBE = WIKI_YOUTUBE.length();+ private static final int LEN_WIKI_VIDEO_YOUTUBE = WIKI_VIDEO_YOUTUBE.length();+ private static final int LEN_WIKI_VIDEO_VIMEO = WIKI_VIDEO_VIMEO.length();private static final int LEN_WIKI_OPEN_EXTERNAL_LINK = WIKI_OPEN_EXTERNAL_LINK.length();private static final int LEN_WIKI_CLOSE_EXTERNAL_LINK = WIKI_CLOSE_EXTERNAL_LINK.length();private static final int LEN_WIKI_HR_LINE = WIKI_HR_LINE.length();@@ -639,11 +641,17 @@ public class WikiCode extends AbstractWikiParser implements WikiParser {line = line.substring(0, positionOfOpeningTag) + "<img src=\"" + kl + "\"" + align + alt + ">" + line.substring(positionOfClosingTag + LEN_WIKI_CLOSE_LINK);}- // this is the part of the code that's responsible for Youtube video links supporting only the video ID as parameter- else if (kl.startsWith(WIKI_YOUTUBE)) {- kl = kl.substring(LEN_WIKI_YOUTUBE);+ // this is the part of the code that is responsible for Youtube video links supporting only the video ID as parameter+ else if (kl.startsWith(WIKI_VIDEO_YOUTUBE)) {+ kl = kl.substring(LEN_WIKI_VIDEO_YOUTUBE);line = line.substring(0, positionOfOpeningTag) + "" + "<object width=\"425\" height=\"350\"><param name=\"movie\" value=\"http://www.youtube.com/v/" + kl + "\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/" + kl + "\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"350\"></embed></object>";}+ // this is the part of the code that is responsible for Vimeo video links supporting only the video ID as parameter+ else if (kl.startsWith(WIKI_VIDEO_VIMEO)) {+ kl = kl.substring(LEN_WIKI_VIDEO_VIMEO);+ line = line.substring(0, positionOfOpeningTag) + "" + "<iframe src=\"http://player.vimeo.com/video/" + kl + "\" width=\"425\" height=\"350\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>";+ }+ // if it's no image, it might be an internal linkelse {if ((p = kl.indexOf(PIPE_ESCAPED)) > 0) {kv = kl.substring(p + LEN_PIPE_ESCAPED);