andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


Modified code to allow manpaths...

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Man Page Lookup
View previous topic :: View next topic  
Author Message
anacreo
Newbie


Joined: 18 May 2004
Posts: 4

PostPosted: Tue May 18, 2004 1:53 pm    Post subject: Modified code to allow manpaths... Reply with quote

In the class file:

~line 85 added:
$this->path = '';

~line 184 modified the line to include the path:
$pipe = popen('man ' . ($this->path ? "-M {$this->path} " : '' ) . ' -k a', 'r');

~line 274 modified the line to include the path:
$exe = 'man ' . ($this->path ? "-M {$this->path} " : '' ) . ($this->section ? "-S{$this->section} " : '') . EscapeShellCmd($cmd);

In the test file I inserted my line:
$mp = new ManPageLookUp();
$mp->path = "/usr/dt/man:/usr/man:/usr/openwin/share/man:/usr/local/man:/opt/hpnpl/man:/usr/perl5/man:/opt/gnome/man";
$mp->useTimer(true);
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Wed May 19, 2004 3:58 am    Post subject: Reply with quote

Hi anacreo, and welcome to the board!

Many thanks for this update - it's a nice little addition to make sure people can view the man pages, regardless of their path settings. I'll be sure to add this as soon as I can.

Regards,

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Man Page Lookup All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group