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)

t325 10-11-2007 04:07 PM

I tried to fix this problem, and I'm just completely stumped. I got the code down to this:

PHP Code:

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

$this->post['message'] = eregi_replace($array1$array2$this->post['message']); 


I think it *should* work. It's no longer making everything lowercase. But the replacements simply aren't working. Anyone know what I'm doing wrong?

I tried replacing eregi_replace with str_replace (would be case sensitive though) to no avail. I tried hard coding the find and replace words in the function call, and it works just fine, so the problem seems to lie in the fact that $array1/$array2 or the $vbulletin->options['ah...'] strings aren't being set (they're populated in the database though).

Foxtrotelite 11-04-2007 01:40 AM

Any chance of a version 3.6.8 update? Please?

IvyKeepMommy 11-04-2007 10:55 PM

I also had the same problem -- I installed, and it converted every letter in all my posts to lower case, but didn't change the words I was trying to replace. So I had to uninstall.

It's a great idea and I'd love to see it working!

incisor 11-05-2007 04:34 AM

has the problem with it turning everything into lowercase been fixed ?

tillcat5 11-07-2007 12:38 PM

great release and would love to use it, but it nocks out all my images and wont let me post anything with [img] would love to get an upgrade of this!!

aspen1018 11-08-2007 11:54 PM

this looks like a very useful mod; however I haven't been able to get it to work with my board I have 3.6.5

malakaikingston 11-09-2007 05:57 PM

I added this mod and all my posts became lowercase.

I did the fixes someone posted in the code and got all my posts back to normal.

However now everything is fine but, the mod is just not working. :down:

We used the phbb replace mode extensively before moving to VB, and would love a VB 3.6.8 version of this mod that works, I'll pay anyone that gets it working 25$.

If not this mod are there any other options? :D

Fungsten 11-10-2007 06:12 PM

Quote:

Originally Posted by malakaikingston (Post 1379196)
I added this mod and all my posts became lowercase.

I did the fixes someone posted in the code and got all my posts back to normal.

However now everything is fine but, the mod is just not working. :down:

I got the exact same issue about the lower case! Uninstalled.

centralss 11-15-2007 09:39 PM

Doesn't work on 3.6.8 level 2 patch. Also wouldn't show anything linked to photobucket, which was strange. I had to uninstall it to show everything again.

Looks like it needs an update to 3.6.8!!!

Soupa 11-16-2007 02:32 AM

Can you replace words with a smilies image that has a sensor banner.

Pocket Aces 11-21-2007 04:31 AM

Would be nice if it affects thread title as well and pls. fix the lowercase issue.

mri_mohammad 11-25-2007 11:38 PM

not working it's make my website down on 3.6.8

Foxtrotelite 12-24-2007 01:40 PM

any chance of an update for 3.6.8 or maybe 3.7?

BigKev45 01-05-2008 05:27 PM

have it installed and i was hoping i could replace it with a vb code smiley but it just shows up w/ the code and no smiley for example if i want to replace dog it shows :censored: instead of the smiley that is attached to this code

Big Kahuna 01-13-2008 12:48 AM

I installed it on 3.6.8 and it works -- except it changes any upper case letter (like the first letter of the first word of a sentence) to lowercase. Had to disable until I find out that there is a fix -- of the I have to uninstall.

AcidX 01-13-2008 09:04 PM

Doesn't work for me, using 3.6.3.

craiovaforum 01-18-2008 12:01 PM

I recomment that you modify your plugin and use str_ireplace instead of doing a strtolower to the whole post message because its simply wrong.
Your plugin changes all posts to lowercase.

Of course, str_ireplace isnt the ideal way to handle utf-8 strings but its better than what you use in any case.

ballpnet 01-20-2008 03:36 PM

Greetings,

I've changed the code within the plugin in order to get it to work at our forums. This works with 3.6.8 and I've not tested it on any of the other versions. If anyone else wants to make the same modifications they are more than welcome to do so, but please be advised that it'll be at your own discretion and I will not provide support or be held liable if anything goes wrong.

*Props goes to mah man Nate(nathanledet) for bringing this plugin to our attention.*

Things the modification fixes:
1)It does not lower case the entire message
2)It tries to uppercase the first letter of a word at the beginning of a sentence. Say for example you want to replace the uppercase word WIDGET with widget. If someone begins the sentence with this word, then it'll look awkward and incorrect when it gets lowercased. The code then corrects this by uppercasing the "w" and giving us a correct much better looking "Widget."

Find and replace the <phpcode> opening and closing tags with the following.

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;]]> 


NathanLedet 01-20-2008 04:18 PM

Works great!! :up:

satanreborn 01-20-2008 08:34 PM

still cant get it to work, even with the updated php... running vBulletin 3.6.8 Patch Level 2

Gersfan 01-21-2008 07:29 AM

Hi Guys,

Has there been a fix yet for the lowercase problem on boards?

Thanks

Habsy 02-10-2008 11:41 PM

Doesn't work in 3.6.8

sdsvtdriver 02-15-2008 04:40 AM

I tried BallPnets changes and it doesn't work on my site.

3.6.8

vigape 03-18-2008 11:07 AM

I would use this mod to rewrite some words and make it url. Sample:
But when I put the bbcode replace, vbulletin shows the bbcode, not the url.

What can I do?

BarelyHangingOn 04-03-2008 11:43 PM

3.68 turned all of my text to lower case, otherwise it worked.

dennisuello 04-14-2008 02:16 PM

Quote:

Originally Posted by centralss (Post 1383363)
Doesn't work on 3.6.8 level 2 patch. Also wouldn't show anything linked to photobucket, which was strange. I had to uninstall it to show everything again.

Looks like it needs an update to 3.6.8!!!

Had the same issue on my forum, more than half of the photobucket images showed "Image removed" message instead. All I had in the Find and Replace boxes was "therockgods" and "kittenwar", respectively. I'm running 3.6.9.

forovideojuegos 04-30-2008 10:27 AM

Quote:

Originally Posted by ballpnet (Post 1425218)
Greetings,

I've changed the code within the plugin in order to get it to work at our forums. This works with 3.6.8 and I've not tested it on any of the other versions. If anyone else wants to make the same modifications they are more than welcome to do so, but please be advised that it'll be at your own discretion and I will not provide support or be held liable if anything goes wrong.

*Props goes to mah man Nate(nathanledet) for bringing this plugin to our attention.*

Things the modification fixes:
1)It does not lower case the entire message
2)It tries to uppercase the first letter of a word at the beginning of a sentence. Say for example you want to replace the uppercase word WIDGET with widget. If someone begins the sentence with this word, then it'll look awkward and incorrect when it gets lowercased. The code then corrects this by uppercasing the "w" and giving us a correct much better looking "Widget."

Find and replace the <phpcode> opening and closing tags with the following.

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;]]> 


Wow! Works great!! Thank you!

yingzhou 06-30-2008 02:59 AM

it work with 3.6.8 but havent tried with 3.7.0. Any idea?

River_rush 07-05-2008 03:45 PM

I can confirm with that edit that it works on 3.7.2 having just installed and tested it.
Heres the Edited XML

yingzhou 07-06-2008 04:33 AM

thank, will try this edited xml!

sbirish96 07-06-2008 05:35 PM

I'm running 3.6.4 and still can't get any of these to work. I really like the idea, but can't seem to implement it. It simply doesn't change any words.

tirol07 07-28-2008 03:39 PM

Quote:

Originally Posted by River_rush (Post 1567437)
I can confirm with that edit that it works on 3.7.2 having just installed and tested it.
Heres the Edited XML

For 3.7.x perfect. thanks :up:

NGUYENDUCTRUONG 07-30-2008 04:13 PM

its not good because it makes your Censorship PREVENT SHOUT cannot disable. Means you can't type UPPERCASE in posts|threads, all words are lowercase. I have to disable this funtion to keep Prevent Shout totally disable.

sojobo 08-20-2008 03:24 PM

This works in posts, but is there a way to make this work in my shoutbox too? (inferno shoutbox)

FreneZy 09-14-2008 01:08 PM

Hey, product does not work for my board, and I make all my CAPS characters gone tiny :/
We have the very lastest version of vBulletin.

madkeen 09-28-2008 10:47 AM

Anyone able to get this to work on 3.6.?

rapidphim 09-30-2008 08:51 PM

Quote:

Originally Posted by River_rush (Post 1567437)
I can confirm with that edit that it works on 3.7.2 having just installed and tested it.
Heres the Edited XML

It worked on 3.7.3 but however, how can we make it on different color for the replace text?

ultrmn 10-03-2008 08:37 PM

Quote:

Originally Posted by madkeen (Post 1632165)
Anyone able to get this to work on 3.6.?

No, i couldn't work this hack on 3.6.7

emdee 10-07-2008 12:06 AM

not working for my 3.7.3 install

ShackMaster 10-08-2008 03:11 PM

Did you try the edited XML file or the original file?


All times are GMT. The time now is 01:34 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.01426 seconds
  • Memory Usage 1,848KB
  • 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
  • (3)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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