vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Replace character of thread titles. (https://vborg.vbsupport.ru/showthread.php?t=310660)

HenryRocket 04-21-2014 06:13 PM

Replace character of thread titles.
 
Hello friend vbulletin, I have a request; I need to replace some characters in only thread title created.

For example : "Im have one question" to 'Im have Question'

Character is " to ' , any plugin or hook to recommend me?

Thanks so much and advance.

Seven Skins 04-21-2014 09:57 PM

You can run queries in phpmyadmin:

Code:

UPDATE thread SET title = REPLACE(title,'"','\'');
UPDATE post SET title = REPLACE(title,'"','\'');

PS. Make database backup before doing anything like this to the database.

HenryRocket 04-22-2014 07:51 AM

Thanks for u help, but this is not what I need. What I need is that when the user creates an issue when using this symbol " can not be used and it is replaced by this '

please see my idea, im only search for vbulletin 3 :(
https://vborg.vbsupport.ru/showpost....39&postcount=1

Seven Skins 04-22-2014 11:46 AM

1 Attachment(s)
You can edit "class_dm_threadpost.php" file.

Find:
Code:

$title = preg_replace('/&#(0*32|x0*20);/', ' ', $title);
Add below:
Code:

$title = str_replace('"', "'", $title);
This is working on vb 4.2.2

HenryRocket 04-23-2014 10:42 PM

Thanks so much SeveSkin this working. Thanks so much again!


All times are GMT. The time now is 02:18 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.01048 seconds
  • Memory Usage 1,713KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete