Refinements for movie display
This commit is contained in:
@@ -97,6 +97,7 @@
|
|||||||
// Data table
|
// Data table
|
||||||
lines.push('^ Title | ' + safe(movie.Title) + ' |');
|
lines.push('^ Title | ' + safe(movie.Title) + ' |');
|
||||||
lines.push('^ Year | ' + safe(movie.Year) + ' |');
|
lines.push('^ Year | ' + safe(movie.Year) + ' |');
|
||||||
|
lines.push('^ Runtime | ' + safe(movie.Runtime) + ' |');
|
||||||
lines.push('^ Genre | ' + safe(movie.Genre) + ' |');
|
lines.push('^ Genre | ' + safe(movie.Genre) + ' |');
|
||||||
lines.push('^ Director | ' + safe(movie.Director) + ' |');
|
lines.push('^ Director | ' + safe(movie.Director) + ' |');
|
||||||
lines.push('^ Actors | ' + safe(movie.Actors) + ' |');
|
lines.push('^ Actors | ' + safe(movie.Actors) + ' |');
|
||||||
|
|||||||
60
syntax/moviemarker.php
Normal file
60
syntax/moviemarker.php
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use dokuwiki\Extension\SyntaxPlugin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* luxtools Plugin: Movie marker syntax.
|
||||||
|
*
|
||||||
|
* Matches the <!-- BEGIN MOVIE --> and <!-- END MOVIE --> markers inserted
|
||||||
|
* by the movie-import toolbar button and renders them as invisible output.
|
||||||
|
* The markers remain in the page source for reliable find-and-replace on
|
||||||
|
* repeated imports.
|
||||||
|
*/
|
||||||
|
class syntax_plugin_luxtools_moviemarker extends SyntaxPlugin
|
||||||
|
{
|
||||||
|
/** @inheritdoc */
|
||||||
|
public function getType()
|
||||||
|
{
|
||||||
|
return 'substition';
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @inheritdoc */
|
||||||
|
public function getPType()
|
||||||
|
{
|
||||||
|
return 'block';
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @inheritdoc */
|
||||||
|
public function getSort()
|
||||||
|
{
|
||||||
|
return 319;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @inheritdoc */
|
||||||
|
public function connectTo($mode)
|
||||||
|
{
|
||||||
|
$this->Lexer->addSpecialPattern(
|
||||||
|
'<!-- BEGIN MOVIE -->',
|
||||||
|
$mode,
|
||||||
|
'plugin_luxtools_moviemarker'
|
||||||
|
);
|
||||||
|
$this->Lexer->addSpecialPattern(
|
||||||
|
'<!-- END MOVIE -->',
|
||||||
|
$mode,
|
||||||
|
'plugin_luxtools_moviemarker'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @inheritdoc */
|
||||||
|
public function handle($match, $state, $pos, Doku_Handler $handler)
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @inheritdoc */
|
||||||
|
public function render($format, Doku_Renderer $renderer, $data)
|
||||||
|
{
|
||||||
|
// Render nothing — markers are source-level only.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user