[REQ]Read Hide post in vBulletin forum

musicazx

New Member
Plz help me to read this Post in vBulletin thank you
Code:
http://www.vbulletin.org/forum/showpost.php?p=1442948&postcount=493
 
i have the same problem. when passivevid is enabled, i get
Code:
Warning
    : Invalid argument supplied for foreach() in
    /includes/class_postbit.php(296) : eval()'d code
    on line
    39

Ok, here's a fix. This is for passiveVid - (YouTube, Myspace, Google...) Not BBCODE users ONLY.

In AdminCP > Plugins & Products > Plugin Manager, look for passiveVid - Showthread Replacement under Product : passiveVid and select [Edit].

FIND:
Code:
               foreach ($passiveVid as $k => $v) {
                   if ( $this->registry->options['passiveVid_sites'] & $v['id'] ) {
                       $this->post['message'] = preg_replace_callback($v['string'],create_function('$matches',$v['replacement']),$this->post['message']);
                       
                   }
               }
REPLACE WITH:
Code:
               if ($passiveVid) {
                   foreach ($passiveVid as $k => $v) {
                       if ( $this->registry->options['passiveVid_sites'] & $v['id'] ) {
                           $this->post['message'] = preg_replace_callback($v['string'],create_function('$matches',$v['replacement']),$this->post['message']);
                       
                       }
                   }
               }
Disclaimer:
Note that this was tested on my development board. I do not actively use passiveVid (or any video embedding tools) so I cannot be held responsible for any undesired effects that may occur as a result of making these changes.

That being said, the changes simply check for the existence of a variable. There are no destructive functions being added or implemented, however, I just like to cover my rear.
 
Top