Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 9th, 2005, 5:34 AM   #1
dereko04011
Newbie
 
Join Date: Jan 2005
Posts: 9
Rep Power: 0 dereko04011 is on a distinguished road
Comments page

Hi I am using the free version of GeoCities, and I want to have a comments page. Will I be able to have one with out needing a CGI-bin or anything? How would I make one.. please help!

Thanks,
Derek
dereko04011 is offline   Reply With Quote
Old Aug 9th, 2005, 7:56 AM   #2
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
GeoCities doesn't support php, so the only way to make a comments page on it, would be if they had an option on their sitebuilder or something.
Consider moving to www.100webspace.com, there you can use php and mysql for free.
It is easy enough to code up a comments page using php, and store the vcomments in text files or in the mysql database.
coldDeath is offline   Reply With Quote
Old Aug 9th, 2005, 8:56 AM   #3
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Yeah, geocities is fairly limited. You couold code this in relatively few lines of PHP
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Aug 9th, 2005, 9:00 PM   #4
dereko04011
Newbie
 
Join Date: Jan 2005
Posts: 9
Rep Power: 0 dereko04011 is on a distinguished road
How would I code it.. I have no experience with PHP/MySQL..

Thanks
dereko04011 is offline   Reply With Quote
Old Aug 10th, 2005, 11:52 AM   #5
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
you could probabally do it with javascript like this:

To save a variable with document.execCommand('SaveAs'), you simply need
a hidden IFRAME (or any other such window object) and some scripting,
<iframe id="SaveFrame" style="display:none"></iframe>

<script>

function SaveVarAsFile(someVar){
  SaveFrame.document.open("text/html","replace")
  SaveFrame.document.write(someVar)
  SaveFrame.document.close()
  SaveFrame.focus()
  SaveFrame.document.execCommand('SaveAs')
}

</script>


now you can call the function from anywhere on your page. that code should give you the ability to write to a text file on the server. However, i have not tested this, and it most likely doesn't work exactly the way that you want, but it a start. you'd just need to hook it to a form action, or a On submit event.

Using PHP & Mysql (or Postgresql) would be the way to go though.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Aug 10th, 2005, 1:11 PM   #6
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Look into PHP's File I/O as well, for an alternative.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Aug 10th, 2005, 1:39 PM   #7
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
<iframe id="SaveFrame" style="display:none"></iframe>
Quote:
<script>

function SaveVarAsFile(someVar){
  SaveFrame.document.open("text/html","replace")
  SaveFrame.document.write(someVar)
  SaveFrame.document.close()
  SaveFrame.focus()
  SaveFrame.document.execCommand('SaveAs')
}

</script>
I have no experience in JavaScript, but instead of replace, wouldn't you want to append? or can't you do that.
Well thats if you save every comment into one file anyway.

Doing it in PHP would be a real benefit, you don't have to use MySQL if you don't want to.
coldDeath is offline   Reply With Quote
Old Aug 10th, 2005, 2:17 PM   #8
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Let's define what we are using:

document.open([mimeType[, replace]])

This method is used to open a stream to collect the output from any write or writeln methods. The first of the optional parameters is mimeType which determines the type of document you are writing to; if this parameter is not used, the default value is "text/html". The second parameter is replace, also optional, which causes the history entry for the new document to inherit the history entry from the document from which it was opened.

Thus meaning, or atleast how i read it, it has nothing to do with the content of the document.

Inherit:
1)
a. To receive (property or a title, for example) from an ancestor by legal succession or will.
b. To receive by bequest or as a legacy.

2) To receive or take over from a predecessor: The new administration inherited the economic problems of the last four years.


Please Note, i think this code will only work under IE.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!

Last edited by Pizentios; Aug 10th, 2005 at 3:08 PM.
Pizentios is offline   Reply With Quote
Old Aug 10th, 2005, 5:35 PM   #9
dereko04011
Newbie
 
Join Date: Jan 2005
Posts: 9
Rep Power: 0 dereko04011 is on a distinguished road
Thank you.. I'll do this as soon as I can.. very appreciated


Thank you soo much for your time

Derek
dereko04011 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:39 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC