форум vBSupport.ru > vBulletin > Old vB versions (3.0.x & 2.x.x) > vBulletin 3.7.x > Hacks, mods and scripts [3.7.x]
  • »
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
 
 
 
 
Cybermama
Эксперт
 
Cybermama's Avatar
Default Dynamic Tab for Postbit Legacy
2

Такой вот интересный хак позволяет прятать по вкладкам содержимое о юзере в постбите:

Тема на орге

Live Demo




Dynamic Tab Content for Postbit_Legacy.zip


Установка
1. Скачать аттач, распаковать и залить postbit_tabs в корень форума
2. Скачать tabcontent.rar распаковать, поместить tabcontent.js в папку postbit_tabs
3. Отредактировать шаблон postbit_legacy
Найти:
Code:
<if condition="$show['avatar']">
    <div class="smallfont">
     &nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
    </div>
   </if>
Под этим вставить:
Code:
<!-- BEGIN AJAX CONTENT -->
<head>
<link rel="stylesheet" type="text/css" href="postbit_tabs/tabcontent.css" />
<script type="text/javascript" src="postbit_tabs/tabcontent.js">
/***********************************************
* Tab Content script v2.2- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
</head>
 
<div id="$post[postid]postbittabs" class="djdot">
<ul>
<li><span title="View Tab 1"><a href="#" rel="$post[postid]tab1" id="selected">&nbsp;</a></span></li>
<li><span title="View Tab 2"><a href="#" rel="$post[postid]tab2">&nbsp;</a></span></li>
<li><span title="View Tab 3"><a href="#" rel="$post[postid]tab3">&nbsp;</a></span></li>
<li><span title="View Tab 4"><a href="#" rel="$post[postid]tab4">&nbsp;</a></span></li>
<li><span title="View Tab 5"><a href="#" rel="$post[postid]tab5">&nbsp;</a></span></li>
</ul>
<br style="clear: left" />
</div>
 
 
 
<div class="smallfont">
 
<!--TAB 1 CONTENT -->
<div id="$post[postid]tab1" class="tabcontent">
<div class="info">Tab 1 Content:Block A</div>
<div class="info">Tab 1 Content:Block B</div>
<div class="info">Tab 1 Content:Block C</div>
</div>
 
<!-- TAB 2 CONTENT -->
<div id="$post[postid]tab2" class="tabcontent">
<div class="info">Tab 2 Content:Block A</div>
<div class="info">Tab 2 Content:Block B</div>
<div class="info">Tab 2 Content:Block C</div>
<div class="info">Tab 2 Content:Block D</div>
</div>
 
<!-- TAB 3 CONTENT -->
<div id="$post[postid]tab3" class="tabcontent">
<div class="info">Tab 3 Content:Block A</div>
<div class="info">Tab 3 Content:Block B</div>
<div class="info">Tab 3 Content:Block C</div>
<div class="info">Tab 3 Content:Block D</div>
<div class="info">Tab 3 Content:Block E</div>
<div class="info">Tab 3 Content:Block F</div>
</div>
 
<!-- TAB 4 CONTENT -->
<div id="$post[postid]tab4" class="tabcontent">
<div class="info">Tab 4 Content:Block A</div>
<div class="info">Tab 4 Content:Block B</div>
<div class="info">Tab 4 Content:Block C</div>
</div>
 
<!-- TAB 5 CONTENT -->
<div id="$post[postid]tab5" class="tabcontent">
<div class="info">Tab 5 Content:Block A</div>
<div class="info">Tab 5 Content:Block B</div>
<div class="info">Tab 5 Content:Block C</div>
<div class="info">Tab 5 Content:Block D</div>
<div class="info">Tab 5 Content:Block E</div>
<div class="info">Tab 5 Content:Block F</div>
<div class="info">Tab 5 Content:Block G</div>
<div class="info">Tab 5 Content:Block H</div>
<div class="info">Tab 5 Content:Block I</div>
</div>
 
</div>
 
<script type="text/javascript">
var mytabs=new ddtabcontent("$post[postid]postbittabs")
mytabs.setpersist(true)
mytabs.setselectedClassTarget("link")
mytabs.init()
</script>
<!-- END AJAX CONTENT -->
4. Вместо Tab 1 Content: Block A и т.д.. Вставить нужные элементы для отображения в постбите, например:
Code:
<!--TAB 1 CONTENT -->
<div id="$post[postid]tab1" class="tabcontent">
<div class="info">$post[onlinestatus] </div> //Он-лайн статус
<div class="info">$vbphrase[posts]: $post[posts]</div>//Кол-во сообщений
<if condition="$post['age']"><div class="info">$vbphrase[age]: $post[age]</div></if>//Возраст
</div>
 
<!-- TAB 2 CONTENT -->
<div id="$post[postid]tab2" class="tabcontent">
 <if condition="$post['joindate']"><div class="info">$vbphrase[join_date]: $post[joindate]</div></if>//Дата регистрации
 <if condition="$post[field1]"><div class="info"><b>Biography:</b> $post[field1]</div></if>

/*VbCredits*/
<if condition="$show['credits_post']">
     <div class="info">
      $vbphrase[credits]: <span id="cdt_$post[postid]_$post[userid]">$post[credits]</span> <if condition="$show['credits_donate']">[<a href="credits.php?$session[sessionurl]do=manage&amp;u=$post[userid]#donate">$vbphrase[donate]</a>]</if> <if condition="$show['credits_check']">[<a href="credits.php?$session[sessionurl]do=banking&amp;u=$post[userid]">$vbphrase[check]</a>]</if>
     </div>
    </if>

/*IbProArcade*/
<div class="info">
        <if condition="$crowns">
 $post[crowns]$post[champtext]
   <else />
   $post[username] has not championed any arcade games.   </if>
      </div>
</div>
(Только без моих комментариев)

Quote:
Known Bugs
There is one minor issue with the tabs that I've noticed only occurs when using the AJAX quick reply and inline editing. Actually it's two issues, but I've only seen one or the other on my live site vs. my demo board. In one instance, the entire content of all your tabs displays all at once when posting/editing using AJAX. This is not a huge deal, as the only person who sees it do that is the person doing the posting/editing. And it will return to normal anytime he reloads or refreshes the page. The other instance is when after posting/editing through AJAX, no tab content appears, except the dot tabs. This is also not a huge deal as the same thing will happen here; only the poster sees it and it will look normal anytime he returns or reloads the page. I think it's a minor trade off for the sleek look it gives your forum the rest of the time.
На оригинальной теме автор предупреждает, что могут быть глюки при использовании быстрого ответа и быстрого редактирования - содержимое вкладок вытягивается в одну когда используется быстрое редактирование, потом восстанавливается после обновления страницы, это видно только автору поста

И ещё - может быть глюк с разлогиниванием юзеров - в этом случае в postbit_legacy отключите функцию mytabs.setpersist(true) - поставьте mytabs.setpersist(false)

Last edited by Cybermama : 07-25-2008 at 07:04 AM.
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
Solid Snake
Простоузер
Default
0

Реально интересный хак. Но нужна подробная инструкция как определять и вставлять поля в нужные закладки. Обычному юзеру типа меня непонятно где брать все эти данные.
 
 
Myhu
Вечный олень
Default
0

Я так и не понял для чего этот хак. Объясните пожалуйста!)))
 
 
Мик
Эксперт
 
Мик's Avatar
Default
0

Quote:
Originally Posted by Myhu View Post
Я так и не понял для чего этот хак. Объясните пожалуйста!)))
доп. инфа на аяксе
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 08:09 PM.


Powered by vBulletin® Version 3.5.7
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Loading...