vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to convert charset ? (https://vborg.vbsupport.ru/showthread.php?t=247578)

Readboy 07-30-2010 07:34 AM

How to convert charset ?
 
i want convert charset of my forum but in vb4, mod convert not working.

Pls tell me how to convert charset vb4 , iso => utf8 ?

--------------- Added [DATE]1280495344[/DATE] at [TIME]1280495344[/TIME] ---------------

nobody can help me ?

--------------- Added [DATE]1280505578[/DATE] at [TIME]1280505578[/TIME] ---------------

nobody can help me ?

--------------- Added [DATE]1280550184[/DATE] at [TIME]1280550184[/TIME] ---------------

help meeeeeeeeeee

Readboy 08-01-2010 12:15 AM

upppppppppppppppppppppppppppppppppppp

Readboy 08-02-2010 01:07 PM

uppppppppppppp

borbole 08-02-2010 01:25 PM

Quote:

Originally Posted by Readboy (Post 2078155)
uppppppppppppp


Create a file called convert.php and place the following code in it

PHP Code:

<?php
// Don't forget to enter your db infos.

define('THIS_SCRIPT''convert');
require 
'./global.php';

//---------------

header('Content-type: text/plain');

$dbconn mysql_connect('servername''db_user''db_pass') or die( mysql_error() );
mysql_select_db("db_name");

$sql "ALTER DATABASE `db_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci";
$result mysql_query($sql) or die( mysql_error() );
print 
"Database changed to UTF-8.\n";

$sql 'SHOW TABLES';
$result mysql_query($sql) or die( mysql_error() );

while ( 
$row mysql_fetch_row($result) )
{
$table mysql_real_escape_string($row[0]);
$sql "ALTER TABLE $table DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci, CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci";
mysql_query($sql) or die( mysql_error() );
print 
"$table changed to UTF-8.\n";
}

mysql_close($dbconn);
?>

Enter your db info accordingly and then upload the file in the root of your forum folder and run it from the browser. But first it would be best if you backed up your db.


All times are GMT. The time now is 01:15 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.01974 seconds
  • Memory Usage 1,727KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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