Loading...
 

PluginNoprint

Trying to hack a new wikiplugin_noprint.php in lib/wiki-plugins that helps wrapping text in order to not get that part of content printed in tiki-print.php:

Here's the try:

<?php

// No printing of content if the page is being printed
// Usage
// {NOPRINT()}
//  data
// {NOPRINT}
	
function wikiplugin_noprint_help() {
  return tra("No printing of Plugin Content in the wiki page print mode");
}

function wikiplugin_noprint($data,$params) {
  global $tikilib;
  extract($params);
  {if $print_page !== 'y'}$data = trim($data);{/if}
  {if $print_page eq 'y'}$data = "";{/if}
  return $data;
}

?>


Any ideas on how to use Smarty code in Wikiplugins?

ML: very interesting. Let's make sure this works everywhere (articles, wiki pages, blog posts, etc) A PluginPrint would also be interesting.


Page last modified on Wednesday 12 July 2006 03:19:44 GMT-0000

Upcoming Events

No records to display

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.