[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_plugins/forum/ -> forum_shortcodes.php (source)

   1  <?php
   2  if (!defined('e107_INIT')) { exit; }
   3  include_once(e_HANDLER.'shortcode_handler.php');
   4  $forum_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__);
   5  /*
   6  SC_BEGIN TOP
   7  return "<a href='".e_SELF."?".e_QUERY."#top' onclick=\"window.scrollTo(0,0);\">".LAN_10."</a>";
   8  SC_END
   9      
  10  SC_BEGIN JOINED
  11  global $post_info, $gen;
  12  if ($post_info['user_id']) {
  13  return LAN_06.': '.$gen->convert_date($post_info['user_join'], 'forum').'<br />';
  14  }
  15  SC_END
  16      
  17  SC_BEGIN THREADDATESTAMP
  18  global $post_info, $gen, $thread_id;
  19  return "<a id='post_{$post_info['thread_id']}'>".IMAGE_post."</a> ".$gen->convert_date($post_info['thread_datestamp'], "forum");
  20  SC_END
  21      
  22  SC_BEGIN POST
  23  global $post_info, $tp, $iphost;
  24  $ret = "";
  25  $ret = $tp->toHTML($post_info["thread_thread"], TRUE, "BODY", 'class:'.$post_info["user_class"]);
  26  if (ADMIN && $iphost) {
  27  $ret .= "<br />".$iphost;
  28  }
  29  return $ret;
  30  SC_END
  31      
  32  SC_BEGIN PRIVMESSAGE
  33  global $post_info, $tp;
  34  if($post_info['user_id'] > 0){
  35      return $tp->parseTemplate("{SENDPM={$post_info['user_id']}}");
  36  }
  37  SC_END
  38      
  39  SC_BEGIN AVATAR
  40  global $post_info;
  41  if ($post_info['user_id']) {
  42  if ($post_info["user_image"]) {
  43  require_once(e_HANDLER."avatar_handler.php");
  44  return "<div class='spacer'><img src='".avatar($post_info['user_image'])."' alt='' /></div><br />";
  45  } else {
  46  return "";
  47  }
  48  } else {
  49  return "<span class='smallblacktext'>".LAN_194."</span>";
  50  }
  51  SC_END
  52      
  53  SC_BEGIN ANON_IP
  54  global $post_info;
  55  //die($post_info['thread_user']);
  56  $x = explode(chr(1), $post_info['thread_user']);
  57  if($x[1] && ADMIN)
  58  {
  59      return $x[1];
  60  }
  61  SC_END
  62  
  63  SC_BEGIN POSTER
  64  global $post_info, $tp;
  65  if($post_info['user_name'])
  66  {
  67      return "<a href='".e_BASE."user.php?id.".$post_info['user_id']."'><b>".$post_info['user_name']."</b></a>";
  68  }
  69  else
  70  {
  71      $x = explode(chr(1), $post_info['thread_user']);
  72      $tmp = explode(".", $x[0], 2);
  73      if(!$tmp[1])
  74      {
  75          return FORLAN_103;
  76      }
  77      else
  78      {
  79          return "<b>".$tp->toHTML($tmp[1])."</b>";
  80      }
  81  }
  82  SC_END
  83      
  84  SC_BEGIN EMAILIMG
  85  global $post_info, $tp;
  86  if($post_info['user_id'])
  87  {
  88      return (!$post_info['user_hideemail'] ? $tp->parseTemplate("{EMAILTO={$post_info['user_email']}}") : "");
  89  }
  90  return "";
  91  SC_END
  92      
  93  SC_BEGIN EMAILITEM
  94  global $post_info, $tp;
  95  if($post_info['thread_parent'] == 0)
  96  {
  97      return $tp->parseTemplate("{EMAIL_ITEM=".FORLAN_101."^plugin:forum.{$post_info['thread_id']}}");
  98  }
  99  SC_END
 100  
 101  SC_BEGIN PRINTITEM
 102  global $post_info, $tp;
 103  if($post_info['thread_parent'] == 0)
 104  {
 105      return $tp->parseTemplate("{PRINT_ITEM=".FORLAN_102."^plugin:forum.{$post_info['thread_id']}}");
 106  }
 107  SC_END
 108      
 109  SC_BEGIN SIGNATURE
 110  global $post_info, $tp;
 111  return ($post_info['user_signature'] ? "<br /><hr style='width:15%; text-align:left' /><span class='smalltext'>".$tp->toHTML($post_info['user_signature'],TRUE)."</span>" : "");
 112  SC_END
 113      
 114  SC_BEGIN PROFILEIMG
 115  global $post_info, $tp;
 116  if (USER && $post_info['user_id']) {
 117  return $tp->parseTemplate("{PROFILE={$post_info['user_id']}}");
 118  } else {
 119  return "";
 120  }
 121  SC_END
 122      
 123  SC_BEGIN POSTS
 124  global $post_info;
 125  if ($post_info['user_id']) {
 126  return LAN_67.": ".$post_info['user_forums']."<br />";
 127  }
 128  SC_END
 129      
 130  SC_BEGIN VISITS
 131  global $post_info;
 132  if ($post_info['user_id']) {
 133  return LAN_09.": ".$post_info['user_visits']."<br />";
 134  }
 135  SC_END
 136      
 137  SC_BEGIN EDITIMG
 138  global $post_info, $thread_info, $thread_id;
 139  if ($post_info['user_id'] != '0' && $post_info['user_name'] === USERNAME && $thread_info['head']['thread_active']) {
 140  return "<a href='forum_post.php?edit.".$post_info['thread_id']."'>".IMAGE_edit."</a> ";
 141  } else {
 142  return "";
 143  }
 144  SC_END
 145      
 146  SC_BEGIN CUSTOMTITLE
 147  global $post_info, $tp;
 148  if ($post_info['user_customtitle']) {
 149  return $tp->toHTML($post_info['user_customtitle'])."<br />";
 150  }
 151  SC_END
 152      
 153  SC_BEGIN WEBSITE
 154  global $post_info, $tp;
 155  if ($post_info['user_homepage']) {
 156  return LAN_08.": ".$post_info['user_homepage']."<br />";
 157  }
 158  SC_END
 159      
 160  SC_BEGIN WEBSITEIMG
 161  global $post_info;
 162  if ($post_info['user_homepage'] && $post_info['user_homepage'] != "http://") {
 163  return "<a href='{$post_info['user_homepage']}'>".IMAGE_website."</a>";
 164  }
 165  SC_END
 166      
 167  SC_BEGIN QUOTEIMG
 168  global $thread_info, $post_info, $forum_info;
 169  if (check_class($forum_info['forum_postclass']) && check_class($forum_info['parent_postclass']) && $thread_info["head"]["thread_active"]) {
 170  return "<a href='".e_PLUGIN."forum/forum_post.php?quote.{$post_info['thread_id']}'>".IMAGE_quote."</a>";
 171  }
 172  SC_END
 173      
 174  SC_BEGIN REPORTIMG
 175  global $post_info, $from;
 176  if (USER) {
 177  return "<a href='".e_PLUGIN."forum/forum_viewtopic.php?{$post_info['thread_id']}.{$from}.report'>".IMAGE_report."</a> ";
 178  }
 179  SC_END
 180      
 181  SC_BEGIN RPG
 182  global $post_info;
 183  return rpg($post_info['user_join'],$post_info['user_forums']);
 184  SC_END
 185      
 186  SC_BEGIN MEMBERID
 187  global $post_info, $ldata, $pref, $forum_info;
 188  if ($post_info['anon']) {
 189  return "";
 190  }
 191  
 192  $fmod = ($post_info['user_class'] != "" && check_class($forum_info['forum_moderators'], $post_info['user_class'], TRUE));
 193  if(!$fmod && $forum_info['forum_moderators'] == e_UC_ADMIN)
 194  {
 195      $fmod = $post_info['user_admin'];
 196  }
 197  if (!array_key_exists($post_info['user_id'],$ldata)) {
 198      $ldata[$post_info['user_id']] = get_level($post_info['user_id'], $post_info['user_forums'], $post_info['user_comments'], $post_info['user_chats'], $post_info['user_visits'], $post_info['user_join'], $post_info['user_admin'], $post_info['user_perms'], $pref, $fmod);
 199  }
 200  return $ldata[$post_info['user_id']][0];
 201  SC_END
 202      
 203  SC_BEGIN LEVEL
 204  global $post_info, $ldata, $pref, $forum_info;
 205  if ($post_info['anon']) {
 206  return "";
 207  }
 208  $fmod = ($post_info['user_class'] != "" && check_class($forum_info['forum_moderators'], $post_info['user_class'], TRUE));
 209  if(!$fmod && $forum_info['forum_moderators'] == e_UC_ADMIN)
 210  {
 211      $fmod = $post_info['user_admin'];
 212  }
 213  if (!array_key_exists($post_info['user_id'],$ldata)) {
 214  $ldata[$post_info['user_id']] = get_level($post_info['user_id'], $post_info['user_forums'], $post_info['user_comments'], $post_info['user_chats'], $post_info['user_visits'], $post_info['user_join'], $post_info['user_admin'], $post_info['user_perms'], $pref, $fmod);
 215  }
 216  if($parm == 'pic')
 217  {
 218  return $ldata[$post_info['user_id']]['pic'];
 219  }
 220  if($parm == 'name')
 221  {
 222  return $ldata[$post_info['user_id']]['name'];
 223  }
 224  if($parm == 'special')
 225  {
 226  return $ldata[$post_info['user_id']]['special'];
 227  }
 228  if($parm == 'userid')
 229  {
 230  return $ldata[$post_info['user_id']]['userid'];
 231  }
 232  return $ldata[$post_info['user_id']][1];
 233  SC_END
 234      
 235  SC_BEGIN MODOPTIONS
 236  if (MODERATOR) {
 237  return showmodoptions();
 238  }
 239  SC_END
 240      
 241  SC_BEGIN LASTEDIT
 242  global $post_info, $gen;
 243  if ($post_info['thread_edit_datestamp']) {
 244  return $gen->convert_date($post_info['thread_edit_datestamp'],'forum');
 245  }
 246  return "";
 247  SC_END
 248  
 249  SC_BEGIN POLL
 250  global $pollstr;
 251  return $pollstr;
 252  SC_END
 253  
 254  */
 255  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7