Welcome to Geeklog, Anonymous Saturday, October 01 2022 @ 10:56 pm EDT

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

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
 Quote

All times are EDT. The time is now 10:56 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