1
rossb
USAGE: register_postfilter
  • 2017/1/2 16:24

  • rossb

  • Just popping in

  • Posts: 77

  • Since: 2006/8/28


Hi;

Having difficulty understanding how to use the smarty register_postfilter function with xoops-2.5.8, based on this post:

https://xoops.org/modules/newbb/viewtopic.php?topic_id=72081

Correct me if I am wrong, but, I think this goes into index.php, just after "include $GLOBALS['xoops']->path('header.php');"

function add_header_comment($tpl_source, &$smarty)     {         
return "<?php echo "<!-- Created by Smarty! -->n"?>n" . $tpl_source; 
  } 

$xoTheme->register_postfilter("add_header_comment");


I am nor even sure whether this function still applies and is usable for xoops-2.5.8, nor whether index.php is where it should reside.

Thanks;
Bill

2
rossb
Re: USAGE: register_postfilter
  • 2017/1/2 17:51

  • rossb

  • Just popping in

  • Posts: 77

  • Since: 2006/8/28


Solved;

Problems twofold:

changed location from $ROOT/index.php to modules/publisher/index.php, since it is publisher O/P I want to postfilter (add pupup definitions)

cut and past problems \n became n in the code:

return "<?php echo "<!-- Created by Smarty! -->\n"; ?>\n" . $tpl_source;

now, it works. Such a noob:)

Login

Username:
Password:

Lost Password? Register now!

Who's Online

69 user(s) are online (39 user(s) are browsing Support Forums)


Members: 0


Guests: 69


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits