Results 1 to 8 of 8

Thread: Stupid Questen :(

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2001
    Location
    Boston, uk
    Posts
    37

    Stupid Questen :(

    This must be a very stupid questen:

    I have made over 10 html pages with the same left and right side of the page the same, menu, next match & Practices, i was woundering if their is anyway to make a cgi script that will change all menu, next patch & practices things other then changing each html page?, a bit like newspro, but insted of news it you can change menu and others
    Thanks
    John
    http://www.tengauge.com

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    You might be able to use Server-Side Includes.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3
    scoutt
    Guest
    I'm sure you could. but you would be better off using SSI like Josh said. a lot less hassle

  4. #4
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    to use them... <!--#include file="directory/file.txt"-->

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  5. #5
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Ok
    I know that this isnt html but just in case it is useful. I threw together a little vb program that allows me to change stuff in all my web pages in one go instead of doing it thru html. This is more for the design phase but may be applicable if u change the individual pages and then reload to ur server.
    Regards
    Stuart

    FORM CONTAINS;
    1 Filelistbox, 2 command buttons and 1 label control
    VB Code:
    1. Dim MyPath As String
    2. Dim FileLoop As Long
    3. Dim MyString As String
    4. Dim MyFile As String
    5. Dim MyLen As Long
    6. Dim MyFind As String
    7. Dim MyReplace As String
    8. Dim MyCopy As String
    9. Dim MyLenCheck As Double
    10. Dim MyCounter As Long
    11.  
    12. Private Sub Form_Load()
    13.     MyPath = "C:\My Documents\Webpage" 'Ur path
    14.    
    15.     File1.Path = MyPath'Set the path of the file list box
    16.     File1.Pattern = "*.htm"'And type of files
    17.     FileLoop = File1.ListCount'How many files
    18.     MyCounter = 0
    19.     File1.ListIndex = MyCounter
    20. End Sub
    21.  
    22. Private Sub Command1_Click()
    23.     File1.ListIndex = MyCounter
    24.    
    25.     MyFile = MyPath & "\" & File1.List(MyCounter)
    26.     MyLen = FileLen(MyFile)
    27.    
    28.     'Open the applicable page
    29.     Open MyFile For Input As #1
    30.     MyString = Input(MyLen, #1)
    31.     Close #1
    32.    
    33.     'What u want to change
    34.     MyFind = "string to change from"
    35.     MyReplace = "string to change to"
    36.    
    37.     'Replace 'find' with 'replace'
    38.     MyCopy = Replace(MyString, MyFind, MyReplace)
    39.     'Check to see that any items were found
    40.     MyLenCheck = (Len(MyCopy) - Len(MyString)) / (Len(MyReplace) - Len(MyFind))
    41.     Label1 = MyLenCheck
    42.  
    43.     Command2.SetFocus
    44. End Sub
    45.  
    46. Private Sub Command2_Click()
    47.     'Write the changed page back
    48.     Open MyFile For Output As #1
    49.     Print #1, MyCopy
    50.     Close #1
    51.    
    52.     MyCounter = MyCounter + 1
    53.     Command1.SetFocus
    54.     If MyCounter >= FileLoop Then Command2.Enabled = False
    55. End Sub
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  6. #6
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    cool, good idea

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  7. #7
    Fanatic Member chrismitchell's Avatar
    Join Date
    Jan 2001
    Location
    With Hobbes in New Zealand
    Posts
    568
    Cheers beachbum you just answered a question that I was going to ask today... Thanks for that!

  8. #8
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    yeah, i am currently making something like this, with a web interface.

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width