Template output

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

Moderator: Spunkmeyer

Template output

Postby Abpadmin » Tue Apr 29, 2008 2:02 pm

I have the news going thru a tmpl file just fine and looking like I want it.

One thing I noticed is creating my template is that includes statements don't work. Which is OK, I just had to hard code what I needed.

Once a news item is built and output is created with the template, is there any way when a news item is selected for it to show diffenrent advertisers or sponsors.

Example, say I have advertiser ABC and the I get a new sponsor XYZ, is ther any waht that when news that already been built with the ABC sponsor to be able to show both ABC & XYZ?

Thanks
Abpadmin
 
Posts: 36
Joined: Mon Apr 14, 2008 1:40 pm
Location: missouri

Another question

Postby Abpadmin » Tue Apr 29, 2008 2:06 pm

IF it can be done thru a banner rotation script, which I'm not sure if it can, and even if it can't, does anyone know of a good open source banner script? The one that is in my classifieds script I can select which pages it shows on, how many views it has had and the number of click thru's.

Thanks again.
Abpadmin
 
Posts: 36
Joined: Mon Apr 14, 2008 1:40 pm
Location: missouri

Postby SrNupsen » Tue Apr 29, 2008 2:21 pm

Do you use viewnews.cgi or Maginot?
-----------------------------------------------------------------------------------------------------
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 Abpadmin » Tue Apr 29, 2008 2:55 pm

I am using maginot
Abpadmin
 
Posts: 36
Joined: Mon Apr 14, 2008 1:40 pm
Location: missouri

Postby SrNupsen » Tue Apr 29, 2008 4:46 pm

OK - I suggest you drop the template and instead put your whole HTML source in the style used to create the Maginot pages. Something like this in your style. This way you can use PHP includes (if you run PHP) or any other includes simply by including them in your style, where they will work.
-----------------------------------------------------------------------------------------------------
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 driv » Tue Apr 29, 2008 9:12 pm

Yep, it took me a long time to realise this.
You are lucky to be given this advice straight away :)
driv
 
Posts: 69
Joined: Wed May 05, 2004 10:30 am

Postby Abpadmin » Wed Apr 30, 2008 3:13 am

OK, so you are saying to copy the html for my template page and put it in the style page?

I was just reading a tutorial on php includes at http://allyourtech.com/content/articles ... ow_php.php and it mentions that I could still have a file with the html extension and use the php include statement for that file. If this is correct would both options have the same result?

Does anyone know of a good banner ad manger opensource script?
Abpadmin
 
Posts: 36
Joined: Mon Apr 14, 2008 1:40 pm
Location: missouri

Re: Template output

Postby Jackanape » Wed Apr 30, 2008 3:50 am

Abpadmin wrote:One thing I noticed is creating my template is that includes statements don't work.
Includes usually won't work with files located in the cgi-bin. I ran into this problem myself along the way. Nupsen's solution seems sound.

Instead of a banner rotation system, why not use Coranto to manage your banners? You can set up a category for banners, and have your banner code be the news item. You can set up your profile to show just ONE news item, and viola!

Then, try "Randomnews" to handle the banner rotation...While I haven't tried the rotation bit yet, I use Coranto to handle a large number of banners at my site, with great efficacy.
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
-Robert A. Heinlein
User avatar
Jackanape
 
Posts: 632
Joined: Tue Jan 09, 2007 12:15 am
Location: Capitol of the Great State of New York

Postby Abpadmin » Wed Apr 30, 2008 2:39 pm

So if I am understanding correctly, and with the documentation that I have found on php include statements, once I get my template to look like I want it then I would copy the entire tmpl code and put it into the style code for the news, right?

And if I am looking at this right for each news category would I still need the 2 profiles as I have now because of using maginot? Then also I would need to setup new styles for each category as well, correct.

Do include statement work inside of the style?

For the banner script what I am needing is something that has the capabilities of showing the number of impressions and the number of clicks.
Abpadmin
 
Posts: 36
Joined: Mon Apr 14, 2008 1:40 pm
Location: missouri

Postby SrNupsen » Wed Apr 30, 2008 4:45 pm

You need to replace the <Field: Content> in your template with the content of your style, then put the whole resulting code in your new Maginot style.
-----------------------------------------------------------------------------------------------------
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 Jackanape » Wed Apr 30, 2008 6:25 pm

Abacus is an addon that handles the number of times your news has been viewed, this should be what you need.
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
-Robert A. Heinlein
User avatar
Jackanape
 
Posts: 632
Joined: Tue Jan 09, 2007 12:15 am
Location: Capitol of the Great State of New York


Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron