Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Detailed pages directly from DB

Quote Reply
Detailed pages directly from DB
All pages are build as static .shtml pages on my directory.

But there are some 35000 resources, so I can make the detailed pages directly from database instead of 35000 detailed static pages in 'Detailed' folder?

Simple all category pages as static and detailed pages directly from database. possible?
Quote Reply
Re: [hegu] Detailed pages directly from DB In reply to
Erm, why don't you just use mod_rewrite for the detailed pages? =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed pages directly from DB In reply to
Andy wrote:
Erm, why don't you just use mod_rewrite for the detailed pages? =)

Cheers

I can display detailed pages WITHOUT actually creating statric pages with modrewrite? How?
Quote Reply
Re: [hegu] Detailed pages directly from DB In reply to
Yup

What format do you use for detailed pages? (the URL)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed pages directly from DB In reply to
http://www.mysite.com/Detailed/link_id.shtml
Quote Reply
Re: [hegu] Detailed pages directly from DB In reply to
Ok, try this in a .htaccess file:

RewriteEngine On
RewriteRule Detailed/([0-9]+)\.shtml$ /cgi-bin/links/page.cgi?g=Detailed/$1.html [L]

The only issue I can see, is that you have "shtml" ... is that so you can use SSI calls, or did you just happen to call the files .shtml ?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed pages directly from DB In reply to
I call SSI functions on those pages like include files.

Is there any plugin or mod that creates detailed pages in respective folders of the categories and subcategories? (instead of 35000 pages in one folder)
Quote Reply
Re: [hegu] Detailed pages directly from DB In reply to
What version of GLinks do you have? 3.2 onways has the ability to set the format of the detailed pages.

i.e:

Setup > Build Options > build_detail_format

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed pages directly from DB In reply to
Andy, how this option is useful to me?

I am seeing LinkID there.
Quote Reply
Re: [hegu] Detailed pages directly from DB In reply to
Set to the 2nd option, and then it will build the detailed pages in their respective category folder :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed pages directly from DB In reply to
So if I select 'FullCategoryName/Title-LinkID', then the detailed pages will be created like this?

/category/index.shtml
/category/category detailed pages.shtml

/category/subcategory/index.shtml
/category/subcategory/subcategory detailed pges.shtml

I mean Subcategory detailed pages are created in main category?

================
What if I don't want Title in the URL?

'FullCategoryName/LinkID'

Last edited by:

hegu: Mar 15, 2010, 11:35 AM
Quote Reply
Re: [hegu] Detailed pages directly from DB In reply to
Just select "Other" from that list, and enter this:

%Full_Name%/%ID%

Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed pages directly from DB In reply to
Andy wrote:
Just select "Other" from that list, and enter this:

%Full_Name%/%ID%

Smile

Cheers

Thanks Andy. I am going to try this. After I built, I can delete 'Detailed' folder completely?

In previous version of Linkssql, there was an option to name the 'Detailed' folder. Now I can't see it?
Quote Reply
Re: [hegu] Detailed pages directly from DB In reply to
Setup > Paths and URLs, then there is a link at the bottom of that page (click here) .. and this will let you edit the folder the detaiiled pages are build in :)

Re deleting the Detailed folder - you could do, although I would just rename it to Detailed_Old for now, just in case=)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed pages directly from DB In reply to
Quote:
and this will let you edit the folder the detaiiled pages are build in :)

If the detailed pages are going to be created in respective category folders, then I don't need the build_detail_url and build_detail_path ? Empty those two textboxes?
Quote Reply
Re: [hegu] Detailed pages directly from DB In reply to
Dont empty them - just set them to the build_root_url / build_root_path settings - otheriwse it will try and build them at the very root of your server Wink

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed pages directly from DB In reply to
Andy wrote:
Dont empty them - just set them to the build_root_url / build_root_path settings - otheriwse it will try and build them at the very root of your server Wink

Cheers

My build_root_url : http://www.mysite.com
My build_root_path : /home/xxxx/public_html

So fill these two at build_detail_url and path?
Quote Reply
Re: [hegu] Detailed pages directly from DB In reply to
Yup :)

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed pages directly from DB In reply to
Andy wrote:
RewriteRule Detailed/([0-9]+)\.shtml$ /cgi-bin/links/page.cgi?g=Detailed/$1.html [L]

Just wanted to jump in on this thread and clarify something.

I currently build Detailed pages but call them dynamically like this:

Code:
RewriteRule Detailed/(.*)$ /cgi-bin/links/page.cgi?g=Detailed/$1 [L]

Does your rule above actually do away with building the Detailed pages completely but still work as I require? This would save a lot of server space.
Quote Reply
Re: [MJB] Detailed pages directly from DB In reply to
Hi,

Your code looks pretty much the same as mine? =)

Quote:
Does your rule above actually do away with building the Detailed pages completely but still work as I require? This would save a lot of server space.

Yup, you don't need to build the static detailed pages any more.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed pages directly from DB In reply to
OK, I've changed the rewrite rule to yours above and deleted all of my Detailed pages. This works fine as expected.

What I want to know is if I do a Build All or Build Changed so that static pages are updated will it rebuild the Detailed pages or does the rewrite rule avoid this?
Quote Reply
Re: [MJB] Detailed pages directly from DB In reply to
Just tried a Build Changed to test and it's rebuilt some of the Details pages in the directory. Any way to stop this?
Quote Reply
Re: [MJB] Detailed pages directly from DB In reply to
Hi,

Unfortunatly, if you have build_detailed => yes setup in your config, then it will still build those pages.

The only way to stop that happening, is to comment these lines out in nph-build.cgi:

Code:
$PLG->dispatch('create_detailed', \&_build_detailed, {});

and

Code:
$PLG->dispatch('create_detailed_changed', \&_build_detailed, GT::SQL::Condition->new('Links.Timestmp', '>', $time));

This will stop the pages being built (you will obivously need to re-apply this fix though when upgrading)

The other option is to disable build_detailed in setup **BUT** this will stop detailed_url being generated (so you will have to use a global to generate the details URLs then)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Detailed pages directly from DB In reply to
OK, thanks.