PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 07-31-2004, 12:11 AM   #1
hotmonkey
Green Mole
 
Join Date: Jul 2004
Location: Michigan
Posts: 2
Need to index orphan php pages, how?

I have a directory or two that contain no index.php page within them or pages that contain any links to the pages in that directory. They are just directories that contain specific php pages full of content. A general example would be;
DIR cars/
ford.php
chevy.php
toyota.php
no links to them (or in them) and no index in directory.

(actual example
(ROOT...)/archive/20040313.php
(ROOT...)/gallery/trout.php or 20040415_stills.php
if this may offer an idea or clue)

Is there some other answer than "sorrrrry duuuude, make an index that lists them....." (there are several hundred and they change from time to time), and listing them one at a time is not pratical at the moment.

There are other indexers that seem to do this, however I would like to stick with digphp as the results seem better (nicer) once I got the hang of setting the default search to "or", tweeking a template and along with other helpful hints from this forum.

Any suggestions or ideas will be welcome, or places to look. I am a bit remedial at the moment concerning phpdig but learning and would prefer to not have to change to another indexer/search if I could help it. Thank you!

Last edited by hotmonkey; 07-31-2004 at 12:16 AM.
hotmonkey is offline   Reply With Quote
Old 07-31-2004, 01:48 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. PhpDig follows links so just make a list, but don't hand-type the list...
Code:
<?php
// link to files modified within the hour in current directory
$base = basename($_SERVER['PHP_SELF']);
if ($handle = opendir(".")) {
    while (false !== ($file = readdir($handle))) {
        if ($file != "." && $file != ".." && $file != $base) {
            if (filemtime($file) > time() - 3600) {
                echo "<a href=\"$file\">$file</a><br>";
            }
        }
    }
    closedir($handle);
}
?>
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 07-31-2004, 08:10 AM   #3
hotmonkey
Green Mole
 
Join Date: Jul 2004
Location: Michigan
Posts: 2
I think the "Head Mole" title suits you well today. A wonderful and easy work around to my need.

Did need to try twice after a moment of staring:
ORIG: if (filemtime($file) > time() - 3600) {
Changed to "<" and found all the files.

Thank you for sharing your knowledge.

Followup Question:
Once the files are in the index database, can I remove this page and trust that the "/admin/update-functions" will find them again or do I have to leave this page in the directory for future updates on existing pages?

Again, Thanks!
hotmonkey is offline   Reply With Quote
Old 07-31-2004, 11:41 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
You can use the update button from the admin panel to remove the list page from PhpDig and update portions of a site. If you add new pages that are not linked, just use the list script with ">" and maybe change 3600 to X so that the files listed are those that were modified within the last X seconds.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Index some, but spider all pages griemer Troubleshooting 0 01-16-2007 06:30 AM
PhpDig 1.8.5 does not index all pages gaam Troubleshooting 3 12-14-2004 05:57 AM
how to index only not indexed pages? zaartix How-to Forum 2 07-14-2004 05:23 AM
converted from html pages to php pages now no pages will index!!! help!! bigals Troubleshooting 24 04-01-2004 10:34 AM
do not index all pages robilix Troubleshooting 2 11-25-2003 02:50 PM


All times are GMT -8. The time now is 10:38 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.