New, with my first question

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

Moderator: Spunkmeyer

New, with my first question

Postby tosp » Fri Apr 14, 2006 2:30 pm

I just recently installed Coranto and am having fun playing with it and enjoying the versatility of this little program :) I have read through everything I can find, including headline link that was provided on a bunch of prior posts that I searched on, the newbie FAQs and all documentation and I cant find exactly what I am looking for.

I want to have my news page setup to look like this:
<Linked headline>
This is the start of the news article, which will be snipped. The rest of the news article will be able to be viewed by clicking on the headline.

Ok, so I have followed the instructions to setup the headlines profile and add that to my news page, but all that gives me is the linked headline without the start of the news article below it, because if I put in a second 'include' for the news article, it shows up at a completely different area of my page and doesnt look like it is associated.

So, figuring I can add a link to my default news style, I added this:

<a href="http://www.mysite.com/cgi-bin/coranto/viewnews.cgi?id=<Field: Subject> and then just continued on in the news style box with the fields to add in the rest of the article. Well, when adding the link in my default news style, it has not linked just the subject, but the subject line is not showing up and it is trying to link the entire article. I closed the <a href>tag, so I dont understand why it would not stop the link after the subject, or not show it at all.

So, I can seem to find either a solution to link just the headline without the article, or link the article without the headline, but not both. Am I doing something wrong, or can someone explain what I need to do?

Thanks for any help and I'm just in the beginning processes of customizing my page, so I'm sure I'll be back often! :lol:
tosp
 
Posts: 6
Joined: Fri Apr 14, 2006 2:22 pm

Postby SrNupsen » Fri Apr 14, 2006 2:53 pm

Glad you enjoy Coranto!

What you want to do is really quite simple. What you need, is two styles and two profiles. One for your clickable headline + snip of story, and one for your full article.

In your first style, put something like:

Code: Select all
<a href="http://www.mysite.com/cgi-bin/coranto/viewnews.cgi?id=<Field: newsid>"><Field: Subject></a>
<br><br>
<Snip 200: Field: Text>


Note that the link in your post is wrong (you want to use newsid, and not subject associated with viewnews.cgi). Also note the number after Snip (200), which can ofcourse be customized.

Now in your second style, simply put:

Code: Select all
<Field: Subject>
<br><br>
<Field: Text>



Everything is, as you may have discovered, highly customizable :) I also recommend the tutorials available from the help section of this site, if you haven't read them allready. Good luck, and post again if something is unclear!

SrNupsen
-----------------------------------------------------------------------------------------------------
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 tosp » Fri Apr 14, 2006 4:31 pm

Thanks for offering to help SrNupsen...I really appreciate it. So, I got the layout to look like I want, just one small problem which might be a quick fix, but I havent been able to figure it out and that is with the snip feature. Right now, it is snipping the front page article which I want it to do, but when I click on the headline link, the article is again snipped on the page that is supposed to show the full article.

If I put the snip code in the headlines style, then it doesnt snip the main page and shows the entire article. If I put the snip code in the news style, it snips both the front page article, as well as the full page article and if I put the snip code in both styles, it shows the front page article fine, but again, the full page article is snipped.

Any ideas on why this is happening, or what I need to do to get it to snip only the front page article, but link to the full article properly? Thanks again!
tosp
 
Posts: 6
Joined: Fri Apr 14, 2006 2:22 pm

Postby SrNupsen » Fri Apr 14, 2006 5:59 pm

This isn't making much sense to me. As you say, if you'd put the snip field in both your news style and headlines style, there is no reason it shouldn't have snipped your full article.

It's important that you get the hang of how styles and profiles work. I will summarize your first peace of news as

Code: Select all
Subject: PUT SUBJECT HERE

Text: HERE GOES THE FULL NEWS TEXT. LOTS OF TEXT. COULD BE SEVERAL KILOBYTES OF IT. YOU DON'T HAVE TO TYPE IT ALL IN CAPS, OF COURSE.


This is what you submitted at the submit news page. Now you want, say, only the first 30 characters of your text to appear at the front page, under a clickable headline. To do this, you need to put the following in your headlines style:

Code: Select all
<a href="http://www.mysite.com/cgi-bin/coranto/viewnews.cgi?id=<Field: newsid>"><Field: Subject></a>
<br><br>
<Snip 30: Field: Text>


Then, for your full article you want to put this in your Default Style (when you call viewnews.cgi like you do in your headlines style above, it uses the Default Style by... default(!) to display your news item):

Code: Select all
<Field: Subject>
<br><br>
<Field: Text>


Now the only thing you have to do, is to include the text file output by your headlines profile on your main page.

Coranto's flexibility implies that you may also insert any HTML, CSS, PHP, whatever code in your news style. An example (instead of the rather modest Default Style above):

Code: Select all
<div class="header"><Field: Subject></div>

<table border="2"><tr><td bgcolor="blue"><Field: Text></td></tr><tr><td>
<Field: UserField_name>
</td></tr></table>


The example is silly and would look rather awful, but you see the point? In addition to styling your news with some CSS code you choose yourself, this example would insert the name of the poster (not the user name, but the real name as specified from the "User settings" within Coranto).

SrNupsen
-----------------------------------------------------------------------------------------------------
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 tosp » Fri Apr 14, 2006 6:27 pm

I apologize Sr...I realize now what I did. I still had the include in my news.shtml pointing to news.txt instead of headlines.txt. I fixed it and now it works great..thanks so much again and sorry for any confusion! :wink:
tosp
 
Posts: 6
Joined: Fri Apr 14, 2006 2:22 pm

Postby SrNupsen » Fri Apr 14, 2006 8:18 pm

No problem - We aim to please :D

Feel free to ask again if you run into any more confusion!

SrNupsen
-----------------------------------------------------------------------------------------------------
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


Return to Customization

Who is online

Users browsing this forum: No registered users and 4 guests

cron