A Puzzler

Results 1 to 4 of 4

Thread: A Puzzler

  1. #1
    Join Date
    Dec 1969

    Default A Puzzler

    Okay, this one has me stumped... I&#039;m writing a message board for my website, and things have been running smoothly for the most part. I have a Perl message board (it&#039;s slow, that&#039;s why I&#039;m changing), and I like the way it handles replies - but for the life of me I can&#039;t think of a clever way to duplicate its behavior.<BR><BR>One note about my board, it&#039;s storing all the messages in rows in a database.<BR><BR>Anyway, on my current board, if you reply to a message, in the text box you&#039;re filling out it throws ":" in front of all the lines of the previous message. So it&#039;s like...<BR><BR>********<BR><BR>: Here is some text<BR>: from the original message.<BR><BR>And here&#039;s my reply...<BR><BR>********<BR><BR>Now, if you reply to a reply, it only includes the previous message. So it&#039;s NOT like...<BR><BR>********<BR><BR>:: Here is some text<BR>:: from the original message.<BR><BR>: And here&#039;s my reply...<BR><BR>And here&#039;s the next reply...<BR><BR>********<BR><BR>I want to duplicate that sort of behavior, but can&#039;t think of how to only grab the text of the parent message (and not the parent of the parent, etc.).<BR><BR>I hope this is making sense. I&#039;m not sure it makes total sense to me, and I&#039;m the one posting it... ;P

  2. #2
    Join Date
    Dec 1969

    Default It doesn't make sense

    I&#039;m confused. Are you trying to write a SQL query that gets this info back, or how to display it with code from ASP or how to lay it out in HTML or or or or or

  3. #3
    Shafe Guest

    Default A Puzzler?

    Well, I guess you could always store a reserved tag in between the messages (this could also contain a datestamp). This reserved tag does not have to be displayed in the message even though it is stored with the message. For example:<BR><BR>This is the most recent message<BR>{&#124MESSAGESEPARATOR\04/13/01 09:31:00 AM//&#124}<BR>This is the second message<BR>It&#039;s just a bit longer...<BR>{&#124MESSAGESEPARATOR\04/13/01 09:20:12 AM//&#124}<BR>etc. etc. etc.<BR>{&#124MESSAGESEPARATOR\04/12/01 11:46:19 PM//&#124}<BR><BR>

  4. #4
    Brutus Guest

    Default RE: A Puzzler?

    Just a thought but do you have to store the : at all? You could grab a chunk of the string at a time, place the : in the front, print it out, move to the next line and repeat till your out of chunks. It could be a pin to formate that stff depending on the fonrt you use but it might work

Posting Permissions

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