• Page 1 of 1
  • 1
uCause Community » uCoz Templates and Scripts » Custom Coding and Solutions » Hide comments with rating under -5
Hide comments with rating under -5
AnimorphDate: Wednesday, 2010-09-15, 5:10 PM | Message # 1
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
For blog modules and so on..

hiding comments rated ≤ -5 and show them again by clicking on the link: )

So climb into your template " type comments . Find there $MESSAGE$ and the block that surrounds it . In my case it looks like .

Code
<div class="cMessage">$MESSAGE$</div>

A little change to get this:

Code
<div class="cMessage">
<?if($COMMENT_RATING$<='-5')?><a href="javascript://" onclick="$('#comEnt$ID$ .closedComment').slideToggle('slow'); $(this).slideToggle('slow');">Show Comment</a>
<div class="closedComment" style="display:none;">$MESSAGE$</div>
<noscript>$MESSAGE$</noscript>
<?else?>$MESSAGE$<?endif?>
</div>

Now, all comments with a rating below or equal to -5 will be hidden. And by clicking on the " Show comments " This link will give way to beautiful comment:)

 
0 Thanked you For This Useful Post:
AcidDate: Wednesday, 2010-09-15, 6:49 PM | Message # 2
Member
Group: Senior Members
Messages: 473
Awards: 8
Reputation: 14
Status: :-(
And you can change the number, as instead of -5, you could use -10

 
0 Thanked you For This Useful Post:
AnimorphDate: Wednesday, 2010-09-15, 6:53 PM | Message # 3
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
yes u can do that , -10 is for kinda blogs but for personal blogs about urself i would recommer -5 to hide biggrin
 
0 Thanked you For This Useful Post:
AcidDate: Wednesday, 2010-09-15, 6:55 PM | Message # 4
Member
Group: Senior Members
Messages: 473
Awards: 8
Reputation: 14
Status: :-(
Animorph, just stated an example (:

 
0 Thanked you For This Useful Post:
AnimorphDate: Wednesday, 2010-09-15, 7:40 PM | Message # 5
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
o I was Epic Fail biggrin
 
0 Thanked you For This Useful Post:
DarkGirlDate: Wednesday, 2010-09-15, 8:02 PM | Message # 6
Member
Group: Senior Members
Messages: 11
Awards: 0
Reputation: 0
Status: :-(
o wow this is very usefull thanks Animorph and Acid, ive been seeking for new code's for ages the old Englisch support forums are dead or starting over again...

nice script :x

thankyou !

 
0 Thanked you For This Useful Post:
AnimorphDate: Wednesday, 2010-09-15, 8:24 PM | Message # 7
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
no problem DarkGirl have fun with the script biggrin
 
0 Thanked you For This Useful Post:
uCause Community » uCoz Templates and Scripts » Custom Coding and Solutions » Hide comments with rating under -5
  • Page 1 of 1
  • 1
Search:


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