),
);
+ var $type = array();
+ var $type_settings = array();
+
// pagenate設定
// CollectionableBehavoirによりModelにて設定
/* type設定をセット */
function set_type4view()
{
- $this->model_type = $this->get_type();
- $this->set('type', $this->model_type);
+ $this->type = $this->get_type_i18n();
- $this->model_type2 = array_merge(
- array(0 => 'member'),
- $this->model_type
- );
- $this->set('type2', $this->model_type2);
+ $this->set('type', $this->type);
}
function get_type()
{
return array();
}
}
+ function get_type_i18n(){
+ $type = $this->get_type();
+
+ if (!empty($type)) {
+ $this->set_type_i18n();
+
+ $types = array();
+ foreach ($type as $k => $v) {
+ $types[$k]['name'] = $v;
+ if (isset($this->type_settings[$v])) {
+ $types[$k]['title'] = $this->type_settings[$v]['title'];
+ $types[$k]['description'] = $this->type_settings[$v]['description'];
+ } else {
+ $types[$k]['title'] = '';
+ $types[$k]['description'] = '';
+ }
+ }
+ $type = $types;
+ }
+ return $type;
+ }
+ function set_type_i18n() {
+ $this->type_settings = array(
+ 'member' => array(
+ 'title' => '',
+ 'description' => '',
+ ),
+ 'creators' => array(
+ 'title' => __('Creators/Publishers', true),
+ 'description' => __('The website of TRPG creators/Publishers.', true),
+ ),
+ 'portal' => array(
+ 'title' => __('Portal/Search', true),
+ 'description' => __('The portal site or the search site for TRPG.', true),
+ ),
+ 'ring' => array(
+ 'title' => __('WebRing', true),
+ 'description' => __('Joined Webrings', true),
+ ),
+ 'thanks' => array(
+ 'title' => __('Thanks links', true),
+ 'description' => __('Thanks sites. Some site have NO relation to TRPG.', true),
+ ),
+ );
+ }
/* Restore */
function _restore_html_link($data, $nl2br = false, $emptyNotitle = false) {