home *** CD-ROM | disk | FTP | other *** search
/ Your Web Site Creator / Your Web Site Creator.iso / WebSite / data1.cab / Program_Executable_Files / scripts / newspage.dat < prev    next >
Encoding:
Text File  |  1999-01-13  |  15.1 KB  |  525 lines

  1. ; NEWSPAGE.DAT     Create / edit the family news section
  2. [AddToNews]
  3. SETTEMP f_nws = " Family News"
  4. SETTEMP newsletterlink = "Family Newsletter"
  5. SETTEMP urtext = "Enter your own text here."
  6. SETTEMP urhead = "Story Headline"
  7. SETTEMP txt1n = "In addition to a newsletter, the news section can include up to five announcement pages.  "
  8.  
  9. SETTEMP NewsSectExists = istopic( pageNews )
  10. IF NewsSectExists = NN || dummyNews = YY
  11.   GOSUB CreateNewsSection
  12.   GOSUB GetAnnouncements
  13.   GOSUB GetPhotoAlbumInfo
  14. ELSE
  15.   GOSUB EditNewsSection
  16. ENDIF
  17.  
  18. BUSY 1
  19. ARGUMENT "Please wait for a moment or two while the wizard creates the family news section."
  20.  
  21. ;  BUILD NEWS LINK PAGE xxxxxxxxxxxxxxxxx
  22. SETTEMP temp_placard = nws_pix
  23. SETTYPE temp_placard = picture
  24.  
  25. GOSUB SetAnncLinks
  26.  
  27. SETPARENTTOPIC pageContents
  28. IF nAnnc > 0
  29.   SETTEMP linkPageName = "##FamNewsLinkPage"
  30.   SETTEMP newsletPageName = "##Newsletter"
  31.   SETTEMP pageNewsletterVar = "pageNewsletter"
  32.   GOSUB BuildNewsWAnnc
  33. ELSE
  34.   SETTEMP newsletPageName = "##FamNewsLinkPage"
  35.   SETTEMP pageNewsletterVar = "pageNews"
  36.   GOSUB BuildNewsletterTopic
  37. ENDIF
  38.  
  39. IF haveNewsletterAlbum = YY
  40.   SETTEMP parentTopic = eval( pageNewsletterVar )
  41.   SETTEMP albumTopic = "pageNewsPhotoAlbum"
  42.   SETTEMP nPictures = nNewletterPictures
  43.   SETTEMP pictureNameRoot = "newsPix"
  44.   SETTEMP pictureCaptionRoot = "newsPixText"
  45.   SETTEMP albumStyle = newsAlbumStyle
  46.   SETTEMP photoPageNameVar = "famNewsAlbumTopicNames"
  47.   SETTEMP photo_mode = "news"
  48.   GOSUB MakePhotoAlbumPages
  49.   SETTEMP newsPhotoAlbum = pageNewsPhotoAlbum
  50. ENDIF
  51.  
  52. IF NewsSectExists = NN || dummyNews = YY
  53.   GOSUB BuildHomePage
  54. ENDIF
  55. IF dummyNews = YY
  56.   SET dummy_sections = subtract( dummy_sections 1)
  57.   SET dummyNews = ""
  58. ENDIF
  59.  
  60. BUILDLINKS
  61. SET hasNews = 1
  62. BUSY 0
  63.  
  64.  
  65. ;xxxxxxxxxxxxxxxx CHOOSE NEWSLETTER STYLE xxxxxxxxxxxxxx
  66. [ChooseNLStyle]
  67. SETTEMP temp = newsLetterStyle
  68.  
  69. PAGE
  70. TYPE LIST
  71. WIZPIC wizpics\newslett.gif
  72. DESCRIPTION You can choose from several different stylings for the family news page.  Pick one of the styles from the list below to determine how your newsletter page is decorated.
  73. NAME temp
  74. ARGUMENT nlStyle1@1@"wizpics\nlstyle1.gif" ;bogota
  75. ARGUMENT nlStyle2@2@"wizpics\nlstyle2.gif" ;holidy
  76. ARGUMENT nlStyle3@3@"wizpics\nlstyle3.gif" ;vactn
  77. ARGUMENT nlStyle4@4@"wizpics\nlstyle4.gif" ;kids
  78. ARGUMENT nlStyle5@5@"wizpics\nlstyle5.gif" ;fireworks
  79. ARGUMENT nlStyle6@6@"wizpics\nlstyle6.gif" ;extra!
  80.  
  81. SET newsLetterStyle = temp
  82.  
  83. ;xxxxxxxxxxxxxxxxx CREATE NEWSLETTER xxxxxxxxxxxxxxxxxxxx
  84. [CreateNewsSection]
  85. BACKSTOP
  86. PAGE
  87. TYPE DESCRIPTION
  88. WIZPIC wizpics\newslett.gif
  89. DESCRIPTION FAMILY NEWSLETTER\nAn important use of your family Web site is to communicate with other family members and friends in a way that is easy for you and convenient for them.\n\nTo accomplish this, your Web site has a news section and a newsletter page with up to four different stories (two of them will have a picture).  These are not limits, but rather just the part that is automated for you.\n\nAs you continue, you will be guided through the entry of material for the four stories.
  90.  
  91. BACKSTOP
  92. GOSUB ChooseNLStyle
  93.  
  94.  
  95. BACKSTOP LastNews1
  96. SETTEMP nNewsPage = 1
  97. GOSUB GetNewsStory
  98. SETBACKSTOP LastNews1
  99.  
  100. BACKSTOP LastNews2
  101. SETTEMP nNewsPage = 2
  102. GOSUB GetNewsStory
  103. SETBACKSTOP LastNews2
  104.  
  105. BACKSTOP LastNews3
  106. SETTEMP nNewsPage = 3
  107. GOSUB GetNewsStory
  108. SETBACKSTOP LastNews3
  109.  
  110. BACKSTOP LastNews4
  111. SETTEMP nNewsPage = 4
  112. GOSUB GetNewsStory
  113. SETBACKSTOP LastNews4
  114. ;
  115. SETTEMP sectionCompleted = 1
  116.  
  117. ;xxxxxxxxxxxxxxxxxxxxxxxx INPUT A NEWS STORY xxxxxxxxxxxxxxxxxxxxxx
  118. [GetNewsStory]
  119. GOSUB LoadStoryFields
  120. SETTEMP nNumber = nNewsPage
  121. GOSUB Ordinal
  122.  
  123. SETTEMP nPx1 = "\n\nFill in the headline and, if you like, choose a different picture to go with the ",ordinal," story."
  124. SETTEMP nPx2 = "Enter the text for the ",ordinal," story.  You can type as many lines as you like.  The title for your story is shown below.  You can change it if you like.  This story will appear "
  125.  
  126. IF nNewsPage = 1
  127.   SETTYPE newsPagePic = normal
  128.   IF newsPagePic = ""
  129.     SETTEMP newsPagePic = modulepath( "clip_art\signs\whatsnew.gif" )
  130.   ENDIF
  131.  
  132.   IF newsHeadline = ""
  133.     SETTEMP newsHeadline = "What's New"
  134.   ENDIF
  135.  
  136.   PAGE
  137.   NOSPELLCHECK
  138.   TYPE PICTUREANDCAPTION
  139.   WIZPIC wizpics\newslett.gif
  140.   DESCRIPTION_RE "The first story is usually titled 'What's New'.  An appropriate picture with those words is provided for your use.  You can replace the picture if you like.",nPx1
  141.   NAME newsPagePic
  142.   PROMPT Pi&cture:
  143.   ARGUMENT &Headline for the first story:@newsHeadline
  144.  
  145.   BACKSTOP
  146.   PAGE
  147.   TYPE MULTIANDEDIT
  148.   WIZPIC wizpics\newslett.gif
  149.   DESCRIPTION_RE nPx2,"at the top of the first column of the newsletter."
  150.   ARGUMENT H&eadline:@newsHeadline
  151.   ARGUMENT &Text of story:@newsStory
  152. ENDIF
  153.  
  154. IF nNewsPage = 2 || nNewsPage = 3
  155.   IF nNewsPage = 2
  156.     SETTEMP nPx3 = "at the bottom of the first column in the newsletter."
  157.   ELSE
  158.     SETTEMP nPx3 = "at the top of the second column in the newsletter."
  159.   ENDIF
  160.  
  161.   PAGE
  162.   TYPE MULTIANDEDIT
  163.   WIZPIC wizpics\newslett.gif
  164.   DESCRIPTION_RE nPx2,nPx3
  165.   ARGUMENT &Headline for the story:@newsHeadline
  166.   ARGUMENT &Text for the story:@newsStory
  167. ENDIF
  168.  
  169. IF nNewsPage = 4
  170.   SETTYPE newsPagePic = normal
  171.   IF newsPagePic = ""
  172.     SETTEMP newsPagePic = arrayelement( pixarray newsLetterStyle )
  173.     SETTEMP newsPagePic = modulepath( newsPagePic )
  174.   ENDIF
  175.  
  176.   PAGE
  177.   NOSPELLCHECK
  178.   TYPE PICTUREANDCAPTION
  179.   WIZPIC wizpics\newslett.gif
  180.   DESCRIPTION_RE "The fourth story can also include a picture and is shown at the bottom of the second column.  A bit of colorful art is provided if you don't have a particular picture to use.",nPx1
  181.   NAME newsPagePic
  182.   PROMPT Pi&cture:
  183.   ARGUMENT &Headline for the fourth story:@newsHeadline
  184.  
  185.   BACKSTOP
  186.   PAGE
  187.   TYPE MULTIANDEDIT
  188.   WIZPIC wizpics\newslett.gif
  189.   DESCRIPTION_RE nPx2,"at the bottom of the second column of the newsletter."
  190.   ARGUMENT &Headline for the fourth story:@newsHeadline
  191.   ARGUMENT &Text for the fourth story:@newsStory
  192. ENDIF
  193.  
  194. IF newsHeadline = ""
  195.  SETTEMP newsHeadline = urhead
  196. ENDIF
  197. IF newsStory = ""
  198.  SETTEMP newsStory = urtext
  199. ENDIF
  200.  
  201. SET eval( newsHeadlineVar ) = newsHeadline
  202. SET eval( newsStoryVar ) = newsStory
  203. SETTYPE newsPagePic = normal
  204. SET eval( newsPagePicVar ) = newsPagePic
  205.  
  206.  
  207. ;xxxxxxxxxxxxxx  EDIT NEWS SECTION xxxxxxxxxxxxxxxxxxxxx
  208. [EditNewsSection]
  209. IF beenOnce <> 1
  210.   SETTEMP inpL1 = 1
  211.   SETTEMP pTx1 = "&Replace the entire newsletter"
  212.   SETTEMP pTx2 = "&Edit a news story"
  213.   SETTEMP pTx3 = "&Announcements"
  214.   SETTEMP pTx4 = "Add &or modify the photo album"
  215.   SETTEMP pTx5 = "&Change the newsletter styling"
  216.   SETTEMP pTx6 = "&Done with changes to news section"
  217.   SETTEMP wTx1 = "\nChoose this item to replace the entire newsletter section of your family Web site.\n\nYou will be prompted to enter four stories, just like the previous time."
  218.   SETTEMP wTx2 = "\nChoose this item to make a change to any or all of the news stories you previously entered."
  219.   SETTEMP wTx3 = "\nYou can include news announcement pages in the family news section.\n\nChoose this item to add or change the announcements."
  220.   SETTEMP wTx4 = "\nYou can include a photo album in the news section.\n\nChoose this item to add or update the photo album."
  221.   SETTEMP wTx5 = "\nChoose this item to pick a different type of styling for your newsletter page."
  222.   SETTEMP wTx6 = "\nChoose this item when you are finished making changes to the news section."
  223.   SETTEMP dTx = "You may replace the entire newsletter (all four stories) or change one of the newsletter stories.  You can also add to, modify, or replace the news announcements, add a newsletter photo album, or change an existing album.\n\nChoose one of these items to indicate your choice below."
  224.  
  225.   BACKSTOP
  226.   PAGE
  227.   TYPE RADIOBUTTONSWITHTEXT
  228.   WIZPIC wizpics\newslett.gif
  229.   NAME inpL1
  230.   DESCRIPTION_RE dTx
  231.   ARGUMENT pTx1@1@wTx1
  232.   ARGUMENT pTx2@2@wTx2
  233.   ARGUMENT pTx3@3@wTx3
  234.   ARGUMENT pTx4@4@wTx4
  235.   ARGUMENT pTx5@5@wTx5
  236.   ARGUMENT pTx6@6@wTx6
  237. ELSE
  238.   BACKSTOP
  239.   PAGE
  240.   TYPE RADIOBUTTONSWITHTEXT
  241.   WIZPIC wizpics\newslett.gif
  242.   NAME inpL1
  243.   DESCRIPTION_RE dTx
  244.   ARGUMENT pTx1@1@wTx1
  245.   ARGUMENT pTx2@2@wTx2
  246.   ARGUMENT pTx3@3@wTx3
  247.   ARGUMENT pTx4@4@wTx4
  248.   ARGUMENT pTx5@5@wTx5
  249.   ARGUMENT pTx6@6@wTx6
  250.   NOPREVIOUS
  251. ENDIF
  252.  
  253. IF inpL1 <> 6
  254.   IF inpL1 = 1
  255.     GOSUB CreateNewsSection
  256.     IF sectionCompleted = 1
  257.       SETTEMP NewsSectExists = NN   ; force rebuild of homepage links
  258.     ENDIF
  259.   ENDIF
  260.   IF inpL1 = 2
  261.     GOSUB EditStory
  262.   ENDIF
  263.  
  264.   IF inpL1 = 3
  265.     SETTEMP NewsSectExists = NN   ; force rebuild of homepage links
  266.     IF hasAnncPage = 1
  267.       GOSUB EditAnnouncements
  268.     ELSE
  269.       GOSUB GetAnnouncements
  270.     ENDIF
  271.   ENDIF
  272.  
  273.   IF inpL1 = 4
  274.     GOSUB GetPhotoAlbumInfo
  275.     IF sectionCompleted = 1
  276.       SETTEMP NewsSectExists = NN   ; force rebuild of links from homepage
  277.     ENDIF
  278.   ENDIF
  279.  
  280.   IF inpL1 = 5
  281.     SETTEMP temp2 = newsLetterStyle
  282.     GOSUB ChooseNLStyle
  283.     IF temp2 <> newsLetterStyle
  284.       SETTEMP NewsSectExists = NN   ; force rebuild of homepage links
  285.     ENDIF
  286.   ENDIF
  287.  
  288.   SETTEMP inpL1 = 6
  289.   SETTEMP beenOnce = 1
  290.   GOTO EditNewsSection
  291. ENDIF
  292. SETTEMP beenOnce = 0
  293.  
  294.  
  295. [EditStory] ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  296. ; get story# to replace
  297. SETTEMP nNewsPage = 1
  298. IF newsHeadline2 = ""
  299.   SET newsHeadline2 = urhead
  300. ENDIF
  301. IF newsHeadline3 = ""
  302.   SET newsHeadline3 = urhead
  303. ENDIF
  304. IF newsHeadline4 = ""
  305.   SET newsHeadline4 = urhead
  306. ENDIF
  307.  
  308. BACKSTOP
  309. PAGE
  310. WIZPIC wizpics\newslett.gif
  311. TYPE RADIOBUTTONSWITHTEXT
  312. NAME nNewsPage
  313. DESCRIPTION You can make changes to any of the stories in your newsletter.  You can even replace the story completely with a new one.  You can do this for any or all of the stories.\n\nSelect one of the news stories to replace.  The beginning of the story shows in the window at the right.
  314. ARGUMENT "&1. ",newsHeadline1@1@newsStory1
  315. ARGUMENT "&2. ",newsHeadline2@2@newsStory2
  316. ARGUMENT "&3. ",newsHeadline3@3@newsStory3
  317. ARGUMENT "&4. ",newsHeadline4@4@newsStory4
  318.  
  319. BACKSTOP Last
  320. GOSUB GetNewsStory
  321. SETBACKSTOP Last
  322.  
  323.  
  324.  
  325. [BuildNewsWAnnc] ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  326. SETPARENTTOPIC pageContents
  327. SET hasAnncPage = 1
  328. SETTEMP template_use = "FamilyNews",nAnnc
  329.  
  330. BUILDTOPIC linkPageName
  331. REPLACE pageNews
  332. template_use
  333. none             ; backdrop
  334. 1               ; level
  335. 6               ; links
  336. NL1            ; topic for link1
  337. NL2
  338. NL3
  339. NL4
  340. NL5
  341. NL6
  342. 8                ; # of fields in templ
  343. "The ",familylastname,f_nws
  344. temp_placard
  345. NT1
  346. NT2
  347. NT3
  348. NT4
  349. NT5
  350. NT6
  351.  
  352. SET pageNews = topicfromsymbolic( linkPageName )
  353.  
  354. GOSUB BuildNewsletterTopic
  355. GOSUB BuildAnnouncementPages
  356.  
  357.  
  358.  
  359. [BuildNewsletterTopic] ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  360. SETTYPE newsPagePic1 = picture
  361. SETSCALE newsPagePic1 = 100 150
  362.  
  363. SETTYPE newsPagePic4 = picture
  364. SETSCALE newsPagePic4 = 100 150
  365.  
  366. IF haveNewsletterAlbum <> YY
  367.   SETTEMP news_temp = "Newsletter",newsLetterStyle
  368.   SETTEMP newsPhotoAlbum = ""
  369.   SETTEMP alb_button = ""
  370. ELSE
  371.   SETTEMP news_temp = "Newsletter",newsLetterStyle," with Photo Collection"
  372.   SETTEMP alb_button = pix_pix
  373.   SETTYPE alb_button = picture
  374. ENDIF
  375.  
  376. GOSUB AdjustStories
  377.  
  378. BUILDTOPIC newsletPageName
  379. REPLACE eval( pageNewsletterVar )
  380. news_temp     ;template
  381. none        ;backdrop
  382. 1           ;level
  383. 1           ;# links
  384. newsPhotoAlbum
  385. 13          ;# fields
  386. "The ",familylastname," Newsletter"
  387. newsHeadline1
  388. newsPagePic1
  389. newsStory1
  390. newsHeadline2
  391. newsStory2
  392. newsHeadline3
  393. newsPagePic4
  394. newsStory3
  395. newsHeadline4
  396. newsStory4
  397. temp_placard
  398. alb_button
  399.  
  400. SET eval( pageNewsletterVar ) = topicfromsymbolic( newsletPageName )
  401.  
  402. [AdjustStories]
  403. IF newsHeadline4 = urhead || newsStory4 = urtext
  404.   SET newsHeadline4 = ""
  405.   SET newsStory4 = ""
  406. ENDIF
  407.  
  408. IF newsHeadline3 = urhead || newsStory3 = urtext
  409.   IF newsStory4 <> ""
  410.     SET newsHeadline3 = newsHeadline4
  411.     SET newsHeadline4 = ""
  412.     SET newsStory3 = newsStory4
  413.     SET newsStory4 = ""
  414.   ELSE
  415.     SET newsHeadline3 = ""
  416.     SET newsStory3 = ""
  417.   ENDIF
  418. ENDIF
  419.  
  420. IF newsHeadline2 = urhead || newsStory2 = urtext
  421.   SET newsHeadline2 = ""
  422.   SET newsStory2 = ""
  423. ELSE
  424.   IF newsHeadline3 = ""
  425.     SET newsHeadline3 = newsHeadline2
  426.     SET newsHeadline2 = ""
  427.     SET newsStory3 = newsStory2
  428.     SET newsStory2 = ""
  429.   ENDIF
  430. ENDIF
  431.  
  432. IF newsHeadline1 = "What's New" && newsStory1 = urtext
  433.   SET newsHeadline1 = "Check Back Soon!"
  434.   SET newsStory1 = "The ",familyLastName," Family News is coming soon to this page!  Stay tuned."
  435. ENDIF
  436.  
  437.  
  438. [GetPhotoAlbumInfo]  ;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  439. IF haveNewsletterAlbum <> YY
  440.   SET haveNewsletterAlbum = NN
  441. ENDIF
  442.  
  443. SETTEMP sectionCompleted = 0
  444. SETTEMP temp = haveNewsletterAlbum
  445. SETTEMP oldValue = temp
  446.  
  447. BACKSTOP PhotoColPrmpt
  448. PAGE
  449. WIZPIC wizpics\wizalbum.gif
  450. TYPE RADIOBUTTONS
  451. NAME temp
  452. DESCRIPTION You can attach a family photo collection (either 3, 6, or 9 photos) to your newsletter.  Would you like to do this?
  453. ARGUMENT "Y&es, I would like a photo collection"@Yes
  454. ARGUMENT "N&o, I do not want a photo collection"@No
  455.  
  456. SET haveNewsletterAlbum = temp
  457.  
  458. IF haveNewsletterAlbum = YY
  459.   SETTEMP nPicturesVar = "nNewletterPictures"
  460.   SETTEMP pictureNameRoot = "newsPix"
  461.   SETTEMP pictureCaptionRoot = "newsPixText"
  462.   SETTEMP styleVar = "newsAlbumStyle"
  463.   GOSUB GetPhotoCollectionData
  464. ELSE
  465.   IF oldValue = YY
  466.     MESSAGEBOX "You had a photo collection already attached to your newsletter.  This change will cause the wizard to remove it.  Are you sure you want to delete the old photo album?"
  467.     ARGUMENT temp,2,2
  468.     IF temp = NN
  469.       UNWIND PhotoColPrmpt
  470.     ENDIF
  471.  
  472.     BUSY 1
  473.     ARGUMENT "Please wait for a moment while the wizard empties out the old photo album."
  474.     SETTEMP pictureNameRoot = "newsPix"
  475.     ;make empty pages
  476.     SETTEMP temp = "pageNewsPhotoAlbum"  ;start with thumbnail page
  477.     SETTEMP emptyPageIntName = eval( temp )
  478.     SETTEMP emptyPageName = "PhotoThumbnails",pictureNameRoot
  479.     GOSUB MakeEmptyPage
  480.  
  481.     SETTEMP GPCDnPictures = nNewletterPictures
  482.     SETTEMP nNumber = 1
  483.     SETTEMP photo_mode = ""
  484.     SETTEMP albumTopic = ""
  485.  
  486.     SETTEMP photoPageNameVar = "famNewsAlbumTopicNames"
  487.     SETTEMP ind_pix_template = "Empty Page"
  488.     GOSUB BuildIndPages
  489.     SET haveNewsletterAlbum = ""
  490.     BUSY 0
  491.   ENDIF
  492. ENDIF
  493.  
  494.  
  495. [InitNewsVars]
  496. SETTEMP newsPagePic = ""
  497. SETTEMP newsHeadline = ""
  498. SETTEMP newsStory = ""
  499. SETTEMP nNewsPage = ""
  500. SETTEMP nlStyle1 = "Bogota!"
  501. SETTEMP nlStyle2 = "Holidays"
  502. SETTEMP nlStyle3 = "Vacation"
  503. SETTEMP nlStyle4 = "Kids News"
  504. SETTEMP nlStyle5 = "Fireworks"
  505. SETTEMP nlStyle6 = "Extra!"
  506. SETTEMP pixarray = "clip_art\designer\bogota_1.gif@CLIP_ART\BEAUTY\REDHEART.GIF@clip_art\signs\vacation.gif@clip_art\toys\dog.gif@clip_art\bullets\win_bul.gif@clip_art\beauty\flower4.gif@"
  507.  
  508.  
  509. ;xxxxxxxxxxxxxxxxxxxxxxx LOAD FIELDS xxxxxxxxxxxxxxxxxxxxxxx
  510. [LoadStoryFields]
  511. SETTEMP newsPageVar = "newsPage",nNewsPage
  512. SETTEMP newsPage = eval( newsPageVar )
  513.  
  514. SETTEMP newsHeadlineVar = "newsHeadline",nNewsPage
  515. SETTEMP newsHeadline = eval( newsHeadlineVar )
  516.  
  517. SETTEMP newsStoryVar = "newsStory",nNewsPage
  518. SETTEMP newsStory = eval( newsStoryVar )
  519.  
  520. SETTEMP newsPagePicVar = "newsPagePic",nNewsPage
  521. SETTYPE eval( newsPagePicVar ) = normal
  522. SETTEMP newsPagePic = eval( newsPagePicVar )
  523.  
  524. #INCLUDE scripts\announce.dat
  525.