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.


Links to SEE ALSO references+++

 
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: Fri Jun 04, 2004 6:42 pm    Post subject: Links to SEE ALSO references+++ Reply with quote

Within the buildManPage function of class.manpagelookup.php add in this code:
PHP:
<?php ...
                
$this->output ereg_replace("\n\n\n+""\n\n"$build);
                
$replace_str sprintf('<a href="%s?command=\\1&path=%s&section=\\2" title="\\1"><B>\\1(\\2)</B></a>'$_SERVER['PHP_SELF'], urlencode($this->path));  # Begin Anacreo's hack...
                
$this->output preg_replace("/([\w.-]+)\(([0-9]([a-zA-Z]{0,1}|ELF|LIB))\)/",$replace_str,$build); # End Anacreo's Hack

                
if ($this->doemails
                ... 
?>


Now mind you passing the path on the URL line is part of another hack but it shouldn't interfere with anything if you aren't using it. Also the ELF and LIB are to support those two man page sections without making the regex gobble up too many things. I might change this later. But this will make the manpage browser far more delightful Smile
Back to top
View user's profile Send private message
amnuts
Site Admin


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

PostPosted: Thu Jun 10, 2004 5:33 am    Post subject: Reply with quote

Another fine addition! I can't wait till I'm able to integrate them and release a new version. Smile
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