Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP code in PHP code
#9
Johonwayni Wrote:Does the same apply in get_page_content? :/
No. All get_* functions use “echo” to display content, and you need a string for your function. There is no return_* function for the page content, so you will have to come up with your own solution.

I haven’t tested this, but it should work. Add the following function to your code:
Code:
function return_page_content() {
        global $content;
        $content = stripslashes(htmlspecialchars_decode($content, ENT_QUOTES));
        $content = exec_filter('content',$content);
        return $content;
}
Now you have a way to return the content and you can do this:
Code:
<?php echo __(return_page_content()); ?>
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply


Messages In This Thread
PHP code in PHP code - by Johonwayni - 2010-10-06, 23:50:22
PHP code in PHP code - by Zegnåt - 2010-10-07, 00:54:11
PHP code in PHP code - by Johonwayni - 2010-10-07, 03:47:27
PHP code in PHP code - by yojoe - 2010-10-07, 04:26:19
PHP code in PHP code - by Johonwayni - 2010-10-07, 04:56:21
PHP code in PHP code - by Zegnåt - 2010-10-07, 05:46:08
PHP code in PHP code - by Johonwayni - 2010-10-07, 06:55:48
PHP code in PHP code - by Johonwayni - 2010-10-07, 08:29:15
PHP code in PHP code - by Zegnåt - 2010-10-07, 16:42:26
PHP code in PHP code - by Johonwayni - 2010-10-07, 18:22:42



Users browsing this thread: 1 Guest(s)