Jump to content

dotnetic

Members
  • Posts

    1,037
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by dotnetic

  1. Another problem. If i set Hanna Code Text Formatter for the field body and then want to output the body field in my template via PHP, all other code from my Hanna Code snippet is overwritten. Only the field $page->body appears. To clarify, here is what i got: Field with the name body -> Text Formatter: Hanna Code Text Formatter Hanna code: !HannaCode:newsdetails:eyJuYW1lIjoibmV3c2RldGFpbHMiLCJ0eXBlIjoiMiIsImNvZGUiOiJlY2hvICRwYWdlLT50aXRsZTtcclxuXHJcblxyXG5pZigkcGFnZS0+dGh1bWJuYWlsKXtcclxuXHQkaW1hZ2UgPVwiPGEgaHJlZj0neyRwYWdlLT50aHVtYm5haWwtPnVybH0nIGNsYXNzPSdsaWdodGJveCc+XCI7XHJcblx0JGltYWdlIC49XCI8aW1nIGNsYXNzPSdwdWxsLXJpZ2h0IGltZy1wb2xhcm9pZCcgc3JjPSd7JHBhZ2UtPnRodW1ibmFpbC0+d2lkdGgoMjAwKS0+dXJsfSc+XCI7XHJcblx0XHRcdFx0XHRcL1wvICRpbWFnZSAuPVwiPGltZyBjbGFzcz0ncHVsbC1yaWdodCBpbWctcG9sYXJvaWQnIHNyYz0neyRwYWdlLT50aHVtYm5haWwtPmdldFRodW1iKHRodW1ibmFpbCl9Jz5cIjtcclxuXHQkaW1hZ2UgLj1cIjxcL2E+XCI7XHJcbn1cclxuXHJcbmVjaG8gJGltYWdlO1xyXG5lY2hvICRwYWdlLT5ib2R5O1x0In0=/!HannaCode here is the PHP for the Hanna Code: echo $page->title; if($page->thumbnail){ $image ="<a href='{$page->thumbnail->url}' class='lightbox'>"; $image .="<img class='pull-right img-polaroid' src='{$page->thumbnail->width(200)->url}'>"; // $image .="<img class='pull-right img-polaroid' src='{$page->thumbnail->getThumb(thumbnail)}'>"; $image .="</a>"; } echo $image; echo $page->body; template newsdetail.php <?php $hanna = $modules->get('TextformatterHannaCode'); echo $hanna->render('[[newsdetails]]'); ?> When i open the page, only the contents of the body field appear. No Hanna Code is actually used in the body field. Just plain text!!!! If i remove the text formatter for the body field, everything works fine. But sometimes i want to use Hanna Code in my body field as well. So how do i do that?
  2. Next Generation of Ultra Gesture Keyboard: TouchPal Wave! Use simple gesture to input a sentence! http://t.co/pUW9AQ3TsD

  3. Hey Ryan. Thanks for the quick fix Now the PHP example works, but why can´t we use Hanna Code directly in our template files just by using [[name_of_hanna_code_snippet]]? Are there performance issues?
  4. Is it possible to use Hanna Code directly in my template file or in PHP without using a field for it? For example Use directly: <?php include("./head.inc"); ?> <div class="container content"> <div class="row-fluid"> <a name="content"></a> [[newsdetails]] </div> </div> <?php include("./foot.inc"); ?> or with PHP: <?php include("./head.inc"); ?> <div class="container content"> <div class="row-fluid"> <a name="content"></a> <?php $hanna = $modules->get('TextformatterHannaCode'); $page->body = $hanna->render('[[newsdetails]]'); echo $page->body; ?> </div> </div> <?php include("./foot.inc"); ?>
  5. +1 for that feature. Take a look at modx, they implemented it this way.
  6. Hi @soma I have OpenSSL 1.0.1 installed for PHP, i used the update from petsagouris and now it works.
  7. I also get "File could not be downloaded.There seems to be a problem with downloading or writing the module." I am on a Ubuntu 12.04 OS. allow_url_fopen is on, permissions on /site/modules/ and /site/assets/ directories are 775 (also tried 777). But still no success Any suggestions?
  8. Hi, is there a solution to get all pages from my folder "features" where "field1" is smaller than "field2"? Is this possible with the find API? I tried it, with echo $pages->get("/features")->find("field1<field2"); but it did not work. Any suggestions how i can achieve this? Thanks in advance. Jens
  9. Knowledge Graph von Google: Warum Suchwörter nicht nur Suchwörter sind http://t.co/WS3SKmFD #interfacemedien via @interfacemedien

×
×
  • Create New...