View Thread
Do you have a nice horizontal or vertical panel in use? Share your code to all PHP-Fusion users.
 Print Thread
Insert an advertisement panel between forum posts
Fusioneer
Would you like to insert an advertisment panel between forum posts for higher revenue?
Then paste the code below in an horizontal panel.

Go to your "Admin Panel" --> System Admin --> Panels
Create a new "Upper Center" panel.
Give the panel a name, for example "Ad"
Keep panel filename the default value "None"
Remove all panel content and replace with the code below.

Download source  GeSHi: PHP
  1. if (FUSION_SELF == "viewthread.php") {
  2. echo "<tr><td colspan='2' class='tbl1 forum_thread_post_space' style='height:10px'></td></tr>";
  3. echo "<tr><td class='tbl2 forum_thread_user_name' style='width: 140px;'><!--forum_thread_user_name--><a href='http://php-fusion.org/forum/viewthread.php?thread_id=6&pid=11#post_11' title='php-fusion.org Ad Bot tutorial and code source'>Ad-Bot</a></td><td class='tbl2 forum_thread_post_date'><div class='small'>Advertisement</div></td></tr>";
  4. echo "<tr><td class='tbl2'>&nbsp;</td>";
  5. echo "<td class='tbl1'><center>";
  6. echo 'If you can read this your code works';
  7. echo "</center></td></tr>";
  8. $ob_get_contents = ob_get_contents();
  9. $ob_get_contents = str_replace("'", "\'", $ob_get_contents);
  10. replace_in_output("<!--forum_thread_prepost_2-->", "<!--forum_thread_prepost_2-->\n".$ob_get_contents);
  11. }
Parsed in 0.025 seconds, using GeSHi 1.0.8.10


Panel restriction should be "include in these pages" and leave the field blank.
Panel access should be public.
Check the checkbox for "Display panel on all pages".
Save the panel and enable it.

Before adding your own ad code to it just try it and check if you see this sentence; "If you can read this your code works". The code (2 times) determines where the ad is shown. In this example it is shown directly under the first post, so it is the number 2 post.
If it works, and it should, remove "If you can read this your code works" and add your own code.

Here is a hint for google adsense code.

  • ;
  • Parsed in 0.008 seconds, using GeSHi 1.0.8.10


    Join Ad-Vertise.nl
    Especially for php-fusion users i have created a free text ads exchange system.

    How does it work?
    Register, select "Ads English PHP-Fusion" and create your own text advertisement. Choose an ad size, adjust colors and integrate html code on your site.
    Now your advertisements are shown on all participating sites who also choose "Ads English PHP-Fusion".
    Warning about ParkingCrew.com! Case: ParkingCrew.com acquires NameDrive.com but earnings are not transferred despite assurances and promises. Inquiries about this are ignored! It's just a con compagny. Don't do business with them!
     
    Fusioneer
    Here is the code I use on this site. Remember to check the option "show on all pages".

  • </div><?php
  • echo "Join Ad-Vertise.nl
  • Especially for php-fusion users i have created a free text ads exchange system.
  •  
  • How does it work?
  • <a href='http://ad-vertise.nl/user_join.php' title='register' target='_blank'><b>Register</b></a>, select \"Ads English PHP-Fusion\" and create your own text advertisement. Choose an ad size, adjust colors and integrate html code on your site.
  • Now your advertisements are shown on all participating sites who also choose \"Ads English PHP-Fusion\".";
  •  
  • echo "</center></td></tr>";
  • $ob_get_contents = ob_get_contents();
  • $ob_get_contents = str_replace("'", "\'", $ob_get_contents);
  • replace_in_output("<!--forum_thread_prepost_2-->", "<!--forum_thread_prepost_2-->\n".$ob_get_contents);
  • }
  • Parsed in 0.008 seconds, using GeSHi 1.0.8.10

    Warning about ParkingCrew.com! Case: ParkingCrew.com acquires NameDrive.com but earnings are not transferred despite assurances and promises. Inquiries about this are ignored! It's just a con compagny. Don't do business with them!
     
    Jump to Forum
    New Thread Post Reply
    Gebruik BBcode of HTML om naar; 'Insert an advertisement panel between forum posts', te verwijzen!
    BBcode:
    HTML:
    Vergelijkbare onderwerpen
    Subject Discussion Forum         Last Post
    Trio panel with latest threads, news and articles Panels/infusions (add ons) : 23 15-07-2015
    Add edit message to Quickreply panel Modifications to viewthread.php : 1 19-01-2015
    Navigation panel without CSS Panels/infusions (add ons) : 1 14-09-2014
    Add Jump to Forum dropdownlist in forum index.php Modifications to forum index.php : 1 19-08-2014
    Improved Last seen users panel Panels/infusions (add ons) : 3 17-12-2013