• Page 1 of 1
  • 1
uCause Community » Trash & Archives » Forum » Forum Statsistics , Post appearance.
Forum Statsistics , Post appearance.
AnimorphDate: Saturday, 2011-06-25, 6:10 PM | Message # 1
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(


go to CP ---> Design ---> Design management (templates) ---> Forum ---> After $BODY$

uCause Re-Coded Codes With Bug Fixes:

Code
<script type="text/javascript">
    $('.gTable tr').each(function() {
    <?if($PAGE_ID$='main' || $PAGE_ID$='category')?>$('.forum:first',this).append('<div class="uHover">' + $('.forumThreadTd',this).text() + declOfNum($('.forumThreadTd',this).text(), [' Topic', ' Topics', ' Topics'])+ ' | ' +$('.forumPostTd',this).text()+declOfNum($('.forumPostTd',this).text(), [' Post ', ' Posts ', ' Posts '])+'</div>');
    $('.forumNameTd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()}) ; <?endif?>
    <?if($PAGE_ID$='forum')?>$('.threadPinnedLink:first',this).append('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' Post', ' Posts', ' Posts'])+ ' | ' +$('.threadViewTd',this).text()+declOfNum($('.threadViewTd',this).text(), [' View ', ' Views', ' views '])+ ' | author: ' +$('.threadAuthTd span a',this).text())+'</div>';
    $('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()} ) ;<?endif?>
    <?if($PAGE_ID$='forum')?>$('.threadLink:first',this).append('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' Post', ' Posts', ' Posts'])+ ' | ' +$('.threadViewTd',this).text()+declOfNum($('.threadViewTd',this).text(), [' View ', ' Views', ' views '])+ ' | author: ' +$('.threadAuthTd span a',this).text())+'</div>';
    $('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()} ) ;<?endif?>
    <?if($PAGE_ID$='search')?>$('.threadPinnedLink:first',this).append('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' Post', ' Posts', ' Posts'])+ ' | ' +$('.threadViewTd',this).text()+declOfNum($('.threadViewTd',this).text(), [' View ', ' Views', ' views '])+ ' | author: ' +$('.threadAuthTd span a',this).text())+'</div>';
    $('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()} ) ;<?endif?>
    <?if($PAGE_ID$='search')?>$('.threadLink:first',this).append('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' Post', ' Posts', ' Posts'])+ ' | ' +$('.threadViewTd',this).text()+declOfNum($('.threadViewTd',this).text(), [' View ', ' Views', ' views '])+ ' | author: ' +$('.threadAuthTd span a',this).text())+'</div>';
    $('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()} ) ;<?endif?>
    <?if($PAGE_ID$='recentthreads')?>$('.threadPinnedLink:first',this).append('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' Post', ' Posts', ' Posts'])+ ' | ' +$('.threadViewTd',this).text()+declOfNum($('.threadViewTd',this).text(), [' View ', ' Views', ' views '])+ ' | author: ' +$('.threadAuthTd span a',this).text())+'</div>';
    $('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()} ) ;<?endif?>
    <?if($PAGE_ID$='recentthreads')?>$('.threadLink:first',this).append('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' Post', ' Posts', ' Posts'])+ ' | ' +$('.threadViewTd',this).text()+declOfNum($('.threadViewTd',this).text(), [' View ', ' Views', ' views '])+ ' | author: ' +$('.threadAuthTd span a',this).text())+'</div>';
    $('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()} ) ;<?endif?>
    });
    function declOfNum(number, titles) {
    cases = [2, 0, 1, 1, 1, 2];
    return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];
    }
    </script>
    <?if($PAGE_ID$='recentthreads')?><style type="text/css">
    .uHover {float:right;display:none;margin-right:5px;}
    .gTableSubTop:nth-child(3), .gTableSubTop:nth-child(4),.gTableSubTop:nth-child(5), .forumThreadTd, .forumPostTd, .threadViewTd, .threadPostTd, .threadAuthTd<?if($PAGE_ID$='forum')?>, .gTableSubTop:nth-child(5)<?endif?> {display:none}
    a.threadPinnedLink:link {text-decoration:none; color:#0000FF;} a.threadPinnedLink:visited {text-decoration:none; color:#0000FF;} a.threadPinnedLink:hover {text-decoration:none; color:#FF0000;} a.threadPinnedLink:active {text-decoration:underline; color:#FF0000;} </style><?else?><?if($PAGE_ID$='search')?>
    <style type="text/css">
    .uHover {float:right;display:none;margin-right:5px;}
    .gTableSubTop:nth-child(3), .gTableSubTop:nth-child(4),.gTableSubTop:nth-child(5), .forumThreadTd, .forumPostTd, .threadViewTd, .threadPostTd, .threadAuthTd<?if($PAGE_ID$='forum')?>, .gTableSubTop:nth-child(5)<?endif?> {display:none}
    a.threadPinnedLink:link {text-decoration:none; color:#0000FF;} a.threadPinnedLink:visited {text-decoration:none; color:#0000FF;} a.threadPinnedLink:hover {text-decoration:none; color:#FF0000;} a.threadPinnedLink:active {text-decoration:underline; color:#FF0000;} </style><?else?><style type="text/css">
    .uHover {float:right;display:none;margin-right:5px;}
    .gTableSubTop:nth-child(3), .gTableSubTop:nth-child(4), .forumThreadTd, .forumPostTd, .threadViewTd, .threadPostTd, .threadAuthTd<?if($PAGE_ID$='forum')?>, .gTableSubTop:nth-child(5)<?endif?> {display:none}
    a.threadPinnedLink:link {text-decoration:none; color:#0000FF;} a.threadPinnedLink:visited {text-decoration:none; color:#0000FF;} a.threadPinnedLink:hover {text-decoration:none; color:#FF0000;} a.threadPinnedLink:active {text-decoration:underline; color:#FF0000;} </style><?endif?>
       
       
    <style type="text/css">
// Copyright Bug Fixes and Translated by  uCause ~ http://uCause.ucoz.com/  //
    .uHover {float:right;display:none;margin-right:5px;}
    .gTableSubTop:nth-child(3), .gTableSubTop:nth-child(4), .forumThreadTd, .forumPostTd, .threadViewTd, .threadPostTd, .threadAuthTd<?if($PAGE_ID$='forum')?>, .gTableSubTop:nth-child(5)<?endif?> {display:none}
    a.threadPinnedLink:link {text-decoration:none; color:#0000FF;} a.threadPinnedLink:visited {text-decoration:none; color:#0000FF;} a.threadPinnedLink:hover {text-decoration:none; color:#FF0000;} a.threadPinnedLink:active {text-decoration:underline; color:#FF0000;} </style><?endif?>


Original code with bug in Recent Messages And Un-Translated:

Code
<script type="text/javascript">
$('.gTable tr').each(function() {
<?if($PAGE_ID$='main' || $PAGE_ID$='category')?>$('.forum:first',this).append('<div class="uHover">' + $('.forumThreadTd',this).text() + declOfNum($('.forumThreadTd',this).text(), [' тема', ' темы', ' тем'])+ ' | ' +$('.forumPostTd',this).text()+declOfNum($('.forumPostTd',this).text(), [' ответ ', ' ответа ', ' ответов '])+'</div>');
$('.forumNameTd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>
<?if($PAGE_ID$='forum')?>$('.threadLink:first',this).append('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' ответ', ' ответа', ' ответов'])+ ' | ' +$('.threadViewTd',this).text()+declOfNum($('.threadViewTd',this).text(), [' просмотр ', ' просмотра ', ' просмотров '])+ ' | Автор: ' +$('.threadAuthTd span a',this).text())+'</div>';
$('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>
});
function declOfNum(number, titles) {
       cases = [2, 0, 1, 1, 1, 2];
       return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];
}
</script>
<style type="text/css">
.uHover {float:right;display:none;margin-right:5px;}
.gTableSubTop:nth-child(3), .gTableSubTop:nth-child(4), .forumThreadTd, .forumPostTd, .threadViewTd, .threadPostTd, .threadAuthTd<?if($PAGE_ID$='forum')?>, .gTableSubTop:nth-child(5)<?endif?> {display:none}
</style>


uCause Parts coded and Fixed:
- Code Fixes
- New Messages Page Fixes
- Search Page In forum Fixed
- Sticked Threads Fixed


And there are no other bugs in the uCause version , Test the difference and see that uCause does have Coding knowledge


Say thanks
Attachments: 1639919.jpg(28.7 Kb)
 
0 Thanked you For This Useful Post:
AnimorphDate: Sunday, 2011-06-26, 2:49 AM | Message # 2
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
Script updated
 
0 Thanked you For This Useful Post:
SirDarknight(Tonmoy)Date: Sunday, 2011-06-26, 4:03 PM | Message # 3
Member
Group: Senior Members
Messages: 894
Awards: 10
Reputation: 15
Status: :-(
Thank You

Please Give Me A Award or + Rep If My Post Helps You

Please Give Me A Award or + Rep If You Like my Scripts
 
0 Thanked you For This Useful Post:
AnimorphDate: Sunday, 2011-06-26, 4:21 PM | Message # 4
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
SirDarknight(Tonmoy), no problem smile i'm glad that i could fix this messy code because it has a great result
 
0 Thanked you For This Useful Post:
CreativeCollusionsDate: Sunday, 2011-06-26, 4:38 PM | Message # 5
Member
Group: Senior Members
Messages: 359
Awards: 2
Reputation: 5
Status: :-(
Very good.

Creative Collusions is a web & graphics studio based in Yorkshire, England.

Twitter:
@CCollusions (Company) and @elliottmangham (Personal)
 
0 Thanked you For This Useful Post:
Maczo12310Date: Sunday, 2011-06-26, 5:03 PM | Message # 6
Member
Group: Senior Members
Messages: 987
Awards: 12
Reputation: 11
Status: :-(
Great Script. Can't wait to try it out.


Visit my Graphic forum board on uCause !!!
 
0 Thanked you For This Useful Post:
AnimorphDate: Sunday, 2011-06-26, 5:07 PM | Message # 7
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
Donught, then don't wait xD
 
0 Thanked you For This Useful Post:
HermesDate: Sunday, 2011-06-26, 6:33 PM | Message # 8
Member
Group: Senior Members
Messages: 455
Awards: 7
Reputation: 8
Status: :-(
Animorph, Great result! Thank You! respect
 
0 Thanked you For This Useful Post:
uCause Community » Trash & Archives » Forum » Forum Statsistics , Post appearance.
  • Page 1 of 1
  • 1
Search:


"Making uCoz web designs simple and easy to use"
- uCause Developers