Placing an ad under the second article of 5?

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

Moderator: Spunkmeyer

Placing an ad under the second article of 5?

Postby BJv » Fri Jan 26, 2007 5:03 pm

First of all I'm glad Coranto still has a future, after messing about with other "newer" news scripts I still find myself always coming back to Coranto :lol:

As for the question. Right now I'm using Coranto to place the 5 latest news articles on my frontpage, what I would like to do is place an ad under the second news item.

Is there a way to edit the Default Style so that only the second latest news item get a little extra code under it?
BJv
 
Posts: 26
Joined: Fri Jan 26, 2007 4:52 pm

Postby Feathers » Fri Jan 26, 2007 5:22 pm

Yes...but I'll need a bit of time to look up how I did it.
Mike
(Maintaining the vB3Comments addon)
Feathers
 
Posts: 110
Joined: Wed Jan 10, 2007 6:06 pm
Location: London

Postby Feathers » Fri Jan 26, 2007 5:32 pm

Found it.

In this case, I'm putting a link to an archive file after the 10th item but the principle is the same.

I got this from the old Coranto site, I think, so it's NOT all my own work!

At the top of the Style I have:
Code: Select all
<PerlCode>
  $NewsCounter  = ++$countitems{$ProfileName};
</PerlCode>


Then lower down I have:

Code: Select all
<If: Field: NewsCounter eq "10">

<A HREF="/News_Archive/PalmNews-archive-<Field: Day>-<Field: Month_Number>-<Field: Year>.shtml">Today's Archived News</A>

</If>


Does that do what you need?
Mike
(Maintaining the vB3Comments addon)
Feathers
 
Posts: 110
Joined: Wed Jan 10, 2007 6:06 pm
Location: London

Postby Lumberjack » Fri Jan 26, 2007 6:59 pm

Alternatively, you can make two profiles, one to include news posts 1 and 2, and another to include 3-5. Then place the ad in html between them when you include the txt files into your page.
The way Feathers has posted is more elegant though, and more versatile as you can later change the position very easily.
Lumberjack
 
Posts: 555
Joined: Wed Jan 10, 2007 7:22 pm
Location: Oxford, UK

Postby BJv » Fri Jan 26, 2007 7:06 pm

Thank you it works perfectly.

By the way what exactly is that vB3comments addon mentioned in your sig? How does that work.
BJv
 
Posts: 26
Joined: Fri Jan 26, 2007 4:52 pm

Postby Dale Ray » Fri Jan 26, 2007 11:17 pm

BJv wrote:By the way what exactly is that vB3comments addon mentioned in your sig? How does that work.


The vBulletin (3.x) Comments addon provides Coranto with the capability to generate articles as threads in a vBulletin forum.

See the docs at the Coranto Documentaion Wiki.
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby Gilbert » Sat Jan 27, 2007 1:13 am

Dale wrote:
BJv wrote:By the way what exactly is that vB3comments addon mentioned in your sig? How does that work.


The vBulletin (3.x) Comments addon provides Coranto with the capability to generate articles as threads in a vBulletin forum.

See the docs at the Coranto Documentaion Wiki.


BTW Feathers released also a PhpBB Comments addon
Gilbert
 
Posts: 121
Joined: Tue Jan 09, 2007 10:03 am

IPB

Postby YushDon » Tue Jan 30, 2007 2:33 pm

i don't know if this is useful to anyone but after some experimenting i got the add on to work with ipb 1.3.1 and 2.1.0. haven't tried it with 2.2.0j yet...
YushDon
 
Posts: 88
Joined: Mon Jan 22, 2007 11:33 pm
Location: London

Ad placement - google ads

Postby Gcampos » Tue Jun 05, 2007 7:17 pm

Hi,

would this also work for google ads in between news posts. Would like to try it this way, rather than creating new styles.

I tried the above code with google ads in between if statements but threw an error.

Thanks,

Gerry
Gcampos
 
Posts: 31
Joined: Tue Jan 23, 2007 9:06 pm
Location: So Cal


Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron