Jump to content

felix

Members
  • Posts

    214
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by felix

  1. We've also experienced serious performance issues since the 2.5.18 update. It looks like crops aren't cached anymore but beeing generated on every visit. Also processing in general is painfully slow (wasn't the case with 2.5.17).


  2. About the Project

     

    This project is now online for some months and I'm happy to finally have the time and the customers approval to write about it.

     

    As some of you might know germany has one of the best health care systems in the world. If you live here you're enforced by the law to have a health insurance: As an employee you take care of choosing your "Krankenkasse" (health insurance provider) and your employer pays your dues to them like taxes. If you're selfemployed or earn more than "the average worker" you can also choose/have to get a private health insurance which (in many cases) covers more services (most people here for example know the "Chefarztbehandlung" which means if you ever need to get to the hospital your insurance guarantees that you will be treated by the head head physician).

     

    People who are are civil servants get something called "Beihilfe" from the state which partially covers your medical treatments costs depending on where you live / are employed at (the federal state), if you're married, have childs and a bunch of other factors. For the remaining rest you have to get a "Restkostenversicherung" which covers the remaining rest of your expenses for treatments. 

     

    The problem with the "Beihilfe" system is: It's REALLY complex and you have to read a lot (or get help) to understand it's rules. 

     

    That's why our customer, the Continentale Krankenversicherung a.G., one of germanys largest insurance companys, asked us and our friends from Aufgesang (a specialist agency for Online Public Relations, Content Marketing and SEO) to build a portal that informs potential customers and give them the posibility to get in touch with local experts. As a plus people who are interested in an insurance can calculate their costs without having to read through all official laws and brochures.

     

     


    brg_startseite.jpgbrg_rechner.jpgbrg_content.jpg


    There currently are three editors (all professional journalists) that constantly update content and write new texts to cover more in depth topics. Furthermore there are plenty of features that are planned to be released in the next years so the portal as a whole will continue growing and keep getting more usefull and hopefully get the #1 source of information for "Beihilfe" and "Restkostenversicherung" in Germany.

     


    <3 Processwire

    From a technical point of view there were many custom tailored things we've implemented in processwire. The Search uses a modified Version of Jonathan Darts excellent Elasticsearch Module (with a fallback to a basic text search in pw). We've created a lot of services and Tools to import Excel lists of experts and their coverage areas, complex rulesets for the costs calculation, a frontend calculation tool (built on top of Knockout.js), several HannaCodes to insert Download-Buttons and information within the content and last but not least a custom pdf-guide which is completely based on the users input and generated on the fly from the "Beihilfe-Rechner" (calculation tool). There also are mechanisms to inform experts when someone wishes to contact them, a newsletter service and many, many other things. 

    Currently there are about 30 installed modules, 42 "Physical" template files (53 Templates all in all) ... and growing.

    I'm (still) really happy we were allowed to choose processwire for this project as we NEVER had any task we couldn't manage within the blink of an eye. If I think about having to build all those import tools in (i.e.) Typo3 I'm pretty sure we would have needed double the time. So once again: Thanks ryan and all contributors for building such an awesome piece of software.

    P.S.: We're currently searching for senior php developers to continue developing this and more portals and websites. If you're interested: Feel free to contact me!

    P.P.S: There are three more sites to come in the next weeks. I'll present them here as always :)

    • Like 15
  3. We've done (almost exactly) the same thing for a project recently (except for the s3 bucket thing). We've managed to handle different sizing of videos and photos, also. It took us about 2-3 Weeks with 2-3 developers. There was still a lot of libmgeg stuff+ trial and error involved. But Still: I suggest thinking about your budget A LOT would be appreciated as this involves way to much stuff for a "normal" module  :)

    // And when i say exactly i mean we even used fineuploader and the confirmation process you described as a whole. This is odd in many ways... somehow :)

  4. Craig, I had used the Facebook login and didn't have a clue what password (if I even had one). I simply did password reset to get local password and used that when joining into directory.

    I also registered using facebook. I've tried the same and got a new password but still can't login with my username and the new pw :(

  5. I am converting a current project to twig templates (with data providers of course  :D)

    Yay: Glad to hear people using this! :)

    Sorry for the late reply: Just saw that you've posted - I follow this thread now to get notifications on updates.

    You're right. Some propertys don't load automatically and you need to "get" them the way you've stated.

    There currently isn't a "fix" for this as we didn't classified this behaviour as an error.

  6. Here is another discussion on this topic. I think having some sort of "structuring item" for the backend page tree would be great. 

    This could propably be done with an extension. I would write one if i had the time atm... but I don't. But as there (quite often) is a need for this from us I will talk to my boss if we can give this to ryan as a "sponsored" extension.

  7. This is something i'm also missing. And I think most of you don't get what ryanlath means:

    Sometimes it's just a waste of time to create special "folder" templates just to structure the information in the page tree (especially if they need different icons to distinguish them easier). It would be great to have some sort of pre defined "folder" or "strucure" element that doesn't (necessarily) create an url-slug.

    Example: I always create a template called "folder" (sometimes even 10+ just for the icons) and on the root of the page tree there are 2 or 3 folders like "meta" (containing legal information, contact...), Data (containing PageTable items), [...]. Those folders wouldn't need their own url-slug but i don't want their contents to "mess up" my page tree. This is just a matter of keeping things easy to navigate (in the backend) rather than grouping information in a semantic way.

    • Like 3
  8. I'm pretty sure MarkupSEO is causing issues when viewing form results generated by FormBuilder.

    I posted the issue in the Form Builder Support but in case anyone isn't a member (VIP forum), here's the details.

    Error on viewing FormBuilder entries

    Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /home/sites/pretendy-url.com/public_html/wire/core/Selectors.php line 247)
    
    #0 /home/sites/pretendy-url.com/public_html/wire/core/Selectors.php(284): Selectors->create('1.2', '', '')
    #1 /home/sites/pretendy-url.com/public_html/wire/core/Selectors.php(81): Selectors->extractString('1.2')
    #2 /home/sites/pretendy-url.com/public_html/wire/core/Pages.php(165): Selectors->__construct('1.2')
    #3 [internal function]: Pages->___find('1.2', Array)
    #4 /home/sites/pretendy-url.com/public_html/wire/core/Wire.php(389): call_user_func_array(Array, Array)
    #5 /home/sites/pretendy-url.com/public_html/wire/core/Wire.php(344): Wire->runHooks('find', Array)
    #6 /home/sites/pretendy-url.com/public_html/wire/core/Pages.php(260): Wire->__call('find', Array)
    #7 /home/sites/pretendy-url.com/public_html/wire/core/Pages.php(260): Pages->find('1.2', Array)
    #8 /home/sites/pretend
    This error message was shown because you are logged in as a Superuser. Error has been logged. 
    

    Ryan's suggestion

    Uninstalling MarkupSEO makes the FB entries viewable again.

    I had the same issue with ProcessDatabaseBackups. See the related github issue: https://github.com/NicoKnoll/MarkupSEO/issues/4

  9. Very nice site. Also nice to see people using TemplateDataProviders and TemplateTwigReplace. If you've got any suggestions on improving the modules let me know.

    If you got questions concerning elasticsearch: We're just about to release a website which makes use of elasticsearch and modified ElasticSearchProcessWire quite a bit to fit our needs. It's really easy once you got into it.

  10. First of all: Thanks for your help!

    I've just merged the pull request and altered some stuff. Basically I removed the part where you overwrite the fuel every time something is set. If it would have stayed like this you wouldn't have been able to overwrite fuel variables once they are set (no matter if they are proteced or not).

    Now all "system" keys are stored during module initialization and the setter method checks against those. Furthermore I replaced the isset() check within the getter with is_null as isset always returned false.

    • Like 1
  11.  

    Why not write this:

    ob_start();
    echo $form->render(); // draw form or process submitted form
    $this->formMarkup = ob_get_contents();
    ob_end_clean();

    Like this:

    $this->formMarkup = $form->render();

    ?

    Why generate output, create an output buffer, to then assign the buffer to a variable, if you can assign the form output directly to the var?

     

    Yeah - you're right. That's why I've added the second option.


    thanks, I will try this  ;)

    Tried to update to version 1.0.7 and got the following error:

    Notice: Undefined index: ignoredTemplates in /../site/modules/TemplateTwigReplace/TemplateTwigReplace.module on line 194

    The problem is that I could not submit the settings and there is no entry for the new config optionignoredTemplates atm. The second error message occurs because the entry admin is not saved as well so I got the following message (it tries to render the admin template using twig):

    paths->adminTemplates . 'controller.php');

    I added a simple if-condition and everything works as expected.

    I'll look into this issue asap. It was working in my test setup. I must have missed something. 

  12. *shameless plug*
    We're using TemplateDataProviders for exactly this kind of jobs (preparing data before it's rendered). Maybe you should try it out, too.
    In your case I'd use output buffer and store it inside a variable to output it using twig later on.
     
    dataproviders/ContactPage.php
    <?php
    
    class ContactPage extends \nw\DataProviders\PageDataProvider {
    
    	public function populate() {
    		$modules = wire('modules');
    		$templates = wire('templates');
    
    		$form = $modules->get('FormTemplateProcessor'); 
    		$form->template = $templates->get('my_contact_form_template'); // required
    		$form->requiredFields = array('fullname', 'email');
    		$form->email = 'your@email.com'; // optional, sends form as email
    		$form->parent = $page; // optional, saves form as page
    
    		ob_start();
    		echo $form->render(); // draw form or process submitted form
    		$this->formMarkup = ob_get_contents();
    		ob_end_clean();
    	}
    
    }
    

    contact.twig

    {{ formMarkup }}
    
     
     
    Alternately you could add the Form Object to the templates namespace and render it directly using the method call within twig:
     
    dataproviders/ContactPage.php
    class ContactPage extends \nw\DataProviders\PageDataProvider {
    
    	public function populate() {
    		$modules = wire('modules');
    		$templates = wire('templates');
    
    		$form = $modules->get('FormTemplateProcessor'); 
    		$form->template = $templates->get('my_contact_form_template'); // required
    		$form->requiredFields = array('fullname', 'email');
    		$form->email = 'your@email.com'; // optional, sends form as email
    		$form->parent = $page; // optional, saves form as page
    
    		$this->contactForm = $form;
    	}
    
    }
    
    contact.twig
    {{ contactForm.render() }}
    
  13. Another roadblock: I am building a new Article/News container page that presents a list of published articles.

    The format for each article I am hoping for is simple:

    Title: in an <a> anchor tag

    Date

    Author name

    Summary: first 255 characters from the Body content copy

    Continue Reading: also in an <a> anchor tag

    My Article post template (I have created the Date and authorName Fields) looks like this:

    <h3><?=$page->title?></h3>
    <div id='articleCopy'>
    	 <?=$page->Date?>
    	 <?=$page->authorName?>
        <?=$page->body?>
       </div>
    

    For the parent container Articles page I am using some code from a forum post by Ryan in my template:

    <?php include('./_head.php'); // include header markup ?>
    <div id="content">
    	<div id="mainColumn">
    	<?php
    	// output 'headline' if available, otherwise 'title'
    	echo "<h1>" . $page->get('headline|title') . "</h1>";
    		 echo $page->body; // output bodycopy 
    		?>
    		<?php
    
    		// start the news stories list
    		echo "<ul>";
    
    		// get the stories for this page
    		$stories = $page->children("limit=4, sort=-date"); 
    
    		// note if you set the stories to sort by date descending on the /news/ page
    		// in the admin, then you can omit the "sort=-date" above. 
    
    		// cycle through each story and print it in a <li>
    		foreach($stories as $story) {
    		    echo "
    		        <li><a href='{$story->url}'>{$story->title}</a> 
    		        <p>date: {$story->date}</p>
    		         <p>by: {$story->authorName}</p>"; 
    				// make our own summary from the beginning of the body copy
    				// grab the first 255 characters
    				$summary = substr($story->body, 0, 255); 
    
    				// truncate it to the last period if possible
    				if(($pos = strrpos($summary, ".")) !== false) {
    				    $summary = substr($summary, 0, $pos); 
    				}
    		   echo "{$summary}</li>";      
    		}
    
    		echo "</ul>";
    
    		// get values for our placemarker headline
    		$start = $stories->getStart(); 
    		$end = $start + count($stories);  
    		$total = $stories->getTotal(); 
    		$num = $input->pageNum; 
    		$lastNum =  ceil($total / $stories->getLimit());
    
    		// output the placemarker headline
    		echo "<h4>Showing $start - $end of $total Article/s | Page $num of $lastNum</h4>"; 
    
    		// output pagination links
    		echo $stories->renderPager();
    		?>
    		</div><!--mainColumn ends-->
    		<div id="sideBar">
    			<?php include('./_sidebar.php'); // include sideBar markup ?>
    			</div><!--sideBar ends-->
    	</div><!--content ends-->
    		<?php include('./_foot.php'); // include footer markup ?>
    

    At this point the system is working but with two main issues:

    1) On the parent container Articles page each article post will output the Summary and the full body copy. I only want the teaser Summary to appear here. The reader should click on the anchor link in the Title name or the "continue reading" link to read the full story.

    2) I am getting unwanted output code at the bottom of the Body content that looks like this:

    , 0, 255); // truncate it to the last period if possible if(( = strrpos(, )) !== false) { = substr(, 0, ); }
    

    I have been messing around with this but can't seem to break through these issues. Any pointers here?

    Thanks!

    You're missing some quotation there. Take a Look at the altered Sourcecode in your post (the "$summary" part).

  14. Hi Bea, 

    thanks a lot. I did see that the rendering didn't support the 2.5 attach/prepend settings but didn't have the time to implement it.

    I've merged your pull-request (and restored the indention to tabs ;)!!!). Furthermore I've added a new config setting that lets you exclude templates from beeing rendered with twig. This is needed if you're using FormBuilder (and i can think of some more use cases).

×
×
  • Create New...