didYouKnow_v0.1.zip

kuzco

Avatar: kuzco

2011-10-23 13:04

Hello,
I have implemented didYouKnow_v0.1.zip on my CMS 3.2 page - so far so good.

I would like to read the "did you know news" not from a new section menu4 - I would like to read them directly from an already existing subpage.

Means:
I have already a subpage News with my news. All news are seperated by a line break. I am looking now for a way to read the latest or last 2 news from this page and to put this news directly in the field for the "disyouknow" - i do not need random etc, only the last 1 or 2 news.

It is difficult to explain, so I hope it is clear what I mean. Any hint is welcome.

reagards
kuzco

» Quick.Cms v3.x

kuzco

Avatar: kuzco

2011-10-23 21:50

Hello,
it is me again.
When playing with didyouknow, I have sen, that not the entry (longdescription) of the subpage will be displayed, it will be displayed the name of the page.

When checking the screenshot http://opensolution.org/download/Quick.Cms/plugins/didYouKnow.png, it will display me the description.

Any hint ?

regards
kuzco

kuzco

Avatar: kuzco

2011-10-25 17:32

Hello,
does anyone tried this plugin ?

Have still the problem, that not the sDescriptionFull will be displayed (like in the example screensho), it will display the name of the subpage.

In pages.php:
/**
* Display did you know page
* @return string
* @param string $sFile
* @param int $iType
*/
function throwDidYouKnowPage( $sFile, $iType ){

if( !isset( $this->aPagesParentsTypes[$iType] ) )
return null;

$oTpl = TplParser::getInstance( );
$aPages = $this->aPagesParentsTypes[$iType];
$iCount = ( count( $aPages ) - 1 );
$iKey = rand( 0, $iCount );

if( isset( $aPages[$iKey] ) ){
$aData = $this->aPages[$aPages[$iKey]];
if( !empty( $aData['sDescriptionShort'] ) ){
$aData['sDescriptionShort'] = changeTxt( $aData['sDescriptionShort'], 'nlNds' );
}
$oTpl->setVariables( 'aData', $aData );
return $oTpl->tbHtml( $sFile, 'DID_YOU_KNOW' );
}
} // end function throwDidYouKnowPage

This will use the random method to display a page, but where is the content ?

regards
kuzco

Back to top
about us | contact