Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configmodify #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

$pico_configs_can_be_override = array(
'show_listasindex' => 'bool' ,
'show_subject' => 'bool' ,
'show_breadcrumbs' => 'bool' ,
'when_top_hide_breadcrumbs' => 'bool' ,
'top_show_module_name' => 'bool' ,
'show_pagenavi' => 'bool' ,
'show_printicon' => 'bool' ,
'show_tellafriend' => 'bool' ,
Expand All @@ -14,6 +17,8 @@
'guest_vote_interval' => 'int' ,
'htmlheader' => 'text' ,
'allow_each_htmlheader' => 'bool' ,
'rss_link_show' => 'bool' ,
'menu_link_show' => 'bool' ,
'css_uri' => 'text' ,
'images_dir' => 'text' ,
'body_editor' => 'text' ,
Expand Down
11 changes: 9 additions & 2 deletions xoops_trust_path/modules/pico/language/english/modinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,14 @@
define($constpref.'_NOTIFY_CONTENT_COMMENTCAP', 'Notify if a new comment is posted. (approved comments only)');
define($constpref.'_NOTIFY_CONTENT_COMMENTSBJ', '[{X_SITENAME}] {X_MODULE} : a new comment');

}

define($constpref.'_RSS_LINK_SHOW','Show RSS Link');
define($constpref.'_SHOW_SUBJECT','Show Subject');
define($constpref.'_SHOW_SUBJECTCAP','Show Subject in contents view');
define($constpref.'_MENU_LINK_SHOW','Show MENU Link');
define($constpref.'_WHEN_TOP_HIDE_BREADCRUMBS','Hide breadcrumb in module top page');
define($constpref.'_WHEN_TOP_HIDE_BREADCRUMBSCAP','If you want to hide breadcrumb in module top page, select YES');
define($constpref.'_TOP_SHOW_MODULE_NAME','Top category show module name');
define($constpref.'_TOP_SHOW_MODULE_NAMECAP','If you choose NO, it shows default category name');

}
?>
11 changes: 9 additions & 2 deletions xoops_trust_path/modules/pico/language/ja_utf8/modinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,14 @@
define($constpref.'_NOTIFY_CONTENT_COMMENTCAP', 'このコンテンツへのコメント登録があった場合に通知します(未承認であれば通知しません)');
define($constpref.'_NOTIFY_CONTENT_COMMENTSBJ', '[{X_SITENAME}] {X_MODULE} : コメントの投稿がありました');

}

define($constpref.'_RSS_LINK_SHOW','RSSリンクを表示する');
define($constpref.'_SHOW_SUBJECT','表題を表示する');
define($constpref.'_SHOW_SUBJECTCAP','コンテンツを表示するときに表題を表示します');
define($constpref.'_MENU_LINK_SHOW','MENUリンクを表示する');
define($constpref.'_WHEN_TOP_HIDE_BREADCRUMBS','モジュールトップページの時パンくずを隠す');
define($constpref.'_WHEN_TOP_HIDE_BREADCRUMBSCAP','モジュールトップページの時はパンくずを表示したくないときは はい としてください');
define($constpref.'_TOP_SHOW_MODULE_NAME','TOPカテゴリーはモジュール名を表示する');
define($constpref.'_TOP_SHOW_MODULE_NAMECAP','いいえ にした場合はトップカテゴリー名(デフォルト:TOPもしくはトップ)が表示されます');

}
?>
19 changes: 17 additions & 2 deletions xoops_trust_path/modules/pico/templates/inc_breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
<{if $mod_config.show_breadcrumbs}>
<{assign var="show" value=$mod_config.show_breadcrumbs}>
<{assign var="count" value=$xoops_breadcrumbs|@count}>
<{if $show}>
<{if $count ==1}>
<{if $mod_config.when_top_hide_breadcrumbs}>
<{assign var="show" value=0}>
<{/if}>
<{/if}>
<{/if}>
<{if $show}>
<!-- breadcrumbs -->
<div class="pico_breadcrumbs">
<a href="<{$mod_url}>/index.php"><{$smarty.const._MD_PICO_TOP}></a>
<a href="<{$mod_url}>/index.php">
<{if $mod_config.top_show_module_name}>
<{$xoops_modulename}>
<{else}>
<{$smarty.const._MD_PICO_TOP}>
<{/if}>
</a>
<{foreach from=$xoops_breadcrumbs key="i" item="bc"}>
<{if $i > 0}>
&nbsp;&gt;&nbsp;
Expand Down
14 changes: 11 additions & 3 deletions xoops_trust_path/modules/pico/templates/main_listcontents.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<div class="pico_controllers">

<!-- link to menu -->
<{if $mod_config.menu_link_show == 1}>
<a href="<{$mod_url}>/index.php?page=menu">[<{$smarty.const._MD_PICO_MENU}>]</a>
<{/if}>
<{if $category.isadminormod}>
<a href="<{$mod_url}>/index.php?page=categorymanager&amp;cat_id=<{$category.id}>">[<{$smarty.const._MD_PICO_LINK_EDITCATEGORY}>]</a>
<{/if}>
Expand All @@ -29,13 +30,20 @@
<{/if}>

<!-- link to RSS -->
<{if $mod_config.rss_link_show == 1}>
<a href="<{$mod_url}>/index.php?page=rss&amp;cat_id=<{$category.id}>">[RSS]</a>
<{/if}>
</div>

<{if $category.id == 0}><p><{$mod_config.top_message}></p><{/if}>

<h1><{$category.title}></h1>
<h1>
<{if $mod_config.top_show_module_name && $category.id == 0}>
<{$xoops_modulename}>
<{else}>
<{$category.title}>
<{/if}>
</h1>
<{if $category.isadminormod}>
<p>
<{$smarty.const._MD_PICO_CONTENTS_TOTAL}>:<{$category.redundants.contents_total}>
Expand Down
13 changes: 11 additions & 2 deletions xoops_trust_path/modules/pico/templates/main_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,21 @@
<a href="<{$mod_url}>/index.php?page=makecategory">[<{$smarty.const._MD_PICO_LINK_MAKECATEGORY}>]</a>
<{/if}>
<!-- link to RSS -->
<{if $mod_config.rss_link_show == 1}>
<a href="<{$mod_url}>/index.php?page=rss">[RSS]</a>
<{/if}>
</div>

<p><{$mod_config.top_message}></p>

<{foreach item=category from=$categories}>

<h<{$category.depth_in_tree|min:5}>><a href="<{$mod_url}>/<{$category.link}>"><{$category.title}></a>
<h<{$category.depth_in_tree|min:5}>><a href="<{$mod_url}>/<{$category.link}>">
<{if $category.depth_in_tree == 1 && $mod_config.top_show_module_name == 1}>
<{$xoops_modulename}>
<{else}>
<{$category.title}>
<{/if}>
</a>
</h<{$category.depth_in_tree|min:5}>>

<!-- controllers for each categories -->
Expand All @@ -41,7 +48,9 @@
<{/if}>

<!-- link to RSS -->
<{if $mod_config.rss_link_show == 1}>
<a href="<{$mod_url}>/index.php?page=rss&amp;cat_id=<{$category.id}>">[RSS]</a>
<{/if}>
</div>

<div class="level<{$category.depth_in_tree|min:5}>">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<div class="pico_container" id="<{$mydirname}>_container">

<{include file="db:`$mydirname`_inc_breadcrumbs.html"}>

<{if $mod_config.show_subject}>
<h2><{$content.subject}></h2>
<{/if}>
<{* admin controllers *}>
<{capture name="controllers"}>
<{if $content.can_edit}>
Expand Down
62 changes: 56 additions & 6 deletions xoops_trust_path/modules/pico/xoops_version.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$modversion['version'] = 1.86 ;
$modversion['detailed_version'] = "1.86.0" ;
$modversion['credits'] = "PEAK Corp.";
$modversion['author'] = "GIJ=CHECKMATE<br />PEAK Corp.(http://www.peak.ne.jp/)<br />XOOPS X�@(ten)�@Distribution�ihttps://github.com/XoopsX/pico�j" ;
$modversion['author'] = "GIJ=CHECKMATE<br />PEAK Corp.(http://www.peak.ne.jp/)<br />XOOPS X (ten) Distribution(https://github.com/XoopsX/pico)" ;
$modversion['help'] = "" ;
$modversion['license'] = "GPL" ;
$modversion['official'] = 0 ;
Expand Down Expand Up @@ -210,6 +210,16 @@
'options' => array()
) ;

$modversion['config'][] = array(
'name' => 'show_subject' ,
'title' => $constpref.'_SHOW_SUBJECT' ,
'description' => '' ,
'formtype' => 'yesno' ,
'valuetype' => 'int' ,
'default' => 1 ,
'options' => array()
) ;

$modversion['config'][] = array(
'name' => 'show_breadcrumbs' ,
'title' => $constpref.'_SHOW_BREADCRUMBS' ,
Expand All @@ -220,13 +230,33 @@
'options' => array()
) ;

$modversion['config'][] = array(
'name' => 'when_top_hide_breadcrumbs' ,
'title' => $constpref.'_WHEN_TOP_HIDE_BREADCRUMBS' ,
'description' => $constpref.'_WHEN_TOP_HIDE_BREADCRUMBSCAP' ,
'formtype' => 'yesno' ,
'valuetype' => 'int' ,
'default' => 1 ,
'options' => array()
) ;

$modversion['config'][] = array(
'name' => 'top_show_module_name' ,
'title' => $constpref.'_TOP_SHOW_MODULE_NAME' ,
'description' => $constpref.'_TOP_SHOW_MODULE_NAMECAP' ,
'formtype' => 'yesno' ,
'valuetype' => 'int' ,
'default' => 1 ,
'options' => array()
) ;

$modversion['config'][] = array(
'name' => 'show_pagenavi' ,
'title' => $constpref.'_SHOW_PAGENAVI' ,
'description' => '' ,
'formtype' => 'yesno' ,
'valuetype' => 'int' ,
'default' => 1 ,
'default' => 0 ,
'options' => array()
) ;

Expand All @@ -236,7 +266,7 @@
'description' => '' ,
'formtype' => 'yesno' ,
'valuetype' => 'int' ,
'default' => 1 ,
'default' => 0 ,
'options' => array()
) ;

Expand All @@ -246,7 +276,7 @@
'description' => '' ,
'formtype' => 'yesno' ,
'valuetype' => 'int' ,
'default' => 1 ,
'default' => 0 ,
'options' => array()
) ;

Expand All @@ -256,7 +286,7 @@
'description' => '' ,
'formtype' => 'yesno' ,
'valuetype' => 'int' ,
'default' => 1 ,
'default' => 0 ,
'options' => array()
) ;

Expand Down Expand Up @@ -326,7 +356,7 @@
'description' => '' ,
'formtype' => 'yesno' ,
'valuetype' => 'int' ,
'default' => 1 ,
'default' => 0 ,
'options' => array()
) ;

Expand Down Expand Up @@ -360,6 +390,26 @@
'options' => array()
) ;

$modversion['config'][] = array(
'name' => 'rss_link_show' ,
'title' => $constpref.'_RSS_LINK_SHOW' ,
'description' => '' ,
'formtype' => 'yesno' ,
'valuetype' => 'int' ,
'default' => 0 ,
'options' => array()
) ;

$modversion['config'][] = array(
'name' => 'menu_link_show' ,
'title' => $constpref.'_MENU_LINK_SHOW' ,
'description' => '' ,
'formtype' => 'yesno' ,
'valuetype' => 'int' ,
'default' => 0 ,
'options' => array()
) ;

$modversion['config'][] = array(
'name' => 'css_uri' ,
'title' => $constpref.'_CSS_URI' ,
Expand Down