Inserting ad code inside the news text?

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

Inserting ad code inside the news text?

Postby BJv » Thu Nov 01, 2007 11:07 pm

Is there anyway to insert google ad codes inside the text field of news? When I add something like this:

Code: Select all
<div style="float: right; margin-left: 9px;">google ad code</div>


It doesn't show up inside the the actual published content, plus <br> codes have been inserted into the ad code's new lines when I look at the article in modify news.

I tried using a php include but that didn't work either?
BJv
 
Posts: 26
Joined: Fri Jan 26, 2007 4:52 pm

Postby SrNupsen » Fri Nov 02, 2007 3:08 pm

Coranto inserts <br> tags automatically for each carriage return submitted in the text field (You can change this behaviour by going to the Field's settings AND Coranto's default settings, but then the <br> tags would also disappear from the rest of the text field, of course, and not just the Google ad code)

When you say you've tried a php include, have you tried just putting the Google ad code inside a PHP file and including that from within your text field? Should get rid of the <br> tags, at least.

I'm not sure why the ads don't show up, though. You sure Javascript is turned on in your browser and that you're not using any adblock extensions or similar?
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby BJv » Fri Nov 02, 2007 7:56 pm

After I submit news and go modify the article the php include code is gone. The strange thing is that if I edit the news article and put the php include code in again it works but not when I submit the article :?

I'm using maginot static pages by the way could that have anything to do with it? I've checked all the settings and can't find anything wrong.
BJv
 
Posts: 26
Joined: Fri Jan 26, 2007 4:52 pm

Postby SrNupsen » Sat Nov 03, 2007 4:16 pm

There is a setting to strip out PHP (or any other code) from news posts as this could be desirable for security reasons. I think it is in General Settings, or possibly Categories. Try and look around for it, it could be the reason your PHP include code disappears.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby BJv » Tue Nov 06, 2007 2:44 pm

No I just checked everything again and that wasn't it. Its strange but I guess I'll just modify the php include into the article after I post it.

Who knows maybe my users will get lucky and get adless articles when im in a rush. :shock:
BJv
 
Posts: 26
Joined: Fri Jan 26, 2007 4:52 pm

Postby SrNupsen » Tue Nov 06, 2007 5:16 pm

BJv wrote:After I submit news and go modify the article the php include code is gone. The strange thing is that if I edit the news article and put the php include code in again it works but not when I submit the article


This STRONGLY indicates that the code is being stripped out by Coranto when you submit the article. There are TWO places for you to check: In the actual field's settings, check that "Disable HTML" and "Strip Code" are correctly set.

The reason I'm dubious about this is that I use PHP includes heavily in all my Coranto installations and never had any problem with them.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby BJv » Fri Nov 09, 2007 3:45 pm

Both Strip Code? and Disable HTML? are set to No (Off) on the text input field so is Parse Links? but I doubt thats causing the problem.

Could it possibly have anything to do with the cradmin.pl fix from this topic? http://www.gocoranto.com/forum/viewtopic.php?t=210
BJv
 
Posts: 26
Joined: Fri Jan 26, 2007 4:52 pm

Postby SrNupsen » Fri Nov 09, 2007 8:12 pm

I would be happy to investigate this if you could set up a test account and PM me the login details.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby BJv » Tue Nov 13, 2007 3:25 pm

Thank you for your offer SrNupsen, I've sent a PM with the details.
BJv
 
Posts: 26
Joined: Fri Jan 26, 2007 4:52 pm


Return to Customization

Who is online

Users browsing this forum: No registered users and 2 guests

cron