ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 13611


Ignore:
Timestamp:
Jul 17, 2010, 8:02:16 AM (12 years ago)
Author:
ebihara
Message:

added support for activity (refs #1369)

Location:
OpenPNE3/plugins/opCommunityTopicPlugin/trunk
Files:
6 added
5 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/mobile_frontend/i18n/messages.ja.xml

    r13608 r13611  
    239239        <target>設定を保存しました</target>
    240240      </trans-unit>
     241      <trans-unit id="">
     242        <source>[%Community% Topic] (%1% %community%) %2%</source>
     243        <target>[トピック] (%1% %community%) %2%</target>
     244      </trans-unit>
     245      <trans-unit id="">
     246        <source>[%Community% Event] (%1% %community%) %2% (open %3%)</source>
     247        <target>[イベント] (%1% %community%) %2% (%3% 開催)</target>
     248      </trans-unit>
    241249    </body>
    242250  </file>
  • OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/pc_backend/i18n/messages.ja.xml

    r12403 r13611  
    183183        <target>メンバーをイベント参加者から削除しました。</target>
    184184      </trans-unit>
     185      <trans-unit id="">
     186        <source>Community Topic Plugin Configuration</source>
     187        <target>コミュニティトピックプラグイン設定</target>
     188      </trans-unit>
     189      <trans-unit id="">
     190        <source>Use</source>
     191        <target>使用する</target>
     192      </trans-unit>
     193      <trans-unit id="">
     194        <source>Not use</source>
     195        <target>使用しない</target>
     196      </trans-unit>
     197      <trans-unit id="">
     198        <source>Update activity</source>
     199        <target>アクティビティ更新設定</target>
     200      </trans-unit>
     201      <trans-unit id="">
     202        <source>If this is used, activity message is updated automatically by posting a topic. To show the activity list, see "Appearance" > "ガジェット設定".</source>
     203        <target>使用するに設定した場合、コミュニティトピックが投稿された際にアクティビティが自動更新されます。アクティビティリストの表示設定は、「デザイン設定」>「ガジェット設定」から行ってください。</target>
     204      </trans-unit>
    185205    </body>
    186206  </file>
  • OpenPNE3/plugins/opCommunityTopicPlugin/trunk/apps/pc_frontend/i18n/messages.ja.xml

    r13608 r13611  
    183183        <target>設定を保存しました</target>
    184184      </trans-unit>
     185      <trans-unit id="">
     186        <source>[%Community% Topic] (%1% %community%) %2%</source>
     187        <target>[%Community%トピック] (%1% %community%) %2%</target>
     188      </trans-unit>
     189      <trans-unit id="">
     190        <source>[%Community% Event] (%1% %community%) %2% (open %3%)</source>
     191        <target>[%Community%イベント] (%1% %community%) %2% (%3% 開催)</target>
     192      </trans-unit>
    185193    </body>
    186194  </file>
  • OpenPNE3/plugins/opCommunityTopicPlugin/trunk/lib/model/doctrine/PluginCommunityEvent.class.php

    r13486 r13611  
    115115    $this->getCommunity()->getImageFilename();
    116116  }
     117
     118  public function postInsert($event)
     119  {
     120    if (Doctrine::getTable('SnsConfig')->get('op_community_topic_plugin_update_activity', false)
     121      && defined('OPENPNE_VERSION') && version_compare(OPENPNE_VERSION, '3.6beta1-dev', '>='))
     122    {
     123      sfContext::getInstance()->getConfiguration()->loadHelpers(array('Helper', 'opUtil'));
     124
     125      $open = op_format_date($this->getOpenDate(), 'D').($this->getOpenDate() ? ' '.$this->getOpenDateComment() : '');
     126      $body = '[%Community% Event] ('.$this->getCommunity()->getName().' %community%) '.$this->name.' (open '.$open.')';
     127      $options = array(
     128        'public_flag' => $this->getCommunity()->getConfig('public_flag') === 'public' ? 1 : 3,
     129        'uri' => '@communityEvent_show?id='.$this->id,
     130        'source' => 'CommunityEvent',
     131        'template' => 'community_event',
     132        'template_param' => array('%1%' => $this->getCommunity()->getName(), '%2%' => $this->name, '%3%' => $open),
     133      );
     134      Doctrine::getTable('ActivityData')->updateActivity($this->member_id, $body, $options);
     135    }
     136  }
    117137}
  • OpenPNE3/plugins/opCommunityTopicPlugin/trunk/lib/model/doctrine/PluginCommunityTopic.class.php

    r13601 r13611  
    6565    return $result;
    6666  }
     67
     68  public function postInsert($event)
     69  {
     70    if (Doctrine::getTable('SnsConfig')->get('op_community_topic_plugin_update_activity', false)
     71      && defined('OPENPNE_VERSION') && version_compare(OPENPNE_VERSION, '3.6beta1-dev', '>='))
     72    {
     73      $body = '[%Community% Topic] ('.$this->getCommunity()->getName().' %community%) '.$this->name;
     74      $options = array(
     75        'public_flag' => $this->getCommunity()->getConfig('public_flag') === 'public' ? 1 : 3,
     76        'uri' => '@communityTopic_show?id='.$this->id,
     77        'source' => 'CommunityTopic',
     78        'template' => 'community_topic',
     79        'template_param' => array('%1%' => $this->getCommunity()->getName(), '%2%' => $this->name),
     80      );
     81      Doctrine::getTable('ActivityData')->updateActivity($this->member_id, $body, $options);
     82    }
     83  }
    6784}
Note: See TracChangeset for help on using the changeset viewer.