phpWebLog

find
story index | search | archive | submit story | downloads | stats | contact
Topics
  • General (915)
  • Announcements (20)
  • Development (521)
  • Mods & Hacks (33)


  • 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
  • Meaning of Blog (JKilborn)
  • Meaning of Blog (JKilborn)
  • phpweblog 0.5.2 (and maybe 0.5.3) security problems (Anonymous)
  • phpweblog 0.5.2 (and maybe 0.5.3) security problems (test)
  • New site and a little praise (Poker)


  • PHP block
    Posted under General by Steen Brølling on Saturday March 17 2001 @ 06:09AM EST
    I'm trying to include some PHP in my blocks, but it seems that it parses some PHP and doesn't parse other PHP parts...

    Related Link

    < Cani disable More Links (its buggy) | Function SETLOCALE() on OpenBSD >

    Brian Milby writes on Saturday March 17 2001 @ 08:44PM EST: [ reply | parent ]
    This came up before and I said that it was too hard. After looking around, I think that I've found a way to implement this fairly easily. You will need to edit include/layout.inc.php to make the following changes:
    Near the end of each function in that file, you will find $tmp = "print... and a couple of lines later eval($tmp) [lines 55 and 57 are the first instance]. Use the following instead:

    eval("\$tmp = \"" . $template . "\";");
    eval("?<" . $tmp);

    I would strongly advise against making this change to the F_drawComment function because it would create a huge security hole.
    I would also caution you in that I have not tested this extensively except to make sure that it does work for simple cases.
    Steen Brølling writes on Sunday March 18 2001 @ 11:33PM EST: [ reply | parent ]
    Well I've tried it, and can't get it to work. I get errors all over the page.
    Seems like every simple PHP string gives an error.
    Brian Milby writes on Tuesday March 20 2001 @ 09:40AM EST: [ reply | parent ]
    What level of HTML are you allowing? You really need to have it down to 0 (don't touch) because you may get unexpected results. Also, the php must be inserted just like in a normal document - <? ...code...; ?>
    Brian Milby writes on Tuesday March 20 2001 @ 09:42AM EST: [ reply | parent ]
    Hey, I made a huge typo... eval("?>" . $tmp);
    Sorry!
    Brian Milby writes on Tuesday March 20 2001 @ 09:51AM EST: [ reply | parent ]
    Take a look here for the example: http://linux.nscs.com/phpweblog/stories.php?story=01/03/20/9816540
    I won't guarantee that it will be there long, but at least for the next few days.
    Brian Milby writes on Tuesday March 20 2001 @ 09:55AM EST: [ reply | parent ]
    Here's the complete replacement:
    eval("\$tmp = \"" . $template . "\";");eval("?>" . $tmp);
    jason writes on Sunday March 18 2001 @ 12:02AM EST: [ reply | parent ]
    Another solution, which might actually be a bug preventing you from doing this, is to remove the javascript check for URL when you add a new page/block. Without that, if I can remember correctly, you should be able to put the full local path to a php script to include. I honestly can't remember if this works, and am not around a machine right now where I can check.
    kevin writes on Friday March 23 2001 @ 05:21PM EST: [ reply | parent ]
    I'm setting up a new log at the moment, and I've had no trouble worth a mention when using php blocks (mostly fetching selections from T_Links). And it's my first go at php and mysql... I just include B_etcetera.inc.php. What am I doing "wrong"? Parselevel luck?
    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
  • Call for Speakers : PHP Qu&eacute;bec 2004
  • New function list auto completion
  • PHP 4.3.4 released!
  • PHP 5.0.0 Beta 2 released
  • Forum PHP in Paris, November 26 & 27th
  • Monthly PHP Magazine in French launched!
  • ApacheCon 2003, the Global Hub for All Things Apache
  • php|cruise: The World's First Ever PHP-only Cruise
  • PHP Usage Survey Results
  • PHP Manual CHM Edition - 12th build

  • PHPBuilder
  • Zend Studio 3.0
  • GIS Mapping with PHP
  • On User-Defined Timezones in PHP
  • Dreamweaver MX 2004
  • Using PEAR's HTML_Table Class
  • An introduction to the ADOdb class library, Part 2
  • An introduction to the ADOdb class library for PHP
  • Manually Expiring Web Pages
  • Regression Testing With JMeter
  • Advanced Image Editing Under the GD Library

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