MyBB Community Forums

Full Version: HTML & PHP Code in Post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can I use HTML Or PHP Code in my Post?

Like :

<?php include("mypage.php"); ?>

Actually I want to Put Google Ads in a File & want to Include it in my Posts or Threads or in Header or Footer etc etc?

Or Can I Show Google Ads in any Thread or Post?

Thanks in Advance!
Cheers
Muhammad Faizan
If you enable HTML in the forum (edit the forum to enable this setting), then you can post HTML. There's no way to post PHP without a modification (I'd say it would be pretty unsafe).

If you want to put your google ads in your header/footer, please look at the second part of Cory's post here: http://community.mybboard.net/showthread...5#pid15835
if you want to add google adsense in your posts in the best safe way.
do the following steps..
  1. login your acp
  2. press Custom MyCode
  3. press Add MyCode
  4. add a title and description of your choice
  5. add the following in Regular expression
    \[go](.*?)\[/go\]
  6. add the following in Replacement
    <script type="text/javascript">google_ad_client ="pub-$1";google_ad_slot="3215464845";google_ad_width=468;google_ad_height = 60;</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
    Important Note: replace the replacement code with your ad unit code only change the pub-adsense id whith pub-$1 and remove any line break in the code to look like the example I post..
  7. now you can post the adsense in your posts like that
    [go]adsense id here[/go]
done!