Welcome to Geeklog, Anonymous Saturday, November 23 2024 @ 06:00 pm EST
Geeklog Forums
for using PHP in block*.thtml
Status: offline
ivy
Forum User
Full Member
Registered: 11/25/04
Posts: 314
Location:Tokyo Japan
Hi
Hiro , Japanese Geeklog member hacked lib-common.php for using PHP code in block*.thtml
// php - by hiro 20070615 {
// return $block->finish( $block->get_var( 'startHTML' ));
$tmp = $block->finish( $block->get_var( 'startHTML' ));
ob_start();
eval( '?>' . $tmp );
$retval = ob_get_contents();
ob_end_clean();
return $retval;
// } php - hiro 20070615
So we can use PHP for hide block title when piriod added.
blockheader_left.thtml, blocheader_right.thtml blocheader.thtml:
before:
<h2>{block_title}{block_help}</h2>
aftrer:
<?php if ( 0 != strncasecmp("{block_title}",".",1)){ ?><h2>{block_title}{block_help}</h2><?php } ?>
Geeklog Japan https://www.geeklog.jp
Hiro , Japanese Geeklog member hacked lib-common.php for using PHP code in block*.thtml
Text Formatted Code
// php - by hiro 20070615 {
// return $block->finish( $block->get_var( 'startHTML' ));
$tmp = $block->finish( $block->get_var( 'startHTML' ));
ob_start();
eval( '?>' . $tmp );
$retval = ob_get_contents();
ob_end_clean();
return $retval;
// } php - hiro 20070615
So we can use PHP for hide block title when piriod added.
blockheader_left.thtml, blocheader_right.thtml blocheader.thtml:
before:
Text Formatted Code
<h2>{block_title}{block_help}</h2>
aftrer:
Text Formatted Code
<?php if ( 0 != strncasecmp("{block_title}",".",1)){ ?><h2>{block_title}{block_help}</h2><?php } ?>
Geeklog Japan https://www.geeklog.jp
12
10
Quote
All times are EST. The time is now 06:00 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content