[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 if (!defined('e107_INIT')) { exit; } 3 include_once(e_HANDLER.'shortcode_handler.php'); 4 $forum_post_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__); 5 6 /* 7 SC_BEGIN LATESTPOSTS 8 global $thread_info, $action, $gen, $tp, $forum_shortcodes, $post_info; 9 global $LATESTPOSTS_START, $LATESTPOSTS_END, $LATESTPOSTS_POST; 10 $txt = $tp->parseTemplate($LATESTPOSTS_START, TRUE, $forum_shortcodes); 11 for($i = count($thread_info)-2; $i>0; $i--) 12 { 13 $post_info = $thread_info[$i]; 14 $txt .= $tp->parseTemplate($LATESTPOSTS_POST, TRUE, $forum_shortcodes); 15 } 16 $txt .= $tp->parseTemplate($LATESTPOSTS_END, TRUE, $forum_shortcodes); 17 return $txt; 18 SC_END 19 20 SC_BEGIN THREADTOPIC 21 global $thread_info, $action, $gen, $tp, $post_info, $forum_shortcodes, $THREADTOPIC_REPLY; 22 $post_info = $thread_info['head']; 23 return $tp->parseTemplate($THREADTOPIC_REPLY, TRUE, $forum_shortcodes); 24 SC_END 25 26 SC_BEGIN FORMSTART 27 return "<form enctype='multipart/form-data' method='post' action='".e_SELF."?".e_QUERY."' id='dataform'>"; 28 SC_END 29 30 SC_BEGIN FORMEND 31 return "</form>"; 32 SC_END 33 34 SC_BEGIN FORUMJUMP 35 return forumjump(); 36 SC_END 37 38 SC_BEGIN USERBOX 39 global $userbox; 40 return (USER == FALSE ? $userbox : ""); 41 SC_END 42 43 SC_BEGIN SUBJECTBOX 44 global $subjectbox, $action; 45 return ($action == "nt" ? $subjectbox : ""); 46 SC_END 47 48 SC_BEGIN POSTTYPE 49 global $action; 50 return ($action == "nt" ? LAN_63 : LAN_73); 51 SC_END 52 53 SC_BEGIN POSTBOX 54 global $post, $pref; 55 $rows = (e_WYSIWYG) ? 15 : 10; 56 $ret = "<textarea class='tbox' id='post' name='post' cols='70' rows='{$rows}' style='width:95%' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>$post</textarea>\n<br />\n"; 57 if(!e_WYSIWYG) 58 { 59 $ret .= display_help('helpb', 'forum'); 60 } 61 return $ret; 62 SC_END 63 64 SC_BEGIN BUTTONS 65 global $action, $eaction; 66 $ret = "<input class='button' type='submit' name='fpreview' value='".LAN_323."' /> "; 67 if ($action != "nt") 68 { 69 $ret .= ($eaction ? "<input class='button' type='submit' name='update_reply' value='".LAN_78."' />" : "<input class='button' type='submit' name='reply' value='".LAN_74."' />"); 70 } 71 else 72 { 73 $ret .= ($eaction ? "<input class='button' type='submit' name='update_thread' value='".LAN_77."' />" : "<input class='button' type='submit' name='newthread' value='".LAN_64."' />"); 74 } 75 return $ret; 76 SC_END 77 78 SC_BEGIN FILEATTACH 79 global $pref, $fileattach, $fileattach_alert; 80 81 if ($pref['forum_attach'] && strpos(e_QUERY, "edit") === FALSE && (check_class($pref['upload_class']) || getperms('0'))) 82 { 83 if (is_writable(e_FILE."public")) 84 { 85 return $fileattach; 86 } 87 else 88 { 89 $FILEATTACH = ""; 90 if(ADMIN) 91 { 92 if(!$fileattach_alert) 93 { 94 $fileattach_alert = "<tr><td colspan='2' class='nforumcaption2'>".($pref['image_post'] ? LAN_390 : LAN_416)."</td></tr><tr><td colspan='2' class='forumheader3'>".LAN_FORUM_1."</td></tr>\n"; 95 } 96 return $fileattach_alert; 97 } 98 } 99 } 100 SC_END 101 102 SC_BEGIN POSTTHREADAS 103 global $action, $thread_info; 104 if (MODERATOR && $action == "nt") 105 { 106 $thread_s = (isset($_POST['threadtype']) ? $_POST['threadtype'] : $thread_info['head']['thread_s']); 107 return "<br /><span class='defaulttext'>".LAN_400."<input name='threadtype' type='radio' value='0' ".(!$thread_s ? "checked='checked' " : "")." />".LAN_1." <input name='threadtype' type='radio' value='1' ".($thread_s == 1 ? "checked='checked' " : "")." />".LAN_2." <input name='threadtype' type='radio' value='2' ".($thread_s == 2 ? "checked='checked' " : "")." />".LAN_3."</span>"; 108 } 109 return ""; 110 SC_END 111 112 SC_BEGIN BACKLINK 113 global $forum, $thread_info,$eaction, $action,$BREADCRUMB; 114 $forum->set_crumb(TRUE,($action == "nt" ? ($eaction ? LAN_77 : LAN_60) : ($eaction ? LAN_78 : LAN_406." ".$thread_info['head']['thread_name']))); 115 return $BREADCRUMB; 116 SC_END 117 118 SC_BEGIN EMAILNOTIFY 119 global $pref, $thread_info, $action; 120 if ($pref['email_notify'] && $action == "nt") 121 { 122 if(isset($_POST['fpreview'])) 123 { 124 $chk = ($_POST['email_notify'] ? "checked = 'checked'" : ""); 125 } 126 else 127 { 128 if(isset($thread_info)) 129 { 130 $chk = ($thread_info['head']['thread_active'] == 99 ? "checked='checked'" : ""); 131 } 132 else 133 { 134 $chk = ($pref['email_notify_on'] ? "checked='checked'" : ""); 135 } 136 } 137 return "<span class='defaulttext'>".LAN_380."</span><input type='checkbox' name='email_notify' value='1' {$chk} />"; 138 } 139 return ""; 140 SC_END 141 142 SC_BEGIN POLL 143 global $poll_form, $action, $pref; 144 if ($action == "nt" && $pref['forum_poll'] && strpos(e_QUERY, "edit") === FALSE) 145 { 146 return $poll_form; 147 } 148 return ""; 149 SC_END 150 151 */ 152 ?>
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 |