View Full Version : [Build HTML] Mod
VSDan
05-26-2006, 08:18 PM
I'm considering coding a phpLD mod that will build static HTML pages. This will resolve some issues some people have been having with Rewrite. The script (build.php) would:
- build category / subcategory directories if they do not exist.
- build category / subcategory listing HTML pages (broken down over multiple pages with navigation system - you preset the number of listings to display per page)
- delete category / subcategory directories that no longer exist in database.
- delete category / subcategory listing HTML pages that no longer applicable.
Unless you have a small database, you would run the script automatically via cron at set dates/times - otherwise, can easily timeout (browser and/or server).
Does such a mod strike some interest?
Steven Myers
05-26-2006, 08:25 PM
I am no programmer, or anything along the lines of this kind of work, but from small experience with coding and database entries, I think this will do a very good deal for a lot of people.
Again, I can't break down some useful info for you as to why it would be useful, but this would be a tool that I myself would use, and even the cron will do a huge help to delete directories that don't exist, and so forth and so on with the layout you have here.
Sorry if this doesn't help at all, but it shows that I would be interested myself to use this mod.
Thanks for the info about this Dan :)
Hey Dan ;)
Yep, this would be a cool mod, but there are some things to note:
On huge DB's the script could time-out even when runnig it in a cron job. You could do it with redirects, let's say precess 500 entries per script, then redirect and you run the tool from admin panel. When you add a new category the script should add the html page automatically.
If the user is running a huuge DB, the server needs also a large harddrive to store that many files.
Movable Type (http://www.sixapart.com/movabletype/) is using files instead of URL rewriting.
Boby
euwebdirectory
06-06-2006, 02:56 PM
Hi Vsdam, yes i interesting. By the way, i have a spanish directory, first in google.es, (with search "Directorio web")and i dont lost the PR .... i need this mod, convert the "/" in .html like this ...
CAT
http://www.mysite.net/cat1.html
subcat
http://www.mysite.net/cat2.html
and not
http://www.mysite.net/cat1/cat2.html
look the example in Directorio web on mi sign ...
Time ago i see in any place this mod, but now i dont found and asking for it to booby ....
Sorry for my english ....
note: i buy yesterday version 3.0.5 i hope this help me to better performance for this Directory ....
Regards and we´ll spoke about db migrate for FreeScripDirectory to phpld
technomatters
12-18-2006, 11:54 AM
Hello dan,
we have bought mods from you. we have a question that the re_write generator gives "index.php" is it possible to get index.html?
thanks in advance.
A.E.O
01-06-2007, 06:02 AM
i'd like to have .html for my directory too. i'm new to phpld and not a programmer .
please let me know how i can get the mod? sorry if this will slow down everybody here.
thanks.
thompson
01-06-2007, 09:41 AM
cool mod dan.
VSDan
01-09-2007, 05:54 AM
I started the mod on Saturday, and it is now coded. I'm now testing. Hope to have BETA version ready for release in the phpLD_Vault later this week or next week. Some notes:
- Mod creates category and subcategory directories, and populates each with HTML pages (one HTML page per listings page in each given cat / subcat).
- Mod creates top index.html page, so you can link to directory/index.html (instead of directory/index.php).
- Mod creates Latest directory and Latest/index.html for latest listings. Optional.
- Mod creates Top directory and Top/index.html for top listings. Optional.
- Mod creates detail pages for listings. Optional.
- You can select two(2) Build Types: Build All and Build Staggered. Build All build all directories and HTML in one stage. If you have many listings and/or cats/subcats, you can select Build Staggered to minimize timeout issues. To further minimize timeout issues (in cases of large databases), you can also build individual cats / subcats (applicable to both Build All and Build Staggered), and/or change the number of steps per stage (only applies to Build Staggered). And in the case of Build Staggered, you can either build manually or automatically: manually you click on link to proceed to next stage, and automatically it proceeds automatically to each stage.
- There may be disk space issues if you have a large database and/or limited disk space (especially if you are hosted virtually). You can get a very 'rough' idea as to how much disk space is required:
(Total Number Listings / Number Listings Per Page x Page Size) + (3 x Page Size)
* you can estimate Page Size by right-clicking on a typical listings page, and selecting [Properties] from menu (or [View Page Info] if using Firefox).
* second term in parentheses references top index.html, Top/index.html, and Latest/index.html pages (3 files)
- The mod exists outside the phpLD Admin, inside the directory public area. It has to be this way because in order to build the HTML, the mod has to be in the user PHP environment. However, the mod is still password protected like other phpLD Admin files. If you are not logged in phpLD Admin, and you call build.php, then you will redirected to admin/login.php to login first. Very secure. But you can always rename the file to something nonsensical (e.g., kj34jh89dioF7nZ2.php) - and/or password protect the file using Basic Authentication (in top .htaccess file):
Content visible to registered users only.
Why static HTML instead of dynamic? Less load on server and faster directory rendering since less PHP calls and less Rewrites for server to execute. More search engine friendly.
Screenshot:
Content visible to registered users only.
nice Dan. you make quality MODs.
VSDan
01-09-2007, 07:08 AM
Thanks =) I'm most proud with this mod.
Harry1985
03-07-2007, 01:11 PM
Is there any news about this mod ? I am also interested since i ran in trouble with the mod rewrite.
pragent
03-07-2007, 03:17 PM
Thank you for very good MODS .....
VSDan
03-07-2007, 11:31 PM
As an update, the mod is nearly complete. However, been too swamped lately to finish. Will get to it sometime in March for release.
pagekeeper
03-10-2007, 07:50 PM
Cant wait to try this out... im so desperate for it HEHE.
Is it possible to have the {ID}.html to the title of the link? as that would be a big bonus in terms of seo.
navjotjsingh
03-24-2007, 11:36 AM
Any updates on its release?
Matt1
03-25-2007, 05:59 AM
This is great. I was just going to suggest implementing this into a PHPLD future release but I thought I would perform a board search first. I'm very interested in this too.
VSDan
03-25-2007, 06:08 AM
Sorry, for the delay. Been bogged down with existing mod updates and support, in addition to tending to our company matters. But, I haven't forgotten. If I have a chance, I will look into the mod this week - depends on how my cold progresses in the next few days.
Matt1
03-25-2007, 06:12 AM
VSDan, I saw that you have a couple of build options... For those that don't want to build their entire directory, you should include the ability to build a static page for only the directory home page (category listing page). This alone will dramatically reduce server load and always allow your home page to load lightening fast.
VSDan
03-25-2007, 06:28 AM
Hi:
The mod has changed since the last screenshot. You can opt to not build category pages, and the just the top index.html page.
pagekeeper
04-08-2007, 01:10 AM
Is there a release date now? any news? :)
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.