Warning: include(/home/pizzads/public_html/zogworld/quote.php) [function.include]: failed to open stream: No such file or directory in /home1/pizzanig/public_html/zogworld/blog/2004/08/update-archive-read-for-blogger.php on line 32

Warning: include() [function.include]: Failed opening '/home/pizzads/public_html/zogworld/quote.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home1/pizzanig/public_html/zogworld/blog/2004/08/update-archive-read-for-blogger.php on line 32

Warning: include(/home/pizzads/public_html/zogworld/menu.php) [function.include]: failed to open stream: No such file or directory in /home1/pizzanig/public_html/zogworld/blog/2004/08/update-archive-read-for-blogger.php on line 36

Warning: include() [function.include]: Failed opening '/home/pizzads/public_html/zogworld/menu.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home1/pizzanig/public_html/zogworld/blog/2004/08/update-archive-read-for-blogger.php on line 36

Sunday, August 01, 2004

UPDATE: Archive Read for BLOGGER

Since I did not like the list o' links that Blogger had for archives and since I wanted something PHP to work with, SO I wrote a nice little script for creating the nice pull down menu for archives you see on the right.

It is available HERE for free. archive_read.zip (5 KB)

You MUST be publishing VIA FTP
You MUST have PHP installed and running on your SERVER where you publish


Please let me know what you think. I hope you find this useful Check back for updates.

UPDATE: v0.4 Link above gets newest version (0.4).

2 new features added

  1. Better File checking for available archive files
  2. SORTING of archives - which should have been in the very first version.
Please leave comments if you use it to your BLOG so it can be seen in action.

17 Comments:

  • At 6/25/2004 03:27:33 PM, Arthur said…

    A little question: where do I put this code? Can I paste this in the template codes itself? You mean the template can be FTP'd as a PHP file? Thank you so much.

     
  • At 6/27/2004 05:50:11 PM, David said…

    This post has been removed by the author.

  • At 6/28/2004 10:02:32 AM, Arthur said…

    This tool is sooooo nice! I love putting links (in my page) in drop-down boxes... good thing I found this tool. Thank you answering some of my questions. Have a nice day!:)

     
  • At 6/28/2004 11:41:13 AM, David said…

    I had to DELETE my comment from above because of the PHP in it.

    Here it is corrected for display:
    Here is the README:

    Basically - the directory that is UNZIPPED - archive_read - needs to be uploaded AFTER you modify the common.inc file.

    if you have any more questions, or something does not seems clear I will be more then happy to help.

    1) UNZIP the file. Keep the directory structure in tact. You should have 4 files
    -archiveread.php
    -common.inc
    -index.php
    -readme.txt
    If you are reading this - you have readme.txt

    2) OPEN common.inc and set the variables there.

    3) UPLOAD entire directory to your webserver.

    4) LOGIN to BLOGGER - you will need to modify your TEMPLATE, ARCHIVE, and PUBLISHING SETTINGS.

    5) UNDER SETTINGS->PUBLISHING your BLOG FILENAME will have to be a .php file.
    For example, if it is now index.html you will need to rename it index.php
    - SAVE SETTINGS
    6) UNDER SETTINGS -> ARCHIVING your ARCHIVE FILENAME will have to be a .php file.
    For Example, if it is now archive.html, it will need to be archive.php
    - SAVE SETTINGS
    7) TEMPLATE -> EDIT CURRENT
    a - SELECT ALL and copy it - paste this someewhere and save this just in case
    b - FIND Archives section in TEMPLATE -
    c - REMOVE everything IN the ARCHIVE section (about 6-7 lines)
    d - add the following

    < ? php
    include ('/path/to/archive/archiveread.php');
    ?>

    You will need to modify the above to be the FULL PATH to this script.

    8) SAVE TEMPLATE CHANGES
    9) REPUBLISH ENTIRE BLOG.
    10) You are ready to go!

     
  • At 6/28/2004 11:54:58 AM, David said…

    BTW - Arthur - where is your blog so I can check it out and see the script in action else where.

     
  • At 6/28/2004 04:03:37 PM, Arthur said…

    Actually, I'm still configuring the PHP function in my site. I've already added the scripts in my end but I haven't uploaded it yet in Blogger templates.

    I have one more question though. What I'm planning to do now (bec. I am making a revamp in my blog's design) is to have my blog viewed inside an iframe. Showing the index or the current posting is easy (because you can specify the target in the iframe). But my problem is, how can I view the archives without manually coding every archive file's link everytime a month/week passes by? Any suggestions?

     
  • At 6/28/2004 04:08:54 PM, Arthur said…

    Btw, the URL of my site is http://www.myarthurdelrosario.ph.

    Check this site, http://www.greencapsule.org. See the iFrame being used in the site? I want to publish my blog like that but with the "view archive" function still intact (and without manually inputting the archive links everytime update my blog and Blogger creates a new file for my archives list).

     
  • At 6/28/2004 04:43:00 PM, David said…

    I think this should work (I emphasize should).

    OPEN the archiveread.php file

    REPLACE echo "<input type=submit value=Go>\n";

    with

    echo "<input name=\"submitName\" type=\"button\" value=\"Go\"
    onClick=\"top.frameB.location.href = this.form.archive_read.archive_read.options[this.form.archive_read.archive_read.selectedIndex].value;return false\">";

    this would be in a set up like
    <frameset rows="20%,*">
    <frame src="frameA.html" name="frameA">
    <frame src="frameB.html" name="frameB">
    </frameset>

    You would change the frameB in the above javascript with the name of your frame.

    I THINK this will work. Been a long time since I played with forms and frames.

    BTW - you site looks good

     
  • At 6/28/2004 04:48:44 PM, David said…

    OR

    You can replace

    echo "<form name=\"archive_read\" ACTION=\"$archive_page\" METHOD=POST>\n";

    with

    echo "<form name=\"archive_read\" ACTION=\"$archive_page\" METHOD=POST target=\"FRAMENAME\">\n";

    I am not sure if that will work either but you can try.

     
  • At 6/28/2004 05:16:03 PM, Arthur said…

    Where should I put this? Inside the blogger template still? I will keep you posted on the progress of this project. Thanks dude!

     
  • At 6/28/2004 06:10:56 PM, David said…

    The FORM modifications above would be in the achiveread.php file. It is one of the 3 files that you would upload to YOUR server - not place in the template.

    The only thing that goes in the template is the php include statement from the README file.

     
  • At 7/3/2004 09:02:40 PM, Arthur said…

    ei David!

    So I didn't push through with my plans to build the iFrame. I had a hard time configuring the PHP script (to work).

    Btw, thanks for the dropdown script. I have some problems though. I'm getting the message "Cannot modify header information - headers already sent by...". I don't know what I did wrong. You may want to check it out at my site. Again, thank you and have a nice day! I'll post a linkback once the site is 100% complete.

     
  • At 7/3/2004 09:52:01 PM, David said…

    Arthur,

    The problem is that some how you added extra "white space" at the end of the common.inc file. If you can use an editor that will show line numbers the last line should be the ?> to close off the php. Anything after that will attempt to be displayed.

    Also, I looked at one of your archive pages - I would change the "include" statement so that it is absolute. There was an error about not finding it.

     
  • At 7/3/2004 11:51:55 PM, Arthur said…

    Nice! Now it is working... it was the white space indeed. Btw, what's your last name? Gonna include your site in my link list (if it is OK). Thanks man!

     
  • At 7/4/2004 01:10:05 AM, David said…

    GREAT!! I am glad it worked.

    Thanks for the link back - I will include you so others can see it.

    I am going to release v 0.4 soon.

    just include me as the Zog Blog - that would be cool.

     
  • At 8/1/2004 10:17:08 PM, CarLBanks said…

    I keep getting a bad archive error.

     
  • At 8/17/2004 11:59:00 AM, David said…

    Sorry about the bad zip file - that is corrected now and works fine.

     

Post a Comment

<< Home

 

Warning: include(/home/pizzads/public_html/zogworld/menu.php) [function.include]: failed to open stream: No such file or directory in /home1/pizzanig/public_html/zogworld/blog/2004/08/update-archive-read-for-blogger.php on line 322

Warning: include() [function.include]: Failed opening '/home/pizzads/public_html/zogworld/menu.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home1/pizzanig/public_html/zogworld/blog/2004/08/update-archive-read-for-blogger.php on line 322