diff options
| -rwxr-xr-x[-rw-r--r--] | templates/backlinks.tpl | 4 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/center_wiki_page.php | 18 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/copyrights.tpl | 12 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/edit_page.tpl | 56 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/html_head_inc.tpl | 5 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/like_pages.tpl | 4 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/menu_wiki.tpl | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/page_action_bar.tpl | 26 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/page_date_bar.tpl | 8 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/page_display.tpl | 4 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/page_header.tpl | 13 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/page_history.tpl | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/page_icons.tpl | 8 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/rollback.tpl | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/show_page.tpl | 24 |
15 files changed, 96 insertions, 92 deletions
diff --git a/templates/backlinks.tpl b/templates/backlinks.tpl index 0b6dea0..b9b7461 100644..100755 --- a/templates/backlinks.tpl +++ b/templates/backlinks.tpl @@ -6,8 +6,8 @@ <div class="body"> <ul> - {foreach from=$backlinks key=content_id item=title} - <li><a href="{$smarty.const.WIKI_PKG_URL}index.php?content_id={$content_id}" class="wiki">{$title}</a></li> + {foreach from=$backlinks key=page_id item=title} + <li><a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$page_id}" class="wiki">{$title}</a></li> {foreachelse} <div class="norecords">{tr}No backlinks to this page{/tr}</div> {/foreach} diff --git a/templates/center_wiki_page.php b/templates/center_wiki_page.php index 74a661f..2c700e6 100644..100755 --- a/templates/center_wiki_page.php +++ b/templates/center_wiki_page.php @@ -1,18 +1,18 @@ <?php + +use Bitweaver\Wiki\BitPage; global $moduleParams, $gBitSmarty; // Load up the correct wiki page -$lookupHash['page_id'] = ( !empty( $moduleParams['module_params']['page_id'] ) ? $moduleParams['module_params']['page_id'] : NULL ); -$lookupHash['content_id'] = ( !empty( $moduleParams['module_params']['content_id'] ) ? $moduleParams['module_params']['content_id'] : NULL ); -$lookupHash['page'] = ( !empty( $moduleParams['module_params']['page'] ) ? $moduleParams['module_params']['page'] : NULL ); +$lookupHash['page_id'] = !empty( $moduleParams['module_params']['page_id'] ) ? $moduleParams['module_params']['page_id'] : null; +$lookupHash['content_id'] = !empty( $moduleParams['module_params']['content_id'] ) ? $moduleParams['module_params']['content_id'] : null; +$lookupHash['page'] = !empty( $moduleParams['module_params']['page'] ) ? $moduleParams['module_params']['page'] : null; -require_once( WIKI_PKG_CLASS_PATH.'BitPage.php' ); -$modulePage = BitPage::lookupObject( $lookupHash ); -$showTitle = TRUE; +$showTitle = true; if( !empty( $moduleParams['module_params']['notitle'] ) ) { - $showTitle = FALSE; + $showTitle = false; } elseif( !empty( $moduleParams['title'] )) { $modulePage->mInfo['title'] = $moduleParams['title']; } -$_template->tpl_vars['showTitle'] = new Smarty_variable( $showTitle ); -$_template->tpl_vars['wikiPage'] = new Smarty_variable( $modulePage ); +$gBitSmarty->assign( 'showTitle', $showTitle ); +$gBitSmarty->assign( 'wikiPage', $modulePage ); diff --git a/templates/copyrights.tpl b/templates/copyrights.tpl index 2609162..53214b8 100644..100755 --- a/templates/copyrights.tpl +++ b/templates/copyrights.tpl @@ -1,6 +1,6 @@ <div class="display copyrights"> <div class="header"> - <h1>{tr}Copyrights for {$pageInfo.title|escape}{/tr}</h1> + <h1>{tr}Copyrights for {$Content->mInfo.title|escape}{/tr}</h1> </div> <div class="body"> @@ -32,12 +32,12 @@ </div> <div class="form-group submit"> - <input type="hidden" name="page_id" value="{$pageInfo.page_id}" /> + <input type="hidden" name="page_id" value="{$gContent->mInfo.page_id}" /> <input type="hidden" name="copyright_id" value="{$copyrights[i].copyright_id|escape}" /> <input type="submit" class="btn btn-default" name="editcopyright" value="{tr}edit{/tr}" /> - <a href="{$smarty.const.WIKI_PKG_URL}copyrights.php?page_id={$pageInfo.page_id}&action=up&copyright_id={$copyrights[i].copyright_id}">{booticon iname="fa-circle-arrow-up" iexplain="move up"}</a> - <a href="{$smarty.const.WIKI_PKG_URL}copyrights.php?page_id={$pageInfo.page_id}&action=down&copyright_id={$copyrights[i].copyright_id}">{booticon iname="fa-circle-arrow-down" iexplain="move down"}</a> - <a title="{tr}Delete this copyright{/tr}" href="{$smarty.const.WIKI_PKG_URL}copyrights.php?page_id={$pageInfo.page_id}&action=delete&copyright_id={$copyrights[i].copyright_id}" + <a href="{$smarty.const.WIKI_PKG_URL}copyrights.php?page_id={$gContent->mInfo.page_id}&action=up&copyright_id={$copyrights[i].copyright_id}">{booticon iname="fa-circle-arrow-up" iexplain="move up"}</a> + <a href="{$smarty.const.WIKI_PKG_URL}copyrights.php?page_id={$gContent->mInfo.page_id}&action=down&copyright_id={$copyrights[i].copyright_id}">{booticon iname="fa-circle-arrow-down" iexplain="move down"}</a> + <a title="{tr}Delete this copyright{/tr}" href="{$smarty.const.WIKI_PKG_URL}copyrights.php?page_id={$gContent->mInfo.page_id}&action=delete&copyright_id={$copyrights[i].copyright_id}" onclick="return confirm('{tr}Are you sure you want to delete this copyright?{/tr}')">{booticon iname="fa-trash" iexplain="delete"}</a> </div> {/form} @@ -45,7 +45,7 @@ {/legend} {form legend="Add a new copyright setting"} - <input type="hidden" name="page_id" value="{$pageInfo.page_id}" /> + <input type="hidden" name="page_id" value="{$gContent->mInfo.page_id}" /> <div class="form-group"> {formlabel label="Title" for="copyleft-tit"} {forminput} diff --git a/templates/edit_page.tpl b/templates/edit_page.tpl index a3cfc11..f14ec1c 100644..100755 --- a/templates/edit_page.tpl +++ b/templates/edit_page.tpl @@ -5,9 +5,9 @@ <h1> {* this weird dual assign thing is cause smarty wont interpret backticks to object in assign tag - spiderr *} {assign var=conDescr value=$gContent->getContentTypeName()} - {if $pageInfo.page_id} + {if $gContent->mInfo.page_id|default:false} {assign var=editLabel value="{tr}Edit{/tr} $conDescr"} - {tr}{tr}Edit{/tr} {$pageInfo.original_title}{/tr} + {tr}{tr}Edit{/tr} {$gContent->mInfo.original_title|default:$gContent->mInfo.title}{/tr} {else} {assign var=editLabel value="{tr}Create{/tr} $conDescr"} {tr}{$editLabel}{/tr} @@ -16,8 +16,8 @@ </div> {* Check to see if there is an editing conflict *} - {if $errors.edit_conflict} - <script>/* <![CDATA[ */ + {if $errors.edit_conflict|default:false} + <script nonce={$cspNonce}>/* <![CDATA[ */ alert( "{$errors.edit_conflict|strip_tags}" ); /* ]]> */</script> {formfeedback warning=$errors.edit_conflict} @@ -41,9 +41,9 @@ </div> {/if} - {if $preview} - {if $pageInfo.edit_section == 1 } - <h2>{tr}Preview Section {$pageInfo.section} of: {$title}{/tr}</h2> + {if !empty($preview)} + {if $gContent->mInfo.edit_section == 1 } + <h2>{tr}Preview Section {$gContent->mInfo.section} of: {$title}{/tr}</h2> {else} <h2>{tr}Preview {$title}{/tr}</h2> {/if} @@ -61,17 +61,19 @@ {jstabs} {jstab title="Body"} {legend legend="`$editLabel` Body"} - <input type="hidden" name="page_id" value="{$pageInfo.page_id}" /> - <input type="hidden" name="content_id" value="{$pageInfo.content_id}" /> + <input type="hidden" name="page_id" value="{$gContent->mInfo.page_id|default:''}" /> + <input type="hidden" name="content_id" value="{$gContent->mInfo.content_id|default:''}" /> <div class="form-group"> - {formfeedback warning=$errors.title} + {if !empty($errors.title)} + {formfeedback warning=$errors.title} + {/if} {formlabel label="$conDescr Title"} {forminput} - {if $gBitUser->hasPermission( 'p_wiki_rename_page' ) || !$pageInfo.page_id} - <input type="text" class="form-control" maxlength="200" name="title" id="title" value="{$pageInfo.title|escape}" /> + {if $gBitUser->hasPermission( 'p_wiki_rename_page' ) or !$gContent->mInfo.page_id} + <input type="text" class="form-control" maxlength="200" name="title" id="title" value="{$gContent->mInfo.title|default:$pageInfo.title|escape}" /> {else} - {$page} {$pageInfo.title|escape} + {$page} {$gContent->mInfo.title|default:''|escape} {/if} {/forminput} </div> @@ -80,25 +82,21 @@ <div class="form-group"> {formlabel label="Summary" for="summary"} {forminput} - <input type="text" class="form-control" name="summary" id="summary" value="{$pageInfo.summary|escape:html}" /> + <input type="text" class="form-control" name="summary" id="summary" value="{$gContent->mInfo.summary|default:''|escape:html}" /> {formhelp note="Brief description of the page. This is visible when you hover over a link to this page and just below the title of the wiki page."} {/forminput} </div> {/if} - <div class="form-group"> - {formlabel label="Meta Tags" for="metatags"} - {forminput} - <textarea class="form-control" name="metatags" id="metatags" rows="5">{$pageInfo.metatags|escape:html}</textarea> - {formhelp note="Meta data to be inserted on page display. Useful for Opengraph tags."} - {/forminput} - </div> - - {if $pageInfo.edit_section == 1} - <input type="hidden" name="section" value="{$pageInfo.section}" /> + {if $gContent->mInfo.edit_section|default:0 == 1} + <input type="hidden" name="section" value="{$gContent->mInfo.section}" /> {/if} - {textarea edit=$pageInfo.data formatguid=$pageInfo.format_guid langcode=$pageInfo.lang_code} + {if !empty($gContent->mInfo.data)} + {textarea edit=$gContent->mInfo.data formatguid=$gContent->mInfo.format_guid langcode=$gContent->mInfo.lang_code} + {else} + {textarea edit=''} + {/if} {if $footnote} <div class="form-group"> @@ -114,7 +112,7 @@ <div class="form-group"> {formlabel label="Comment" for="edit_comment"} {forminput} - <input type="text" class="form-control" name="edit_comment" id="edit_comment" value="{$pageInfo.edit_comment}" /> + <input type="text" class="form-control" name="edit_comment" id="edit_comment" value="{$gContent->mInfo.edit_comment|default:''}" /> {formhelp note="Add a comment to illustrate your most recent changes."} {/forminput} </div> @@ -123,7 +121,7 @@ {if $gBitUser->hasPermission( 'p_wiki_save_minor' )} <div class="form-group"> {forminput label="checkbox"} - <input type="checkbox" name="isminor" id="isminor" value="on" {if $pageInfo.isminor}checked="checked" {/if}/>Minor save + <input type="checkbox" name="isminor" id="isminor" value="on" {if isset($gContent->mInfo.isminor)}checked="checked" {/if}/>Minor save {formhelp note="This will prevent the generation of a new version. You can use this, if your changes are minor."} {/forminput} </div> @@ -141,7 +139,7 @@ {include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_edit_tab_tpl"} - {if $gBitSystem->isFeatureActive( 'wiki_attachments' ) && $gBitUser->hasPermission('p_liberty_attach_attachments')} + {if $gBitSystem->isFeatureActive( 'wiki_attachments' ) and $gBitUser->hasPermission('p_liberty_attach_attachments')} {jstab title="Attachments"} {legend legend="Attachments"} {include file="bitpackage:liberty/edit_storage.tpl"} @@ -219,7 +217,7 @@ <tr><td> {tr}Import file{/tr}:</td><td> <input name="userfile1" type="file" /> - { * <a href="{$smarty.const.WIKI_PKG_URL}export_wiki_pages.php?page_id={$pageInfo.page_id}&all=1">{tr}export all versions{/tr}</a> * } + { * <a href="{$smarty.const.WIKI_PKG_URL}export_wiki_pages.php?page_id={$gContent->mInfo.page_id}&all=1">{tr}export all versions{/tr}</a> * } </td></tr> {/if} { * end upload file row * } *} diff --git a/templates/html_head_inc.tpl b/templates/html_head_inc.tpl index db2a834..1c204e5 100644..100755 --- a/templates/html_head_inc.tpl +++ b/templates/html_head_inc.tpl @@ -1,5 +1,8 @@ {strip} {if $gBitSystem->isPackageActive( 'rss' ) and $gBitSystem->isFeatureActive( 'wiki_rss' ) and $gBitSystem->getActivePackage() eq 'wiki' and $gBitUser->hasPermission( 'p_wiki_view_page' )} -<link rel="alternate" type="application/rss+xml" title="{$gBitSystem->getConfig('fisheye_rss_title',"{tr}Wiki{/tr} RSS")}" href="{$smarty.const.WIKI_PKG_URL}wiki_rss.php?version={$gBitSystem->getConfig('rssfeed_default_version',0)}{if $gBitSystem->getConfig( 'rssfeed_httpauth' ) && $gBitUser->isRegistered()}&httpauth=y{/if}" /> + <link rel="alternate" type="application/rss+xml" + title="{$gBitSystem->getConfig('fisheye_rss_title',"Wiki RSS")}" + href="{$smarty.const.WIKI_PKG_URL}wiki_rss.php?version={$gBitSystem->getConfig('rssfeed_default_version',0)} + {if $gBitSystem->getConfig( 'rssfeed_httpauth' ) and $gBitUser->isRegistered()} &httpauth=y{/if}" /> {/if} {/strip} diff --git a/templates/like_pages.tpl b/templates/like_pages.tpl index d2369b2..8ae822c 100644..100755 --- a/templates/like_pages.tpl +++ b/templates/like_pages.tpl @@ -1,12 +1,12 @@ <div class="listing wiki"> <div class="header"> - <h1>{tr}Pages like{/tr}: <a href="{$pageInfo.display_url}">{$pageInfo.title|escape}</a></h1> + <h1>{tr}Pages like{/tr}: <a href="{$gContent->mInfo.display_url}">{$gContent->mInfo.title|escape}</a></h1> </div> <div class="body"> <ul> {section name=back loop=$likepages} - <li class="{cycle values='odd,even'}"><a href="{$pageInfo.display_url}">{$likepages[back]}</a></li> + <li class="{cycle values='odd,even'}"><a href="{$gContent->mInfo.display_url}">{$likepages[back]}</a></li> {sectionelse} <li class="norecords">{tr}No pages found{/tr}</li> {/section} diff --git a/templates/menu_wiki.tpl b/templates/menu_wiki.tpl index 8890614..e7f51f5 100644..100755 --- a/templates/menu_wiki.tpl +++ b/templates/menu_wiki.tpl @@ -1,5 +1,5 @@ {strip} -{if $packageMenuTitle}<a class="dropdown-toggle" data-toggle="dropdown" href="#"> {tr}{$packageMenuTitle}{/tr} <b class="caret"></b></a>{/if} +{if !empty($packageMenuTitle)}<a class="dropdown-toggle" data-toggle="dropdown" href="#"> {tr}{$packageMenuTitle}{/tr} <b class="caret"></b></a>{/if} <ul class="{$packageMenuClass}"> {if $gBitUser->hasPermission( 'p_wiki_view_page' )} <li><a class="item" href="{$smarty.const.WIKI_PKG_URL}index.php">{booticon iname="fa-house" iexplain="`$smarty.const.WIKI_PKG_DIR|ucwords` Home" ilocation=menu}</a></li> diff --git a/templates/page_action_bar.tpl b/templates/page_action_bar.tpl index dfb7fd9..068673e 100644..100755 --- a/templates/page_action_bar.tpl +++ b/templates/page_action_bar.tpl @@ -1,49 +1,49 @@ {if $print_page ne 'y' && $gBitUser->hasPermission( 'p_users_view_icons_and_tools' )} {capture name=navbarlist}{strip} {if !$gContent->isLocked()} - {assign var=format_guid value=$pageInfo.format_guid} + {assign var=format_guid value=$gContent->mInfo.format_guid} {if $gLibertySystem->mPlugins.$format_guid.is_active eq 'y'} {if $gContent->hasUpdatePermission() or $page eq 'SandBox'} - <li><a href="{$smarty.const.WIKI_PKG_URL}edit.php?page_id={$pageInfo.page_id}">{tr}Edit{/tr}</a></li> + <li><a href="{$smarty.const.WIKI_PKG_URL}edit.php?page_id={$gContent->mInfo.page_id}">{tr}Edit{/tr}</a></li> {/if} {/if} {if $page ne 'SandBox' && $gBitUser->hasPermission( 'p_wiki_remove_page' )} - <li><a title="{tr}Remove this page{/tr}" href="{$smarty.const.WIKI_PKG_URL}remove_page.php?page_id={$pageInfo.page_id}&version=last">{tr}Remove{/tr}</a></li> + <li><a title="{tr}Remove this page{/tr}" href="{$smarty.const.WIKI_PKG_URL}remove_page.php?page_id={$gContent->mInfo.page_id}&version=last">{tr}Remove{/tr}</a></li> {/if} {/if} {if $page ne 'SandBox'} - {if $gBitUser->hasPermission( 'p_wiki_admin' ) or ($gBitUser->mUserId and ($gBitUser->mUserId eq $pageInfo.modifier_user_id) and ($gBitUser->hasPermission( 'p_wiki_lock_page' )) and ($gBitSystem->isFeatureActive( 'wiki_usrlock' )))} + {if $gBitUser->hasPermission( 'p_wiki_admin' ) or ($gBitUser->mUserId and ($gBitUser->mUserId eq $gContent->mInfo.modifier_user_id) and ($gBitUser->hasPermission( 'p_wiki_lock_page' )) and ($gBitSystem->isFeatureActive( 'wiki_usrlock' )))} {if $gContent->isLocked()} - <li><a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&action=unlock">{tr}Unlock{/tr}</a></li> + <li><a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$gContent->mInfo.page_id}&action=unlock">{tr}Unlock{/tr}</a></li> {else} - <li><a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&action=lock">{tr}Lock{/tr}</a></li> + <li><a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$gContent->mInfo.page_id}&action=lock">{tr}Lock{/tr}</a></li> {/if} {/if} {if $gBitUser->hasPermission( 'p_wiki_admin' )} - <li><a href="{$smarty.const.WIKI_PKG_URL}page_permissions.php?page_id={$pageInfo.page_id}">{tr}Permissions{/tr}</a></li> + <li><a href="{$smarty.const.WIKI_PKG_URL}page_permissions.php?page_id={$gContent->mInfo.page_id}">{tr}Permissions{/tr}</a></li> {/if} {if $gBitSystem->isFeatureActive( 'wiki_history' ) and $gContent->hasUserPermission('p_wiki_view_history')} - <li><a href="{$smarty.const.WIKI_PKG_URL}page_history.php?page_id={$pageInfo.page_id}" rel="nofollow">{tr}History{/tr}</a></li> + <li><a href="{$smarty.const.WIKI_PKG_URL}page_history.php?page_id={$gContent->mInfo.page_id}" rel="nofollow">{tr}History{/tr}</a></li> {/if} {/if} {if $gBitSystem->isFeatureActive( 'wiki_like_pages' )} - <li><a href="{$smarty.const.WIKI_PKG_URL}like_pages.php?page_id={$pageInfo.page_id}">{tr}Similar{/tr}</a></li> + <li><a href="{$smarty.const.WIKI_PKG_URL}like_pages.php?page_id={$gContent->mInfo.page_id}">{tr}Similar{/tr}</a></li> {/if} {if $gBitSystem->isFeatureActive( 'wiki_undo' ) and !$gContent->isLocked() and $gContent->hasUserPermission('p_wiki_rollback')} - <li><a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$pageInfo.page_id}&undo=1">{tr}Undo{/tr}</a></li> + <li><a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$gContent->mInfo.page_id}&undo=1">{tr}Undo{/tr}</a></li> {/if} {if $gBitSystem->isFeatureActive( 'wiki_uses_slides' )} {if $show_slideshow eq 'y'} - <li><a href="{$smarty.const.WIKI_PKG_URL}slideshow.php?page_id={$pageInfo.page_id}">{tr}Slides{/tr}</a></li> + <li><a href="{$smarty.const.WIKI_PKG_URL}slideshow.php?page_id={$gContent->mInfo.page_id}">{tr}Slides{/tr}</a></li> {elseif $structure eq 'y'} <li><a href="slideshow2.php?structure_id={$page_info.structure_id}">{tr}Slides{/tr}</a></li> {/if} {/if} {if $gBitUser->hasPermission( 'p_wiki_admin' )} - <li><a href="{$smarty.const.WIKI_PKG_URL}export_wiki_pages.php?page_id={$pageInfo.page_id}">{tr}Export{/tr}</a></li> + <li><a href="{$smarty.const.WIKI_PKG_URL}export_wiki_pages.php?page_id={$gContent->mInfo.page_id}">{tr}Export{/tr}</a></li> {/if} {if $gBitSystem->isFeatureActive( 'users_watches' ) and $gContent->hasUserPermission('p_users_admin')} - <li><a href="{$smarty.const.WIKI_PKG_URL}page_watches.php?page_id={$pageInfo.page_id}">{tr}Watches{/tr}</a></li> + <li><a href="{$smarty.const.WIKI_PKG_URL}page_watches.php?page_id={$gContent->mInfo.page_id}">{tr}Watches{/tr}</a></li> {/if} {/strip}{/capture} {if $smarty.capture.navbarlist ne ''} diff --git a/templates/page_date_bar.tpl b/templates/page_date_bar.tpl index dfc1af4..170da99 100644..100755 --- a/templates/page_date_bar.tpl +++ b/templates/page_date_bar.tpl @@ -1,11 +1,11 @@ {strip} {if !$gBitSystem->isFeatureActive( 'wiki_hide_date' )} <div class="date"> - {tr}Created by{/tr}: {displayname user=$pageInfo.creator_user user_id=$pageInfo.user_id real_name=$pageInfo.creator_real_name}, - {tr}Last modification{/tr}: {$pageInfo.last_modified|reltime} - {if $pageInfo.modifier_user_id!=$pageInfo.user_id} + {tr}Created by{/tr}: {displayname user=$gContent->mInfo.creator_user user_id=$gContent->mInfo.user_id real_name=$gContent->mInfo.creator_real_name}, + {tr}Last modification{/tr}: {$gContent->mInfo.last_modified|reltime} + {if $gContent->mInfo.modifier_user_id!=$gContent->mInfo.user_id} - {tr}by{/tr} {displayname user=$pageInfo.modifier_user user_id=$pageInfo.modifier_user_id real_name=$pageInfo.modifier_real_name} + {tr}by{/tr} {displayname user=$gContent->mInfo.modifier_user user_id=$gContent->mInfo.modifier_user_id real_name=$gContent->mInfo.modifier_real_name} {/if} </div> {/if} diff --git a/templates/page_display.tpl b/templates/page_display.tpl index 4674e2f..b411d76 100644..100755 --- a/templates/page_display.tpl +++ b/templates/page_display.tpl @@ -1,8 +1,8 @@ {strip} -<div class="body"{if $gBitUser->getPreference( 'users_double_click' ) and $gContent->hasUpdatePermission()} ondblclick="location.href='{$smarty.const.WIKI_PKG_URL}edit.php?page_id={$pageInfo.page_id}';"{/if}> +<div class="body"{if $gBitUser->getPreference( 'users_double_click' ) and $gContent->hasUpdatePermission()} ondblclick="location.href='{$smarty.const.WIKI_PKG_URL}edit.php?page_id={$gContent->mInfo.page_id}';"{/if}> <div class="content"> {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo} - {$pageInfo.parsed_data} + {$gContent->mInfo.parsed_data|highlight} <div class="clear"></div> {if $gBitSystem->isFeatureActive( 'liberty_auto_display_attachment_thumbs' )} {include file="bitpackage:liberty/storage_thumbs.tpl"} diff --git a/templates/page_header.tpl b/templates/page_header.tpl index e5421bc..d358562 100644..100755 --- a/templates/page_header.tpl +++ b/templates/page_header.tpl @@ -1,14 +1,15 @@ {capture assign="wiki_page_title"}{strip} {if $gBitSystem->isFeatureActive( 'wiki_page_title' )} - <h1>{$pageInfo.title|escape}</h1> + <h1>{$gContent->mInfo.title|escape}</h1> {/if} - {if $gBitSystem->isFeatureActive( 'wiki_description' ) and $pageInfo.summary} - <p>{$pageInfo.summary|escape}</p> + {if $gBitSystem->isFeatureActive( 'wiki_description' ) and $gContent->mInfo.summary} + <p>{$gContent->mInfo.summary|escape}</p> {/if} - {include file="bitpackage:wiki/page_date_bar.tpl"} {/strip}{/capture} {if !empty($wiki_page_title)} - <div class="header"> - {$wiki_page_title} + <div class="main_header"> + {$wiki_page_title|highlight} + {include file="bitpackage:wiki/page_date_bar.tpl"} + {if ( !empty( $highlightWordList) ) }{$highlightWordList}{/if} </div><!-- end .header --> {/if} diff --git a/templates/page_history.tpl b/templates/page_history.tpl index 1eee68a..8590e25 100644..100755 --- a/templates/page_history.tpl +++ b/templates/page_history.tpl @@ -36,7 +36,7 @@ {if $diff2 eq 'y'} <h2>{tr}Differences from version{/tr} {$version_from} to {$version_to}</h2> - {if $pageInfo.format_guid eq 'bithtml'} + {if $gContent->mInfo.format_guid eq 'bithtml'} {$diffdata|html_entity_decode} {else} {$diffdata} diff --git a/templates/page_icons.tpl b/templates/page_icons.tpl index 98e2b45..06c92cd 100644..100755 --- a/templates/page_icons.tpl +++ b/templates/page_icons.tpl @@ -33,7 +33,7 @@ {/if} {/if} - {if ($structureInfo.structure_id) && ($gStructure->mInfo.creator_user_id == $gBitUser->mUserId || $gContent->hasUserPermission( 'p_wiki_admin_book' ))} + {if !empty($structureInfo.structure_id) && ($gStructure->mInfo.creator_user_id == $gBitUser->mUserId || $gContent->hasUserPermission( 'p_wiki_admin_book' ))} <a href="{$smarty.const.WIKI_PKG_URL}edit_book.php?structure_id={$structureInfo.structure_id}">{booticon iname="fa-gears" iexplain="Edit book"}</a> {elseif is_a($gContent,'BitBook') && $gContent->hasUpdatePermission()} <a href="{$smarty.const.WIKI_PKG_URL}edit_book.php?content_id={$gContent->mContentId}">{booticon iname="fa-gears" iexplain="Edit book"}</a> @@ -78,14 +78,14 @@ <span class="caret"></span> </button> <ul class="dropdown-menu pull-right"> - {foreach key=contentId item=backPage from=$backlinks} - <li><a href="{$smarty.const.BIT_ROOT_URL}index.php?content_id={$contentId}">{$backPage|escape|truncate:30:"&hellip":true}</a></li> + {foreach item=backPage from=$backlinks} + <li><a href="{$smarty.const.BIT_ROOT_URL}{$backPage.url}">{$backPage.title|escape|truncate:30:"…":true}</a></li> {/foreach} </ul> </div> {/if} - {if $showstructs && (count($showstructs) gt 0)} + {if !empty($showstructs) && count($showstructs) gt 0} <select id="sel-structures" name="page" onchange="javascript:BitBase.go(this)"> <option value="">{tr}Wiki Books{/tr} …</option> {section name=struct loop=$showstructs} diff --git a/templates/rollback.tpl b/templates/rollback.tpl index 6bd8f6e..275f603 100644..100755 --- a/templates/rollback.tpl +++ b/templates/rollback.tpl @@ -1,4 +1,4 @@ -<h2>{tr}Rollback page{/tr}: {$pageInfo.title|escape} {tr}to_version{/tr}: {$version}</h2> +<h2>{tr}Rollback page{/tr}: {$gContent->mInfo.title|escape} {tr}to_version{/tr}: {$version}</h2> <div class="wikibody">{$preview.data}</div> <div align="center"> <form action="{$smarty.const.WIKI_PKG_URL}rollback.php" method="post"> diff --git a/templates/show_page.tpl b/templates/show_page.tpl index a88da3d..ce55e92 100644..100755 --- a/templates/show_page.tpl +++ b/templates/show_page.tpl @@ -1,12 +1,14 @@ -{if $comments_at_top_of_page eq 'y' and $print_page ne 'y' and $gBitSystem->isFeatureActive( 'wiki_comments' )} +{if empty($comments_at_top_of_page)}{assign var=comments_at_top_of_page value=false}{/if} +{if empty($print_page)}{assign var=print_page value=false}{/if} +{if $comments_at_top_of_page and !$print_page and $gBitSystem->isFeatureActive( 'wiki_comments' )} {include file="bitpackage:wiki/page_header.tpl"} {include file="bitpackage:liberty/comments.tpl"} {/if} {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='nav' serviceHash=$gContent->mInfo} -<div class="display wiki {$pageInfo.title|escape|lower|regex_replace:"/[^a-z_]/i":""}"> - {if !$liberty_preview} +<div class="display wiki {$gContent->mInfo.title|escape|lower|regex_replace:"/[^a-z_]/i":""}"> + {if empty($liberty_preview)} {include file="bitpackage:wiki/page_icons.tpl"} {include file="bitpackage:wiki/page_header.tpl"} {/if} @@ -17,17 +19,17 @@ {include file="bitpackage:wiki/page_display.tpl"} - {if $pages > 1} + {if !empty($pages) and $pages > 1} <div class="pagination"> - {*<a title="{tr}First page{/tr}" href="index.php?page_id={$pageInfo.page_id}&pagenum={$first_page}">« «</a>*} - <a title="{tr}Previous page{/tr}" href="index.php?page_id={$pageInfo.page_id}&pagenum={$prev_page}">«</a> + {*<a title="{tr}First page{/tr}" href="index.php?page_id={$gContent->mInfo.page_id}&pagenum={$first_page}">« «</a>*} + <a title="{tr}Previous page{/tr}" href="index.php?page_id={$gContent->mInfo.page_id}&pagenum={$prev_page}">«</a> {tr}Page {$pagenum} of {$pages}{/tr} - <a title="{tr}Next page{/tr}" href="index.php?page_id={$pageInfo.page_id}&pagenum={$next_page}">»</a> - {*<a title="{tr}Last page{/tr}" href="index.php?page_id={$pageInfo.page_id}&pagenum={$last_page}">» »</a>*} + <a title="{tr}Next page{/tr}" href="index.php?page_id={$gContent->mInfo.page_id}&pagenum={$next_page}">»</a> + {*<a title="{tr}Last page{/tr}" href="index.php?page_id={$gContent->mInfo.page_id}&pagenum={$last_page}">» »</a>*} </div> {/if} {* end .pagination *} - {$footnote} + {if !empty($footnote)}{$footnote}{/if} {if $gBitSystem->isFeatureActive( 'wiki_copyrights' )} <p class="copyright"> @@ -39,7 +41,7 @@ {tr}The content on this page is licensed under the terms of the{/tr} <a href="{$wiki_license_page}"><b>{tr}{$wiki_submit_notice}{/tr}</b></a>. {/if} {if $gBitUser->hasPermission( 'p_wiki_edit_copyright' )} - <br />{tr}To edit the copyright notices{/tr} <a href="{$smarty.const.WIKI_PKG_URL}copyrights.php?page_id={$pageInfo.page_id}">{tr}click here{/tr}</a>. + <br />{tr}To edit the copyright notices{/tr} <a href="{$smarty.const.WIKI_PKG_URL}copyrights.php?page_id={$gContent->mInfo.page_id}">{tr}click here{/tr}</a>. {/if} </p> {/if} @@ -47,6 +49,6 @@ {include file="bitpackage:liberty/services_inc.tpl" serviceLocation='view' serviceHash=$gContent->mInfo} -{if $comments_at_top_of_page ne 'y' and $print_page ne 'y' and $gBitSystem->isFeatureActive( 'wiki_comments' )} +{if !$comments_at_top_of_page and !$print_page and $gBitSystem->isFeatureActive( 'wiki_comments' )} {include file="bitpackage:liberty/comments.tpl"} {/if} |
