Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Build Category only mod :

Quote Reply
Build Category only mod :
Hello Alex!

Studying on all those Validate routines I was inspired about some changes that struck me while working and I think it could be interesting to discuss this idea in the forum. The suggestion relates to the following areas:

Editor.cgi :- Step 1: Editor.cgi enters in to the Validation sensor.

-gives an option of Validation MODE through ->param"""XXX"""CASE;
Options:
-Mini Validation view MODE: URL, Title, Description only.
-User select MODE: Any fields defined in the Links.pm
-Full view MODE (Default): Shows all fields. As now.

Step 2: Select respective categories to Validate.

It will show the Admin / Section Editor (Responsible for that particular category), how many links are awaiting to validate.

SELECT From Validate
WHERE CategoryID ?

&get_Depth=0 # Gets all the Main categories Listings
.......................# Only related to the new links.

SELECTS FROM CategoryID
WHERE SubCategoryID ? AND
...##... Depth = 0

SELECT COUNT(*) From Validate.CategoryID

# Counts the total links in that category which has new links.

-There are X number of sub categories already validated (and are there in the Links table) and Y number waiting for validation. This gives admin a chance to boost low link category area and rather immediately.

Check in the boxes which categories to validate. Default all selected.

Then Activate the following..........

sub build_stats {, nph-build.cgi

-Once a category Has_num_links is there i.e. if a number is there, that part it does not need to count again from the Links table saving uneccessary action.

-Instead of looping through the entire database, it will simply receive a number from editor.cgi for each category which has already counted a number from Validate adds to to Has_Num_Links! It caches the results. It will also offer a <%grand_total_subcategory> as now editor.cgi has passed the information.

sub build_category_pages {

So, if there are new links in ten subcategories. Then it simply needs to get the Depth = 0 of their respective categories, and build all those validate table + already in Links table. It is therefore it will not have to go through a lengthy process of building the whole database.

&get_build_cat_id

Will get the ID WHERE Depth=0 and list Links + Validate table links.

Proposed sequence of build routines.

&update_Has_num_links
&build_subcategory_page
&buid_Category_page
&build_homepage # Should be the last thing.

BUILD FROM THE Lowest to the most important page in hierarchy.
So that if people click on the new page or a sub category page from the mainpage, then they really should exists and the visitors must be able to enter from the top pages to the sub_categories.

This will open a new arena of possibilities. Then it could offer to the admin ans Section editor. It will make the entire process of validation very fast. Last week I managed to insert 10 links & 4600 categories. It gave timeout problems!

I would be very much interested to participate this area of development, ofcourse only if at all you think it could be important. It could be whenever, if now or later, and would like to test the alpha version before given to all users. Smile Smile Smile