vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Administrative and Maintenance Tools - Replacement Words In Posts (https://vborg.vbsupport.ru/showthread.php?t=149118)

kisanjong 03-13-2012 11:49 AM

a simular word replacment mod for 4.1.11?

Thanks

denpietrau 03-30-2012 08:36 AM

Quote:

Originally Posted by ballpnet (Post 1425218)
PHP Code:

<![CDATA[$array1 explode("|"$vbulletin->options['ah_word_replace_find']);

$array2 explode("|"$vbulletin->options['ah_word_replace_replace']);

$ah_text $this->post['message'];

$breadcrumb = array();

if(
count($array1) > 0) {

  for(
$j=0$j<count($array1); $j++) {
    
$breadcrumb[] = '/'.$array1[$j].'/i';
  }

  
$ah_text preg_replace($breadcrumb$array2$ah_text);

  
$separators = array('. ''? ''! ');
  
  for(
$i=0$i<count($separators); $i++) {

    
$var $separators[$i];
    
$sentences explode($var$ah_text);
    
$tmp_sentence '';
    
$k 0;
    foreach(
$sentences as $single_sentence) {
    
$tmp_sentence .= ucfirst($single_sentence);

     if (
$k<count($sentences)-1) {
          
$tmp_sentence .= $var;
        }
        
$k++;
    }
    
$ah_text $tmp_sentence;
  }
}

$this->post['message'] = $ah_text;]]> 


Thank you so much. It works in vbb 4.

Naijasite 06-26-2012 05:07 AM

works well on www.naijafinder.com

Naijasite 08-22-2012 01:49 AM

It works well on VB 4.2 but its changing all all capital letters to small letters.
Can someone help me to fix this error.

Naijasite 11-25-2012 02:53 PM

This plugin is good. But is changing every capital letters post in my forum to small letters.

How do i fix this error?

Naijasite 11-25-2012 03:34 PM

Thanks i just fix small letters with the below steps.
Quote:

Originally Posted by soniceffect (Post 1287753)
Would also love a fix for this .... Is an excellent hack

EDIT:- Really wanted this so thought I would have a play myself...

PLEASE NOTE YOU MUST BE USING PHP5 FOR THIS FIX


FIXES THE DROPPING OF CAPS
Edit the plugin "word replacements"

Replace
PHP Code:

$ah_message $this->post['message'];
$ah_text strtolower($ah_message); 

with
PHP Code:

$ah_text $this->post['message']; 

replace
PHP Code:

$ah_text str_replace(strtolower($array1[$x]), $array2[$x], $ah_text); 

with
PHP Code:

$ah_text str_ireplace($array1[$x], $array2[$x], $ah_text); 



sergiomc 03-22-2013 04:05 PM

Is good mod, but i have a problem

I put:
(Find): smilie01
(Replace): [swf="height=23 width=23"]http://img56.xooimage.com/files/7/f/5/smilie-10-3cce020.swf[/swf]

I have a mod installed for this code to work.

But, then in the post shows the code and not the image, why?

--

This mod makes the videos do not work in all the forum, why?

Thank you

kartheekb 05-05-2013 12:54 PM

any mod like this for 4.2

BabyNameAddict 08-22-2013 07:51 PM

Quote:

Originally Posted by soniceffect (Post 1287753)
Would also love a fix for this .... Is an excellent hack

EDIT:- Really wanted this so thought I would have a play myself...

PLEASE NOTE YOU MUST BE USING PHP5 FOR THIS FIX


FIXES THE DROPPING OF CAPS
Edit the plugin "word replacements"

Replace
PHP Code:

$ah_message $this->post['message'];
$ah_text strtolower($ah_message); 

with
PHP Code:

$ah_text $this->post['message']; 

replace
PHP Code:

$ah_text str_replace(strtolower($array1[$x]), $array2[$x], $ah_text); 

with
PHP Code:

$ah_text str_ireplace($array1[$x], $array2[$x], $ah_text); 



This worked! Thank you!

l0l4s0 10-07-2013 08:20 PM

you can upgrade to version 4?

is possible to make this plugin only either in the text of the forum and not work on the links, images, etc..?


All times are GMT. The time now is 02:27 PM.

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.01465 seconds
  • Memory Usage 1,772KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete