Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #31  
Old 01-14-2004, 03:26 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NTLDR
I've not tested any of them. Boofo said the code I did for him didn't work.
I DO appreciate your trying, though. At least you gave it a shot.
Reply With Quote
  #32  
Old 01-14-2004, 01:44 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've worked out not why it wasn't working When it parses the vB code (in parse_bbcode2())it runs the censor again regardless, the following is tested and will work

In addition to the other edits I posted, the following are required:

in functions_showthread.php find:

PHP Code:
$post['title'] = fetch_censored_text($post['title']); 
Replace with:

PHP Code:
    if ($post['userid'] == X) {
        
$GLOBALS['no_censor_text'] = true;
    } else {
        
$GLOBALS['no_censor_text'] = false;
        
$post['title'] = fetch_censored_text($post['title']);
    } 
in functions_bbcodeparse.php find:

PHP Code:
$bbcode fetch_censored_text($bbcode); 
replace with:

PHP Code:
    if (!$GLOBALS['no_censor_text']) {
        
$bbcode fetch_censored_text($bbcode);
    } 
This removes censoring from posts and post titles on showthread/post only.
Reply With Quote
  #33  
Old 01-14-2004, 04:33 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you tell me which posts contain the edits for this? There were quite a few and some didn't work.
Reply With Quote
  #34  
Old 01-14-2004, 05:25 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This post has the "other half" of the edits
Reply With Quote
  #35  
Old 01-14-2004, 06:16 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NTLDR can i add you to my hate list now? I spent ages on this, and i was sooo going in the wrong direction and definetly doing it wrong!! Doh!! Guess i should stick to tutorials huh

anyways i was only joking bout the hate list Your taking over the site NTLDR, and i like it
Reply With Quote
  #36  
Old 01-14-2004, 06:54 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NTLDR
This post has the "other half" of the edits
Ok, it seems to work until you edit a message with the word in it. Then it gets censored. Can we fix that, too? And, also, if I wanted to do more than 1 userid, how would I add that?

Excellent job, by the way, my man!
Reply With Quote
  #37  
Old 01-14-2004, 07:11 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In editpost.php find:

PHP Code:
$edit['title'] = fetch_censored_text(fetch_no_shouting_text($edit['title'])); 
Replace with:

PHP Code:
if ($edit['userid'] == X) {
    
$GLOBALS['no_censor_text'] = true;
    
$edit['title'] = fetch_no_shouting_text($edit['title']);
} else {
    
$GLOBALS['no_censor_text'] = false;
    
$edit['title'] = fetch_censored_text(fetch_no_shouting_text($edit['title']));

Find:

PHP Code:
$edit['message'] = fetch_censored_text(fetch_removed_sessionhash($edit['message'])); 
Replace with:

PHP Code:
if ($edit['userid'] == X) {
    
$edit['message'] = fetch_removed_sessionhash($edit['message']);
} else {
    
$edit['message'] = fetch_censored_text(fetch_removed_sessionhash($edit['message']));

Find:

PHP Code:
$edit['reason'] = htmlspecialchars_uni(fetch_censored_text(trim($_POST['reason']))); 
Replace with:

PHP Code:
if ($edit['userid'] == X) {
    
$edit['reason'] = htmlspecialchars_uni(trim($_POST['reason']));
} else {
    
$edit['reason'] = htmlspecialchars_uni(fetch_censored_text(trim($_POST['reason'])));

Adding extra users is just a case of adding || $varname['userid'] == X (where varname is post or edit depending on the file).

*lmao* @ MindTrix
Reply With Quote
  #38  
Old 01-14-2004, 07:21 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NTLDR why dont you just go release it as a hack Sure alot of people would use this.
Reply With Quote
  #39  
Old 01-14-2004, 07:24 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, sir. I will test it thoroughly and get back to you.

BTW: Shouldn't that last piece of code have a bracket at the bottom of it?
Reply With Quote
  #40  
Old 01-14-2004, 07:25 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

These changes only do certain places, it needs some more work and thought to make it global, although I have some ideas howto do it with less file edits and make work everywhere.

Edit: Yes Boofo it should Code edited Thanks.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:41 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07946 seconds
  • Memory Usage 2,290KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (10)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete