story index | search | archive | submit story | downloads | stats | contact

phpWebLog

Topics
  • General (946)
  • Announcements (20)
  • Development (524)
  • Mods & Hacks (33)


  • phpWebLog
  • Latest Unstable - 0.5.3
  • 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
  • This isnt a bug report but.... (online casino)
  • phpWebLog 0.5.0-pre2 (each site)
  • Why comments not approved by moderators??? (room)
  • Polls (this site)
  • Poll Comments (home of)


  • phpWebLog Addons
    See Romarin.org for phpWebLog addons and more support.

    Comments in page blocks views: 281
    Development By Vincent Danen on Sunday February 25 2001 @ 10:04PM EST [ Development ]
    I've noticed a little quirky thing. Well, two actually. The first is when you you try to post a comment to a page block, it does not format the URL properly. For instance, I have a page called "qmail under Linux-Mandrake" so the page URL is ?page=qmail+under+Linux-Mandrake. However, when I post a comment, it returns saying page not found and when I look at the URL string it's "?page=qmail under Linux-Mandrake" without the + seperator.

    The other thing I noticed is that you cannot include a path to a file to include. For instance, I tried to use the include of "/home/www/freezer_burnorg/html/pages/qmail.html" and it came back as an invalid URL (the java check thingy). So I had to include it using http://www.freezer-burn.org/pages/qmail.php, which is fine except that it puts the entire page in the database!

    Wouldn't it be more efficient to use the include() PHP function to include the file? I understand this will negate the cache function for pages, but if the page is local, you don't need a cache.

    Currently, I have custom headers and footers to make the many (about 2-3 dozen) other pages on my site look uniform with the rest of the site. I'd like to have them all on the site as includes because then I don't have to kludge things to make them all work together, and if I change a theme or the layout, I make it easier on myself by including them as pages. But storing the entire page in the MySQL database is seriously ineffcient. Maybe it uses include() if it's a local file (I don't know since it won't let me do it), and if so, that's good. Otherwise, could we maybe change the function of the pages so that it is a little more efficient?




    < Atomical.net setup | RDF import problems >

    Brian Milby writes on Monday February 26 2001 @ 05:46PM EST: [ reply | parent ]
    The fix to the first problem is easy. Edit the pages.php file and on lines 46 and 48 change the last parameter in the function call to:
    "pages.php3?page=".urlencode($page)
    This should do the trick. Hope it helps.
    Don't know about the second question though...
    Brian Milby writes on Monday February 26 2001 @ 05:49PM EST: [ reply | parent ]
    Just checked... this bug also exists in the unstable version.
    jason writes on Monday February 26 2001 @ 11:13PM EST: [ reply | parent ]
    Hopefully Mocha will read this thread and make the changes in his version.
    Brian Milby writes on Tuesday February 27 2001 @ 10:55AM EST: [ reply | parent ]
    I've taken a look at the code to see what it would take to implement your request. The biggest obstacle that I see is how to place the included content inside the template system. One solution that I've thought of would be for F_drawMain to check the page Type. If Type was 3 (for local file), it would split the template before and after $content. Use the existing logic on the first part to get the heading included. Next, include the local file (stored relative to phpweblog root) using "$G_PATH/".$A["URL"] as the location. Then, print $A["Content"] to get the admin edit blocks if present. Finally, just print the second part of the template.
    If this is something that others would like to see, or even if the developers would include it, I'd be happy to do the mods and submit them. You can e-mail me at dev@milby7.com or visit my site and use the contact feature of phpweblog.
    Vincent Danen writes on Wednesday February 28 2001 @ 03:29PM EST: [ reply | parent ]
    Would it really be that difficult? I imagine right now it takes the local page, stuffs it into the database, and pulls it out as $content. Instead of doing something like "print($content);" why not just do "include($file);"? I haven't looked at the code myself so I don't know whether that is feasible, but it sounds like it (should|would) work, no?

    At any rate, yes, I would be interested. I think using the SQL database to cache a local file is horribly inefficient. Disk access may not be fast, but it would use less resources than querying the SQL database all the time and updating it occassionally (ie. you have to set cache to something, even if it's a value of a few days in case you update the local page, or else you have to force an update by going into admin, setting the cache to 1, load the page, go back, disable it, etc.).

    I'll take a look at your quick fix on the urls and give it a shot. Thanks for that.
    Brian Milby writes on Thursday March 01 2001 @ 10:28AM EST: [ reply | parent ]
    The problem lies in the template system. Currently it works as you say... the page is read into a var $content, but then $content is included in the template. This is why it takes a little extra work unless you want to forget about using the template system for this type of page. If that's the case, then yes you can just use the include.
    I'll go ahead and work on this mod this weekend and post it.
    Vincent Danen writes on Wednesday February 28 2001 @ 03:51PM EST: [ reply | parent ]
    For anyone else having the same problem, I've whipped up a patch that I will also send to mocha. I found killing a comment on the pages returned an unencoded url as well, so the end result is double-encoding it (don't ask me why, I found this very wierd, so you also have to patch F_admin. This is the full patch and is working well over here:

    --- pages.php.vdanen Wed Feb 28 13:37:42 2001
    +++ pages.php Wed Feb 28 13:37:20 2001
    @@ -38,13 +38,13 @@
    } else {
    F_uphits("T_Blocks",$A["Rid"]);
    $A["Content"] = F_getContent($A);
    - $A["Content"] .= "\n" . F_admin("T_Blocks",$A["Rid"],"/pages_page_.html" . urlencode($page));
    + $A["Content"] .= "\n" . F_admin("T_Blocks",$A["Rid"],"/pages_page_.html".urlencode($page));
    F_drawMain($A);

    if ($A["PageComments"]>0) {
    - F_doComments($A["Rid"],$A["Rid"],"/pages_page_page.html");
    + F_doComments($A["Rid"],$A["Rid"],"/pages_page_.html".urlencode($page));
    print "";
    - F_PostComment($A["Rid"],$A["Rid"],"/pages_page_page.html");
    + F_PostComment($A["Rid"],$A["Rid"],"/pages_page_.html".urlencode($page));
    }
    }

    --- include/common.inc.php.vdanen Wed Feb 28 13:46:42 2001
    +++ include/common.inc.php Wed Feb 28 13:45:46 2001
    @@ -138,7 +138,7 @@
    global $HTTP_COOKIE_VARS,$CONF,$G_URL,$PHP_SELF;
    if (F_isAdmin()) {
    # kill
    - $s = sprintf("\n",$what,$item,$where,$G_URL);
    + $s = sprintf("\n",$what,$item,urlencode($where),$G_URL);
    # edit
    $s .= sprintf("\n",$what,$item,$where,$G_URL);
    # verify

    It might get a little distorted on the post, I'm not sure. If you need/want the patch, just email me.
    Vincent Danen writes on Wednesday February 28 2001 @ 03:52PM EST: [ reply | parent ]
    Ugh... that didn't come out too good. =( We need a file attachment feature I think.... =)
    casino writes on Saturday September 25 2004 @ 06:04AM EDT: [ reply | parent ]
    Please check the sites in the field of online poker game | online poker game | http://www.nabpak.org/ | cheap tramadol | cheap tramadol | http://www.myrtlejones.com/ | internet casinos | internet casinos | http://www.vtsae.org/ | online poker | online poker | http://www.online-deals99.com/ | texas holdem poker | texas holdem poker | http://www.langsrestaurant.com/ | casino gambling | casino gambling | http://www.uk-virtual-office-solutions.com/ | casino | casino | http://casino.blackjack-123.com/ | online poker | online poker | http://www.online-poker-555.com/ | weight loss pill | weight loss pill | http://www.phrensy.org/ | lose weight | lose weight | http://www.majorapplewhite.info/ | order phentermine | order phentermine | http://www.nikkiwilliams.info/ | poker game | poker game | http://www.thorcarlson.com/ | phentermine | phentermine | http://www.workfromhome-homebasedbusiness.com/ | tramadol online | tramadol online | http://www.montaguefineart.com/ | ... Thanks!!!
    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
    Support This Project


    PHP.net
  • PHP before Canadian government, in Ottawa, October 19th and 20th, 2004
  • Forum PHP in Paris, November 18 &amp; 19, 2004
  • PHP 5.0.2 released!
  • PHP 4.3.9 released!
  • MySQL ComCon Europe
  • OSCOM.4 with Apache Track
  • New Installation Instructions
  • PHP 5.0.1 Released!
  • PHP Tunisie Magazine
  • PHP 5.0.0 Released!

  • PHPBuilder
  • Eclipse for the PHP Developer
  • Enjoy the Openness of MySQL
  • Getting Started with PHP-GTK: Part 1
  • SQLite Support for PHP4
  • Creating a PHP-Based Content Management System
  • Protecting MySQL Sessions With SSH Tunnel (Port Forwarding)
  • Logging into a RETS Server
  • Value Objects and Data Access Objects with PHP 4.2.x
  • Creating a PHP Script for Web Mail Posting and Notification
  • Remote Scripting with Javascript, IFrames and PHP

  • Bordom
  • The Toilet Online - Leave It To Bush!
  • Corn/ Pellet Stoves
  • NCBuy Weird News: Culinary Kids Turn Up The Heat In The Kitchen - 2004-10-13
  • codejedi.com - Home of Shadow Plan for Palm OS
  • Harvey L Pekar
  • California Secession!
  • VHeadline.com - Andrew McKillop: Energy transition and final energy crisis
  • BBC NEWS | Entertainment | Timeline: 25 years of rap records
  • FuckU-FuckMe. Changing the feel of communication.
  • Mojavi API Docs


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