vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Administrative and Maintenance Tools - Fix the weird characters/symbols in posts. (https://vborg.vbsupport.ru/showthread.php?t=239234)

borbole 03-27-2010 10:00 PM

Fix the weird characters/symbols in posts.
 
1 Attachment(s)
This mod will allow you to fix the weird characters/symbols that appear at your forum when you move hosts and/or reatore a database due to the coallition characters conflict in the db.
For ex when all your posts appear with a bunch of ÂÂ@@ or whatever characters. All you have to do is enter those weird characters at the mod settings and then enter the right symbols that you want to replace and all your problems will be solved.

It can aslo be used to replace text. It can be whatever text you want.

Installation:

To install the mod, upload the includes folder to your forum root folder and then import the wierd_symbol_fix.xml file inside the mod package to Plugins&Products in the acp of your forum. Then go to the mod setting option: Fix Wierd Symbols. It can be found on the left side of the Admin Panel, right above the Maintenace section. And enter the information accordingly.

Note: After doing the replacement, go to: Admin CP -> Maintenance -> Update Counters and run Rebuild Post Cache.

Juggernaut 03-28-2010 12:07 AM

tagged for later :D

ProFifaLeagues 03-28-2010 12:30 AM

Tagged as will come in handy!Great work.

Professional2 03-28-2010 04:16 AM

tagged

steve1966 03-28-2010 01:41 PM

it worked once then if i deleted the thread and tried agin it did not work but showed as working in the thread in editing mode

borbole 03-28-2010 03:14 PM

Quote:

Originally Posted by steve1966 (Post 2011608)
it worked once then if i deleted the thread and tried agin it did not work but showed as working in the thread in editing mode

If you deleted the thread it is normal that it won''t work as the posts for that thread will be gone. But it will work on all the other posts at your forum.

steve1966 03-29-2010 12:22 PM

thanks for informing

borbole 03-31-2010 08:15 PM

No problem.

Manoel J?nior 04-26-2010 07:26 PM

Great man!!!!

Thanks

Blooded 08-11-2010 04:00 AM

Tagged maybe in the future i will need it, hope not.

alhindasi 08-14-2010 08:09 PM

waaaaaaaaaaaaaw 100%

it's working good

**BUT**


i need to fix and Replace many Word

Is it possible to add many Word

rajubd 08-14-2010 11:00 PM

some of my attachment showing wierd character is it going to work on attachment?

gusfune 08-26-2010 04:00 AM

One question: will this avoid characters breaking again? I mean, if it's something is causing all new posts to break, will this just fix the characters or is there any bug-fix inside the plugin?

Thanks.

Threepwud 09-11-2010 10:42 AM

I am trying to change ' to an apostrophe ' but it makes my page display a database error:

Database error in vBulletin 4.0.6:
Invalid SQL:
UPDATE thppost
SET pagetext = replace(pagetext, 'I'', ''');
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''')' at line 2
Error Number : 1064
Request Date : Saturday, September 11th 2010 @ 12:34:43 PM
Error Date : Saturday, September 11th 2010 @ 12:34:43 PM
Script : http://www.threepwud.com/vb/showthre...ndings?p=46049
Referrer : http://www.threepwud.com/vb/forum.php
IP Address : 94.170.240.143
Username : Threepwud
Classname : vB_Database
MySQL Version : 5.1.41

Any ideas?
Thanks mate

borbole 09-11-2010 10:52 AM

Quote:

Originally Posted by Threepwud (Post 2096634)
I am trying to change ' to an apostrophe ' but it makes my page display a database error:

Database error in vBulletin 4.0.6:
Invalid SQL:
UPDATE thppost
SET pagetext = replace(pagetext, 'I'', ''');
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '''')' at line 2
Error Number : 1064
Request Date : Saturday, September 11th 2010 @ 12:34:43 PM
Error Date : Saturday, September 11th 2010 @ 12:34:43 PM
Script : http://www.threepwud.com/vb/showthre...ndings?p=46049
Referrer : http://www.threepwud.com/vb/forum.php
IP Address : 94.170.240.143
Username : Threepwud
Classname : vB_Database
MySQL Version : 5.1.41

Any ideas?
Thanks mate

Can you tell me what test/character you want to replace and what with?

Threepwud 09-11-2010 10:56 AM

I mentioned that my apostrophes are showing as & # 0 3 9 ; (without the spaces, here it changes to an apostrophe!) so I want to change ' into an apostrophe.

Is this mod able to do that? Cheers mate

borbole 09-11-2010 11:04 AM

Quote:

Originally Posted by Threepwud (Post 2096637)
I mentioned that my apostrophes are showing as & # 0 3 9 ; (without the spaces, here it changes to an apostrophe!) so I want to change ' into an apostrophe.

Is this mod able to do that? Cheers mate

Yes, that is able to do it. It can replace any text and character.

Anyway, you are using a single quote and as such you should escape it with the backslash character \

i.e. you should enter the character like this:
Code:

\'
at Wierd Symbol & the Replaced Text. I just tried it at my test site and it worked fine.

Threepwud 09-11-2010 11:17 AM

Alright, I changed it so my replaced text said \' and it didn't work - then also tried it with \**** and that didn't work.

I'm thinking maybe because it is between other characters. ie i****m has the characters between the I and M characters.

borbole 09-11-2010 11:21 AM

Quote:

Originally Posted by Threepwud (Post 2096640)
Alright, I changed it so my replaced text said \' and it didn't work - then also tried it with \**** and that didn't work.

I'm thinking maybe because it is between other characters. ie i****m has the characters between the I and M characters.

After you ran it, did you update the counters as well as mentioned in bold at the bottom of the first post here :)

Note: After doing the replacement, go to: Admin CP -> Maintenance -> Update Counters and run Rebuild Post Cache.

Threepwud 09-11-2010 11:29 AM

HA! I did indeed miss that counter update. You sir are a genius.

The only thing I've noticed is that the forum slows down after I've enabled the mod. I'll look into that.

Thanks very much!

edit: after running your brilliant mod and then updating the counters, I simply disabled it and the place went faster again. Awesome stuff.

Could this mod be used to fix my quoting issues too?
[quote author=Jer link=topic=1118.msg46798#msg46798 date=1284059913]
comes from the SMF import and maybe if I can change them all...?

borbole 09-11-2010 11:33 AM

Quote:

Originally Posted by Threepwud (Post 2096642)
HA! I did indeed miss that counter update. You sir are a genius.

The only thing I've noticed is that the forum slows down after I've enabled the mod. I'll look into that.

Thanks very much!

You are welcome. Glad to see that you got it solved :)

After you use the mod you can disable it. And re-enable it again when you want to perform similiar tasks.

Threepwud 09-11-2010 11:38 AM

Quote:

Originally Posted by Threepwud (Post 2096642)

edit: after running your brilliant mod and then updating the counters, I simply disabled it and the place went faster again. Awesome stuff.

Could this mod be used to fix my quoting issues too?
[quote author=Jer link=topic=1118.msg46798#msg46798 date=1284059913]
comes from the SMF import and maybe if I can change them all...?

LOL, one step ahead of you. Did you note the quote issue?

borbole 09-11-2010 11:43 AM

Quote:

Originally Posted by Threepwud (Post 2096649)
LOL, one step ahead of you. Did you note the quote issue?

I had quoted your post before you added the part about the quote. Can you post a link to how it is displayed after the conversion? Or a screenshot.

Threepwud 09-11-2010 11:47 AM

<a href="http://www.threepwud.com/vb/showthread.php/3157-Freaky-speed-bump" target="_blank">http://www.threepwud.com/vb/showthre...aky-speed-bump</a>

There are plenty of quotes there. It slightly differs from VB quotes and I'll understand if it isn't as straight forward as the apostrophe matter!

Kind regards,
Threep

borbole 09-11-2010 01:01 PM

Quote:

Originally Posted by Threepwud (Post 2096653)
http://www.threepwud.com/vb/showthre...aky-speed-bump

There are plenty of quotes there. It slightly differs from VB quotes and I'll understand if it isn't as straight forward as the apostrophe matter!

Kind regards,
Threep

I have converted seevral smf forums to vB and I never experienced that with the quotes. Anyway, that is outside of this mod funcionality. Try to ask it at the Impex forum over at vb.com.

Threepwud 09-11-2010 01:12 PM

Thanks mate, I've asked and a couple have had the issue. Seems you need to tweak impex before the import. Ah wells.

I used your mod to change \[quote author= to \[quote= and whilst the links don't work the threads look amazingly better.

Thanks for your effort - I must point out for your next release that it is WEIRD and not WIERD!

borbole 09-11-2010 01:23 PM

[QUOTE=Threepwud;2096675]Thanks mate, I've asked and a couple have had the issue. Seems you need to tweak impex before the import. Ah wells.

I used your mod to change \[quote author= to \[quote= and whilst the links don't work the threads look amazingly better.

Thanks for your effort - I must point out for your next release that it is WEIRD and not WIERD![/QUOTE]

Thank you for the correcting my typo :) English is not my first language so my grammer is not very good.

I can''t believe it that no one else caught on it before and it has been up for months now :D

CrystaStarLight 09-13-2010 12:35 AM

This mod made my showthread.php load very slowly. Perhaps this could use some optimization?

This is what my debug said when the mod was turned on:

# 18.41910 seconds
# Memory Usage 9,335KB
# Queries Executed 25 (?)

This is after I disabled the mod:

# 0.59638 seconds
# Memory Usage 9,335KB
# Queries Executed 14 (?)

It also depended on how many replies were in the thread. If the thread had around 2 replies the thread page loaded okay, but if it had 12 replies it would load like it is shown above. That debug was shown on a thread with 12 replies.

Threepwud 09-13-2010 12:06 PM

I had the same; I changed what I needed then refreshed the post cache in the update counters section. Then I turned it off straight after - the changes had been made and the mod was switched off.

Good stuff.

borbole 09-13-2010 01:28 PM

Indeed. After the mod does its thing then you can disable or even uninstall it.

CrystaStarLight 09-13-2010 04:43 PM

Oh, you don't need to keep the mod on after it's run? Awesome thanks. =)

borbole 09-13-2010 04:44 PM

Quote:

Originally Posted by CrystaStarLight (Post 2097655)
Oh, you don't need to keep the mod on after it's run? Awesome thanks. =)

No, that is not needed.

Rafa-el 10-03-2010 02:11 AM

Question, it works only for one char each time? I mean, add the char, and then update the message cache?

1hko 10-03-2010 12:48 PM

Does this work for usernames too? I switched over yesterday and have a BUNCH of weird usernames now.

Blooded 10-17-2010 12:48 AM

Quote:

Originally Posted by 1hko (Post 2106307)
Does this work for usernames too? I switched over yesterday and have a BUNCH of weird usernames now.

i think you should make a db query to do that

PHP Code:

UPDATE user SET username='changedusername' WHERE username='originalusername' 

This mod only work with post table not user and that is what you need

OldSchoolDSL 10-17-2010 01:37 AM

not installed, but tagged for possible later use

Thank you.

amorosso 11-07-2010 07:45 PM

Can you update this for 4.0.7 or 4.0.8

DocZaius 04-16-2011 08:06 PM

I'm having the same problem that Threepwud had.

Quotation marks got changed to &quot;
Apostrophes got changed to& # 3 9 ; (without the spaces)
Colons got changed to & # 5 8 ; (without the spaces) which really messes up URLs.
Periods got changed to & # 4 6 ; (without the spaces) which also messes up URLs.

And, of course there's the problem with the quotes.

However, your mod doesn't seem to fix this on my forum, which is running vB 4.1.3. It's making me a sad panda. Any tips?

un? in? 07-12-2011 01:19 PM

Thank for mod
Thank for share

danswano 07-12-2011 03:49 PM

Hello borbole,

can you tell me how this mod works exactly, is it like variable replacement in template or like banned words that replaces bad word with *
i mean it just convert them for users view or it replaces them permanently in the database?

Thanks. :)


All times are GMT. The time now is 05:48 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.01246 seconds
  • Memory Usage 1,829KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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