Etichetă: wordpress advanced excerpt youtube

advanced excerpt & video quicktags

This article has been written before more than 24months, information might old.

Am vazut ca lumea cauta tare ( aici si aici ) cum sa foloseasca impreuna plugin-ele advanced excerpt si viper video quicktags , este destul de simplu trebuie sa facem cateva modificari mici la advanced-excerpt.php .

1. Deschide advanced-excerpt.php

2. Cauta :

if(1 == $no_shortcode) $text = strip_shortcodes($text);

3. Adauga Dupa :

else {
 $nrfound = preg_match_all("/\[[
youtube|googlevideo|vimeo|dailymotion|blip|
viddler|wmv|mpeg|avi|video|videofile|flash|quicktime|flv|
myspace|spike|ifilm|flickrvideo|flickr video|wpvideo|
metacafe|veoh|gvideo]*\]/",$text, $ShortTgs );
               if( $nrfound > 0){
               $length += (45*$nrfound);
               $VideoExists = true;
               }
            }

4. Cauta

$text = apply_filters('the_content', $text);

5. Adauga Dupa :

        $sscrasons="";
        If($VideoExists){
        $vscrvss = preg_match_all("/<script&#91;^>]*>.*<\/script>/s",$text , $mmm );
        if($vscrvss > 0) {
        $sscrasons = "";
        foreach($mmm[0] as $varscrons ) $sscrasons.=$varscrons;
        }
            }

6 Acceseaza http://siteul-tau/wp-admin/options-general.php?page=options-advancedexcerpt si adauga object si script in allowed tags . Acum ar trebui sa mearga .

Paternurile sunt scrise cam prost pot fi rescrise stiu , am sa le rescriu daca am timp .…