DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:stickyexporthtml

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tips:stickyexporthtml [2010-11-17 09:47] – [Change #3] 188.195.45.26tips:stickyexporthtml [2010-11-17 09:55] (current) – [Change #1] 188.195.45.26
Line 31: Line 31:
  
 And this runs for different actions: And this runs for different actions:
 +<code php>
      if ($ACT == 'export_html' || $ACT == 'export_xhtml' || $ACT == 'export_xhtmlbody') {      if ($ACT == 'export_html' || $ACT == 'export_xhtml' || $ACT == 'export_xhtmlbody') {
 +</code>
 ==== Change #2 ==== ==== Change #2 ====
  
Line 44: Line 45:
 ==== Change #3 ==== ==== Change #3 ====
  
-In **inc/parserutils.php**, p_cached_xhtml function, around line 130, or in **inc/cache.php** change:+In **inc/parserutils.php**, p_cached_xhtml function, around line 130, change:
 <code php> <code php>
   $cache  = getCacheName($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.xhtml');   $cache  = getCacheName($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.xhtml');
Line 52: Line 53:
   global $ACT;   global $ACT;
   $cache  = getCacheName($file.$ACT.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.xhtml');   $cache  = getCacheName($file.$ACT.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.xhtml');
 +</code>
 +or in **inc/cache.php** change to:
 +<code php>
 +    if ($mode == 'html' || $mode == 'xhtml' || $mode == 'xhtmlbody') {
 +     parent::cache($file.$mode.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.'.$mode);
 +    } else {
 +     parent::cache($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.'.$mode);
 +    }
 </code> </code>
 The idea is to use a different cache file for "export_html" vs. not.  Without this change I found that once you'd loaded a page with "export_html", subsequent attempts to load the page normally would result in the HTML-only version. The idea is to use a different cache file for "export_html" vs. not.  Without this change I found that once you'd loaded a page with "export_html", subsequent attempts to load the page normally would result in the HTML-only version.
 +
 +
 +
tips/stickyexporthtml.txt · Last modified: 2010-11-17 09:55 by 188.195.45.26

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki