obey robots.txt
May 19 2013 18:01:54
Navigation
View standard Themes
Switch to:
Forum Threads
Newest Threads
BBcode overview page
Trio panel with late...
Insert an advertisem...
Install PHP-Fusion, ...
Messages.php no limi...
Hottest Threads
BBcode overview page [0]
Latest Articles
No Articles available
Facebook Like
Portfolio
BetterClimate.Net
Classifieds.Start-Pages
Daily-Breaking-News.Com
PHP-Fusion.Asia
PHP-Fusion.Cn
PHP-Fusion.Fr
PHP-Fusion.in
PHP-Fusion.Org
WebHostingTrouble.Com
WebMasterTrouble.Com
View Thread
 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&amp;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.051 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 <!--forum_thread_prepost_2--> (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.

Download source  GeSHi: PHP
  1. echo '<script type="text/javascript">
  2. //--></script>
  3. <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>';
Parsed in 0.047 seconds, using GeSHi 1.0.8.10

.
 
Jump to Forum:
Users Online
Guests Online: 1

Members Online: 0

Total Members: 20
Newest Member: Craig
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Last Seen Users
Fusioneer08:28:42
Shoutbox
You must login to post a message.

No messages have been posted.
Member Poll
PHP-Fusion, I might try it.

Yes
Member Poll: PHP-Fusion, I might try it. Yes 100% [3 Votes]
100% [3 Votes]

No
Member Poll: PHP-Fusion, I might try it. No 0% [0 Votes]
0% [0 Votes]

Maybe
Member Poll: PHP-Fusion, I might try it. Maybe 0% [0 Votes]
0% [0 Votes]

Votes: 3
You must login to vote.
Started: 20.10.11
81,090 unique visits