I'm using tinyD with the tag to show a summary in top page. Well, now I would like a link to access the whole article. How can I do it?
hi chico.
You are a heavy user of TinyD
edit blocks/tinycontent_content.php like this:
// if template file exists, parse it.
if( file_exists( "$mymodpath/templates/blocks/tinycontent_content_block.html" ) ) {
$myts =& TinyDTextSanitizer::getInstance() ;
$tpl = new XoopsTpl();
$tpl->assign( array(
'storyid' => $options[1] ,
'title' => $myts->makeTboxData4Show( $title ) ,
'content' => $content
) ) ;
$block['content'] =& $tpl->fetch( "file:$mymodpath/templates/blocks/tinycontent_content_block.html" ) ;
} else {
As this modification is also applied my recent repository, don't mind compatibilities in future.
And rename templates/blocks/tinycontent_content_block.html.dist to tinycontent_content_block.html.
Edit it like this:
<{$content}>
<br />
<a href="<{$mymoddir}>/index.php?id=<{$storyid}>">more...</a>
Thank you for your answer
It worked well, but $mymoddir var didn't.
It returns an empty string (the link returned is:
http://space/index.php?id=1 where space is my localhost).
I had to edit templates/blocks/tinycontent_content_block.html like this:
<{$content}>
<a href="<{$xoops_url}>/modules/tinycontent3/index.php?id=<{$storyid}>">more...</a>
Sorry.
It's a mistake.
// if template file exists, parse it.
if( file_exists( "$mymodpath/templates/blocks/tinycontent_content_block.html" ) ) {
$myts =& TinyDTextSanitizer::getInstance() ;
$tpl = new XoopsTpl();
$tpl->assign( array(
'storyid' => $options[1] ,
'mymoddir' => XOOPS_URL . "/modules/$mydirname" ,
'title' => $myts->makeTboxData4Show( $title ) ,
'content' => $content
) ) ;
$block['content'] =& $tpl->fetch( "file:$mymodpath/templates/blocks/tinycontent_content_block.html" ) ;
} else {
The next TinyD assigns $mymoddir.
Thanks giJoe, it worked excellent.