Nucleus Support Forum Index

Find on the forum:
any terms  all terms  Advanced Search

RSS 2.0
Browse posts: Unanswered | Mark all read

« »
Loading Nucleus FAQ ticker...
Post new topic Reply to topic
Author Message
WebMaster9000
Nucleus Disciple


Joined: 17 Jan 2005
Posts: 241
Location: Brooklyn, NY

Post Posted: Sun Jan 03, 2010 4:44 pm   Post subject: Diplaying a peice of PHP code in a post body
Reply with quote

I want to add in each post that I publish a square 250x250px ad from my ad server, sort of like a template mod, only I think this need to be done at the core level since i didn't see any place to do it at the skins or templates.

Any help on how to go about this?

Back to top

View user's profile Send private message Send e-mail Visit poster's website AIM Address
ftruscot
Nucleus Guru
Nucleus Guru


Joined: 22 Feb 2006
Posts: 6313
Location: Massachusetts

Post Posted: Sun Jan 03, 2010 8:21 pm   Post subject:
Reply with quote

Put the PHP code in a file, called something like myads.php, in the folder for your skin (i.e. skins/default/ for the default skin). Then in the template where you want the ad to be displayed, insert this code <%phpinclude(myads.php)%>
_________________
Is your question not solved yet?
Search our FAQ,
read the Documentation, or
browse the list of available plugins.

Check out my plugins

Back to top

View user's profile Send private message Visit poster's website
WebMaster9000
Nucleus Disciple


Joined: 17 Jan 2005
Posts: 241
Location: Brooklyn, NY

Post Posted: Mon Jan 04, 2010 8:16 pm   Post subject:
Reply with quote

Thanks frank, but I had something like this in mind:

http://tinyurl.com/ydbu6bz

Basically the ad should be inside the post body and the text should wrap around it. Is it possible?

This is the page itself:

http://tinyurl.com/y8kojnr

That site is based off wordpress to the best of my knowledge.

Back to top

View user's profile Send private message Send e-mail Visit poster's website AIM Address
ftruscot
Nucleus Guru
Nucleus Guru


Joined: 22 Feb 2006
Posts: 6313
Location: Massachusetts

Post Posted: Mon Jan 04, 2010 8:35 pm   Post subject:
Reply with quote

I think you would do this in the template used for displaying the Item pages (like default/item or whatever your skin uses). Like this:
Code:
<%body%>
<div class="rightbox"><%phpinclude(myads.php)%></div>
<%more%>

_________________
Is your question not solved yet?
Search our FAQ,
read the Documentation, or
browse the list of available plugins.

Check out my plugins

Back to top

View user's profile Send private message Visit poster's website
WebMaster9000
Nucleus Disciple


Joined: 17 Jan 2005
Posts: 241
Location: Brooklyn, NY

Post Posted: Mon Jan 04, 2010 10:26 pm   Post subject:
Reply with quote

I tried that, and it worked. BUT. I usually only put one paragraph in the beginning of each post and the rest in the extended body, what I was looking for was a way to have it display at least 4 more paragraphs down.

I guess the best way to do it is with CSS? have the div class force it down lower?

Back to top

View user's profile Send private message Send e-mail Visit poster's website AIM Address
ftruscot
Nucleus Guru
Nucleus Guru


Joined: 22 Feb 2006
Posts: 6313
Location: Massachusetts

Post Posted: Mon Jan 04, 2010 10:59 pm   Post subject:
Reply with quote

If you can get the wrapping right doing it with CSS, then sure.
_________________
Is your question not solved yet?
Search our FAQ,
read the Documentation, or
browse the list of available plugins.

Check out my plugins

Back to top

View user's profile Send private message Visit poster's website
rekk1986
Nucleus Newbie


Joined: 05 Jan 2010
Posts: 5

Post Posted: Thu Jan 07, 2010 3:59 am   Post subject:
Reply with quote

You can check the CSS file, i think this errors rise from this area.

Back to top

View user's profile Send private message Send e-mail
Post new topic Reply to topic
Display posts from previous:   

Page 1 of 1

All times are GMT + 1 Hour

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group