Text file based content management system

Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Text file based content management system

  1. #1

    Default Text file based content management system

    IS IT POSSIBLE???????<BR><BR>I have just spent the last 3 days searching the darkest corners of the internet trying to source information on this subject...<BR><BR>It appears everyone is pushing the good old fashioned database method. Im just wanting to provide my clients with a more cost effective and easier solution, rather than having to implement a db.<BR><BR>Surely this is DO-ABLE?????<BR><BR>John

  2. #2
    Join Date
    Dec 1969

    Default RE: Text file based content management system

    If your talking about using it to include actual pages dynamically, it cant be done...<BR><BR>IF your Talking about managing content as in banners, images, etc.. things like that?<BR><BR>Read up on the <BR>[Add Rotator Component]<BR>[Contentent Linking Component]<BR><BR>These are 2 standard asp components which is quite handy.<BR>

  3. #3

    Default actually...

    I was thinking about using it to allow the user to control basic content (as in main body text) within the asp pages...<BR><BR>basically they call up the requested text file through the browser, edit it and overwrite the old one..<BR><BR>thats all

  4. #4
    Join Date
    Dec 1969

    Default RE: actually...

    SO your not doing Many include files<BR>and doing<BR>IF something = something then<BR>Include this file<BR>else<BR>include this file<BR>end if<BR><BR>Not something like that?<BR><BR>Each of these files will only be 1 included file on a page...<BR>and somone can open that file up, edit, then save...<BR><BR>Thats what your looking for right?<BR>

  5. #5

    Default Russell

    Ill walk you through what my intentions were...<BR><BR>1. The user types in a hidden admin page within the url. Easy, no probs.<BR>2. They then enter a username and password to gain access to a page which utilises the basic FileSystemObject method to read all of the notepad or text files within the contents folder. Get it?<BR><BR>So they then may be presented with an asp page that lists txt files as such<BR><BR>home.txt<BR>services.txt<BR>products.t xt<BR>contactus.txt<BR><BR>3. Okay now the user simply clicks on the text file [each file uses the same naming convention as the page they wish to update] Eg. services.txt will edit the services.asp page. I think this would be the best approach and easy for the client to understand.<BR>4. The contents of the txt file are then displayed within a textarea, much the same as they would from a database. The user then makes the desired changes and clicks on upload changes.<BR>5. Again using the FSO method, the old file is deleted, and the new file copied to its appropriate location.<BR><BR>I hope this has clarified what it is I have in mind for you.<BR><BR>John

  6. #6

    Default actually Im pretty **** close...

    Using the request.querstring method....I can hyperlink from the desired text file and push the contents of it to the edit screen...<BR><BR>The initial hyperlink..<BR><BR>Response.Write "&#060;a href=""../cms/edit.asp?file=" & objFile.Name & """&#060;/a&#062;&#060;img src=""../images/save.gif"" align=""absmiddle"" border=""0"" alt=""Modify this file""&#062;&#060;b&#062;&#060;/a&#062;" & objFile.Name & "&#060;/b&#062;<BR>"<BR><BR>This works a treat actually. It catches the file and pushes it to the edit page.<BR><BR>Heres the request object on the edit page...this works too.<BR><BR>strFileName = "C:InetpubwwwrootAboutWEBcontent\" & request.QueryString("file")<BR><BR>Now how to put the contents of the file into a textarea?<BR><BR>Hmmmm...

  7. #7

    Default hey hey hey...

    this works!<BR><BR>response.write "&#060;textarea name=""text"" cols=""50"" rows=""20"" value=" & Replace( objTextStream.ReadAll, vbNewLine, "<BR>" & vbNewLine ) & "&#062;&#060;/textarea&#062;"

  8. #8
    Join Date
    Dec 1969

    Default RE: Russell

    OK you have said everything you need to do...<BR>99.99% of it im sure you can do...<BR><BR>Lets skip the first page for logging user in for now...<BR><BR>Ok they have a page that shows the text files to be edited<BR><BR>home.txt<BR>services.txt<BR>products .txt<BR>contactus.txt<BR><BR>As you said make them hyperlinks, but to your "Edit Page"<BR>&#060;a href="edit_this.asp?File=home.txt"&#062;Edit The home page&#060;/a&#062;<BR><BR>Not to hard.<BR>Next step<BR>On edit_this.asp you need to get the file name<BR><BR>Dim strFileName &#039;&#060;&#060;var to hold file name<BR>strFileName = Request.QueryString("File")<BR><BR>Now using fso, feed the variabl with the file name to it and using FSO.readall you can read full file and put it into a Form Text area...<BR><BR>Allow them to edit it there and post the form to another page...<BR><BR>And page where they post to<BR>Request.Form("TextResults") <BR>Now use Fso to call the Proper file and open it<BR>And drop the contents back into it...<BR><BR>No need to dreate new files and delete old ones...<BR><BR>Ok so that part is done...<BR><BR>Only thing left to do to build the page of editable files...<BR>(If you keep them in own directory you can list them with fso)<BR><BR>If you need to match the files with the user so they cant edit somone elses file...<BR>thats different...<BR>How will you manage loginng them in?<BR>Store their username and password in a File somewhere?<BR>Dont recomend it...<BR>Up to you...<BR><BR>Now, the content linker<BR>This is where you want to read up on it...<BR>It might help you with this to a certain degree...<BR><BR>You can at least get started on the main pages I mentioned above...<BR>To tweek out the login and the page to show only users files, can be tweeked later...<BR>get main part working for now...<BR><BR>Im sure you can handle what I mentioned above?<BR>

  9. #9

    Default although...

    its displaying the <BR> tags...<BR><BR>Could I use some type of Instr command to remove them?<BR><BR>If that parts ok, im very close to the final step. Deleting the existing file and overwriting it with the new one!<BR><BR>John

  10. #10
    Join Date
    Dec 1969

    Default RE: hey hey hey...

    Yes thats how you would do it...<BR> and then post the form to another page... where you request that form element<BR>then use fso to write it back into the file...<BR>

Posting Permissions

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