[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 /* 3 + ----------------------------------------------------------------------------+ 4 | e107 website system 5 | 6 | ©Steve Dunstan 2001-2002 7 | http://e107.org 8 | jalist@e107.org 9 | 10 | Released under the terms and conditions of the 11 | GNU General Public License (http://gnu.org). 12 | 13 | $Source: /cvsroot/e107/e107_0.7/e107_files/shortcode/batch/comment_shortcodes.php,v $ 14 | $Revision: 1.20 $ 15 | $Date: 2006/12/29 16:21:05 $ 16 | $Author: e107steved $ 17 +----------------------------------------------------------------------------+ 18 */ 19 if (!defined('e107_INIT')) { exit; } 20 include_once(e_HANDLER.'shortcode_handler.php'); 21 $comment_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__); 22 /* 23 24 SC_BEGIN SUBJECT 25 global $SUBJECT, $comrow, $pref, $NEWIMAGE, $tp; 26 if (isset($pref['nested_comments']) && $pref['nested_comments']) { 27 $SUBJECT = $NEWIMAGE." ".(empty($comrow['comment_subject']) ? $subject : $tp->toHTML($comrow['comment_subject'], TRUE)); 28 } else { 29 $SUBJECT = ''; 30 } 31 return $SUBJECT; 32 SC_END 33 34 SC_BEGIN USERNAME 35 global $USERNAME, $comrow; 36 if (isset($comrow['user_id']) && $comrow['user_id']) { 37 $USERNAME = "<a href='".e_BASE."user.php?id.".$comrow['user_id']."'>".$comrow['user_name']."</a>\n"; 38 }else{ 39 $comrow['user_id'] = 0; 40 $USERNAME = preg_replace("/[0-9]+\./", '', $comrow['comment_author']); 41 $USERNAME = str_replace("Anonymous", LAN_ANONYMOUS, $USERNAME); 42 } 43 return $USERNAME; 44 SC_END 45 46 SC_BEGIN TIMEDATE 47 global $TIMEDATE, $comrow, $datestamp, $gen; 48 $datestamp = $gen->convert_date($comrow['comment_datestamp'], "short"); 49 return $datestamp; 50 SC_END 51 52 SC_BEGIN REPLY 53 global $REPLY, $comrow, $action, $pref, $table, $id, $thisaction, $thistable, $thisid; 54 $REPLY = ''; 55 if($comrow['comment_lock'] != "1"){ 56 if ($thisaction == "comment" && $pref['nested_comments']) { 57 $REPLY = "<a href='".e_BASE."comment.php?reply.".$thistable.".".$comrow['comment_id'].".".$thisid."'>".COMLAN_326."</a>"; 58 } 59 } 60 return $REPLY; 61 SC_END 62 63 SC_BEGIN AVATAR 64 global $AVATAR, $comrow; 65 if (isset($comrow['user_id']) && $comrow['user_id']) { 66 if (isset($comrow['user_image']) && $comrow['user_image']) { 67 require_once(e_HANDLER."avatar_handler.php"); 68 $comrow['user_image'] = avatar($comrow['user_image']); 69 $comrow['user_image'] = "<div class='spacer'><img src='".$comrow['user_image']."' alt='' /></div>"; 70 }else{ 71 $comrow['user_image'] = ''; 72 } 73 }else{ 74 $comrow['user_image'] = ''; 75 } 76 return $comrow['user_image']; 77 SC_END 78 79 SC_BEGIN COMMENTS 80 global $COMMENTS, $comrow; 81 return (isset($comrow['user_id']) && $comrow['user_id'] ? COMLAN_99.": ".$comrow['user_comments'] : COMLAN_194)."<br />"; 82 SC_END 83 84 SC_BEGIN JOINED 85 global $JOINED, $comrow, $gen; 86 $JOINED = ''; 87 if ($comrow['user_id'] && !$comrow['user_admin']) { 88 $comrow['user_join'] = $gen->convert_date($comrow['user_join'], "short"); 89 $JOINED = ($comrow['user_join'] ? COMLAN_145." ".$comrow['user_join'] : ''); 90 } 91 return $JOINED; 92 SC_END 93 94 SC_BEGIN COMMENT 95 global $COMMENT, $comrow, $tp, $pref; 96 return (isset($comrow['comment_blocked']) && $comrow['comment_blocked'] ? COMLAN_0 : $tp->toHTML($comrow['comment_comment'], TRUE, FALSE, $comrow['user_id'])); 97 SC_END 98 99 SC_BEGIN COMMENTEDIT 100 global $COMMENTEDIT, $pref, $comrow; 101 if ($pref['allowCommentEdit'] && USER && $comrow['user_id'] == USERID && $comrow['comment_lock'] != "1") 102 { 103 if (!strstr(e_QUERY, ".")) 104 { 105 return "<a href='".e_SELF."?".e_QUERY."&comment=edit&comment_id=".$comrow['comment_id']."'><img src='".e_IMAGE."generic/".IMODE."/newsedit.png' alt='".COMLAN_318."' title='".COMLAN_318."' style='border: 0;' /></a>"; 106 } 107 else 108 { 109 return "<a href='".e_SELF."?".e_QUERY.".edit.".$comrow['comment_id']."'><img src='".e_IMAGE."generic/".IMODE."/newsedit.png' alt='".COMLAN_318."' title='".COMLAN_318."' style='border: 0;' /></a>"; 110 } 111 } 112 else 113 { 114 return ""; 115 } 116 SC_END 117 118 SC_BEGIN RATING 119 global $RATING; 120 return $RATING; 121 SC_END 122 123 SC_BEGIN IPADDRESS 124 global $IPADDRESS, $comrow; 125 require_once(e_HANDLER."encrypt_handler.php"); 126 return (ADMIN ? "<a href='".e_BASE."userposts.php?0.comments.".$comrow['user_id']."'>".COMLAN_330." ".decode_ip($comrow['comment_ip'])."</a>" : ""); 127 SC_END 128 129 SC_BEGIN LEVEL 130 global $LEVEL, $comrow, $pref; 131 $ldata = get_level($comrow['user_id'], $comrow['user_forums'], $comrow['user_comments'], $comrow['user_chats'], $comrow['user_visits'], $comrow['user_join'], $comrow['user_admin'], $comrow['user_perms'], $pref); 132 return ($comrow['user_admin'] ? $ldata[0] : $ldata[1]); 133 SC_END 134 135 SC_BEGIN LOCATION 136 global $LOCATION, $comrow, $tp; 137 return (isset($comrow['user_location']) && $comrow['user_location'] ? COMLAN_313.": ".$tp->toHTML($comrow['user_location'], TRUE) : ''); 138 SC_END 139 140 SC_BEGIN SIGNATURE 141 global $SIGNATURE, $comrow, $tp; 142 $SIGNATURE = (isset($comrow['user_signature']) && $comrow['user_signature'] ? $tp->toHTML($comrow['user_signature'], true) : ''); 143 return $SIGNATURE; 144 SC_END 145 146 */ 147 148 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |