Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added dw2pdf support

  • Loading branch information...
commit 4ac6f37197f1a07bef04f384272b93a600db14d8 1 parent e34d33a
@splitbrain authored
View
0  style.css → all.css
File renamed without changes
View
16 pdf.css
@@ -0,0 +1,16 @@
+
+div.vshare__left,
+div.vshare__right,
+div.vshare__center {
+ border: 1px solid #ccc;
+ text-align: center;
+ padding: 2em;
+}
+
+a.vshare {
+ color: #aaa;
+ font-size: 2em;
+ font-weight: bold;
+ text-decoration: none;
+}
+
View
2  plugin.info.txt
@@ -1,7 +1,7 @@
base vshare
author Andreas Gohr
email andi@splitbrain.org
-date 2011-02-01
+date 2012-01-17
name Video Sharing Site Plugin
desc Easily embed videos from various Video Sharing sites. Example: {{youtube>XXXXXX}}
url http://www.dokuwiki.org/plugin:vshare
View
36 syntax.php
@@ -106,13 +106,33 @@ function render($mode, &$R, $data){
if($data['align'] == 3) $align = 'center';
if($data['title']) $title = ' title="'.hsc($data['title']).'"';
- $R->doc .= '<div class="vshare__'.$align.'"'.$title.'>';
- $R->doc .= html_flashobject(
- $data['flash'],
- $data['width'],
- $data['height'],
- $data['vars'],
- $data['vars']);
- $R->doc .= '</div>';
+ if(is_a($R,'renderer_plugin_dw2pdf')){
+ // Output for PDF renderer
+ $R->doc .= '<div class="vshare__'.$align.'"
+ width="'.$data['width'].'"
+ height="'.$data['height'].'">';
+
+ $R->doc .= '<a href="'.$data['flash'].'" class="vshare">';
+ $R->doc .= '<img src="'.DOKU_BASE.'lib/plugins/vshare/video.png" />';
+ $R->doc .= '</a>';
+
+ $R->doc .= '<br />';
+
+ $R->doc .= '<a href="'.$data['flash'].'" class="vshare">';
+ $R->doc .= ($data['title'] ? hsc($data['title']) : 'Video');
+ $R->doc .= '</a>';
+
+ $R->doc .= '</div>';
+ }else{
+ // Normal output
+ $R->doc .= '<div class="vshare__'.$align.'"'.$title.'>';
+ $R->doc .= html_flashobject(
+ $data['flash'],
+ $data['width'],
+ $data['height'],
+ $data['vars'],
+ $data['vars']);
+ $R->doc .= '</div>';
+ }
}
}
View
BIN  video.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.