The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Staff can view censored words in postbit
I have a friend who admins a large v4.2.1 board and he wants himself and his staff to be able to see the censored words in postbit instead of the asterisks.
Offhand I can see this being a usergroup permission thing perhaps? Anyone with any thoughts on this? |
#2
|
|||
|
|||
My first thought is that I believe the censoring feature replaces the word with asterisks before it's saved in the database, so that you'd need to change how that works. Or maybe you could use a hook before the censoring to find the words and log them to a different table, then use that data somehow when a staff member displays a post.
|
Благодарность от: | ||
tbworld |
#3
|
||||
|
||||
Quote:
includes/functions.php find: HTML Code:
function censortext($text) { global $enablecensor,$censorwords,$censorword,$censorchar; Replace with: HTML Code:
function censortext($text) { global $enablecensor,$censorwords,$censorword,$censorchar,$bbuserinfo; if(($bbuserinfo[usergroupid] == 5) or ($bbuserinfo[usergroupid] == 6) or ($bbuserinfo[usergroupid] == 7)){ $enablecensor = 0; } HTML Code:
$bbcode=str_replace("{", "{", $bbcode); // stop people posting replacements in their posts return censortext($bbcode); HTML Code:
$bbcode=str_replace("{", "{", $bbcode); // stop people posting replacements in their posts return $bbcode; But I have no idea the version 4 use of this. |
Благодарность от: | ||
RichieBoy67 |
#4
|
|||
|
|||
I don't find any function called censortext() in vb3.8.8. Maybe it's an older version that works differently? I see a function called fetch_censored_text(), but if you added a check of bbuserinfo[userid] I believe you'd be checking the usergroup of the user who was posting, since it's called when the post is saved and not every time it's viewed.
|
#5
|
||||
|
||||
Quote:
Any way you can think of, for the staff of a board to be able to see what was actually typed and not the asterisks? |
#6
|
|||
|
|||
I looked at at the vb4 code since I kind of liked @kh99's idea and I knew he was on the right track. I was hoping in the post table "pagetext" the censored words were still there and in some magical way they were only parsed before storing as a "parsed-post". I kind of new this was wrong, but was still hoping. Anyway, no-go.
One problem I noticed was the check for censored words via "fetch_censored_text" occurs everywhere for different contexts. It simply censors the string without caring from where it came from. I think I would want to write an interim function for "Fetch_censored_text" which stores the censored words and the context from which it came. In this way you can store the censored text from other areas of the board. The title of the post for example, Social group messages or CMS articles. If you just wanted to just handle the "post text" then of course that would simplify the process -- there would be no reason to store the context. It looks to me that if we used "class_dm_threadpost.php" --> class method "vB_DataManager::verify_pagetext" and extend the class with a modified method "verify_pagetext" --> which would call a modified function "fetch_sensored_text", where we would store the sensor-ed words in the new table that was created. We could simply add a simple AJAX call to query and display the results, since only admins and maybe mods would be using it. Anyway, it does seem to be possible. |
Благодарность от: | ||
Max Taxable |
#7
|
||||
|
||||
Quote:
Code it! |
2 благодарности(ей) от: | ||
BasicGreatGuy, CAG CheechDogg |
#8
|
||||
|
||||
Yeah yeah..what he (Max) said ! lol ...
|
#9
|
||||
|
||||
<a href="https://vborg.vbsupport.ru/showthread.php?t=310258" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=310258</a>
Maybe this mod? |
#10
|
|||
|
|||
Quote:
Unless I misread your mod, it doesn't appear to have the ability to do what the admins and mods of this site are looking for. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|