I am officially the stupidest forum member. On TP 1 there is no scriptbox, so how do I add in my code for adsense? HTML and Javascript doesn't work, it just shows up as the code on it.
There has been a scriptbox on every version of TP that I can remember and I've been using it since version .74. I believe you are either missing some code and/or have incorrect file permissions. You have to check the code and manually add what is missing.
Manual Install Guide (http://docs.tinyportal.co.uk/index.php?topic=140)
I don't see it on any of the dropdown options, and I had no problems installing TP.
Permissions are all right too, and I'm not missing anything. Everything else is there.
voyager,
It would be nice if you would Please Read and Follow the Posting Guidelines (http://www.tinyportal.net/index.php/topic,581) so that we would know which version of TinyPortal you are using.
If you are using TP 1.0 beta 4, use the block type "HTML & Javascript Code". Once you have saved the block for the first time the editor will show up. Down near the bottom of the editor you will see a button that looks something like this in green --> <>
Click that and you will be able to post your code into the code area.
ZarPrime
Ah thanks! That's probably what my problem is.
Hmm, when I press the HTML button nothing happens. I'm using 1.0.4.
Is the highlighted button shown in the pic below the one that you are trying to push and it's not working?
ZP
Yep. When I press it nothing happens.
Well, if that is the case then I have no idea what's going on. Something must not have gotten installed correctly when you upgraded.
Do this ...
Change your block to a php block and paste your code in. Save it and then change the block to an HTML & Javascript block and then save it again and see if that works.
ZP
BTW, are you using a custom theme while you are doing this?
ZP
Yes it is a custom theme. I'll try it.
When I change it back to HTML and Javascript it goes blank. I didn't upgrade from anything, I just fresh installed 1.0.4.
Here's the adsense I'm trying to paste in, is there anything wrong with it?
<script type="text/javascript">
<!--google_ad_client = "pub-1226564767153163";
/* 728x90, Erstellt 05.07.09 */
google_ad_slot = "8101615957";
google_ad_width = 728;
google_ad_height = 90;//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
I don't know anything about this code. Maybe it takes a while for it to kick in. I seem to remember reading something about that before. Maybe somebody else knows.
ZarPrime
Yeah I have adsense on one of my sites. It can take a while to start working. If you get a blank page after doing what ZarPrime said, then maybe it is actually working but the ads aren't ready yet.
No the text in the editor dissapears when I change the block back from PHP to HTML.
Start again with a Script type block.
There's no option for that.
Scriptbox. It's still an option as far as I know.
Nope, on the dropdown it's missing...that's why I started this topic in the first place.
I'd turn off the Editor in the options. And if that doesn't help, then you'll need to run through the manual install guide and make sure all of the files have been edited correctly.
I can confirm there is no Script block.
But using my existing script for adsense I got it to work fine with the HTML & Javascript setting.
I did this:
• Add left block
• Choose HTML & Javascript from the drop down.
• You get a prompt to save it because the block type has changed.
So I saved it.
• Then pressed the HTML button <>. The form changes to a grey background with green ink.
• IPasted in my adsense code.
• Set the areas where it was viewable and activated it.
• Then saved the whole thing.
I did notice that the adsense code gets altered by TP somehow. When I went back to look at the code there was a whole bunch of other code in there too. Not sure why but the whole thing works.
Now I tried this with your adsense code too, and when displayed on the forum it is blank, making me think it is not active yet...hence my earlier point.
As you can see from my screeny...there is no longer a 'Script' block. You can see behind the drop down it does actually work.
Same thing, only it's been renamed and I haven't bothered upgrading my site for ages.
Turn the editor off, it isn't helping.
Then pressed the HTML button <>. The form changes to a grey background with green ink.
Mine isn't doing that for some reason. Nothing happens when I press the <>.
How do you turn off the editor?
Just turn it off.. I have no problems with ads, mainly because I'm not using an editor. It messes with the code. When You've got it working right, turn it back on again.
[Edit] Don't tell me there's no way to turn off the block WYSIWYG editor? You can with the Articles.
There's nowhere that I can just turn it off that I can see...
voyager,
As freddy said, I think your code is working fine and the ads may just not be showing up yet. However, the other problem with not being able to activate the html button in the editor still seems to be a problem. Try switching to the SMF default core theme and setting up an html block and see if the button in the editor is working. If it isn't working in the default theme then you may have to check your TP 1.0 beta 4 install since it should work as freddy said.
ZarPrime
Also, see my edit.
Zetan is correct. If you turn the editor off for articles, it turns it off for blocks as well.
If you want to turn it off, you do it here ...
Admin --> TinyPortal --> Articles and Categories --> Settings --> Use the WYSIWYG editor?
ZarPrime
Nope, you can't turn it off.
I'll try the default theme.
The HTML works on the default theme, but still no adsense. I'm starting to think the block isn't ready because it still shows the code for it.
There's another option.
You could create an HTML article and just make it so it doesn't show all the usual information - I mean so it's just plain - then put your adsense code into that.
Then use a block and from the drop-down set to show a single article - meaning the one with the adsense code in it.
I find the editor to be a bit buggy (so which ones are not!?). Like when I save sometimes it duplicates the code, so in this case I had two adsense slots showing, meaning I had to go back and re-enter just the one block of code.
The other way I thought of as I walked out the door earlier would be to simply use a PHP Block, for now, and just echo the code.. If it works.
echo '
<google code here>
';
So nothing I've tried here works, and I'm still having the same problem. When you go to the forum, only this code shows up:
<script type="text/javascript"><!--
google_ad_client = "pub-1226564767153163";
/* 728x90, Erstellt 05.07.09 */
google_ad_slot = "8101615957";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
Update: I tried it on another one of my SMF forums, both are using 1.1.4 and the other forum didn't show anything at all when I put the code in.
Well, we're all out of ideas then, because most people seem to be able to get Google Adsense to work, among other ads, Amazon for example forks fine on my site and happily sits next to Adsense in a rotating banner.
Have you tried a simple html page, just to test the code?
Yep, it works perfectly in a tester. I wonder if it's because the width of the ad is too large for the width of the theme? I would think that the code would still show up though.
I have no idea what the problem might be.
Quote from: voyager on July 23, 2009, 09:38:43 AM
I wonder if it's because the width of the ad is too large for the width of the theme? I would think that the code would still show up though.
If the ad is too large, it normally just get's cut off and you only see part of it - I don't think that is causing your problem.
Did you try the plain HTML page idea and echoing too then ?
How about if you look at the source of the page the advert is on ? Does it look the same as the code you pasted in the script block or wherever ?
Do you have any ad-blocking app on your browser? I have ABP and of course it wouldn't show the ads. Something simple, but that was the key to my ads not showing up at first...
Quote from: Zetan on July 23, 2009, 08:40:07 AM
Well, we're all out of ideas then, because most people seem to be able to get Google Adsense to work, among other ads, Amazon for example forks fine on my site and happily sits next to Adsense in a rotating banner.
Have you tried a simple html page, just to test the code?
Quote from: voyager on July 23, 2009, 09:38:43 AM
Yep, it works perfectly in a tester. I wonder if it's because the width of the ad is too large for the width of the theme? I would think that the code would still show up though.
Quote from: i-bystander on August 26, 2009, 05:59:41 PM
Do you have any ad-blocking app on your browser? I have ABP and of course it wouldn't show the ads. Something simple, but that was the key to my ads not showing up at first...
We had the code tested in a simple HTML page and it worked fine. So I don't think it's ad blocking software. Unless the OP has blocked pages of their SFM / TP site.