Results 1 to 3 of 3

Thread: Quotes Script

  1. #1
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default Quotes Script

    While I am in this forum (the lounge), I thought I might post about a script I wrote a little while back:

    http://home.comcast.net/~jscheuer1/side/quotes.htm

    It is a pretty straightforward (the css is complex but need not be for simple usage) on page quotes script that can be daily or random, with or without controls (the posted link is to the daily w/controls configuration). Its best feature, I think, is that the quotes can be entered virtually as simple text, each on it own line in the configuration area, no iframes or external files required. It could also easily be adapted to an external script with one file holding, almost exclusively, just the quotes.

    I've documented the code and the css.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I like the interface. Personally I think it might be better just to wrap each quote inside its own DIV tag on the page, and rotate the quotes through CSS's display attribute. It's a lot easier to update the quotes that way. Dealing with all the escapes that must be done inside JS strings can drive people mad.

    If you want, I can move this thread to the public lounge for others to comment on.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Move away! As regards the idea of using a separate division for each quote, I'm not sure I would want to go that route. I get what you mean about escaping but, the way I've constructed it, there would be minimal need. The quote marks (") get added, so would not be required inside the string and since quotes (") are used to delimit the string, apostrophes are OK, wrapping is a function of the layout, so no \n's should be required. However, you have got me to thinking. Perhaps putting the quotes in a single division that has display none and using its inner HTML as the source of the quotes array might do. I would resist using separate divs for each quote, mostly because folks wanting to use an existing list of quotes would find that harder to deal with.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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