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

Changeset 7160


Ignore:
Timestamp:
May 13, 2008, 3:47:29 AM (11 years ago)
Author:
ebihara
Message:

#2399:自分の日記以外のアルバム・アルバム画像以外のURLをアルバム小窓に変換しないようにする

Location:
OpenPNE/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/public_html/cmd/openpne/pc_page_fh_album.js

    r6765 r7160  
    1 function url2cmd(url)
     1function url2cmd(url, target_c_member_id)
    22{
    33    if (!url.match(/(https?:\/\/[a-zA-Z0-9_\-\/.,:;~@=+$%#!\()]+)\/?\?(?:[a-zA-Z0-9_\-\/.,:;~?@=+$%#!\()]|&)*&target_c_album_id=([a-zA-Z0-9_\-]+)/)) {
     
    1616            var c_album = obj.responseXML.firstChild;
    1717            var c_member = c_album.getElementsByTagName('c_member')[0];
     18
     19            if (target_c_member_id != c_member.getElementsByTagName('c_member_id')[0].firstChild.nodeValue) {
     20                pne_url2a(url);
     21                return;
     22            }
    1823
    1924            var subject = c_album.getElementsByTagName('subject')[0].firstChild.nodeValue;
  • OpenPNE/trunk/public_html/cmd/openpne/pc_page_fh_album_image_show.js

    r6689 r7160  
    1 function url2cmd(url)
     1function url2cmd(url, target_c_member_id)
    22{
    33    if (!url.match(/(https?:\/\/[a-zA-Z0-9_\-\/.,:;~@=+$%#!\()]+)\/?\?(?:[a-zA-Z0-9_\-\/.,:;~?@=+$%#!\()]|&)*&target_c_album_image_id=([a-zA-Z0-9_\-]+)/)) {
     
    1919            var image_description = c_album_image.getElementsByTagName('image_description')[0].firstChild.nodeValue;
    2020
     21            var c_member_id = c_album_image.getElementsByTagName('c_member_id')[0].firstChild.nodeValue;
     22            if (target_c_member_id != c_member_id) {
     23                pne_url2a(url);
     24                return;
     25            }
     26
    2127            var str = '<a href="' + url + '">'
    2228                    + '<img src="' + image_filename + '" alt="' + image_description + '" />'
  • OpenPNE/trunk/webapp/lib/smarty_plugins/modifier.t_url2cmd.php

    r6752 r7160  
    55 */
    66
    7 function smarty_modifier_t_url2cmd($string, $type = '')
     7function smarty_modifier_t_url2cmd($string, $type = '', $target_c_member_id = '')
    88{
    99    if (in_array($type, db_get_url2a_denied_list())) {
     
    1616
    1717    $GLOBALS['_CMD']['type'] = $type;
     18    $GLOBALS['_CMD']['target_c_member_id'] = $target_c_member_id;
     19
    1820    return preg_replace_callback($url_pattern, '_smarty_modifier_t_cmd_make_url_js', $string);
    1921}
     
    5961<script type="text/javascript">
    6062<!--
    61 url2cmd('{$url_html}');
     63url2cmd('{$url_html}', '{$GLOBALS['_CMD']['target_c_member_id']}');
    6264//-->
    6365</script>
  • OpenPNE/trunk/webapp/modules/admin/templates/diary_list.tpl

    r6656 r7160  
    109109({/if})
    110110({if $smarty.const.OPENPNE_ADMIN_CONVERT_URL})
    111 ({$item.body|nl2br|t_url2cmd:'diary'|t_cmd:'diary'|t_decoration:1})
     111({$item.body|nl2br|t_url2cmd:'diary':$item.c_member_id|t_cmd:'diary'|t_decoration:1})
    112112({else})
    113113({$item.body|nl2br|t_decoration:1})
  • OpenPNE/trunk/webapp/modules/pc/templates/fh_diary.tpl

    r6778 r7160  
    109109</ul>
    110110({/if})
    111 ({$target_diary.body|nl2br|t_url2cmd:'diary'|t_cmd:'diary'|t_decoration})
     111({$target_diary.body|nl2br|t_url2cmd:'diary':$target_diary.c_member_id|t_cmd:'diary'|t_decoration})
    112112</div>
    113113</dd>
  • OpenPNE/trunk/webapp/modules/pc/templates/h_diary_add_confirm.tpl

    r6402 r7160  
    1515<tr>
    1616<th>本文</th>
    17 <td>({$form_val.body|nl2br|t_url2cmd:'diary'|t_cmd:'diary'|t_decoration})</td>
     17<td>({$form_val.body|nl2br|t_url2cmd:'diary':$member.c_member_id|t_cmd:'diary'|t_decoration})</td>
    1818</tr>
    1919({if $form_val.upfile_1.name})
  • OpenPNE/trunk/webapp/modules/pc/templates/h_diary_edit_confirm.tpl

    r6402 r7160  
    1010<table>
    1111<tr><th>タイトル</th><td>({$form_val.subject})</td></tr>
    12 <tr><th>本文</th><td>({$form_val.body|nl2br|t_url2cmd:'diary'|t_cmd:'diary'|t_decoration})</td></tr>
     12<tr><th>本文</th><td>({$form_val.body|nl2br|t_url2cmd:'diary':$member.c_member_id|t_cmd:'diary'|t_decoration})</td></tr>
    1313({if $form_val.upfile_1.name})
    1414<tr><th>写真1</th><td>({$form_val.upfile_1.name})</td></tr>
Note: See TracChangeset for help on using the changeset viewer.