Главная » Администрирование сайта » Работа с пользователями » Вывод всех материалов пользователя на его персональной странице

Вывод всех материалов пользователя на его персональной странице

10.10.2012 в 16:38
Автор: Selena

В шаблон Персональная страница пользователя между <head> и < /head >
копируем и вставляем:
Code

<style>
.open {display: block;}
.closed {display: block;}
.spoiler-head {cursor: pointer;padding:3px 5px 1px 5px;}  
.spoiler-body {display: none;padding:3px 5px 1px 30px;}
.clear {clear: both;overflow: hidden;height: 1px;}
</style>
<script type="text/javascript">
  jQuery(document).ready(function(){
  jQuery('.spoiler-body').hide()
  jQuery('.spoiler-head').click(function(){
  jQuery(this).toggleClass("open").toggleClass("closed").next().fadeToggle("fast", "linear")
  })
  })
</script>


в том месте где будете выводить материалы пользователя в шаблоне Персональная страница пользователя добовляете код:

Code
<div style="width:49%;float:left;">

<div class="spoiler-wrap">
  <div class="spoiler-head open">Каталог сайтов</div>
  <div class="spoiler-body">
  <span class="h18"></span>
<script type="text/javascript">  
  $.get("$_DIR_ACTIVITY_URL$",function(data) {  
  var ifnohist = $("#dir:first", data).html();  
  if (ifnohist == null) {  
  $('.h18').html('Материалов не найдено');  
  }$("#dir", data).each(function() {var histr = $(this).html();$('.h18').before(histr);}); });  
  </script>
</div></div>

<div class="spoiler-wrap"><div class="spoiler-head open">СКаталог файлов</div><div class="spoiler-body">

<span class="h17"></span>
<script type="text/javascript">  
  $.get("$_LOAD_ACTIVITY_URL$",function(data) {  
  var ifnohist = $("#load:first", data).html();  
  if (ifnohist == null) {  
  $('.h17').html('Материалов не найдено');  
  }$("#load", data).each(function() {var histr = $(this).html();$('.h17').before(histr);}); });  
  </script>
</div></div>

<div class="spoiler-wrap"><div class="spoiler-head open">Объявления</div><div class="spoiler-body">
<span class="h19"></span>
<script type="text/javascript">  
  $.get("$_BOARD_ACTIVITY_URL$",function(data) {  
  var ifnohist = $("#board:first", data).html();  
  if (ifnohist == null) {  
  $('.h19').html('Материалов не найдено');  
  }$("#board", data).each(function() {var histr = $(this).html();$('.h19').before(histr);}); });  
  </script>
</div></div>
</div>

<div style="width:49%;float:left;margin:0px 0px 0px 10px;">

<div class="spoiler-wrap"><div class="spoiler-head open">Новости</div><div class="spoiler-body">
<span class="h22"></span>
<script type="text/javascript">  
  $.get("$_NEWS_ACTIVITY_URL$",function(data) {  
  var ifnohist = $("#news:first", data).html();  
  if (ifnohist == null) {  
  $('.h22').html('Материалов не найдено');  
  }$("#news", data).each(function() {var histr = $(this).html();$('.h22').before(histr);}); });  
  </script>
</div></div>

<div class="spoiler-wrap"><div class="spoiler-head open">Каталог статей</div><div class="spoiler-body">
<span class="h21"></span>
<script type="text/javascript">  
  $.get("$_PUBL_ACTIVITY_URL$",function(data) {  
  var ifnohist = $("#publ:first", data).html();  
  if (ifnohist == null) {  
  $('.h21').html('Материалов не найдено');  
  }$("#publ", data).each(function() {var histr = $(this).html();$('.h21').before(histr);}); });  
  </script>
</div></div>

<div class="spoiler-wrap"><div class="spoiler-head open">Каталог игр</div><div class="spoiler-body">
<span class="h20"></span>
<script type="text/javascript">  
  $.get("$_STUFF_ACTIVITY_URL$",function(data) {  
  var ifnohist = $("#stuff:first", data).html();  
  if (ifnohist == null) {  
  $('.h20').html('Материалов не найдено');  
  }$("#stuff", data).each(function() {var histr = $(this).html();$('.h20').before(histr);}); });  
  </script>
</div></div>
</div>


Далее добавляем в шаблоны в самый низ:
Новости - Вид метриалов
Code
<div id="news" style="display: none;"><div align="left"><div id="nns1"><a href=$ENTRY_URL$>$TITLE$</a></div></div></div>

Каталог статей - Вид метриалов
Code
<div id="publ" style="display: none;"><div align="left"><div id="nns1"><a href=$ENTRY_URL$>$TITLE$</a></div></div></div>

Каталог файлов - Вид метриалов
Code
<div id="load" style="display: none;"><div align="left"><div id="nns"><a href=$ENTRY_URL$>$TITLE$</a></div></div></div>

Каталог сайтов - Вид метриалов
Code
<div id="dir" style="display: none;"><div align="left"><div id="nns1"><a href=$ENTRY_URL$>$TITLE$</a></div></div></div>

Доска объявлений - Вид метриалов
Code
<div id="board" style="display: none;"><div align="left"><div id="nns1"><a href=$ENTRY_URL$>$TITLE$</a></div></div></div>

Каталог игр - Вид метриалов
Code
<div id="stuff" style="display: none;"><div align="left"><div id="nns1"><a href=$ENTRY_URL$>$TITLE$</a></div></div></div>

Рейтинг: 2  (помогла ли Вам эта инструкция: да / нет)          Просмотров: 13018          Комментариев: