Page Index Toggle Pages: [1] 2 3 ... 5 Send TopicPrint
Very Hot Topic (More than 25 Replies) [DONE] Power Hide 1.1 Final (Read 2657 times)
Spikecity
God Member
*****
Offline


Beer anyone ?

Posts: 2630
Location: New York
Joined: Apr 16th, 2002
Gender: Male
[DONE] Power Hide 1.1 Final
Jan 19th, 2007 at 1:42pm
Print Post  
Introducing:

Power Hide V1.1 Final (UK & NL & GE)

This mod allows power users to hide single messages within a thread (upto their own level).
This mod will not mask hidden messages in the totals but it will prevent users to see messages marked with a higher visibility level then their own.
So before anyone starts complaining the message index tells him 10  replies and he sees only 6..... this means there is stuff hidden in the thread not ment for your eyes.
Application could be to make hidden staff notes in a users thread if needed (like privacy sensitive data not ment for the public eye but useful to keep inside a thread.

Usage
In the message post area only power users will have an extra radiobutton set below the message field which allows them to set view level up to their own level.
This means a moderator can only restrict view up to moderator level (basically only hiding it from members and guests, while a Global Moderator can hide a message for moderators too, and an administrator can hide a message for everyone below the rank of Administrator.

Installation
Apply the mod, upload the changed YaBBC.pl, Display.pl, ModifyMessage.pl, Main.lng,Search.pl, Display.template and Post.pl.

IMPORTANT !!
This mod adds a specific tag to the first line of a message thread ([admin only], [gmod only], [mod only] and [member only]) which remains hidden throughout the boards usage, and which determines the visibility of the message it is in.
If you remove this mod ALL hidden messages will be revealed !!

THIS ALSO MEANS THAT IF YOU UPGRADE TO YABB2.2 YOU NEED TO HAVE THIS MOD INSTALLED IN ORDER TO REMAIN HIDDEN STUFF TO BE HIDDEN !!!

The mod will probably install in YaBB2.2 also, but a YaBB2.2 version will be available asap.

Version History
1.0
First release

1.0a
- Fixed mod closing tag
- Added Printpage and Recent Posts code

1.0b
- Made Recent.pl and Search.pl non confusing (thanks MF-B)
- Added German mod


1.0c
- Added check on User Recent post and Thread Summary (Thanks Larian)
- added extra text string 5a for our german friends
- fixed mods to look for the correct language dir

1.1
- Fixed ranking order if Global Moderators were also assigned Moderator on boards.
- Made mod final
« Last Edit: Mar 31st, 2007 at 2:48pm by Spikecity »  

PowerHide_2_1-1_1_final.zip ( 10 KB | Downloads )

Nothing to add here Smiley
Back to top
 
IP Logged
 
MF-B
Senior Member
****
Offline



Posts: 410
Location: Moscow
Joined: Apr 11th, 2006
Gender: Male
Re: [YaBB2.1] Power Hide 1.0 beta
Reply #1 - Jan 19th, 2007 at 3:19pm
Print Post  
Hi Ron

Cool idea...  :2thumbsup:

Install this, working fine...

PS: this function/mod (after small change) can be used for simple approve message...  Wink
  
Back to top
WWW  
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: [YaBB2.1] Power Hide 1.0 beta
Reply #2 - Jan 19th, 2007 at 3:33pm
Print Post  
Hi

Step 3 and 4 you have this  Shocked
Code
Select All
	  <td class="windowbg" width="77%"><input type="checkbox" name="ns" value="NS"$nscheck /> <span class="small"> $post_txt{'277'}</span><br />
	<span class="small">$readable</span><br /><br /></td>
<replace>

<search for>
	# Permission checks for posting.
</search for>

<add before> 



I cannot find this in Step 20

Code
Select All
	# Permission checks for posting. 



  

greetings
Jeff
Back to top
WWW  
IP Logged
 
MF-B
Senior Member
****
Offline



Posts: 410
Location: Moscow
Joined: Apr 11th, 2006
Gender: Male
Re: [YaBB2.1] Power Hide 1.0 beta
Reply #3 - Jan 19th, 2007 at 3:47pm
Print Post  
Quote:
I cannot find this in Step 20
Step 20? Shocked Grin
  
Back to top
WWW  
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: [YaBB2.1] Power Hide 1.0 beta
Reply #4 - Jan 19th, 2007 at 3:49pm
Print Post  
some steps are mixed with search and add or before tags  Grin

download again, modfile ok.  Tongue
  

greetings
Jeff
Back to top
WWW  
IP Logged
 
MF-B
Senior Member
****
Offline



Posts: 410
Location: Moscow
Joined: Apr 11th, 2006
Gender: Male
Re: [YaBB2.1] Power Hide 1.0 beta
Reply #5 - Jan 19th, 2007 at 3:53pm
Print Post  
Aha I see...
Not closed tag <replace> Wink
  
Back to top
WWW  
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: [YaBB2.1] Power Hide 1.0 beta
Reply #6 - Jan 19th, 2007 at 3:59pm
Print Post  
I save modfile in german. all steps copy?  ??? ???
  

greetings
Jeff
Back to top
WWW  
IP Logged
 
Zoo
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 290
Joined: Jan 22nd, 2003
Re: [YaBB2.1] Power Hide 1.0 beta
Reply #7 - Jan 19th, 2007 at 4:32pm
Print Post  
Good. Very good for moderators Wink
I dont' install, but look into code and i have 2 remarks: recent and print  modification to be wanting
  
Back to top
 
IP Logged
 
Spikecity
God Member
*****
Offline


Beer anyone ?

Posts: 2630
Location: New York
Joined: Apr 16th, 2002
Gender: Male
Re: [YaBB2.1] Power Hide 1.0 beta
Reply #8 - Jan 19th, 2007 at 5:19pm
Print Post  
Zoo wrote on Jan 19th, 2007 at 4:32pm:
Good. Very good for moderators Wink
I dont' install, but look into code and i have 2 remarks: recent and print  modification to be wanting

I know recent and print need work, that's why it is called beta guys..... but thanks for the quick test.
I will enhance it further to have it work there too Wink
  

Nothing to add here Smiley
Back to top
 
IP Logged
 
Spikecity
God Member
*****
Offline


Beer anyone ?

Posts: 2630
Location: New York
Joined: Apr 16th, 2002
Gender: Male
Re: [YaBB2.1] Power Hide 1.0a beta
Reply #9 - Jan 19th, 2007 at 5:44pm
Print Post  
1.0a attached to the first post.

fixes closing replace tag and adds the same restrictions to Recent Posts/Topics and Print Page

Please have a go Tongue
  

Nothing to add here Smiley
Back to top
 
IP Logged
 
Spikecity
God Member
*****
Offline


Beer anyone ?

Posts: 2630
Location: New York
Joined: Apr 16th, 2002
Gender: Male
Re: [YaBB2.1] Power Hide 1.0 beta
Reply #10 - Jan 19th, 2007 at 5:47pm
Print Post  
Quote:
I save modfile in german. all steps copy?  ??? ???


Just post the language part of the modfile Jet Li and I'll add the German mods in the zip too Wink
  

Nothing to add here Smiley
Back to top
 
IP Logged
 
MF-B
Senior Member
****
Offline



Posts: 410
Location: Moscow
Joined: Apr 11th, 2006
Gender: Male
Re: [YaBB2.1] Power Hide 1.0a beta
Reply #11 - Jan 19th, 2007 at 5:50pm
Print Post  
@Ron

May be not need confused users who not have permision for view message but see in MessageIndex lastposter > Admin... go to thread and see lastposter User  Shocked

Need change $outblock Wink

I make on my forum this - http://yabb.xost.ru/YaBB.cgi?num=1170620985/0#0
« Last Edit: Mar 10th, 2007 at 2:37pm by MF-B »  
Back to top
WWW  
IP Logged
 
MF-B
Senior Member
****
Offline



Posts: 410
Location: Moscow
Joined: Apr 11th, 2006
Gender: Male
Re: [YaBB2.1] Power Hide 1.0a beta
Reply #12 - Jan 19th, 2007 at 6:05pm
Print Post  
@Ron

Why you not use in Recent, Search the same code as in Printpage? Use this and not needed parse message and use $counter++; Wink
  
Back to top
WWW  
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: [YaBB2.1] Power Hide 1.0a beta
Reply #13 - Jan 19th, 2007 at 6:47pm
Print Post  
Hi Ron

ok, here we go, but need extra string for Visible for:  Wink This is need for posting page  Wink

Code
Select All
%read_txt = (
'visible_for' => "Diese Nachricht ist für: ",
'only_visible_for' => "Diese Nachricht ist nur für ",
'and_up' => "und höher.",
'0' => "Jeden",
'1' => "Mitglieder sichtbar",
'3' => "Moderatoren sichtbar",
'4' => "Global Moderatoren sichtbar",
'5' => "Administratoren sichtbar",
); 

  

greetings
Jeff
Back to top
WWW  
IP Logged
 
Spikecity
God Member
*****
Offline


Beer anyone ?

Posts: 2630
Location: New York
Joined: Apr 16th, 2002
Gender: Male
Re: [YaBB2.1] Power Hide 1.0a beta
Reply #14 - Jan 19th, 2007 at 7:04pm
Print Post  
MF-B wrote on Jan 19th, 2007 at 6:05pm:
@Ron

Why you not use in Recent, Search the same code as in Printpage? Use this and not needed parse message and use $counter++; Wink


The reason for not reusing the same code in Recent, Search and Printpage is basically because the three scripts work different.

In Search we loop through the array $message using a for/next with $counter as a counter variable.

In Printpage we loop through the thread array called $threadpost with a foreach (so no counter)

In Recent we loop through $message again with a for/next loop but now with $i as counter variable.

The reason for increasing the counter even if I skip the message is to remain the correct message reference in all the links (if you do not increase the counter and click quote/edit in a thread where there are invisible messages as a non admin you'll grab the wrong message).

I will have to think about Last message pointing to a hidden message a little as this means adding extra info in the recent/last file (which could cause problems while upgrading to Y2.2 later)

For the same reasons I choose not to tamper with the message counter in the message index page.
I just show the total number of message even if a member will see less.

Keep in mind that I did not intend for this option to be completely stealth.... and I do not care that the observing user will see missing reply# numbers in the thread.

It's OK for users to be aware of the fact that certain messages are not for their eyes but present in the thread.
  

Nothing to add here Smiley
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 3 ... 5
Send TopicPrint