Announcement

Collapse
No announcement yet.

Bizzarre Editing problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • G4cE
    replied
    aha now i know why it is doing it, i just gotta fix it

    i had an older version functions.php with a stars hack in it, and i put that file back in after upgrading to 2.2.2, it worked fine with 2.2.1 so they must of edited the file somehow

    i'll have to re hack a 2.2.2 file i think, or see if i can spot the changes made somewhere

    cheers for the pointer, i got a long night ahead

    G4cE

    Leave a comment:


  • Michael König
    replied
    Have you deleted or modified this code in admin\functions.php?
    PHP Code:
    // ###################### Start unindexpost #######################
    function unindexpost($postid,$title="",$pagetext="") {
        global 
    $DB_site,$vboptions;

        
    // get the data
        
    if ($pagetext=="") {
            
    $post=$DB_site->query_first("SELECT postid,threadid,title,pagetext FROM post WHERE postid='$postid'");
        } else {
            
    $post['postid']=$postid;
            
    $post['title']=$title;
            
    $post['pagetext']=$pagetext;
        }

        
    // get word ids from table
        
    $allwords=$post['title']." ".$post['pagetext'];
        
    $allwords=preg_replace("/[\n\t\r,]/s"," ",$allwords);
        
    $allwords=preg_replace("/(\.+)($| |\n|\t)/s"" "$allwords);
        
    $allwords=str_replace("["" ["$allwords);
        
    $allwords=str_replace("]""] "$allwords);
        
    $allwords=preg_replace("/[\(\)\"':;\[\]?!#{}_\-+\\\\]/s","",$allwords);
        
    $allwords=strtolower(trim(str_replace("  "," ",$allwords)));
        if (
    $titlewords)
            
    $allwords.=" ".$titlewords;
        
    $wordarray=explode(" ",$allwords);

        
    $getwordidsql="title IN ('".str_replace(" ","','",$allwords)."')";
        
    $words=$DB_site->query("SELECT wordid,title FROM word WHERE $getwordidsql");

        
    $wordids="";
        while (
    $word=$DB_site->fetch_array($words)) {
            
    $wordids .= ',' $word[wordid];
        }

        
    // delete em!
        
    $DB_site->query("DELETE FROM searchindex WHERE wordid IN (0$wordids) AND postid=$post[postid]");


    If yes, use this code to fix it

    Leave a comment:


  • G4cE
    started a topic Bizzarre Editing problem

    Bizzarre Editing problem

    hi there

    yesterday i upgraded to 2.2.2 and also installed the vbstats hack.

    Today one of my mods informed me that when he went to edit, after sumitting the edit he got a odd error.

    i tried it myself and he was right.

    the error:

    Fatal error: Call to undefined function: unindexpost() in /usr/home/f/o/forumgir/public_html/editpost.php on line 250


    the wierd thing is, it still does the edit! so it stil lworks, i just get this error

    Any ideas peeps?

    Board url: http://forums.clan-gir.net

    cheers.

    Rob
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X