mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Implement unique IDs and card linking
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
require_once('./modules/mse-drupal-modules/autoformat.inc');
|
||||
|
||||
/**
|
||||
@@ -18,28 +18,28 @@ function autoformat_help($section) {
|
||||
*/
|
||||
function autoformat_filter_tips($delta, $format, $long = FALSE) {
|
||||
if ($long) {
|
||||
$tips = array(
|
||||
'p' => array( t('Paragraphs'), "A single line break\nhas no effect.\n\nBut two line breaks start a new paragraph."),
|
||||
'h2' => array( t('Headings'), '=='. t('Section') ."==\n".
|
||||
'==='. t('Subsection') ."===\n".
|
||||
'===='. t('Subsection two') ."===="),
|
||||
'ul' => array( t('Unordered lists'), "* First list item\n* Second list item\n** A nested list item"),
|
||||
'ol' => array( t('Ordered lists'), "# First list item\n# Second list item\n## A nested list item"),
|
||||
'dl' => array( t('Definition lists'), ": A term\n; The defenition of that term\n; can span multiple lines\n: Another term\n; And another definition."),
|
||||
'mix' => array( t('List types can be mixed'), "* A list\n*: Contains a definition \n*; It is both:\n*;# Inside that list, and\n*;# Correctly formated"),
|
||||
$tips = array(
|
||||
'p' => array( t('Paragraphs'), "A single line break\nhas no effect.\n\nBut two line breaks start a new paragraph."),
|
||||
'h2' => array( t('Headings'), '=='. t('Section') ."==\n".
|
||||
'==='. t('Subsection') ."===\n".
|
||||
'===='. t('Subsection two') ."===="),
|
||||
'ul' => array( t('Unordered lists'), "* First list item\n* Second list item\n** A nested list item"),
|
||||
'ol' => array( t('Ordered lists'), "# First list item\n# Second list item\n## A nested list item"),
|
||||
'dl' => array( t('Definition lists'), ": A term\n; The defenition of that term\n; can span multiple lines\n: Another term\n; And another definition."),
|
||||
'mix' => array( t('List types can be mixed'), "* A list\n*: Contains a definition \n*; It is both:\n*;# Inside that list, and\n*;# Correctly formated"),
|
||||
'pre' => array( t('Preformated text'), " If you start with a space\n the formating is preserved"),
|
||||
'em' => array( t('Emphasis'), "''Emphasized text''"),
|
||||
'strong'=> array( t('Strong Emphasis'), "'''Strongly emphasized text'''"),
|
||||
);
|
||||
$header = array(t('Description'), t('You Type'), t('You Get'));
|
||||
foreach($tips as $tip) {
|
||||
$rows[] = array(
|
||||
array('data' => $tip[0], 'class' => 'description'),
|
||||
array('data' => strpos($tip[1],"\n") !== false
|
||||
? '<pre>'. check_plain($tip[1]) .'</pre>'
|
||||
: '<code>'. check_plain($tip[1]) .'</code>',
|
||||
'class' => 'type'),
|
||||
array('data' => autoformat($tip[1]), 'class' => 'get')
|
||||
$rows[] = array(
|
||||
array('data' => $tip[0], 'class' => 'description'),
|
||||
array('data' => strpos($tip[1],"\n") !== false
|
||||
? '<pre>'. check_plain($tip[1]) .'</pre>'
|
||||
: '<code>'. check_plain($tip[1]) .'</code>',
|
||||
'class' => 'type'),
|
||||
array('data' => autoformat($tip[1]), 'class' => 'get')
|
||||
);
|
||||
}
|
||||
$output = t('Automatic formating of text using the same tags as <a href="http://en.wikipedia.org/wiki/Wikipedia:How_to_edit_a_page#Wiki_markup">MediaWiki (wikipedia)</a>.');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
// Automatic formating of text using the same tags as MediaWiki (wikipedia).
|
||||
|
||||
|
||||
require_once('./modules/mse-drupal-modules/highlight.inc');
|
||||
|
||||
// quick and dirty aliasses
|
||||
|
||||
@@ -51,8 +51,8 @@ $built_in_functions = array(
|
||||
'filter_list' =>'',
|
||||
'random_shuffle' =>'',
|
||||
'random_select' =>'',
|
||||
'random_select_many' =>'',
|
||||
'get_card_styling' =>'',
|
||||
'random_select_many' =>'',
|
||||
'get_card_styling' =>'',
|
||||
'get_card_stylesheet' =>'',
|
||||
// keywords
|
||||
'expand_keywords' =>'', 'expand_keywords_rule'=>'expand_keywords',
|
||||
@@ -93,14 +93,19 @@ $built_in_functions = array(
|
||||
'flip_vertical' =>'',
|
||||
'rotate' =>'',
|
||||
'drop_shadow' =>'',
|
||||
'insert_image' =>'',
|
||||
'dimensions_of' =>'',
|
||||
'symbol_variation' =>'',
|
||||
'import_image' =>'',
|
||||
'built_in_image' =>'',
|
||||
// cards
|
||||
'new_card' =>'',
|
||||
'add_card_to_set' =>'',
|
||||
'has_link' =>'',
|
||||
'get_card_from_link' =>'',
|
||||
'get_card_from_uid' =>'',
|
||||
'get_card_styling' =>'',
|
||||
'get_card_stylesheet' =>'',
|
||||
'add_card_to_set' =>'',
|
||||
// html export
|
||||
'to_html' =>'',
|
||||
'symbols_to_html' =>'',
|
||||
@@ -111,6 +116,7 @@ $built_in_functions = array(
|
||||
'write_set_file' =>'',
|
||||
// other
|
||||
'get_mse_version' =>'',
|
||||
'get_mse_locale' =>'',
|
||||
'get_mse_path' =>'',
|
||||
'trace' =>'',
|
||||
'assert' =>'',
|
||||
@@ -248,4 +254,4 @@ function highlight_script_string($code) {
|
||||
return $code;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user