Marco
Forum Replies Created
-
Forum: Plugins
In reply to: [Yoast SEO] Images in Twitter cards not working any moreTwitter Cards function is not working at all for me.
Tested with: https://dev.twitter.com/docs/cards/validation/validator
Result: “Unable to render card preview”
latest version of the pluginForum: Plugins
In reply to: [Ad Code Manager] Feedback, documentation, and config of DFP Asynchthere is no tag for other sizes than Leaderboard and Medium Rectangle, how can that work out of the box?
a first test showed the leaderboard inside the full banner. the full banner space is generated at the moment by another plugin.
I found that the dfp script code must be added to the header, even when the widget (head) is activated, or the ad will not show up.
Forum: Plugins
In reply to: [Ad Code Manager] Feedback, documentation, and config of DFP AsynchHere it is from the part of functions.php:
// Whitelist default double click url add_filter( 'acm_whitelisted_script_urls', 'rk_acm_whiltelisted_script_urls'); function rk_acm_whiltelisted_script_urls( $whitelisted_urls ) { $whitelisted_urls = array( 'ad.doubleclick.net' ); return $whitelisted_urls; } // Tokenize url add_filter( 'acm_default_url', 'rk_acm_default_url' ) ; function rk_acm_default_url( $url ) { if ( 0 === strlen( $url ) ) { return "https://ad.doubleclick.net/adj/%site_name%/%zone1%;s1=%zone1%;s2=;pid=%permalink%;fold=%fold%;kw=;test=%test%;ltv=ad;pos=%pos%;dcopt=%dcopt%;tile=%tile%;sz=%sz%;"; } } // Add additional output tokens add_filter('acm_output_tokens', 'rk_acm_output_tokens', 5, 3 ); /** * Let's fine tune our output tokens * This is the real example of * how easily you can modify output * depending on your ad network specs */ function rk_acm_output_tokens( $output_tokens, $tag_id, $code_to_display ) { global $dfp_tile; global $dfp_ord; global $dfp_pos; global $dfp_dcopt; global $wp_query; // We can't really rely on get_permalink() so use $_SERVER['REQUEST_URI] as bulletproof solution for generating unique pids $link = strlen( $_SERVER['REQUEST_URI'] ) > 1 ? sanitize_key( $_SERVER['REQUEST_URI'] ) : home_url(); $output_tokens['%permalink%'] = str_replace( array( '/',':', '.' ), "", $link ); $output_tokens['%random%'] = $dfp_ord; $output_tokens['%tile%'] = ++$dfp_tile; if ( false === $dfp_pos[ $code_to_display['url_vars']['sz'] ] ) { $output_tokens['%pos%'] = 'top'; $dfp_pos[ $code_to_display['url_vars']['sz'] ] = true; } else { $output_tokens['%pos%'] = 'bottom'; } if ( ! $dfp_dcopt ) { $output_tokens['%dcopt%'] = 'ist'; $dfp_dcopt = true; } else { $output_tokens['%dcopt%'] = ''; } $output_tokens['%test%'] = isset( $_GET['test'] ) && $_GET['test'] == 'on' ? 'on' : ''; return $output_tokens; } add_filter( 'acm_ad_tag_ids', 'rk_ad_tags_ids' ); /** * Let's expand default list of ad_tag_ids * with 1x1 tag used for richmedia ads */ function rk_ad_tags_ids( $ad_tag_ids ) { return array( array( 'tag' => '728x90-atf', 'url_vars' => array( 'sz' => '728x90', 'fold' => 'atf', 'width' => '728', 'height' => '90', ) ), array( 'tag' => '728x90-btf', 'url_vars' => array( 'sz' => '728x90', 'fold' => 'btf', 'width' => '728', 'height' => '90', ) ), array( 'tag' => '300x250-atf', 'url_vars' => array( 'sz' => '300x250', 'fold' => 'atf', 'width' => '300', 'height' => '250', ) ), array( 'tag' => '300x250-btf', 'url_vars' => array( 'sz' => '300x250', 'fold' => 'btf', 'width' => '300', 'height' => '250', ) ), array( 'tag' => '160x600-atf', 'url_vars' => array( 'sz' => '160x600', 'fold' => 'atf', 'width' => '160', 'height' => '600', ) ), array( 'tag' => '1x1', 'url_vars' => array( 'sz' => '1x1', 'fold' => 'int', 'pos' => 'top', ) ), array( 'tag' => '960x90-atf', 'url_vars' => array( 'sz' => '960x90', 'fold' => 'atf', 'width' => '960', 'height' => '90', ) ), array( 'tag' => '336x700-atf', 'url_vars' => array( 'sz' => '336x700', 'fold' => 'atf', 'width' => '336', 'height' => '700', ) ), array( 'tag' => '468x60-atf', 'url_vars' => array( 'sz' => '468x60', 'fold' => 'atf', 'width' => '468', 'height' => '60', ) ), ); } add_filter( 'acm_output_html','rk_acm_output_html', 5, 2 ); function rk_acm_output_html( $output_html, $tag_id ) { $ltv_script = '<!-- DFP %pos% %sz% ad tag --> <script language="JavaScript" type="text/javascript"> if (typeof ord==\'undefined\') {ord=Math.random()*10000000000000000;} if (typeof(dfp_tile) == \'undefined\') dfp_tile=%tile%; document.write(\'<script language="JavaScript" src="%url%ord=\' + ord + \'?" type="text/javascript"><\/script>\'); </script><noscript><a href="%url%ord=%random%?" target="_blank"><img src="%url%ord=%random%?" width="%width%" height="%height%" border="0" alt=""></a></noscript> <!-- //DFP %pos% %sz% tag -->'; return $ltv_script; }
Forum: Plugins
In reply to: [Ad Code Manager] Feedback, documentation, and config of DFP Asynchdamn, nevermind my last question about the widgets and sidebar: by adding the ad IDs (and the whole rest of the code) to functions.php as documented. so, something did happend! the widget got updated with the added sizes. now we are talking ??
But then again, I did add the filters that seems to be for “DFP” not “DFP Async”. In DFP-Settings in the backend I can’t find “zone 1”, maybe the terminology means now the “ad units”, eg. “Line Items”. “Zone 1” is not anymore in use since DART is now Doubleclick.
https://support.google.com/dfp_premium/bin/answer.py?hl=en&answer=158833
I’m hanging.
I did add the codes more or less the same like here:
https://vip.wordpress.com/documentation/configure-ad-code-manager-to-manage-the-advertisements-on-your-site/#google-adsense-and-doubleclick-for-publishers-asyncThe “do_action” calls work, btw. I just need those ad widgets for the sidebar.
We face exactly the same problem. the plugin stops working. Even after multiple refreshes, the relatet posts are lost next time I check in the front- or Backend. Using: WP 3.3.1 and YARPP 3.5.1