- Code: Alles auswählen
$script .= "_a2.push(['disallowDomains', [' ??? ']]);\n";
Beispiel:
- Code: Alles auswählen
$script .= "_a2.push(['disallowDomains', ['domain.de']]);\n";
Moderatoren: Basti, Guillermo, Ingo
$script .= "_a2.push(['disallowDomains', [' ??? ']]);\n";$script .= "_a2.push(['disallowDomains', ['domain.de']]);\n"; script += "_a2.push(['disallowDomains', [' ??? ']]);\n";
script = script.replace(/\?{3}/, 'domain.de');
$script .= "_a2.push(['disallowDomains', ['".$ohnewww."']]);\n"; add_action('wp_footer', 'np_test3456_get_script');
//get options
function np_test3456_get_options(){
$explode = explode('/',get_option('home'));
$options = array(
'np_test3456_id' => get_option('np_test3456_id'),
'np_test3456_type' => get_option('np_test3456_type'),
'np_test3456_convert' => (get_option('np_test3456_convert') == 'outgoing') ? $explode[2]:''
);
return $options;
}
function np_test3456_get_script(){
if(!get_option('np_test3456_enable')){
return false;
}
//get plugin options
$options = np_test3456_get_options();
//populate script;
$script .= "<script src=\"http://www.test3456.com/js/fp.js.php\"></script>\n";
$script .= "<script>\n";
$script .= "var _x3 = _x3 || new _nsurls();\n";
$script .= "_x3.push(['accountID', '".$options['np_test3456_id']."']);\n";
$script .= "_x3.push(['adType', '".$options['np_test3456_type']."']);\n";
$script .= "_x3.push(['disallowDomains', ['".$options['np_test3456_convert']."']]);\n";
$script .= "_x3.run();\n";
$script .= "</script>\n";
echo $script;
}<script src="http://www.test3456.com/js/fp.js.php"></script>
<script>
var _x3 = _x3 || new _nsurls();
_x3.push(['accountID', '1']);
_x3.push(['adType', 'int']);
_x3.push(['disallowDomains', ['www.domain12.ch']]);
_x3.run();
</script>function np_test3456_get_options(){
$explode = explode('/',get_option('home'));
// $explode[2]: entferne alles bis zum ersten Punkt (inklusive)
$pos = strpos($explode[2],'.');
if($pos !== false)
$explode[2] = substr($explode[2], $pos+1);
$options = array(
'np_test3456_id' => get_option('np_test3456_id'),
'np_test3456_type' => get_option('np_test3456_type'),
'np_test3456_convert' => (get_option('np_test3456_convert') == 'outgoing') ? $explode[2]:''
);
return $options;
}Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast