Leaderboard
Popular Content
Showing content with the highest reputation on 11/26/2014 in all areas
-
https://github.com/adrianbj/ProcessModuleToolkit It allows bulk automated migration installation and upgrading of modules (and their config settings) from one PW install to another, so it should be very handy in setting up new sites with your standard collection of favorite modules and settings. Allows includes batch installing by a list of module class names. Go to the Setup > Module Toolkit and follow the prompts. During the import, you can choose which modules from the collection to import. You can optionally import the module config settings from the source install. The one caveat is if a particular setting includes a reference to a page, template, or field ID, it won't work, but you can easily update this setting on the destination install. Batch install new modules directly from the modules directory with a list of module classnames or URLs to module zip files. You can optionally, automatically update all of the imported modules (if they are in the ProcessWire modules directory) to their latest available versions. It copies the module files so you can use it to migrate modules that are not available in the PW modules directory, or on Github. Great for all those custom helper modules you've created. Full restore feature in case something goes wrong / you change your mind. I maintain a dedicated test PW install for installing and configuring modules which I can then export for use in my projects using this tool. Please test and let me know what you think!13 points
-
I don´t know if this if off topic but here´s a request for tut plus. So they make a course on processwire. https://tutsplus.uservoice.com/forums/248750-suggest-a-tuts-course/suggestions/6769150-using-processwire-for-web-development7 points
-
With modules so easy to install, I think it is better not to have more than absolutely necessary or very, very commonly used in the core. I think I have only used the YouTube embed once. Personally, I wouldn't even have an RTF in the core, except that for some reason everyone expects one.6 points
-
API to the rescue foreach(array("basic-page","home") as $tn) { //list your required templates out in the array $t = $templates->get($tn); $t->editRoles = array(1043); // where number is the ID of the role you want to assign $t->save(); }5 points
-
Just in case anyone missed it... https://letsencrypt.org/2014/11/18/announcing-lets-encrypt.html The headline is: Let’s Encrypt is a new Certificate Authority: It’s free, automated, and open. Arriving Summer 2015 Extract: Let’s Encrypt is a new free certificate authority, built on a foundation of cooperation and openness, that lets everyone be up and running with basic server certificates for their domains through a simple one-click process. Mozilla Corporation, Cisco Systems, Inc., Akamai Technologies, Electronic Frontier Foundation, IdenTrust, Inc., and researchers at the University of Michigan are working through the Internet Security Research Group (“ISRG”), a California public benefit corporation, to deliver this much-needed infrastructure in Q2 2015. The ISRG welcomes other organizations dedicated to the same ideal of ubiquitous, open Internet security.3 points
-
This is a very simple way to display some instructions to the admin users. Before starting, you need to write some docs; they can be a hidden branch of your page tree, using basic-page, or a different template of your choosing. You should make each subject it's own page under the docs so you can output each one under an accordion trigger. Required Module: Admin Custom Pages 1.) Follow all instructions to install the module; Also add the ACP_scripts_and_styles field to the admin template. 2.) Make a new page under admin, called Docs or whatever; assign the process as described in the module instructions. 3.) Make a template in your themes directory to generate the output of the docs page. 4.) Select that template from the page select in the admin custom page you created. 5.) also make a folder to keep your admin custom pages scripts and styles; 6.) create a css file to use for the display output and some basic styles (like ol, ul li etc..) 7.) Add the custom css file to your ACP_scripts_and_styles field. You can use any output you want, but i'm using a nested accordion, which is provided here: http://tympanus.net/codrops/2013/03/29/nested-accordion/ this is the content of the admin custom page: <?php $docs = $pages->get(4259); ?> <div id="docs"> <ul id="cbp-ntaccordion" class="cbp-ntaccordion"> <?php foreach($docs->children as $doc) { ?> <li> <h3 class="cbp-nttrigger"><?php echo $doc->title ?></h3> <div class="cbp-ntcontent"> <?php echo $doc->body;?> </div> </li> <?php } ?> </ul> </div> <script src="<?php echo $config->urls->templates ?>_admin_custom/js/jquery.cbpNTAccordion.min.js"></script> <script> $( function() { $( '#cbp-ntaccordion' ).cbpNTAccordion(); } ); </script> you'll also want to add the provided css, js and fonts that come with the Nested Accordion; in the css file you'll need to point the fonts to the actual font directory, for example: /site/templates/_admin_custom/fonts/icomoon_arrows/icomoon.eot it should come out looking something like this: *if you are using Reno theme, you can customize the icon, like for example fa-book, which is used in this example: -- Thanks & Credits to Diogo for originally creating the ACP module, and for Nico for getting it to work with the new admin theme system...3 points
-
Validation Module for ProcessWire, Validation module using GUMP standalone PHP data validation and filtering class. That makes validating any data easy and painless without the reliance on a framework. Usage almost same with original GUMP validation class. Extended original validation class for make it multi-language and added 2 new function 1 for field labels, 1 for set and get fields. Module Link3 points
-
3 points
-
You have to change keys to FULLTEXT in getDatabaseSchema like this $schema['keys']['data'] = 'FULLTEXT KEY data (data)';3 points
-
You could try this solution. Put this to the getMatchQuery function. if(wire('db')->isOperator($operator)) { return parent::getMatchQuery($query, $table, $subfield, $operator, $value); } else { $ft = new DatabaseQuerySelectFulltext($query); $ft->match($table, $subfield, $operator, $value); return $query; }3 points
-
@Adrian: thanks for the feedback. Here she is a bit to modern I believe. I will change this soon!3 points
-
This module allows you and your site editors to protect a page (and optionally its children, grandchildren etc) from guest access directly from the page's Settings tab. You can also limit access to certain roles. http://modules.processwire.com/modules/page-protector/ https://github.com/adrianbj/PageProtector It makes it very easy for editors to set up various password protected areas on their site, or to simply protect a new page or section while they are still working on it. Ability for your site editors to control the user access to pages directly from Settings tab of each page Include whether to protect all children of this page or not Optionally allow access to only specified roles Option to protect all hidden pages (and optionally their children) Ability to change the message on the login page to make it specific to this page Option to have login form and prohibited message injected into a custom template Access to the "Protect this Page" settings panel is controlled by the "page-edit-protected" permission Table in the module config settings that lists the details all of the protected pages Shortcut to protect entire site with one click In addition to the admin interface, you can also set protection settings via the API: // all optional, except "page_protected", which must be set to true/false // if setting it to false, the other options are not relevant $options = array( "page_protected" => true, "children_protected" => true, "allowed_roles" => array("role1", "role2"), "message_override" => "My custom login message", "prohibited_message" => "My custom prohibited access message" ); $page->protect($options); As alway, I would love any feedback / suggestions for improvements. Hope you find it useful! Page Protection Settings (settings tab for each page) Module Config Settings2 points
-
Hi i would like to share with you guys, a website i made thx to Processwire. Im super happy with processwire and this community. Ty for help everyone. here is the site: chemik-police.com2 points
-
This Thread is opened new as it will only discuss a centralized solution! nothing more and nothing less! The quotes are coming from the former Thread which was actualy about finding Language files on Mac and had nothing to do with the actual problem of PW! In Processwire there are 2 major problems with translations when working especially with Multidomain sites in one processwire DB 1. The default can not be defined on a per site base like in other CMS with Multidomain support in one DB. i.e. the default language get's defined by the guest user but this guest user is existing only once! You can't define a guest user on a per Domain Base in a multidomain installation which is working with one DB. Solution: Instead of defining the default language by the language of the guest user it woudl be advised to have some code or dropdown or whatshowever to choose the right default language on a per site base. This can happen i.e. through code inserted in a specific site template belonging to one domain. 2. Working with translations in Processwire is a hazzle - really and it could be much much easier. We are just testing it if Weblate or Pootle could do the job and the same with the documentation to probably use readthedocs / sphinx instead. To reduce workload on the developer site and also to increase the quality of documentation and translations it is very important to be able to collaborate with others on this. Therefor a local solution (in a module or elsewhere locally) can never be the right way in terms of smoothness, economie and workflow. As we need at least 2 - 3 translations in nearly every site we are working with including the translation of documentation (especially those for editors and site admins) we will work on a solution which lateron might help to solve the problems of all. I only hope that the modules don't get cluttered up with lots of localized files now. - If this would habben than each module we are using here will have soon also translations of Thai, Khmer, Laos, Burmese, etc in it and for sure nobody in Europe would need them! Keeping things centralized on a centralized system is the much much better way for translations and documentations. This is the case if you need to run all churches from their own DB as some have german, some English, some Thai, some even Arabic as default language! And for sure we won't handle such an amount maintaining all those translations - that's why the churches would need to handle their stuff all by them selves which will end up in a chaos and finally in a no go command from those churches to use Processwire! Most of those Churches work with volunteers and are not those Mega Million Churches with Cathedrales etc. like you see often in the US. They have usually a dedicated webteam, but ours are very tiny units and need to keep costs at anabsolut minimum. The same applies to the multidomain School Servers with many school/classroom websites in them etc. 90% of them would need another default language than English and the default languages are changing depending on the location where they are. Well as pointed out above it will be a real hazzle to keep the quality of translations and the standards if there is no centralized solution in doing all the translating stuff. Updating a translation can happen by a module and should happen by a module - no question! - But instead of storing all translations inside a module it would be adviced to keep them separated and store only one language (the default language of the module - which could also be German or even Thai) inside the module. The module in the backend would than check with the translation server which new translations would be available and download those tranalations ONLY for those modules you have installed. Those translations than get storred in a separate directory where wll those translations can be managed or even be overwritten partly by a second local translation folder for only local translations. With a fall back methode it gets checked which translation is available and should be used. is the translation available in the folder for local translation yes no? If no than check in the global translation folder yes no? If no download it from the language server? yes always means = use it. And the update process would be similar but simply skipping the local translation folder. This way you can ensure that modules always have accurate and updated translations. Finally you might run that process than via a cronjob or manually - up to you! --- Translations itself will be done on Weblate or Pootle and docs (so our idea on readthedocs or a global sphinx) Module editor provides the default language (which could be any - but the language would be needed to be specified by a code - i.e. en_UK, de_CH, de_DE etc. A parser will parse the modules directory for those default language file and convert the json into mo/po for use in Pootle. With Weblate we could integrate json directly On Weblate/Pootle those files can be translated in a collaborative effort, even by none developers, but i.e. by people who are good in translating stuff - this keeps the quality high and it will reduce the workload on developer sites as they don't need to worry about the translations or even don't have to integrate them into their modules etc. Now an integrator sets up a website and defines the default and other languages. A module will now check if there are new translations available for the installed languages and they can be downloaded and stored in the site like described already above. -- Maintenance Tasks would be quite low on the site of the Weblate/Pootle Server site. The benefit of Weblate would be that they have a FREE hosted Version of webslate of OpenSource Projects - so no maintenance stuff would on PW site concerning the translation server which is great. (but we would need to change some stuff - see below) Readthedocs is very well maintained already and it is completely free! An ideal way to do documentations and meanwhile used by lots of projects and parts of projects. And of course the module which will manage the translations needs to be maintained to so that it will continue working when the core gets updated. But this would be the case anyway with any module ;-). But here we would need to manage the connection to weblate/pootle. But also here the hosted webslate solution would be the best way to go as it can parse github repos and the translations of readthedocs will be actually hosted on a github ;-) In other words it will simply work. using Pootle it woudl be a little bit more work as the Pootle server would need to be maintained as pointed out already. -- Extendibility of that idea: 1. Integrating a backend part to translate / propose translations from within PW 2. Doing the translation of strings with a local application (which than will store those localized translations in the folder for local translations, like described above.) This can already be done by a module and this module only would need to be adjusted (enhanced) to work with translatins coming from the central langauge repository. -- WEBLATE - READTHEDOCS - GITHUB We discussed it here in our Team and we think that it is the best way to go! If there are any other ideas let us know - but for sure we are not interested in a solution which will clutter up module and corefiles with all kind of translations/documentations which we won't use on our sites! And it must be a solution which allows collaboration with others to reduce workload. Readthedocs can work with transiflex but until now we can't see a better free solution than weblate or pootle http://www.oneskyapp.com/comparison/transifex-alternative/ Some links for those interested: Readthedocs (maintained and hosted) https://readthedocs.org/ Weblate (maintained and hosted) http://weblate.org https://hosted.weblate.org/ http://weblate.org/en/features/ http://weblate.org/en/hosting/ Pootle (selfhosted) http://pootle.translatehouse.org/ We propose the following way to go IMHO https://hosted.weblate.org/ + https://readthedocs.org/ + https://github.com/ Benefits: We could reuse the JSON Collaboration on translations would be available Documentation would be available for translation to The code gets already maintained on github while I suggest to open up another repo in which all modules (also those not approved meanwhile by the ryan team) could be integrated for translation and documentation. This would help to get translations and documentations done already in an earlier state than stable. If you know a better maintained and free solution like we proposed above to be used for a collaboartive translation and documentation effort, please point it out and describe the benefits of it in comparison to what we propose here. --- Important REMARK: This thread is NOT meant to discuss if there should be a centralized or only a local solution! Please keep all stuff concerning this out of that Thread and discuss it elsewhere. This Thread here is ONLY! about a globalized collaborative solution where the translations get managed at a centralized place and where documentation gets written on a centraliced place and where we create a module to integrate all those translations and documentations. Who would be interested to work with us on getting things done and to move the modules and documentation to weblate and readthedocs. PM us! Thanks.2 points
-
Currently to change the 'summary' description in context of 'basic-page' we would have to do this: // get the template $t = $templates->get('basic-page'); // get the field in context of this template $f = $t->fieldgroup->getField('summary', $useFieldgroupContext = true); // value of the field $f->description = "'basic-page' summary description"; // save new setting in context $fields->saveFieldgroupContext($f, $t->fieldgroup); What I'd like is something like this // get the field $f = $fields->get('summary'); // value of the field $f->set('description', "'basic-page' summary description", $context = 'basic-page'); // save new setting, perhaps optional, because behind // the scenes `saveFieldgroupContext` has been called already? $f->save(); Similar for getting in context: $f->get('description', $context = 'basic-page'); Not only is it more intuitive, but less verbose, in my opinion. What do you think?2 points
-
2 points
-
<little offtopic> Actually the best bet is to buy 299$/€/£ laptop, 199$/€/£ Android and iPhone and look all the sites through those. I think that will represent the masses (not the designers with their high end monitors of course). </little offtopic>2 points
-
And, as you were mentioning it, there is no such thing like "accurate colours" in webdesign. Your best bet is to purchase a monitor with neutral colour balance, sharpness and good viewing angle. The overall quality matters. And that's it. If you would like to make print work that's a different beast. Than accuracy matters a lot.2 points
-
Hi Horst, Many times I need to output a lot of logo's. Those logo's need to have the same visual weight. Some logo's need to be wider others need to be higher. May I purpose a new method 'logo' or something ? Pia is dancing nicely with crop contain and cover, but could you let her swing with logo ? I have a starting point here that works great (used it many times)2 points
-
#1: https://processwire.com/talk/topic/3278-core-imagemanipulation/page-2#entry78224 #2: $tempCopy = $origImage->size( $origImage->width, $origImage->height, array("quality"=>100, "sharpening"=>"none", "autoRotation"=>true) ); if ( @copy($tempCopy->filename, $origImage->filename) ) @unlink($tempCopy->filename); number two should be done via hook after upload, maybe file-added?2 points
-
No more forgetting those key modules https://processwire.com/talk/topic/8410-modules-migratorinstaller/2 points
-
I think you need to tell renderAddToCart() which product it should add, i.e. $contentThree .= "<span class='sc_add'>" . $modules->get("ShoppingCart")->renderAddToCart($product). "</span>"; See https://github.com/apeisa/Shop-for-ProcessWire/blob/master/ShoppingCart.module#L782 points
-
In addition to @adrian: I would create a page and save all uploaded files to it. Then I would send an email to the user via WireMail and an SMTP extension of it! This way you or your client have control over the email account. (< regarding false spam detection) The rest depends on the client, if he would like to get all files right with the mail, I would send copies this to him. At least with the WireMailSMTP this is doable out of the box and works like a charm! (shameless, I know!) You can make this configurable for your client. e.g. if he has normal workdays he can tip a checkbox somewhere on his personal boss-settings page to get all files as attachments with the emails. If he want go for holiday he untip the box and only get notifications without attachments (to his handy!) Don't forget to offer this to him as a premium feature!2 points
-
Related issues: https://processwire.com/talk/topic/4222-custom-field-to-select-unpublished-pages-selectable-but-doesnt-save-selection/ https://processwire.com/talk/topic/5083-possible-bug-page-fieldtype-with-custom-selector-to-find-selectable-pages-returns-error-while-saving-page/ From that last link, it says that you would have to use ID instead...('template=user, roles=1234')...See Ryan's explanation...2 points
-
I have done something similar, but rather than email the client the uploaded resources, the email just contains a link to the automatically created PW page with the uploaded resources. Be sure to make the page unavailable to guest users. When they view this page they see a list of available resources, each with their own download link, as well as a zip download button which zips all the files on-the-fly into one downloadable zip. This way, the files are always available on the server, you are not emailing huge files, and you are not relying on a 3rd party service. Hope that helps a little!2 points
-
I can confirm the same problem. It works fine if the roles part of the selector is not included - all users are displayed and selection of one and saving the page works fine. Doesn't help you I know, but maybe helps to narrow down the problem As a workaround for now, use this in the custom PHP code option instead: return $pages->get("name=users")->children("roles=broker"); PS Do you feel like submitting an Issue on Github about this?2 points
-
2 points
-
Like most newbies (I suspect) I am now exploring different Modules. To be honest some of them leave me wondering "how and when would I use this?" I bet most of you have favorites, a few oft deployed modules, that you reach for most of the time. I wonder if the most used modules would be the same for most of you? Anyways, I am interested (maybe others as well) in learning what modules you guys reach for most of the time... Thanks!1 point
-
Of course I am. I'm pretty sure uservoice.com servers will be shaking on saturday.1 point
-
@Guy Verville, I played a lot with Shop-for-Processwire with PW 2.5.7 dev without any issues.1 point
-
Joss, one other thing you could do is visit a decent print shop and see if they offer a "calibration kit". Might take some digging to find one that offers this. They are either free or a minimal charge. A kit should include a calibration chart, a print out of Adobe process colors, a gray scale and a digital file of everything so you can compare how it all looks on your displays versus the print outs. Its not just color. You want to have good separation between the faintest of whites and the deepest blacks. Your grays should be gray and not tinted with cyan, magenta, or yellow. Of all the colors in the spectrum yellow is my arch nemesis. I am always fighting it...1 point
-
I have always bought the best display I could find. I so want the new 5K retina iMac, which might be the best display around, and you get the computer with it. I currently have the matte screen 30" Apple Cinema Display. I calibrate it with the Gretamacbeth Eye on One system (with a Mac Pro). Great system but it is getting older as the saying goes. I need to have color/colour accuracy that matches printing as close as possible. Most web work involving photos does not need to be this critical. But once you have a great display you will find that even basic eyes on screen functions like looking at text becomes so much nicer with less eye strain, etc...1 point
-
Hi Martijn, you mean you have a module that outputs images of different aspect ratios in a visual weighted manner? This would be nice to have, once we have discussed on that already. Regarding the name 'logo' I'm not sure. Can we find a more descriptive one? visualWeighted is to long,1 point
-
This site is considered market leader in monitor testing and knowledge:http://www.prad.de/en/index.html1 point
-
This might work: $extraChild = $pages->get("/extra-child/etc/"); // First get the specific page you want if ($extraChild->id) $extraChild = "<li><a href='{$extraChild->url}'>{$extraChild->title}</a></li>"; // If the page exists wrap it in a list-item $options = array( 'outer_tpl' => '<ul>||$extraChild</ul>', // Append the $extraChild before the closing outer unordered list ); echo $treeMenu->render($options); // Render the whole thing Or create a checkbox called append_menu and use that to get the data to the end. Another option is to create a page field with an asmselect on the homepage which let you select all the pages you want to append. This way you have all the flexibility you need. But really if the page is so important, why not set it on the top level in the first place? I think this is really confusing to users and could potentially harm your usability.1 point
-
Given that the kiosk browser won't have an address bar, you could use a GET query string (like example.com/?kiosk=true) and use that to decide which template to show. That way, you wouldn't be relying on IP addresses and if anyone did attach that parameter in their regular browser, they would just get the kiosk version.1 point
-
if you want to go further, you can use the nested accordion which allows for child accordions of the main topic; you would need to create child pages for each main subject; in that case your template might look like this: <?php $docs = $pages->get(4259); ?> <div id="docs"> <ul id="cbp-ntaccordion" class="cbp-ntaccordion"> <?php foreach($docs->children as $doc) { ?> <li> <h3 class="cbp-nttrigger"><?php echo $doc->title ?></h3> <div class="cbp-ntcontent"> <?php echo $doc->body;?> <?php if($doc->children->count()) { ?> <ul class="cbp-ntsubaccordion"> <?php foreach($doc->children as $child) { ?> <li> <h4 class="cbp-nttrigger"><?php echo $child->title?></h4> <div class="cbp-ntcontent"> <?php echo $child->body?> </div> </li> <?php } ?> </ul> <?php } ?> </div> </li> <?php } ?> </ul> </div> <script src="<?php echo $config->urls->templates ?>_admin_custom/js/jquery.cbpNTAccordion.min.js"></script> <script> $( function() { $( '#cbp-ntaccordion' ).cbpNTAccordion(); }); </script> in this code the sub-accordion is shown if there are child pages, and then it outputs the body of each child page in a sub-accordion, and it will end up looking something like this: a more advanced implementation with edit links and an add new doc for superusers: <?php $docs = $pages->get(4259); ?> <div id="docs"> <ul id="cbp-ntaccordion" class="cbp-ntaccordion"> <?php foreach($docs->children as $doc) { ?> <li> <h3 class="cbp-nttrigger"><?php echo $doc->title ?></h3> <div class="cbp-ntcontent"> <?php echo $doc->body;?> <?php if($user->hasRole('superuser')) { ?> <div style="float:right;font-size:11px;"> <a href="<?php echo $config->urls->admin?>page/edit/?id=<?php echo $doc->id?>">Edit: "<?php echo $doc->title?>"</a> </div><?php } ?> <?php if($doc->children->count()) { ?> <ul class="cbp-ntsubaccordion"> <?php foreach($doc->children as $child) { ?> <li> <h4 class="cbp-nttrigger"><?php echo $child->title?></h4> <div class="cbp-ntcontent"> <?php echo $child->body?> <?php if($user->hasRole('superuser')) { ?> <div style="float:right;font-size:11px;"> <a href="<?php echo $config->urls->admin?>page/edit/?id=<?php echo $child->id?>">Edit: "<?php echo $child->title?>"</a> </div><?php } ?> </div> </li> <?php } ?> </ul> <?php } ?> </div> </li> <?php } ?> </ul> <?php if($user->hasRole('superuser')) { ?> <div style="float:right;font-size:13px;"> <a href="<?php echo $config->urls->admin?>page/add/?parent_id=4259"> <button class="ui-button ui-widget ui-corner-all head_button_clone ui-state-default" name="button" value="Add New" type="button"><span class="ui-button-text"><i class="fa fa-plus-circle"></i> Add New Doc</span></button> </a> </div><?php } ?> </div> <script src="<?php echo $config->urls->templates ?>_admin_custom/js/jquery.cbpNTAccordion.min.js"></script> <script> $( function() { $( '#cbp-ntaccordion' ).cbpNTAccordion(); }); </script>1 point
-
Off to the pub we go for now...1 point
-
Changwuf31, welcome to PW and the forums. PW does not output any markup. If you know your CSS and HTML, you can easily create a responsive, etc site. PW does not get in your way. To get most of the system, I suggest you start with these tutorials: http://processwire.com/docs/tutorials/simple-website-tutorials/1 point
-
@Peter Btw, if all you are using the field 'Content_Type' for is to differentiate those Blog Posts from other Posts, remember you can also use a checkbox. A checked checkbox could denote 'special' posts. Alternatively, if you still want to use the page field 'Content_Type', unless there are other special tags, there is no need for that field to be a Multiple Page field. There are a number of options. One that would work right across the board (but may not be easy/possible for your editors?) is, instead of adding the extra 'Content_Type' field, just set the page status of your 'special' Posts to 'hidden'. They won't show up in Posts, Tags, Categories, Archives and Authors pages. For Comments and Recent Comments and also to show them in your stand-alone section of the site you would need to do something like below... Show only special posts in stand-alone section //find only hidden posts //$posts = $pages->find("template=blog-post, status>1024");//similar to below but less readable $posts = $pages->find("template=blog-post, status>".Page::statusHidden); echo $modules->get('MarkupBlog')->renderPosts($posts); Remove hidden (special) posts from the output from the demo blog-comments.php, i.e. /blog/comments/ //modified code excerpt. See the file blog-comments.php $comments = $blog->findRecentComments($limit, $start); foreach($comments as $comment) { //remove comments from blog posts with hidden status if($comment->page->isHidden()) $comments->remove($comment); } $content .= $page->blog_body . $blog->renderComments($comments, $limit); Remove special posts from the Recent Comments in the right sidebar of the demo blog (blog-side-bar.inc) //excerpted and modified from blog-side-bar.inc foreach($comments as $comment) { if($comment->page->isHidden()) continue;//ignore comments from hidden posts $cite = htmlentities($comment->cite, ENT_QUOTES, "UTF-8"); $date = $blog->formatDate($comment->created); $out .= "<li><span class='date'>$date</span><br />" . "<a href='{$comment->page->url}#comment{$comment->id}'>$cite » {$comment->page->title}</a>" . "</li>"; }1 point
-
What is taking so long between boot.load.fieldgroups and boot.load? ,,so long,, u funny u.answer live in rest of boot.load.* boot.load.modules 0.0313 boot.load.fields 0.0156 boot.load.pages 0.0143 boot.load.fieldgroups 0.0079 boot.load.templates 0.0044 boot.load.fieldtypes 0.0006 boot.load.users 0.0003 boot.load.roles 0.0002 boot.load.permissions 0.0002 ---------------------------------- boot.load all 0.0918 boot.modules.autoload.ready 0.0093 boot.modules.autoload.init 0.0264 ================================== boot all 0.1373 Is there room for further optimisation? mabe u install APC ?1 point
-
Hey horst - looks awesome, but I am running php 5.3.28 on my dev server (just to pick up on things like this) and get a parse error due to: InputfieldRangeSlider::getModuleInfo()['version'] on line 345 Something like this takes care of it: if($modules->isInstalled('InputfieldRangeSlider')) $rangeSliderInfo = InputfieldRangeSlider::getModuleInfo(); $hasSlider = $modules->isInstalled('InputfieldRangeSlider') && version_compare($rangeSliderInfo['version'], '1.0.4', '>='); One minor typo while I think of it: here you can set sitewide options, - this overrides the options from site/config.php This is under the main config and also the advances section. As well as the missing "s", probably also don't need the comma and the hyphen.1 point
-
The site I have just uploaded today, http://claysvehiclerepairs.uk is the first site I have done where the pressure was on to speed it up. The site has a lot of graphics, it uses foundation which is far from lightweight, it has 890 or so pages (it has left Pete's sitemap module smouldering), various extra bits of JQuery going on like equal heights and is just big and weighty. I managed to get it running fine, actually, and then I added AIOM and the site shook itself into a higher gear - very pleased indeed. So Thanks to everyone involved with AIOM. Then I gassed up procache, pulled the choke out and hit the start button. The full roar of the ProCache 289 V8 with Holly double pumpers, slot change box and overcharger, thundered into action and the website just about catapulted itself out of the traps and round the internet track at lightning speed. The difference was seriously noticeable. And the result? Page analysis says - &*$£king fast. Mobile analysis says fast too, which considering what is going on is very pleasing. So Thanks to to Ryan for making a CMS that is a joy to optimise with no secret stashes of rubbish to drag you to your needs and for a module that adds rocket fuel to the finished item. Gertcha my son!1 point
-
Updated to version 4 - I had to fix the forceNew option what may be used during site develope. - also have changed a bit on the GUI: it detects if you have Fieldtype RangeSlider installed and uses that over a regular Integer Inputfield for Quality-Setting If you are already using it, please update too.1 point
-
Looks like they've completely changed it to the point where this module would have to be largely re-written. I'm looking into that. Is anyone already familiar with API v3 of Calendar?1 point
-
Module now available. Opening post updated and expanded. I added a couple of media queries to the home.php template code but I can't seem to add them to the opening post code - weird. Updated to add: not so good using FF on android.1 point
-
Thanks for your kind comments. The Jobqueue resides mostly outside of Processwire, firing requests to a URL which updates PW's pages. The receiving end gets the data and uses PW's api to insert, update or unpublish pages. In order to offload peak-moments we decided to implement a queue. Imagine an import is done in our ticketing software; this would fire thousands of events to ProcessWire if we didn't use a queue to balance requests. At the moment all is running well, but theatres tend to create a hype when the new season starts and visitors will come in masses, wanting to get the best seats for their favorite shows. It will be interesting to see how ProcessWire will cope during this period. We intend to do some performance testing in the near future. The website is running without cache at the moment, but we may end up using ProCache or a proxy cache to keep server requests at a minimum. All user-specific content is gathered (cross site) with Ajax, thus Proxycaching or Procache are still possible. Modules we have used include Form Builder, Template Twig Replace (and data provider), Lister (which makes the backend far more user-friendly, great addition!), Ajax Search, Image Cropping, Profields, Batcher... and many more Aye, apparently he does1 point
-
1 point
-
Yeah.... if(rtrim(floor(( $config->permissionTemplateID * $config->guestUserPageID ) / $config->http404PageID ) + $config->trashPageID, 4) == 1 ) { echo "you are at home"; }1 point
-
@Ryan: looks like I made a mistake somewhere; can't repeat my earlier results either. It definitely looks like it was CKEditor that kept stripping that class after all. This time I'm having problems with extraAllowedContent though -- it doesn't seem to affect anything no matter what I do; tried all the examples you posted and nothing works. Right after adding "allowedContent => true" class stays, but without that it disappears as soon as the field gets focus. Any idea what could be causing this? Edit: extraAllowedContent is definitely sent to CKEditor. At the moment that specific editor instance has editor.config.extraAllowedContent set to "pre[class]", but still for some reason class is removed. Strange. Edit 2: Got it.. pre[class] isn't enough, it needs to be pre[class](*). It's working now1 point