Create HTML pages and templates. Then add them as blocks to pages. Allows for direct links to templates. If you are editing a HTML file, the TinyMCE editor is launched automatically.
to create a homepage for your gallery that may contain anything (including any gallery block)
{* display the systemlink *}
{g->block type="core.SystemLinks"}
{* display an image *}
<div>
{g->block type="imageblock.ImageBlock" blocks="specificItem" maxSize="400"
itemId=123456 useDefaults=0 showDate=0 showViews=0 showOwner=1 showTitle=1 }
</div>
{* display a HTML file *}
<div>
{g->block type="htmlblock.HTMLBlock" file="my-content.html"}
</div>
{* say hello to your user *}
<div>
{capture name="lang"}{g->language}{/capture}
{assign var="lang" value=$smarty.capture.lang}
{if $lang == "en-US"}
{assign var="greeting" value="Hello"}
{elseif $lang == "ro-RO"}
{assign var="greeting" value="Salut"}
{/if}
{$greeting} {$user.userName}
</div>
or
/* Load and run the appropriate view */
insert this:
/* Serban: if not embedded and empty view, nor a path, nor an item specified
go to htmlblock.RenderFile, with no args, so it will take the default, FrontPage.tpl */
$rewritePath = (isset($_GET[GALLERY_FORM_VARIABLE_PREFIX . 'path']) ?
$_GET[GALLERY_FORM_VARIABLE_PREFIX . 'path'] : null);
$itemId = (int)(isset($_GET[GALLERY_FORM_VARIABLE_PREFIX . 'itemId']) ?
$_GET[GALLERY_FORM_VARIABLE_PREFIX . 'itemId'] : null);
$page = (int)(isset($_GET[GALLERY_FORM_VARIABLE_PREFIX . 'page']) ?
$_GET[GALLERY_FORM_VARIABLE_PREFIX . 'page'] : null);
if (empty($viewName) && !$gallery->isEmbedded() && empty($itemId) && empty($rewritePath) && empty($page)) {
$viewName='htmlblock.RenderFile';
GalleryUtilities::putRequestVariable('view', $viewName);
}
/* Serban: end of changes for frontpage */
to allow the tiny mce editor to not remove Javascript tags: Edit /templates/TileEdit.tpl Change:
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
to:
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style],script[charset|defer|language|src|type]",
Currently there are no feature requests for this module.
Currently there are no known issues for this module.
This is the resulting call in FileEdit.tpl:
tinyMCE.init({
entity_encoding : "raw",
mode : "textareas",
theme : "advanced",
plugins : "insertdatetime,print,fullscreen,noneditable,visualchars,nonbreaking",
theme_advanced_disable: "link,unlink,image,anchor,help,visualaid,charmap,css,code",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,separator",
theme_advanced_buttons3_add : "|,visualchars,nonbreaking,|,print,|,fullscreen",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
content_css: "{/literal}{g->url href="`$theme.themeUrl`/theme.css" forceFullUrl=1}{literal}"
});
Cumgranosalis 15:21, 18 February 2008 (PST)