3_3_forum_viewthread_profile_node.tpl.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?php if(!defined('IN_DISCUZ')) exit('Access Denied');
  2. function profile_node_numbercard($post, $s, $e) {
  3. foreach($post['numbercard'] as $numbercardkey => $numbercard) $return .= ($numbercardkey == 2 ? '<td>' : '<th>').'<p><a href="'.$numbercard[link].'" class="xi2">'.dnumber($numbercard[value]).'</a></p>'.$numbercard[lang].($numbercardkey == 2 ? '</td>' : '</th>');
  4. ?><?php
  5. $return = <<<EOF
  6. {$s}<div class="tns xg2"><table cellspacing="0" cellpadding="0">{$return}</table></div>{$e}
  7. EOF;
  8. ?><?php
  9. return $return;
  10. }
  11. function profile_node_groupicon($post, $s, $e) {
  12. ?><?php
  13. $return = <<<EOF
  14. EOF;
  15. if($post['groupicon']) {
  16. $return .= <<<EOF
  17. {$s}<a href="home.php?mod=spacecp&amp;ac=usergroup&amp;gid={$post['groupid']}" target="_blank">{$post['groupicon']}</a>{$e}
  18. EOF;
  19. }
  20. $return .= <<<EOF
  21. EOF;
  22. ?><?php
  23. return $return;
  24. }
  25. function profile_node_authortitle($post, $s, $e) {
  26. ?><?php
  27. $return = <<<EOF
  28. {$s}<a href="home.php?mod=spacecp&amp;ac=usergroup&amp;gid={$post['groupid']}" target="_blank">{$post['authortitle']}</a>{$e}
  29. EOF;
  30. ?><?php
  31. return $return;
  32. }
  33. function profile_node_customstatus($post, $s, $e) {
  34. ?><?php
  35. $return = <<<EOF
  36. EOF;
  37. if($post['customstatus']) {
  38. $return .= <<<EOF
  39. {$s}{$post['customstatus']}{$e}
  40. EOF;
  41. }
  42. $return .= <<<EOF
  43. EOF;
  44. ?><?php
  45. return $return;
  46. }
  47. function profile_node_medal($post, $s, $e) {
  48. if(!$post['medals']) return;
  49. foreach($post['medals'] as $medal) $return .= '<img id="md_'.$post['pid'].'_'.$medal['medalid'].'" src="'.STATICURL.'image/common/'.$medal['image'].'" alt="'.$medal['name'].'" title="" onmouseover="showMenu({\'ctrlid\':this.id, \'menuid\':\'md_'.$medal['medalid'].'_menu\', \'pos\':\'12!\'})" />';
  50. ?><?php
  51. $return = <<<EOF
  52. {$s}<a href="home.php?mod=medal">{$return}</a>{$e}
  53. EOF;
  54. ?><?php
  55. return $return;
  56. }
  57. function profile_node_star($post, $s, $e, $upgrademenu = 1) {
  58. $stars = showstars($post['stars']);
  59. $menu = $post['upgradecredit'] !== false ? profile_node_upgrade_menu($post) : '';
  60. ?><?php
  61. $return = <<<EOF
  62. {$s}<span
  63. EOF;
  64. if($post['upgradecredit'] !== false && $upgrademenu) {
  65. $return .= <<<EOF
  66. id="g_up{$post['pid']}" onmouseover="showMenu({'ctrlid':this.id, 'pos':'12!'});"
  67. EOF;
  68. }
  69. $return .= <<<EOF
  70. >{$stars}</span>{$e}
  71. EOF;
  72. if($upgrademenu) {
  73. $return .= <<<EOF
  74. {$menu}
  75. EOF;
  76. }
  77. $return .= <<<EOF
  78. EOF;
  79. ?><?php
  80. return $return;
  81. }
  82. function profile_node_upgradeprogress($post, $s, $e, $upgrademenu = 1) {
  83. if($post['upgradecredit'] !== false) {
  84. $menu = profile_node_upgrade_menu($post);
  85. ?><?php
  86. $return = <<<EOF
  87. {$s}<span class="pbg2"
  88. EOF;
  89. if($upgrademenu) {
  90. $return .= <<<EOF
  91. id="upgradeprogress_{$post['pid']}" onmouseover="showMenu({'ctrlid':this.id, 'pos':'12!', 'menuid':'g_up{$post['pid']}_menu'});"
  92. EOF;
  93. }
  94. $return .= <<<EOF
  95. ><span class="pbr2" style="width:{$post['upgradeprogress']}%;"></span></span>{$e}
  96. EOF;
  97. if($upgrademenu) {
  98. $return .= <<<EOF
  99. {$menu}
  100. EOF;
  101. }
  102. $return .= <<<EOF
  103. EOF;
  104. ?><?php
  105. return $return;
  106. }
  107. }
  108. function profile_node_upgrade_menu($post) {
  109. global $_G;
  110. ?><?php
  111. $return = <<<EOF
  112. <div id="g_up{$post['pid']}_menu" class="tip tip_4" style="display: none;"><div class="tip_horn"></div><div class="tip_c">{$post['authortitle']}, 积分 {$post['credits']}, 距离下一级还需 {$post['upgradecredit']} 积分</div></div>
  113. EOF;
  114. ?><?php
  115. return $return;
  116. }
  117. function profile_node_baseinfo($post, $s, $e, $extra) {
  118. $str = viewthread_baseinfo($post, $extra);
  119. return $str !== '' ? $s.$str.$e : '';
  120. }
  121. ?>