Hi all,
i've got 2 problems with Static_Docs,
it's a great module, but i can't seem to solve 2 problems
1. the w3c validation doesn't like & chars it suggests to replace them with &
Static docs has a cool feature (which isn't so cool right now :) ) that it replaces all simple HTML hrefs with entire cgi links. like href="bar.html" -> href="http://test.linuxbusiness.it/html/index.php?module=Static_Docs&func=viewf=/bar.html"
The problem is it uses plain & chars, how can i replace them with & ?
2. inserted HTML pages usually contain a tag(it's the same with the example welcome.html page), but i end up with having more tags in the final document. How can i get rid of that?
thanks
:D
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- Guite responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 05:53 PM
- frw responded to »Bug in the SMTP mail transfer protocol - Port 25 - Zikula 1.2.9« 22. May
- mdee responded to »Short URL questions« 22. May
- mesteele101 responded to »Problem in Database Connection« 21. May
- Herr.Vorragend responded to »Clip Documentation and Doubt« 19. May
- mazdev responded to »zikula 1.3.3. and IE9« 19. May
- mesteele101 responded to »How to install Zikula for MSSQL ??? - Part II« 19. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Statics_Docs and w3c validation
-
- Rank: Helper
- Registered: Apr 08, 2002
- Last visit: Oct 21, 2009
- Posts: 614
for 1: I assume you mean the prefix index.php?module=Static_Docs&type=user etc? This is set once during installation time. Open pninit.php, search forand replace it withCode
$parse_url = 'index.php?module=Static_Docs&type=user&func=view&f=';Code
for 2:
open inc/parser.class.php, locate function _removeArroundBody and replacewithCode
Code
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 28, 2003
- Posts: 11
jn
for 1: I assume you mean the prefix index.php?module=Static_Docs&type=user etc? This is set once during installation time. Open pninit.php, search for
and replace it withCode
$parse_url = 'index.php?module=Static_Docs&type=user&func=view&f=';Code
for 2:
open inc/parser.class.php, locate function _removeArroundBody and replacewithCode
Code
for1: seems like it didn't solve the problem, any other ideas?
for2: thanks, that worked :) -
- Rank: Helper
- Registered: Apr 08, 2002
- Last visit: Oct 21, 2009
- Posts: 614
You're right; I will have a look at it later.
BTW: The changes above are in CVS already.
Jörg -
- Rank: Helper
- Registered: Apr 08, 2002
- Last visit: Oct 21, 2009
- Posts: 614
misc2000, as you mentioned, pnModURL puts in & instead of & as well. BUT: With the line you posted, all works well. Of course, you have to re-initialize the module for this change to take effect.
If you have a lot of data (i.e. desriptions of files etc) you do not want to lose (which would happen re-initializing), I would suggest to edit the vaule directly in the table <prefix>_module_vars; have a look at the entry with pn_modname = Static_Docs and pn_name = mime_html_parse_url and change pn_value to include &
Jörg</prefix> -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
pnModURL does indeed generate links with a & only. This is becuase internal functions like pnRedirect need this format of URL. To generate a URL in the correct format use pnVarPrepForDisplay(pnModURL(.......)).
So the correct line becomes
Code
-Mark
--
Visit My homepage and Zikula themes. -
- Rank: Helper
- Registered: Apr 08, 2002
- Last visit: Oct 21, 2009
- Posts: 614
which is the way it is in CVS now. Thank you Mark for clarifying this. -
- Rank: Helper
- Registered: Apr 08, 2002
- Last visit: Oct 21, 2009
- Posts: 614
-
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
Static docs is a 3rd party module and not part of the core installation and should (IMO) remain that way. Static docs is only one among a number of modules taking different approaches to the problem of existing content. To select one and include it in PN could potentially stifle development of others.
PN's goal always has been a lean core with a good architecture for 3rd party developers.
-Mark
--
Visit My homepage and Zikula themes.
- Moderated by:
- Support
