Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Calling nph-build.cgi from global

Quote Reply
Calling nph-build.cgi from global
Hi there Smile

Is there a way to call nph-build.cgi from a global or maybe a template?
I am trying to build detail pages from the front end, instead of using the Admin panels.

Thanks


Sacrifice is not about what you lose,
it is about what you gain in the process.
Quote Reply
Re: [EZFrag] Calling nph-build.cgi from global In reply to
Does't sound too much of a good idea, but you should be able to do it with either:

Code:
sub {
system("perl /full/path/to/admin/nph-build.cgi --all");
return; # otherwise will print out "1"
}

..or maybe:

Code:
sub {
`perl /full/path/to/admin/nph-build.cgi --all`;
return; # otherwise will print out "1"
}

Hope that helps.

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!

Last edited by:

Andy: Apr 16, 2009, 3:41 AM
Quote Reply
Re: [Andy] Calling nph-build.cgi from global In reply to
I thought that might work, but no luck. Maybe it has to do with permissions that needs to be set correctly.

As for the build process itself, it is a controlled build, a modified version of nph_build.
Only certain users are allowed to build certain Links /detail pages.
Unless I'm missing a point some where, it seems safe to do it.

Thanks Andy Smile


Sacrifice is not about what you lose,
it is about what you gain in the process.
Quote Reply
Re: [EZFrag] Calling nph-build.cgi from global In reply to
Mmm, one of those 2 should work.

Only other way I can think of, is via a plugin.

Make a new plugin, with a function like:

Code:
sub DoBuild {
`perl /full/path/to/admin/nph-build.cgi --all`;
}

...then call in the template with:

Code:
<%Plugins::PluginName::DoBuild()%>

Otherwise, afraid I'm out of ideas.

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: [EZFrag] Calling nph-build.cgi from global In reply to
Try:

Code:
open (FH, "/full/path/to/nph-build.cgi --all");
close(FH);

Also check your logs if it doesn't work.

Last edited by:

Wychwood: Apr 16, 2009, 9:09 AM
Quote Reply
Re: [Wychwood] Calling nph-build.cgi from global In reply to
I couldn't find a to run it from a global. So I went and retrieved the necessary functions from the nph-build.cgi and I created a global that builds the pages as I need them.

Thanks for the help ^_^


Sacrifice is not about what you lose,
it is about what you gain in the process.