Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed some templates to use cache (fixes #619)
- Loading branch information
Showing
33 changed files
with
307 additions
and
223 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
apps/mobile_frontend/modules/ranking/actions/components.class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
/** | ||
* ranking components. | ||
* | ||
* @package opRankingPlugin | ||
* @subpackage ranking | ||
* @author Shogo Kawahara <kawahara@tejimaya.net> | ||
*/ | ||
class rankingComponents extends opRankingPluginRankingComponents | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
_menu: | ||
enabled: true | ||
|
||
_access: | ||
enabled: true | ||
lifetime: 3600 | ||
|
||
_friend: | ||
enabled: true | ||
lifetime: 3600 | ||
|
||
_community: | ||
enabled: true | ||
lifetime: 3600 | ||
|
||
_topic: | ||
enabled: true | ||
lifetime: 3600 |
23 changes: 23 additions & 0 deletions
23
apps/mobile_frontend/modules/ranking/templates/_access.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php op_mobile_page_title(__('Ranking'), __('Access number No1 member')) ?> | ||
<?php if ($memberList['number']): ?> | ||
<?php | ||
|
||
echo '<center>' . __('It is a ranking of the member with a lot of numbers of yesterday of accesses.') . '</center>'; | ||
|
||
$list = array(); | ||
for ($i = 0; $i < $memberList['number']; $i++) | ||
{ | ||
$member = $memberList['model'][$i]; | ||
$list[] = __('No%0%', array('%0%' => $memberList['rank'][$i])).'<br>' | ||
. __('%0% :%1% access', array('%0%' => link_to($member->getName(), 'member/profile?id='.$member->getId()), '%1%' => $memberList['count'][$i])); | ||
} | ||
|
||
$options = array( | ||
'border' => true, | ||
); | ||
|
||
op_include_list('rankingList', $list, $options); | ||
?> | ||
<?php else: ?> | ||
<?php echo '<center>' . __('all member is 0 access') . '</center>' ?> | ||
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
apps/mobile_frontend/modules/ranking/templates/_friend.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php op_mobile_page_title(__('Ranking'), __('Member of number No1 of %friend%', array('%friend%' => $op_term['friend']->pluralize()))); ?> | ||
<?php if ($memberList['number']): ?> | ||
<?php | ||
echo '<center>'.__('It is a ranking of the member with a lot of numbers of registered %friend%.', array('%friend%' => $op_term['friend']->pluralize())).'</center>'; | ||
|
||
$list = array(); | ||
for ($i = 0; $i < $memberList['number']; $i++) | ||
{ | ||
$member = $memberList['model'][$i]; | ||
$list[] = __('No%0%', array('%0%' => $memberList['rank'][$i])).'<br>' | ||
. __('%0% :%1% member', array('%0%' => link_to($member->getName(), 'member/profile?id='.$member->getId()), '%1%' => $memberList['count'][$i])); | ||
} | ||
|
||
$options = array( | ||
'border' => true, | ||
); | ||
|
||
op_include_list('rankingList', $list, $options); | ||
?> | ||
<?php else: ?> | ||
<?php echo '<center>' . __('There is no member who has a %friend%') . '</center>'; ?> | ||
<?php endif; ?> |
4 changes: 4 additions & 0 deletions
4
..._frontend/templates/_partsRankingLink.php → ...ntend/modules/ranking/templates/_menu.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
<?php slot('op_mobile_footer_menu') ?> | ||
<?php if (class_exists('Ashiato')): ?> | ||
<?php echo link_to(__('Access number No1 member'), '@ranking_access') ?><br> | ||
<?php endif; ?> | ||
<?php if ($op_config['enable_friend_link']): ?> | ||
<?php echo link_to(__('Member of number No1 of %friend%', array('%friend%' => $op_term['friend']->pluralize())), '@ranking_friend') ?><br> | ||
<?php endif; ?> | ||
<?php echo link_to(__('Participation number No1 %community%'), '@ranking_community') ?><br> | ||
<?php if (class_exists('CommunityTopicComment')): ?> | ||
<?php echo link_to(__('No1 %community% at each upsurge'), '@ranking_topic') ?> | ||
<?php endif; ?> | ||
<?php end_slot(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
apps/mobile_frontend/modules/ranking/templates/accessError.php
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
apps/mobile_frontend/modules/ranking/templates/accessSuccess.php
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
apps/mobile_frontend/modules/ranking/templates/communityError.php
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
apps/mobile_frontend/modules/ranking/templates/friendError.php
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
apps/mobile_frontend/modules/ranking/templates/friendSuccess.php
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
apps/mobile_frontend/modules/ranking/templates/showSuccess.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php include_partial('menu') ?> | ||
<?php include_component('ranking', $type, array('culture' => $sf_user->getCulture())) ?> |
5 changes: 0 additions & 5 deletions
5
apps/mobile_frontend/modules/ranking/templates/topicError.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
apps/pc_frontend/modules/ranking/actions/components.class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
/** | ||
* ranking components. | ||
* | ||
* @package opRankingPlugin | ||
* @subpackage ranking | ||
* @author Shogo Kawahara <kawahara@tejimaya.net> | ||
*/ | ||
class rankingComponents extends opRankingPluginRankingComponents | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
_menu: | ||
enabled: true | ||
|
||
_access: | ||
enabled: true | ||
lifetime: 3600 | ||
|
||
_friend: | ||
enabled: true | ||
lifetime: 3600 | ||
|
||
_community: | ||
enabled: true | ||
lifetime: 3600 | ||
|
||
_topic: | ||
enabled: true | ||
lifetime: 3600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
_menu: | ||
all: | ||
stylesheets: [/opRankingPlugin/css/ranking] | ||
layout: layoutB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php if ($memberList['number']): ?> | ||
<?php | ||
$list = array(); | ||
for ($i = 0; $i < $memberList['number']; $i++) | ||
{ | ||
$member = $memberList['model'][$i]; | ||
$list[$i][__('No%0%', array('%0%' => $memberList['rank'][$i]))] = | ||
__('%0% :%1% access', array('%0%' => link_to($member->getName(), 'member/profile?id='.$member->getId()), '%1%' => $memberList['count'][$i])); | ||
$selfintoroCaption = __('Self Introduction'); | ||
if ($member->getProfile('op_preset_self_introduction')) | ||
{ | ||
$list[$i][$selfintoroCaption] = op_truncate($member->getProfile('op_preset_self_introduction'), 36, '', 3); | ||
} | ||
} | ||
|
||
$options = array( | ||
'id' => 'rankingResultList', | ||
'title' => __('The No1 of the number of access member is %0%', array('%0%' => $memberList['model'][0]->getName())), | ||
'link_to_detail' => 'member/profile?id=%d', | ||
'model' => $memberList['model'], | ||
'list' => $list, | ||
'rank' => $memberList['rank'], | ||
); | ||
|
||
include_partial('global/partsRankingResultList', array('options' => $options)); | ||
?> | ||
<?php else: ?> | ||
<?php op_include_box('access_list', __('all member is 0 access'), array( | ||
'title' => __('Access number No1 member'), | ||
)); ?> | ||
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php if ($memberList['number']): ?> | ||
<?php | ||
$list = array(); | ||
for ($i = 0; $i < $memberList['number']; $i++) | ||
{ | ||
$member = $memberList['model'][$i]; | ||
$list[$i][__('No%0%', array('%0%' => $memberList['rank'][$i]))] = | ||
__('%0% :%1% member', array('%0%' => link_to($member->getName(), '@obj_member_profile?id='.$member->getId()), '%1%' => $memberList['count'][$i])); | ||
$selfintoroCaption = __('Self Introduction'); | ||
if ($member->getProfile('op_preset_self_introduction')) | ||
{ | ||
$list[$i][$selfintoroCaption] = op_truncate($member->getProfile('op_preset_self_introduction'), 36, '', 3); | ||
} | ||
} | ||
|
||
$options = array( | ||
'id' => 'rankingResultList', | ||
'title' => __('The No1 of the number of %friend% member is %0%', array( | ||
'%friend%' => $op_term['friend']->pluralize(), '%0%' => $memberList['model'][0]->getName() | ||
)), | ||
'link_to_detail' => '@obj_member_profile?id=%d', | ||
'model' => $memberList['model'], | ||
'list' => $list, | ||
'rank' => $memberList['rank'], | ||
); | ||
|
||
include_partial('global/partsRankingResultList', array('options' => $options)); | ||
?> | ||
<?php else: ?> | ||
<?php op_include_box('friend_list', __('There is no member who has a %friend%'), array( | ||
'title' => __('Member of number No1 of %friend%', array('%friend%' => $op_term['friend']->pluralize())) | ||
)); ?> | ||
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.