Web Liberty,PHP Labo,freoのプログラムの改造の備忘録
トップページ > freoのバージョン別変更点(Ver 1.3.0~⇒Ver 1.20.2) > freo Ver 1.6.4との変更点
freo本体のVer 1.6.4(2011/05/11更新)と最新のバージョンVer 1.20.2(2018/07/08更新)との変更点です。
※今お使いのfreoのバージョンがわからない場合は、freoの管理画面のステータスに「本体のバージョンは x.x.x です。」と表示されているのをご確認ください。
※他のバージョンについては こちら から
※公式サイトにあるテンプレートと差し替えてください。
target += 'a[href$=.' + this + ']';
の部分を、
target += 'a[href$=¥'.' + this + '¥']';
に変更(赤字の部分を追加)してください。 target += 'a[href$=.' + this + ']';
の部分を、
target += 'a[href$=¥'.' + this + '¥']';>
に変更(赤字の部分を追加)してください。 //閲覧制限
if ($('#article_restriction').val() == 'group') {
$('#article_password').hide();
} else if ($('#article_restriction').val() == 'password') {
$('#article_group').hide();
} else {
$('#article_group, #article_password').hide();
}
$('#article_restriction').change(function() {
if ($(this).val() == 'group') {
$('#article_group').show();
$('#article_password').hide();
} else if ($(this).val() == 'password') {
$('#article_group').hide();
$('#article_password').show();
} else {
$('#article_group, #article_password').hide();
}
});
を追加し、
51行目あたり(ColorBoxの設定)にある
target += 'a[href$=.' + this + ']';
の部分を、
target += 'a[href$=¥'.' + this + '¥']';
に変更(赤字の部分を追加)してください。※公式サイトにあるテンプレートと差し替えてください。
target += 'a[href$=.' + this + ']';
の部分を、
target += 'a[href$=¥'.' + this + '¥']';
に変更(赤字の部分を追加)してください。 <li><a href="{$freo.core.http_file}/admin">ユーザー用ページ</a></li>
の部分を、
<li><a href="{$freo.core.http_file}/user">ユーザー用ページ</a></li>
に変更(緑字の部分を赤字に)し、
87行目あたり(フィルター設定へのリンク)にある
<!--{if $freo.user.authority != 'root' and $freo.user.authority != 'author' and ($freo.config.entry.filter or $freo.config.page.filter)}-->
の部分を、
<!--{if $freo.user.authority != 'root' and $freo.user.authority != 'author' and ($freo.config.entry.filter or $freo.config.page.filter or $freo.config.media.filter)}-->
に変更(赤字の部分を追加)してください。 <!--{if $option.type == 'text'}-->
<dd><input type="text" name="entry_associate[option][{$option.id}]" size="50" value="{$input.entry_associate.option[$option.id]}" /></dd>
<!--{elseif $option.type == 'textarea'}-->
<dd><textarea name="entry_associate[option][{$option.id}]" cols="50" rows="5">{$input.entry_associate.option[$option.id]}</textarea></dd>
の部分を、
<!--{if $option.type == 'text'}-->
<dd><input type="text" name="entry_associate[option][{$option.id}]" size="50" value="{if $freo.query.id or $freo.query.session or $smarty.server.REQUEST_METHOD == 'POST'}{$input.entry_associate.option[$option.id]}{else}{$option.text}{/if}" /></dd>
<!--{elseif $option.type == 'textarea'}-->
<dd><textarea name="entry_associate[option][{$option.id}]" cols="50" rows="5">{if $freo.query.id or $freo.query.session or $smarty.server.REQUEST_METHOD == 'POST'}{$input.entry_associate.option[$option.id]}{else}{$option.text}{/if}</textarea></dd>
に変更(赤字の部分を追加)してください。 <!--{if $freo.config.entry.restriction or $freo.config.page.restriction}-->
の部分を、
<!--{if $freo.config.entry.restriction or $freo.config.page.restriction or $freo.config.media.restriction}-->
に、
91行目あたり(フィルター管理へのリンク)にある
<!--{if $freo.config.entry.filter or $freo.config.page.filter}-->
の部分を、
<!--{if $freo.config.entry.filter or $freo.config.page.filter or $freo.config.media.filter}-->
に、それぞれ変更(赤字の部分を追加)してください。 <li>ページを入力してください。</li>
<li><abbr class="attention" title="入力必須">*</abbr> の付いた項目は入力必須項目です。</li>
の直後に、
<li><a href="{$freo.core.http_file}/admin/page?pid={$input.page.pid}">この階層のページを表示する</a>。</li>
を追加し、
29行目あたり(オプション項目)にある
<!--{if $option.type == 'text'}-->
<dd><input type="text" name="page_associate[option][{$option.id}]" size="50" value="{$input.page_associate.option[$option.id]}" /></dd>
<!--{elseif $option.type == 'textarea'}-->
<dd><textarea name="page_associate[option][{$option.id}]" cols="50" rows="5">{$input.page_associate.option[$option.id]}</textarea></dd>
の部分を、
<!--{if $option.type == 'text'}-->
<dd><input type="text" name="page_associate[option][{$option.id}]" size="50" value="{if $freo.query.id or $freo.query.session or $smarty.server.REQUEST_METHOD == 'POST'}$input.page_associate.option[$option.id]}{else}{$option.text}{/if}" /></dd>
<!--{elseif $option.type == 'textarea'}-->
<dd><textarea name="page_associate[option][{$option.id}]" cols="50" rows="5">{if $freo.query.id or $freo.query.session or $smarty.server.REQUEST_METHOD == 'POST'}$input.page_associate.option[$option.id]}{else}{$option.text}{/if}</textarea></dd>
に変更(赤字を追加)し、
109~110行目あたりにある
<!--{foreach from=$pages|smarty:nodefaults item='page'}-->
<option value="{$page.id}"{if $input.page.pid == $page.id} selected="selected"{/if} >{$page.id}</option>
の部分を、
<!--{foreach from=$parent_pages|smarty:nodefaults item='parent_page'}-->
<option value="{$parent_page.id}"{if $input.page.pid == $parent_page.id} selected="selected"{/if}>{$parent_page.id}</option>
に変更(緑字を赤字に)してください。▼<a href="{$freo.core.http_file}/login?freo%5Bsession%5D=logout">ログアウト</a><br />
の部分を、
▼<a href="{$freo.core.http_file}/login?guid=ON&freo%5Bsession%5D=logout">ログアウト</a><br />
に変更(赤字の部分を追加)してください。※公式サイトにあるテンプレートと差し替えてください。
<nav>
の部分を、
<nav id="back">
に変更(赤字の部分を追加)してください。 <!--{if $freo.user.authority != 'root' and $freo.user.authority != 'author' and ($freo.config.entry.filter or $freo.config.page.filter)}-->
の部分を、
<!--{if $freo.user.authority != 'root' and $freo.user.authority != 'author' and ($freo.config.entry.filter or $freo.config.page.filter or $freo.config.media.filter)}-->
に変更(赤字の部分を追加)してください。//TinyMCE
tinymce.init({
language: 'ja',
selector:'#tiny_mce',
height: 500,
plugins: [
'advlist autolink lists link image charmap print preview anchor',
'searchreplace visualblocks code fullscreen',
'insertdatetime media table contextmenu paste code pagebreak'
],
toolbar: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image pagebreak',
content_css: [
freo_path + 'css/common.css',
],
convert_urls: false
});
に書き換えます。<script type="text/javascript" src="{$freo.core.http_url}tiny_mce/tiny_mce.js"></script>
の部分を、
<script type="text/javascript" src="{$freo.core.http_url}tinymce/tinymce.min.js"></script>
に変更(緑字を削除して赤字を追加)してください。div#utility div.utility ul.gallery {
margin: 0;
padding: 0;
}
div#utility div.utility ul.gallery li {
list-style: none;
}
div#utility div.utility ul.gallery li img {
max-width: 180px;
max-height: 130px;
margin-bottom: 5px;
}
を追加し(サイドバーに新着画像表示が不要な場合は無くてもOK)、
その下に、
/********* ギャラリー ***********************************************/
div#gallery {
overflow: hidden;
}
div#gallery div.gallery {
float: left;
margin-right: 12px;
margin-bottom: 20px;
}
div#gallery div.gallery p.picture {
overflow: hidden;
width: 140px;
height: 100px;
margin: 0;
}
div#gallery div.gallery p.picture a {
color: #FFFFFF;
text-decoration: none;
}
div#gallery div.gallery p.picture a img {
min-width: 140px;
min-height: 100px;
}
div#gallery div.gallery p.picture a span.empty {
display: block;
line-height: 100px;
width: 140px;
height: 100px;
background-color: #AAAAAA;
text-align: center;
}
div#gallery div.gallery p.comment {
overflow: hidden;
width: 140px;
margin: 3px 0 0;
font-size: 80%;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
}
div#gallery ul {
margin: 10px 0 20px 0;
}
div#gallery ul li {
display: inline;
}
div#gallery ul li img {
margin: 0 2px 10px 0;
}
を追加してください。 <div class="utility">
<h3>リンク</h3>
<div class="content">
<ul>
<!--{if !$freo.user.authority and $freo.config.user.regist}-->
<li><a href="{$freo.core.http_file}/regist">ユーザー登録</a></li>
<!--{/if}-->
の部分を、
<div class="utility">
<h3>リンク</h3>
<div class="content">
<ul>
<li><a href="{$freo.core.http_file}/entry_gallery">ギャラリー</a></li>
<!--{if !$freo.user.authority and $freo.config.user.regist}-->
<li><a href="{$freo.core.http_file}/regist">ユーザー登録</a></li>
<!--{/if}-->
に変更(赤字の部分を追加)し、
「ユーザー」部分の下に、
<!--{if $plugin_entry_galleries|smarty:nodefaults}-->
<div class="utility">
<h3>新着画像</h3>
<div class="content">
<ul class="gallery">
<!--{foreach from=$plugin_entry_galleries|smarty:nodefaults item='plugin_entry_gallery'}-->
<li><a href="{$freo.core.http_file}/view/{if $plugin_entry_gallery.code}{$plugin_entry_gallery.code}{else}{$plugin_entry_gallery.id}{/if}"><!--{if $plugin_entry_gallery.image}--><img src="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}entry_images/{$plugin_entry_gallery.id}/{$plugin_entry_gallery.image}" alt="{$plugin_entry_gallery.memo|default:$plugin_entry_gallery.title}" title="{$plugin_entry_gallery.memo|default:$plugin_entry_gallery.title}" /><!--{elseif $plugin_entry_gallery_thumbnails[$plugin_entry_gallery.id]}--><img src="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}entry_thumbnails/{$plugin_entry_gallery.id}/{$plugin_entry_gallery.file}" alt="{$plugin_entry_gallery.memo|default:$plugin_entry_gallery.title}" title="{$plugin_entry_gallery.memo|default:$plugin_entry_gallery.title}" /><!--{elseif $plugin_entry_gallery.file}--><img src="{$freo.core.http_url}{$smarty.const.FREO_FILE_DIR}entry_files/{$plugin_entry_gallery.id}/{$plugin_entry_gallery.file}" alt="{$plugin_entry_gallery.memo|default:$plugin_entry_gallery.title}" title="{$plugin_entry_gallery.memo|default:$plugin_entry_gallery.title}" /><!--{elseif $plugin_entry_gallery_medias[$plugin_entry_gallery.id].file}--><img src="{$plugin_entry_gallery_medias[$plugin_entry_gallery.id].file}" alt="{$plugin_entry_gallery.memo|default:$plugin_entry_gallery.title}" title="{$plugin_entry_gallery.memo|default:$plugin_entry_gallery.title}" /><!--{else}-->{$plugin_entry_gallery.memo|default:$plugin_entry_gallery.title}<!--{/if}--></a></li>
<!--{/foreach}-->
</ul>
</div>
</div>
<!--{/if}-->
を追加してください(サイドバーに新着画像表示が不要な場合は無くてもOK)。 <meta name="viewport" content="width=device-width" />
を追加し、
メニュー部分の
<!--{if isset($smarty.session.freo.agent.type|smarty:nodefaults)}-->
<li><a href="{$smarty.server.PHP_SELF}?freo%5Bagent%5D%5Btype%5D=iphone">iPhone版</a></li>
<!--{/if}-->
を削除してください。/********* レスポンシブ *********************************************/
@media (max-width: 480px) {
body {
padding: 5px;
}
form textarea {
width: 95%;
}
img {
max-width : 100%;
height: auto;
}
div#container {
width: 90%;
padding: 15px;
}
div#content {
float: none;
width: 100%;
}
div#entry div.entry {
width: 100%;
border-right: 0;
border-left: 0;
word-wrap:break-word;
}
div#utility {
float: none;
width: 100%;
margin: 0;
}
}
を追加してください。