Page 1 of 1
[SOLVED] Posting HTML code not working

Posted:
Mon Apr 23, 2007 3:57 pm
Author: .QUACK.Major.Pain
Your phpBB Version: 2.0.
phpBB Type: Integramod 141
MODs: No
Your knowledge: Beginner
Board URL: http://www.aaquacks.com/forum PHP Version: MySQL Version: What was done before the problem appeared? What was done to try to solve the problem? De.scription and MessageI'm trying to post a google adsense banner in a post using the hmtl code they provide, but doesn't show the banner. It shows some chewed up code.
Code I'm using:
<script><google_ad_client>
</script>
<script>
</script>
My results:
<script><google_ad_client>
</script>
<script>
</script>
I tried "Disable BBCode", using Code and PHP functions above. (didn't think they would work but had to try.
HMTL is set to ON for posting, so should work but not.
Any ideas???
Re: Posting HTML code not working

Posted:
Mon Apr 23, 2007 5:24 pm
Author: Helter
in acp/general admin/Configuration
choose "allow html"
It is a security risk though to allow html in posts
Re: Posting HTML code not working

Posted:
Mon Apr 23, 2007 5:51 pm
Author: .QUACK.Major.Pain
As I said above it is already turned on.
It shows under post screen
HTML is ON
Not working.

Posted:
Tue Apr 24, 2007 12:38 am
Author: Whisky
same on my board, HTML code in posts is not working and the HTML is ON
that's not a big deal but I would like to understand why
Re: Posting HTML code not working

Posted:
Tue Apr 24, 2007 2:29 am
Author: Frost
I can offer a temporary solution for adding your adsense until Helter looks this over for you because as he said it is a major security risk enabling HTML code in your posts. (Look at myspace.. sorry cheap shot <img> )
Anyways, I can show you how to alter your code to make the adsense appear on the post's page somewhere on every page of posts if you'd like.
For example, show ads as second post, show ads above every first post, or after every last post etc...
For the actual problem, I think it's either an error in code in posting.php or you're trying to use this html in your signature
let's see if it's getting set
Open posting.php
Find,
- Code: Select all
$html_on = 0;
If it doesn't exist then you do indeed have it enabled
To double check
Find,
- Code: Select all
$html_on = 1;
Re: Posting HTML code not working

Posted:
Tue Apr 24, 2007 4:46 am
Author: .QUACK.Major.Pain
Found it and it was 0 - changed it to 1 and same result - still not working
Also there are extra spaces after ?> - removed them but still not working.
Re: Posting HTML code not working

Posted:
Thu Apr 26, 2007 6:04 am
Author: Frost
Hmm, did you try adding the code you were going to use?
See Demo: [url=http]HERE[/url]

Posted:
Thu Apr 26, 2007 6:38 am
Author: shedt_v
Will this work with the KB? I want to use html in a KB article.
Re: Posting HTML code not working

Posted:
Thu Apr 26, 2007 6:42 am
Author: Frost
I'm not sure, it should, but you might want to wait for HelterSkelter's reply because I don't ever use the KB

Posted:
Thu Apr 26, 2007 3:51 pm
Author: shedt_v
I think I was just putting in the wrong tags. I was not using the <
My questions is, for the KB config, how can I make the allowed tags text input box where i type in, bigger? Or what file would I need to edit?
I guess I'll take a peek in the admin tpl files.

Posted:
Thu Apr 26, 2007 6:16 pm
Author: shedt_v
ok, I pretty much have done what I needed, but I can't get this code to display correctly in a KB article.
If anyone knows how I can add it to anything else (block, forum post) anything, please let me know.
[code]<frameset> <frame name="menu" src="http]
The first src as you can see is a KB article with only the links. It works prefect, but I want to get rid of the html file (i'm going to need to create more i think anyways)
If not it's not big deal, but it would be awesome if someone could give me a tip.
take care.
Re: Posting HTML code not working

Posted:
Fri Apr 27, 2007 1:46 pm
Author: .QUACK.Major.Pain
Frost I tried doing that demo you posted and when I click submit I got the following error:
Forbidden
You don't have permission to access /forum/admin/admin_board.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------------------------------------------
Apache/1.3.34 Server at
http://www.aaquacks.com Port 80
Is that a problem with the host?
Re: Posting HTML code not working

Posted:
Fri Apr 27, 2007 8:25 pm
Author: Frost
Hmm check the permissions, it should be 644
If it is, make sure your cookie settings are right, that you are logged in as board founder, and as a last resort, delete cookies, and re-login
Re: Posting HTML code not working

Posted:
Sat Apr 28, 2007 1:00 pm
Author: .QUACK.Major.Pain
It is chmod 644, deleted cookies and re-logged in.
Tried again with the same error.
I then tried adding just ,<script> without the </script> and
I then got a CT error.
Debug info:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Script-Filename: /forum/admin/admin_board.php ---------------- Request-Method: POST Matching rule: <.script In variable: allow_html_tags Possible solution: ------------------ # #-----[ OPEN ]------------------------------------------ # /forum/admin/admin_board.php # #-----[ FIND ]------------------------------------------ # define('IN_PHPBB', 1); # #-----[ AFTER, ADD ]------------------------------------------ # define('CT_SECLEVEL', 'MEDIUM'); $ct_ignorepvar = array('allow_html_tags'); # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM
Sry quote messed up - logmanager posted it weird.
Did the suggested debug and no more error
Tried adding both again but post still messed up.
Tried adding .script and tried adding .script,/.script without <>, still messed up.
No fix yet.
Re: Posting HTML code not working

Posted:
Sun Apr 29, 2007 1:02 pm
Author: Frost
Hmm, I'll try adding it to my board, and go through everything I can think of, then I'll post back if I get it to work
Re: Posting HTML code not working

Posted:
Sun Apr 29, 2007 10:53 pm
Author: tekguru
"Frost";p="24359" wrote:Anyways, I can show you how to alter your code to make the adsense appear on the post's page somewhere on every page of posts if you'd like.
For example, show ads as second post, show ads above every first post, or after every last post etc...
Frost I'd be very interested in the above.....
Re: Posting HTML code not working

Posted:
Mon Apr 30, 2007 4:42 pm
Author: Frost
Ok, show me the code they gave you and I'll show you how to add it
Also, where do you want the ad to appear?
Re: Posting HTML code not working

Posted:
Mon Apr 30, 2007 4:47 pm
Author: .QUACK.Major.Pain
My code is at beginning of this thread.
I wanted to put it in a post and react the same as if it was in a banner.
Re: Posting HTML code not working

Posted:
Mon Apr 30, 2007 5:19 pm
Author: Frost
I was talking to tekguru there, but in reply to you, I have tried to add the code myself to my forum and get the same result.
I am currently digging through files and looking for the preg_replace but I'm having no luck as of yet.
Either way, I think it is a very bad idea to allow anyone but yourself to use html in their posts. I don't think you grasp what people can do with html. I could take down your entire site if I could use html...
Anyway, after you posted last, all you're wanting to do is have the ads appear in the post?
I thought for some reason you wanted to manually ad the code in a post. There is no need for this as there are plenty of mods, and different ways, to do this without allowing html on your board.
I will post a follow up with some mods that do what (I think you ALL are looking for).
Re: Posting HTML code not working

Posted:
Mon Apr 30, 2007 5:45 pm
Author: .QUACK.Major.Pain
No problem. I was just looking to get the banner that the above code would produce in a post.
We are putting an area in our forum for information on how to make money on the side by advertising.
I have added other sites, but the above code uses html and I don't know enough to convert it.
Also wanted it to work so that we get the credit for the referal if someone chooses to join by clicking our banner.
Thx ahead of time!!!
Re: Posting HTML code not working

Posted:
Mon Apr 30, 2007 6:04 pm
Author: Frost
To add your google adsense between the 1st and 2nd postsSTOP! - Backup your files first!Open viewtopic.phpFind- Code: Select all
include($phpbb_root_path . 'common.'.$phpEx);
After, Add- Code: Select all
$adblocktext = <<<EOM<tr><td>Insert your Google AdSense Code Here</td></tr> <tr><td><imgsrc></td></tr>EOM;
Find- Code: Select all
for($i = 0; $i <total_posts> $l_edited_by,
After, Add- Code: Select all
'AD_BLOCK' => $adblock,
Open viewtopic_body.tplFind (Second instance, around line 200)
- Code: Select all
<END>
Before, Add - Code: Select all
{postrow.AD_BLOCK}
Save, Close all files-------------------------------------------------------------------------------------
Now, you need to edit a few parts of these instructions.
You need to replace
"Insert your Google AdSense Code Here" with your ad code. For this test I used the code that
.=QUACK=.Major.Pain supplied in an earlier post.
You also need to replace
"templates/yourtheme/images/spacer.gif" with whatever theme you are using. Or at least any theme that you know you will keep. (spacer is transparent)
You can edit or play around with this to achieve the best results for you.
Have fun <img>
Re: Posting HTML code not working

Posted:
Mon Apr 30, 2007 6:24 pm
Author: .QUACK.Major.Pain
That would put between 1st and 2nd of all posts in all topics?
Re: Posting HTML code not working

Posted:
Tue May 01, 2007 3:46 am
Author: Frost
yes
Re: Posting HTML code not working

Posted:
Tue May 01, 2007 4:40 am
Author: .QUACK.Major.Pain
Ok thx - not what I was looking for.
Already have adsense in my banners, so would just be duplicating.
Was looking to use in a single post as a how to guide for making money with adsense.
Re: Posting HTML code not working

Posted:
Tue May 01, 2007 5:55 am
Author: Frost
You would have to figure out why you cannot use java.script/html in your posts. I've looked but I don't know why it is like that. Obviously something somewhere is replacing instances of <script> with <script>, may be java.script blocking, not html.
Why don't you just make a small html page with the code inside, then use IntegraMOD's "Insert Web Page" to show it in a post?
Re: Posting HTML code not working

Posted:
Tue May 01, 2007 11:47 am
Author: .QUACK.Major.Pain
Ok - see what I can dream up. LOL
Sounds possible.
Re: Posting HTML code not working

Posted:
Tue May 01, 2007 1:10 pm
Author: .QUACK.Major.Pain
ok I took an attempt at it.
I tried this:
<html>
<script><google_ad_client>
</script>
<script>
</script>
</html>
I first tried the code as is and didn't work.
I added the <html> and </html> and didn't work
you can see my results here:
http://www.aaquacks.com/forum/adsense.htmlI need a little help with the proper coding cause I suck LOL.
Re: Posting HTML code not working

Posted:
Wed May 02, 2007 1:32 pm
Author: .QUACK.Major.Pain
I hope someone can get the html working in posts.
We also use a Buy/Sell/Trade section and want to use "Buy Now" paypal button, and it's also in html.
If html is such a security risk, why is it that paypal, adsense, youtube, metcalfe, and others only provide html coding?
Re: Posting HTML code not working

Posted:
Wed May 09, 2007 8:13 pm
Author: .QUACK.Major.Pain
No ideas for a fix yet?
Re: Posting HTML code not working

Posted:
Sun Jul 22, 2007 12:26 pm
Author: Helter
you must add any html tags you want to use in the "Allowed HTML tags" section of Genral Admin/Configuration
add "table,object,tr,td," to "Allowed HTML tags"
in your forum root, make a folder called html.
you need to add 2 files to it.
first make an empty file named index.html - this will keep users from browsing the contents of the folder.
next make a file called "google.html" add the text below to this file
[web height=350:5vlnugdq]http://www.integramod.com/html/google.txt[/web:5vlnugdq]
add the text below to your post or sig
[code] <table> <tr> <td> <OBJECT data="http]
this is the output
<table>
<tr>
<td>
<OBJECT>
Warning: google.html could not be embedded.
</OBJECT>
</td>
</tr>
</table>
Re: Posting HTML code not working

Posted:
Sun Jul 22, 2007 1:52 pm
Author: .QUACK.Major.Pain
Ok thx Helter. We were having problem with the .script code before.
I actually figured out the problem by looking at your last reply.
I was putting in ACP>General Admin>Configuration
Allowed html: .script, td, tr, etc.
When doing it, I was putting in spaces after the , which frigs it all up.
If it's done without, .script,td,tr,etc everything works fine.
I've tried it and have got both google ads and pay now button to work great.
Thanks again Helter.
Re: Posting HTML code not working

Posted:
Sun Jul 22, 2007 2:01 pm
Author: .QUACK.Major.Pain
solved