Dragonfly CMS v9 ⇒ CPG-BB (forum) ⇒ Forum thread ads ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum Index Modules & Blocks CPG-BB (forum)

Forum thread ads Reply to topic


I would like to post Google ads in the forum threads. I have seen websites where the second forum post is auto inserted by the system. How can this be accomplished in DF?

XJBikes.com

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux/Apache=1.3.41/MySQL=5.0.87-community/PHP=5.2.6/DFCMS=9.2.1


in forum templates, if i remember correctly, there is a check for "first post" or something similar (this check maybe within php files) thats a start i suppose

im aware of this because i did it for a dragonflycms website ones

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
none available


Not sure if this will help but seeing DF is based on phpbb2 you might be able to hack it to make it work without too much trouble.
http://phpbbhacks.com/download/7944

[edited because I found this in a search on the forum]

http://dragonflycms.org/Forums/viewtopic/t=20656/highlight=adsense/

############################################################## ## MOD Title: Google Adsense as Second post ## MOD Author: ShadowKnyght < email @ hotmail.com > (James) http://forum.cyber-mag.com ## MOD Author Original: Dale Rodgers < dalerodgers38 @ hotmail.com > (Dale Rodgers) http://www.tntboards.com ## MOD Description: Automatically displays an advert in a topic as a post. ## MOD Version : 1.4.0 ## ## Installation Level: Easy ## Installation Time: 1 Minute ## Files To Edit: - viewtopic.php ## ## Included Files: - images/google_logo.png ## ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ## Generator: MOD Studio [ ModTemplateTools 1.0.2288.38406 ] ## ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## This MOD was made to have adverts on your forum without ruining the design. ## ## - Abilty to change the advert ## - Currently clashes with attachment mod in that if your first post has an attachment it will ## End up attached to the add block instead of your first post - no harm though probably increase ## The chance of the add being clicked. ############################################################## ## Other Notes: ## You need to replace Ad Code Here with your ad code. ############################################################## ## MOD History: ## ## ## 2007-06-07 - Version 1.4.0 ## - Google'ized the mod. Added Google Avatar and naming. ## ## 2005-02-06 - Version 1.3.7 ## - First release of the MOD ## ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]------------------------------------------ # viewtopic.php # #-----[ FIND ]------------------------------------------ # $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; # #-----[ REPLACE WITH ]------------------------------------------ # $row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2']; $num ++; # #-----[ FIND ]------------------------------------------ # 'U_POST_ID' => $postrow[$i]['post_id']) ); # #-----[ AFTER, ADD ]------------------------------------------ # if($i == $ad_after) { $row_color = ( !($num % 2) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !($num % 2) ) ? $theme['td_class1'] : $theme['td_class2']; $num ++; $mini_post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$i]['post_id']) . '#ad'; $template->assign_block_vars('postrow', array( 'ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'POST_DATE' => $post_date, 'POST_SUBJECT' => 'Please Click to support this site', 'MINI_POST_IMG' => $mini_post_img, 'POSTER_NAME' => 'Google', 'POSTER_RANK' => 'AdSense', 'POSTER_AVATAR' => '<A HREF="http://www.cyber-mag.com/googleisearch.htm" target="blank"><IMG SRC="images/google_logo.png" Border=0></A>', 'MESSAGE' => '<div align="center"><SPAN class="gensmall"> <script type="text/javascript"><!-- google_ad_client = "pub-5802988291320060"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; google_color_border = "0E0E0E"; google_color_bg = "F1F1F1"; google_color_link = "0000FF"; google_color_text = "000000"; google_color_url = "008000"; //2007-06-06: posts google_ad_channel = "0772936079"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script><BR><BR></SPAN></div>', 'L_MINI_POST_ALT' => $mini_post_alt, 'U_MINI_POST' => $mini_post_url, 'U_POST_ID' => 'ad') ); } # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM

HTH

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
Linux / 2.2.6 / 5.0.45 / 5.2.4 / Dragonfly (9.2.1)

All times are UTC


Jump to: