make 2 news files

Archive of notes and cross input on Dev versions of Coranto (1.25.1 and Older)

Moderators: Dale Ray, SrNupsen, Bluetooth, Jackanape

make 2 news files

Postby Timbudtwo » Thu Jul 04, 2002 11:24 pm

Is there a way to make newspro make 2 news files,
for example, you have 2 versions of your webpage
(frames and no frames) and they're both in different
folders, and you want it it make one news.txt in each
folder updates whaen newspro posts news?
...
Timbudtwo
 
Posts: 4
Joined: Thu Jul 04, 2002 11:22 pm

Postby l0rdphi1 » Fri Jul 05, 2002 12:58 am

Yes, you can, but it's a lot easier with Coranto!

I suggest upgrading.
User avatar
l0rdphi1
 
Posts: 3590
Joined: Sat Mar 09, 2002 10:03 pm
Location: Pennsylvania, United States of America

Postby AeroSoul » Fri Jul 05, 2002 1:18 am

or if you don't want to upgrade i'd siggest newscat ][
Keep the dream alive!
User avatar
AeroSoul
 
Posts: 562
Joined: Sat Mar 09, 2002 10:30 pm
Location: Toronto, Canada

how?

Postby Timbudtwo » Fri Jul 05, 2002 5:53 am

can yuo tell me how w/o upgrading?
...
Timbudtwo
 
Posts: 4
Joined: Thu Jul 04, 2002 11:22 pm

Postby kriko » Fri Jul 05, 2002 11:06 am

it is simple, just upload it and read the documentation.
Kristjan aka. kriko
now a wireless expert
User avatar
kriko
 
Posts: 3328
Joined: Sat Feb 24, 2007 8:13 pm

i have only an idea you can check it out!

Postby Gmaniac » Fri Jul 05, 2002 1:55 pm

i have only an idea you can check it out!
let's take things from the begining...

you have a lot of news items.... in the default category
and you need to make in 2 separate folders 2 versions of your news,
frames and no frames version
i guess that you want to make your news into Static Pages
Static pages with Frame and Without Frame

upload the newscat ][ addon (prefer the build 12 version)
then log on, go to newscat from Newspro Menu and make 3 profiles

a.) Frames
b.) NoFrames
c.) Frameset

Edit the first 2 profiles and set it like this:

1. Include news from these categories:
default

2. a. Minimum age, in days,
b. Maximum age, in days
c. Maximum number of news
d. Skip this many news items
e. Filtering subroutine
(this settings it's in your decision)

3. News Generating Subroutine:
use the default sub

4. Create anchors (it's in your decision)

5. Text file to create (leave it as is)

6. File Location:
(Set the full path to your folder for each profile)
folder to the frames version & folder to no frames version
/you server/path to your/folders

7. Base URL:
(Set the full URL to your folder for each profile)
http://url to your folders

8. This URL:
(Set the full URL to your folder for each profile)
http://url to your folders

9.Template file to use:
SET DIFFERENT TEMPLATE FOR EACH PROFILE LIKE
noframes.tmpl
frames.tmpl

10. Template Title:
(it's in your decision)

11. File Extension:
you must use shtml or whatever technology you are using

12. Profile Types:
set this to "Standard Static Pages"

13. Static Field:
select "newsid"

and then save you profile

---------------------------
3rd and last profile

with this profile we can build the Main Frameset

1. Include news from these categories:
default

2. a. Minimum age, in days,
b. Maximum age, in days
c. Maximum number of news
d. Skip this many news items
e. Filtering subroutine
(this settings it's in your decision)

3. News Generating Subroutine:
use the DoFramesetHTML

4. Create anchors (it's in your decision)

5. Text file to create (leave it as is)

6. File Location:
(Set the full path to your folder for each profile)
folder to the frames version & folder to no frames version
/you server/path to your/folders

7. Base URL:
(Set the full URL to your folder for each profile)
http://url to your folders

8. This URL:
(Set the full URL to your folder for each profile)
http://url to your folders

9.Template file to use:
use a template called blank.tmpl or use the default template
the viewnews.tmpl with only this into it <InsertContent>

10. Template Title:
(it's in your decision)

11. File Extension:
you must use shtml or whatever technology you are using

12. Profile Types:
set this to "Standard Static Pages"

13. Static Field:
select "newssubject" <-IMPORTANT to choose a different field as file name

--------------------------------------------

Now you are almost ready.

create the folders in your server
chmod them to 777

create the 2 html templates

IMPORTANT: the frames template it must be the BODY frame only
and the other frame (top or left) must allready been into the frames folder

-------------------------------------------------------

Now the last part (simple but more coding included).

let's create the frameset pages with newsrpo

(example with left frame)

open ndisplay.pl and paste this sub after the default news sub (DoNewsHTML)


Code: Select all
# <endedit>
}


if you see the code above in ndisplay.pl
here is the place after the default sub

Code: Select all
#######################
#
#  FRAMESET SUB
#
#######################

sub DoFramesetHTML {
   $fname = &NCMakeFName;
   $newshtml .= qq~
<html>
<head>
<title><InsertTitle></title>
</head>

<frameset cols="80,*" frameborder="NO" border="0" framespacing="0">
<frame name="leftFrame" scrolling="NO" noresize src="MyLeftFrame.html">
<frame name="mainFrame" src="$thisURL/$fname">
</frameset>
<noframes><body bgcolor="#FFFFFF" text="#000000">

</body></noframes>
</html>
~;
}
######################
#
# end of sub
#
#####################


Note: this code "$thisURL/$fname" will set the url to each body page


well if this is too hard don't do it
it's only an idea
Gmaniac (A Greek, Coranto Experienced User)
Gmaniac
 
Posts: 291
Joined: Mon Jan 15, 2007 11:05 am
Location: Hellas - Greece

2 news files

Postby Timbudtwo » Fri Jul 05, 2002 9:22 pm

I uploaded newscat][. All i want it to do it make 1 news file in 2 folers, but the news are updated when news is built, thereforem they are identical. Is thre a way to do this, or no. I would think it wouldnt take much code, but i may be wrong.
...
Timbudtwo
 
Posts: 4
Joined: Thu Jul 04, 2002 11:22 pm

Postby kriko » Sat Jul 06, 2002 10:58 am

It is VERY simple. Just create two profiles, and let them include the news from the same (default) category. And set the paths as you want (you need to create normal profiles).
Kristjan aka. kriko
now a wireless expert
User avatar
kriko
 
Posts: 3328
Joined: Sat Feb 24, 2007 8:13 pm

I dono how

Postby Timbudtwo » Sat Jul 06, 2002 6:17 pm

how do you change the profiles? there isnt a link or wahtever to modify them...
...
Timbudtwo
 
Posts: 4
Joined: Thu Jul 04, 2002 11:22 pm

Postby AeroSoul » Sat Jul 06, 2002 6:42 pm

when you upload the newscat addon there will be a link in your nav menu (something like "Newscat ][ build 12"). click on it and there will be two main sections. one for profiles and another for categories. the box at the bottom of the page will let you add, and then edit profiles.
Keep the dream alive!
User avatar
AeroSoul
 
Posts: 562
Joined: Sat Mar 09, 2002 10:30 pm
Location: Toronto, Canada


Return to Coranto Development Archives -- 1.25.1 and Older

Who is online

Users browsing this forum: No registered users and 1 guest

cron