Important: This page is using cookies (cookies). Using this website without turning off cookies in browser, means that you agree for using it.
Buy Now! Features Downloads

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Page 4 of 6 FirstFirst ... 23456 LastLast
Results 31 to 40 of 58

Thread: How to remove the vbet language code

  1. #31
    Retired ;)
    Join Date
    Aug 2011
    Posts
    441

    Default

    Quote Originally Posted by raymond View Post
    I looked at the code and saw this.
    <form action="clearBB.php?do=execute" method="post"><input type="submit"
    value="clear" style="width: 70%; margin-left: 15%" /></form>
    Maybe the script will have to be named as clearBB.php?
    Yes, you were right, but problem with missing token, is about other line is this code - one that gives you right to execute file.
    Consider this issue solved, or have you got any questions

  2. #32
    Senior Member
    Join Date
    Feb 2011
    Posts
    138

    Default

    Thanks Raymond. That fixed the token error for me.

    This isn't 'solved' though r.dziadusz...

    Problem after running the script: all previous apostrophes (and quotation marks) are now in Ascii Html': &#039 , &quot; Any ideas on how to fix this? (I have vbseo and tried the character replacement function - doesn't work. I also rebuilt the post cache after running the BB script - didn't change anything). Only apostrophes and quotation marks which were there before the script was run have been affected (new posts containing them will display normally) I can 'cheat' a partial fix by using vb censoring but I'd rather not.

    Also, & is showing everywhere as &amp;

    Problem 2: for some reason I have this BB code in some places: [Lang=x], [lang = x] etc How do I amend your script (clearBB.php) to kill those too?
    Last edited by norku; 11-10-11 at 12:03.

  3. #33
    Retired ;)
    Join Date
    Aug 2011
    Posts
    441

    Default

    Sorry I've marked it as solved, I supposed it work for both of you
    I will investigate why you get &#039, please tell me what charset do you use (describe how to do it, you can find it in readme.html file )
    About second problem, it appeard becouse users add "lang" code manualy
    If you want to remove ii using my script for first case [ Lang=x]
    please find these lines:

    if ((strpos($message['pagetext'], '[lang=')) !== FALSE){
    $new_message = basic_clear($new_message, '[lang=');
    }

    and put exactly after it:

    if ((strpos($message['pagetext'], '[Lang=')) !== FALSE){
    $new_message = basic_clear($new_message, '[Lang=');
    }


    -this wasn't tested is just a quick fix
    but in second case [I][ lang = x][/I] this bbcode doesn't work and it is more complicated, also can affect with some more problems, becouse you show me tag with two gaps, but i don't know if there were ones with three gaps etc, and becouse of that you can have some text cutted, i need to figure out if it is possible to remove tags like this safely.

    Edit
    About &#039 we are curently working on it pleae wait a second
    Last edited by r.dziadusz; 11-10-11 at 12:49.

  4. #34
    Senior Member
    Join Date
    Feb 2011
    Posts
    138

    Default

    Hi and thanks. I started a new thread on this so could you delete it please?

    My charset is ISO-8859-1

    Thanks also for the info on the script.

    Looking forward to hearing from you on the Ascii html thing as I would really like to get that fixed.

  5. #35
    Retired ;)
    Join Date
    Aug 2011
    Posts
    441

    Default

    Hi we still working on it, we have to overcome some temporary vbulletin issue in our test forum, sorry for delay, you will get the solution as soon as possible!

  6. #36
    Retired ;)
    Join Date
    Aug 2011
    Posts
    441

    Default

    Hi i know what seems to be the issue, I guess you use previous version of clearBB so like I said it was a beta version.
    To remove &amp etc. please restore your database from your backup just before using the robot, and create this file again exactly as is descrption:CLICK, using current - (not previous, it could create problem - sorry for that)version of script
    Last edited by r.dziadusz; 12-10-11 at 11:13.

  7. #37
    Senior Member
    Join Date
    Feb 2011
    Posts
    138

    Default

    And lose 2 days worth of posts/threads on the affected forum? I can't do that...

  8. #38
    Retired ;)
    Join Date
    Aug 2011
    Posts
    441

    Default

    Ok i can create for you another script that will remove all of it &#039 , &quot , &amp
    I'm sorry that this ASCI html codes appears, but please note that you use beta version of this product, we will do anything to help you

  9. #39
    Senior Member
    Join Date
    Feb 2011
    Posts
    138

    Default

    That would be excellent. Thanks. Will the script remove them even if they are joined onto other words like this: &quot;Munchen-Nordwest&quot; ?
    Last edited by norku; 12-10-11 at 17:27.

  10. #40
    Retired ;)
    Join Date
    Aug 2011
    Posts
    441

    Default

    It is also beta version

    1.Please create file and save it as "decode.php"
    2.Put the code below into it and save it
    3.Upload to your server, forum root
    4.Do the backup of your database
    5.Turn off your forum
    6.Log in as admin
    7.In your browser, put url with destination to your "clearBB.php"
    8.Press "clear" button
    <?php echo "<input type=\"hidden\" name=\"securitytoken\" value=\"" . $vbulletin->userinfo['securitytoken'] . "\" />\n";?>

    <p style="text-align: center">
    Use this program to change asci html code into "normal" signs
    </br>This script has big influence on your
    database and changes are permanent - <b>can not be undone</b> therefore:
    </br>
    make sure you did the <b>backup of your database!</b> and remember to <b>turn
    off your forum</b> during using this script!</p>


    <form action="decode.php?do=execute" method="post"><input type="submit"
    value="clear" style="width: 70%; margin-left: 15%" /></form>

    <?php

    function update_pagetext(&$new_message, $message_id) {
    global $vbulletin;

    $vbulletin->db->query_write("
    UPDATE " . TABLE_PREFIX . "post
    SET pagetext = '".addslashes($new_message)."'
    WHERE postid = " .$message_id
    );
    }

    function update_tittle(&$new_tittle, $tittle_id) {
    global $vbulletin;

    $vbulletin->db->query_write("
    UPDATE " . TABLE_PREFIX . "post
    SET title = '".addslashes($new_tittle)."'
    WHERE postid = " .$tittle_id
    );
    $vbulletin->db->query_write("
    UPDATE " . TABLE_PREFIX . "thread
    SET title = '".addslashes($new_tittle)."'
    WHERE firstpostid = " .$tittle_id
    );
    }


    require_once('./global.php');


    if ($_REQUEST['do'] == 'execute') {
    $to_remove = array("&gt;", "&lt;", "&amp;", "'", "&quot;");

    $result = $vbulletin->db->query_read("SELECT * FROM ".TABLE_PREFIX."post WHERE pagetext LIKE '%&gt;%' OR pagetext like '%&lt;%' OR pagetext like '%&amp;%' OR pagetext like '%&#039%' OR pagetext like '%&quot;%' OR title LIKE '%&amp;%' OR title LIKE '%&#039%' OR title LIKE '%&lt;%' OR title LIKE '%&gt;%' OR title LIKE '%&quot;%' " );
    while ($message = $db->fetch_array($result)){
    $new_message = $message['pagetext'];
    if ((strpos($message['pagetext'], '&gt;')) !== FALSE){
    $new_message = str_replace('&gt;','>',$new_message);
    }
    if ((strpos($message['pagetext'], '&lt;')) !== FALSE){
    $new_message = str_replace('&lt;','<',$new_message);
    }
    if ((strpos($message['pagetext'], '&amp;')) !== FALSE){
    $new_message = str_replace('&amp;','&',$new_message);
    }
    if ((strpos($message['pagetext'], '&#039')) !== FALSE){
    $new_message = str_replace('&#039',"'",$new_message);
    }
    if ((strpos($message['pagetext'], '&quot;')) !== FALSE){
    $new_message = str_replace('&quot;','"',$new_message);
    }

    update_pagetext($new_message,$message['postid']);

    $new_title = $message['title'];
    if ((strpos($message['title'], '&gt;')) !== FALSE){
    $new_title = str_replace('&gt;','>',$new_title);
    }
    if ((strpos($message['title'], '&lt;')) !== FALSE){
    $new_title = str_replace('&lt;','<',$new_title);
    }
    if ((strpos($message['title'], '&amp;')) !== FALSE){
    $new_title = str_replace('&amp;','&',$new_title);
    }
    if ((strpos($message['title'], '&#039')) !== FALSE){
    $new_title = str_replace('&#039',"'",$new_title);
    }
    if ((strpos($message['title'], '&quot;')) !== FALSE){
    $new_title = str_replace('&quot;','"',$new_title);
    }
    update_tittle($new_title, $message['postid']);
    }
    }
    ?>
    Last edited by r.dziadusz; 18-10-11 at 19:36.

Page 4 of 6 FirstFirst ... 23456 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •