phpWebLog

find
story index | search | archive | submit story | downloads | stats | contact
Topics
  • General (894)
  • Announcements (20)
  • Development (516)
  • Mods & Hacks (28)


  • phpWebLog
  • Latest Release - 0.5.3 (BETA)
  • Latest Stable - 0.5.2
  • ChangeLog
  • TODO / Roadmap
  • BUGS

    CVS WEB

  • New XL fork 0.5.2
  • Unstable branch 0.5.3

  • For development discussions and for general support, join the phpWebLog mailing list

    phpWebLog needs active developers to help fix bugs. If you are interested, send me your SourceForge login information for CVS access.


    Last 5 Comments
  • IP blocking? (benny)
  • Improve phpweblog site performance (George)
  • IP blocking? (Jordi)
  • Chaging the Time Zone in phpWebLog (Beth)
  • Last 5 comments box (Chris DuBack)


  • sNews, Javascript and PHP
    Posted under General by Andrew on Tuesday June 26 2001 @ 04:59AM EDT

    I am using the sNews addon (Javascript headlines) by chino. However, there is one problem with the script, it does not strip out (or escape/replace) " marks and other forbidden characters in Javascript.

    Since I'm new to PHP, how can I get it to do this?

    An excellent little addon. Lack of being able to offer Javascript headlines was one of the issues that was holding me up from using PHPweblog. My site supplies headlines to around a dozen or so other websites.

    I've adapted the addon it so that I can offer headlines with a summary as well as plain headlines.

    However, if there are quotation marks in the summary or headline it will (obviously) crash the Javascript.




    < Error in 0.5.2 ? | Hardcoded image URL? >

    chino writes on Wednesday June 27 2001 @ 02:38PM EDT: [ reply | parent ]
    If you write a story with "", javascript sends you an error? I'll try. And i'll try to fix it. I dont know javascript, btw, ill try to fix it.
    chino writes on Wednesday June 27 2001 @ 02:49PM EDT: [ reply | parent ]
    I wrote a test story with "" in the title. There's no error. It's ok. See here a snapshot.
    Andrew writes on Friday June 29 2001 @ 10:07PM EDT: [ reply | parent ]
    Hmm, that's interesting, I don't see why javascript would do that?

    If there are quotation marks in the summary (when I include it in the javascript headlines) it crashes the code. I hadn't actually tried it with quotation marks in the title as well, I dn't see why it wouldn't do the same thing there as well.

    Weird.
    Andrew writes on Friday June 29 2001 @ 10:09PM EDT: [ reply | parent ]
    Ha !

    Getting confused with my breaks :-)
    chino writes on Saturday June 30 2001 @ 10:47AM EDT: [ reply | parent ]
    it's ok now ?
    Andrew writes on Sunday July 01 2001 @ 06:05PM EDT: [ reply | parent ]
    No, I'm just having to make sure that no quotations marks go into the summary field or else the javascript will crash.

    I can live with that, but I thought that there might have been a more elegant solution.

    By the way, thanks for writing the sNews script, I have found it very useful. It clinched my migration over from flat text files to MySQL and PHPweblog.
    Post a Comment
    Name:
    Email:
    URL:
      Remember my information (uses cookies)
      I would rather be anonymous
    Comment:
    * Your email will not be made public.
    Save As:

    SourceForge
    SourceForge is providing us a mailing list , documentation and a CVS tree.

    SourceForge Logo


    PHP.net
  • Country Detection
  • PHP 4.3.2RC2 Released
  • My PHP.net
  • International PHP Conference - Spring Edition Early Bird Discount runs out!
  • PHP 4.3.2RC1 Released
  • Grant Program
  • Set your own language preference
  • First Hungarian PHP Conference
  • PHP 4.3.1 released in response to CGI vulnerability
  • PHPCon East 2003 - (April 23-25, 2003)

  • PHPBuilder
  • Interfacing with COM objects under Windows
  • Dynamic XML Conversion Using the SAX Parser
  • Arrays 101
  • Introduction to PHP5
  • Installing PHP-GTK on Linux
  • Installing PHP under BadBlue Web Server
  • Installing PHP under Xitami
  • A Test To See If You Write Sloppy Software
  • Switchbox
  • Professional PHP4 Multimedia Programming


  • phpWebLog: A PHP News and Content Management System
    Copyright (C) 2000-2002, Jason Hines / Eye Integrated Communications