Coranto with Flash

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

Moderator: Spunkmeyer

Coranto with Flash

Postby pPittman_arppix » Fri Oct 27, 2006 7:46 pm

Is there a way to pull the txt file generated by Coranto and place the current news story into a flash generated page? I can access it by placing a comment at the begining of the newsdat.txt file, but as soon as you do a rebuild, that is gone and you have to do it manually again. That kind of defeats the purpose.

Ideas or suggestions are aprreciated.

Paul
User avatar
pPittman_arppix
 
Posts: 8
Joined: Sun Jan 01, 2006 11:54 pm
Location: Central WI

Postby Dale Ray » Sat Oct 28, 2006 1:25 am

You do not want to edit newsdat.txt manually. newsdat.txt is Coranto's database file where all of your news items are stored.

If you mean news.txt as output by a profile you can cause whatever code or comment you need to be by placing it in a template and using that template in conjunction with a profile.

You do not make it very clear exactly what it is you wish to do. I have never worked with Flash to create a site and have no experience with it. You may want to elaborate on your problem so that others can offer suggestions.

Coranto outputs simple text files. How would you go about including the contents of a text file you created into a flash page?

You might want to read the available documentation about styles and templates:

Coranto tutorial part 3 - Profiles, styles and templates
Coranto - Installation to First News Item (the later parts)
How Coranto Works
Templates - an Overview
Styles - an Overview
Profiles Overview
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby msbzdragn » Sat Oct 28, 2006 3:38 pm

The short answer: Yes, if Flash is capable of pulling in and displaying a text file or group of text files (which I'm sure it is), then yes Coranto is capable of formatting them however you need.

What you need is to tell us what Flash requires, so we can tell you how to make Coranto format it appropriately.
Michael R. Tomkins
Administrator, 'Unofficial Coranto / NewsPro Forums'

Mitsubishi Diamante Forum

Do NOT send me instant messages asking for Coranto help without me telling you explicitly to do so. You WILL be placed on ignore if you do so; I don't have time to provide personal tech support to every person who IM's me. Sorry!
User avatar
msbzdragn
 
Posts: 2397
Joined: Mon Mar 11, 2002 4:51 pm
Location: Oak Ridge, TN

Postby pPittman_arppix » Sat Oct 28, 2006 5:12 pm

To import a txt file into flash, you have to have a variable at the begining of the txt file with an equals sign (ie: content=). In the flash file, you have to have the same variable to call the txt file (ie: content). Without having to manually change the txt file each time, is there away to keep the variable (content=) in front of everything when the news is built, even the html tags? Otherwise, is there a way for flash to open a window within itself to display the html file that coranto creates?
User avatar
pPittman_arppix
 
Posts: 8
Joined: Sun Jan 01, 2006 11:54 pm
Location: Central WI

Postby Dale Ray » Sat Oct 28, 2006 7:12 pm

At the top of your style add:

Code: Select all
<PerlCode>
$FlashHeader = 0;
if ( not $firstItem{$ProfileName}  ) {
$firstItem{$ProfileName}  = 1;
$FlashHeader = 1;
}
</PerlCode>
<If: Field: FlashHeader>content=<If>Start your text here


This will cause the content= statement to only be included once.

Here is a tutorial about using text files with flash.
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby pPittman_arppix » Sat Oct 28, 2006 9:05 pm

Thanks!!

I found a small error with the syntax. It was missing a "/" before the final IF to close it out. Once I found that, it no longer gave me an error.
Last edited by pPittman_arppix on Mon Oct 30, 2006 4:59 pm, edited 4 times in total.
User avatar
pPittman_arppix
 
Posts: 8
Joined: Sun Jan 01, 2006 11:54 pm
Location: Central WI

Postby Dale Ray » Sat Oct 28, 2006 9:17 pm

<PerlCode>
$FlashHeader = 0;
if ( not $firstItem{$ProfileName} ) {
$firstItem{$ProfileName} = 1;
$FlashHeader = 1;
}
</PerlCode>
<If: Field: FlashHeader>content=</If>Start your text here


Missed a slash - try it with the </If> tag fixed.
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Close

Postby pPittman_arppix » Mon Oct 30, 2006 4:58 pm

The style statement did put the content= statement into the news.txt file, however, it put it in AFTER the the <A name=...> statement at the very begining. Flash will not recognize it as a text file this way. I did notice however, that this DOES put the content= statement at the very begining of the newsdat.txt file. I can use that, but then there are other considerations to consider.

Is there a way to move the content statement to the very begining of the news.txt file?
User avatar
pPittman_arppix
 
Posts: 8
Joined: Sun Jan 01, 2006 11:54 pm
Location: Central WI

Re: Close

Postby Dale Ray » Mon Oct 30, 2006 5:24 pm

pPittman_arppix wrote:Is there a way to move the content statement to the very beginning of the news.txt file?


On the settings page for the profile set Anchor Tags? to NO. This turns off the automatic creation of the anchor tags.

If you need anchor tags in the article you can place them below the content= using:
Code: Select all
<a name="<ItemAnchor>"></a>

in your style.
Dale Ray
User avatar
Dale Ray
 
Posts: 1001
Joined: Sun Jan 19, 2003 6:02 pm
Location: NW Indiana

Postby pPittman_arppix » Fri Dec 22, 2006 7:01 pm

Much Appreciated!!! I'll give it a whirl and let you know how it works.

Paul
User avatar
pPittman_arppix
 
Posts: 8
Joined: Sun Jan 01, 2006 11:54 pm
Location: Central WI

Working

Postby pPittman_arppix » Mon Jan 08, 2007 8:55 pm

Thanks much to all who hlped. The suggestions were worked through and I am glad to say that it works like a charm. After Dale Ray's last suggestion, it seemed like it wanted to work, and after tracing down the culprit, I found that you must remove the hard return after the </PERLCODE><If... statements so that the text file generated starts immediately after the "content=" statement at t he begining of the text file.

After this, the entire project seemed and in fact was, very easy!

Thanks again

www.kimmock.arppix.net to see it in action. Working in News, Schedule and results!

Paul
User avatar
pPittman_arppix
 
Posts: 8
Joined: Sun Jan 01, 2006 11:54 pm
Location: Central WI

Postby Jackanape » Mon Jan 08, 2007 11:18 pm

That sounds like a terrific application of Coranto...looks great!

The only problem I can see is that you don't have the "powered by coranto" tagline, as required by the license, anywhere on the site. Not only is it part of the license agreement, but we need all the exposure we can get!
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 2 guests

cron