[Solved] Print pdf does not work

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Locked
JohnnyTheOne
Forum Members
Forum Members
Posts: 17
Joined: Fri Feb 08, 2008 6:03 pm

[Solved] Print pdf does not work

Post by JohnnyTheOne »

if I change manually that line $html=$props->mPropertyValues["content_en"]; in createpdf.php it works
Last edited by JohnnyTheOne on Wed Apr 15, 2009 4:41 pm, edited 1 time in total.
alby

Re: Print pdf does not work

Post by alby »

JohnnyTheOne wrote: if I change manually that line $html=$props->mPropertyValues["content_en"]; in createpdf.php it works
Confirmed and present in next release:

substitute (around #100) with:
//Start MLE
global $mleblock, $mleblockfallback;
$block = (!empty($mleblock)) ? (!empty($mleblockfallback) ? $mleblockfallback : $mleblock) : "_en";
$html=$props->mPropertyValues["content".$block];
//End MLE
Thank you  :)

Alby
JohnnyTheOne
Forum Members
Forum Members
Posts: 17
Joined: Fri Feb 08, 2008 6:03 pm

Re: Print pdf does not work

Post by JohnnyTheOne »

Thanks for the quick response but it does not work
alby

Re: Print pdf does not work

Post by alby »

JohnnyTheOne wrote: Thanks for the quick response but it does not work
Have you substitute the row?
Tried and work for me

Alby
JohnnyTheOne
Forum Members
Forum Members
Posts: 17
Joined: Fri Feb 08, 2008 6:03 pm

Re: Print pdf does not work

Post by JohnnyTheOne »

alby wrote: Have you substitute the row?
yes, here is what I did

Code: Select all

//Start MLE
global $mleblock, $mleblockfallback;
$block = (!empty($mleblock)) ? (!empty($mleblockfallback) ? $mleblockfallback : $mleblock) : "_en";
$html=$props->mPropertyValues["content".$block];
//End MLE
//$html=$props->mPropertyValues["content_en"];
alby

Re: Print pdf does not work

Post by alby »

JohnnyTheOne wrote:
alby wrote: Have you substitute the row?
yes, here is what I did
I re-tried and works for me with content of all languages

Alby
JohnnyTheOne
Forum Members
Forum Members
Posts: 17
Joined: Fri Feb 08, 2008 6:03 pm

Re: Print pdf does not work

Post by JohnnyTheOne »

the problem is with me I will continue looking thanks
JohnnyTheOne
Forum Members
Forum Members
Posts: 17
Joined: Fri Feb 08, 2008 6:03 pm

Re: [Solved] Print pdf does not work

Post by JohnnyTheOne »

Show from DEFAULT_LANG if current lang is not ready:
it must not be selected :'(

maybe you have a solution for this function is very useful
alby

Re: [Solved] Print pdf does not work

Post by alby »

JohnnyTheOne wrote:
Show from DEFAULT_LANG if current lang is not ready:
it must not be selected :'(

maybe you have a solution for this function is very useful
humm, you are right.....
Try with:
//Start MLE
global $mleblock, $mleblockfallback;
$block = (!empty($mleblock)) ? $mleblock : (!empty($mleblockfallback) ? $mleblockfallback : "_en");
$html=$props->mPropertyValues["content".$block];
//End MLE
Alby
JohnnyTheOne
Forum Members
Forum Members
Posts: 17
Joined: Fri Feb 08, 2008 6:03 pm

Re: [Solved] Print pdf does not work

Post by JohnnyTheOne »

work now thanks
alby

Re: [Solved] Print pdf does not work

Post by alby »

yes but not like this ..... I think something  :-\

Alby
alby

Re: [Solved] Print pdf does not work

Post by alby »

Sorry for wrong code,
this is the working code that I add in next release:
//Start MLE
global $mleblock, $mleblockfallback;
$param1 = !empty($mleblock) ? $mleblock : '_en';
$param2 = !empty($mleblockfallback) ? str_replace($mleblock, $mleblockfallback, $param1) : '_en';
$html=$props->mPropertyValues['content'.$param1];
if( (!empty($mleblockfallback)) && (empty($html)) && ($param1 != $param2) ) $html=$props->mPropertyValues['content'.$param2];
//End MLE
Alby
Locked

Return to “[locked] CMSMS MLE fork”