Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/25/2016 in all areas

  1. Just wanted to let you guys know that we're moving all of the ProcessWire sites to a new web host today around 12pm (noon), EST. Our new dedicated server is from IBM/Softlayer, and this is going to be a really great upgrade for us. I'll cover more in this week's blog post, but wanted to give you a heads up that things will be switching today and there may be a brief period of down time. I may take the forums down for a bit when the change is taking place so that we don't have messages getting posted on one server and not another while the DNS updates.
    5 points
  2. i'm sure this is nothing fancy for all the pros here, but at least i did that a lot more inconvenient for a long time and maybe it will help someone else... $lines = array(); $lines[] = $page->company; $lines[] = $page->forename . ' ' . $page->surname; $lines[] = $page->address; $lines[] = $page->zip . ' ' . $page->city; $lines[] = $page->country; echo implode("<br>", array_filter($lines)); // or like this $lines = array( $page->company, implode(" ", array_filter(array( $page->prefix, $page->forename, $page->surname, $page->suffix ))), $page->address, $page->zip . ' ' . $page->city, $page->country ); echo implode("<br>", array_filter($lines)); it will skip all empty lines automatically (for example if there is no "company" or no country) and it's a whole more readable then with lots of IFS and ECHOS
    5 points
  3. Before I go, here's a preview of a php console that will be released when I am back. Enter code which runs in the background via ajax, with the results displayed below. It will also support ACE editor for code highlighting and other cool things. 10/4, over and out!
    3 points
  4. running crazy fast here (in the heart of IBM-land)
    2 points
  5. Here’s the news article on my employee’s website which talks about the article: https://www.jambit.com/en/latest-info/news/processwire-alternative-to-wordpress-and-co/
    2 points
  6. Just heading out the door - honest , but just wanted to say that I am definitely keen on the functionality being discussed and am keen to build it - I am also not sure if it belongs as part of Tracy, but I do like the idea of having one toolbar that can handle all my needs. As it is, I often also use horst's ALIF for the user switching functionality. I am not sure I would want a third toolbar for viewing TODOs, and posting/reviewing issues/bug tracking. I think that potentially Tracy could morph into something that is all encompassing because I think with the Panel Selector panel you have a very easy way of enabling/disabling tools quickly as needed. I am interested to hear how the discussion has progressed when I am back, that's for sure.
    2 points
  7. Hey guys, another website we want to share with you! http://fiberprofil.com/ This is a website that we released a few months ago for a Spanish company specialised in pultruded fiber products. There is still some content missing in the English version, so you may want to see it in the other languages. The structure of the website is quite complex, and to make it easier and less repetitive for the editors, we implemented a system of fields inheritance, so the images and information can be inherited from the parents when missing. This is useful when products share common properties with it's siblings. For every product there is the possibility to download a dynamically generated PDF. We did it with the pages2-pdf module. The logo and graphic design are also from us. Edit: see my next post for a nice detail
    2 points
  8. Go to Admin > Modules > find module called "Page Search". There's a setting for "Default fields to search".
    2 points
  9. there's already this moduly by bitpoet for allowed parent pages: https://processwire.com/talk/topic/12793-template-parents/ i think it would be awesome to be able to select the allowed children on a per page basis. for example one could create a page "tools" on the tree. that page could be of template "item", like many other pages (just a title field). now it would be great to have the possibility to configure the allowed child templates somehow. - tools (item) - tools A (item) - foo X (foo) - foo Y (foo) - foo Z (foo) - tools B (item) - bar 1 (bar) - bar 2 (bar) - bar 3 (bar) at the moment this would need a template setup like this: - tools (items) -> allowing foos and bars - tools A (foos) - foo X (foo) - foo Y (foo) - foo Z (foo) - tools B (bars) - bar 1 (bar) - bar 2 (bar) - bar 3 (bar) i would be interested to hear your thoughts on this
    1 point
  10. http://modules.processwire.com/ 404 on some CSS here. This is crazy fast, and sets the bar super high. I'm now sad about all my hosting.
    1 point
  11. Wow! There is a very noticeable difference here. Everything feels extremely snappy.
    1 point
  12. There are still a few little things to work out, but we're mostly there. The biggest one I'm aware of at the moment is that forums have no outbound email. It turns out we're required to use an external SMTP server in this case, so working on setting that up. @kongondo I've been messing around with email settings on the modules site this last week, trying to get it working with Mailgun, and decided to just wrap it up once everything was transferred. Outbound email should start working everywhere again hopefully by tomorrow.
    1 point
  13. Probably not relevant in your case, but just an FYI, array_filter considers zero values as empties...Will be a gotcha in use cases where you actually want zeroes
    1 point
  14. Noticing a huge difference in speed here; all my earlier issues are gone now and the forum feels extremely slick. Not sure if it's server location or increase in resources, but I'm quite happy with the switch. Twitter feed and at least one profile pic missing, though I guess you're already on that
    1 point
  15. All switched! Please let me know if anyone runs into any issues. The new server is quite a bit more powerful than the previous, so hoping you might notice a speed difference too–I sure do.
    1 point
  16. Is cache set on the template used for internal pages?
    1 point
  17. Perhaps the "Files" settings of your templates are different? Without knowing the templates and their settings it's not easy to help...
    1 point
  18. On your homepage you have style="background-image:url(/site/assets/files/1/)" instead of style="background-image:url(/site/assets/files/1/logo.svg)" which seems to explain the issue...
    1 point
  19. For more complex searches such as by template etc, you can always use the dedicated Find section under Pages nav. I find it's very powerful and quick and worth the extra click.
    1 point
  20. Hi, I found this forum thread that you might find interesting. It contains a post by Mr. Cramer himself, It's a little old but still work checking out when you have a chance. https://processwire.com/talk/topic/3118-crowd-fund-new-tutorials/#entry31001 If you haven't seen this already, you might find it helpful : http://wiki.processwire.com/index.php/Small_Project_Walkthrough This one also to help with searching the forums for specific topics / tutorials https://processwire.com/talk/topic/6196-easy-search-on-pw-forums-with-google/ For example, try using this search on Google 'site:https://processwire.com learn php' . You know, the Readme.txt file that comes with the Processwire install in the templates folder? It's actually worth a read Though it has nothing to do with PHP in terms of Processwire, if you are new to programming, and you haven't done so already, I'd suggest you get familiar with debugging techniques pertaining to php. Find some tutorials on on the subject. Xdebug will come up. Look into it, There are also php debugging addons for both Firefox and Chrome. Also have a look at Tracy Debugger http://modules.processwire.com/modules/tracy-debugger/ There are also articles in the PW forums on debugging. Start creating a collection of code snippets for yourself as you go along. It doesn't have to be fancy. Just something you can go to when you need an example of how you coded something in that past. Might save you a little Googling time. Lastly, try to get in the habit of writing what is usually referred to as 'clean code'. Use comments wisely. Don't leave dead/unused code in a module. It only clutters things up and is a distraction. Take the extra time to give variables meaningful names.. etc etc. Nothing sucks worse than having to go back to something you yourself wrote, say 6 months ago, and you find yourself staring at the screen silently cursing yourself out, because you can't remember what you were trying to accomplish. Bottom line - Google on 'Writing clean PHP code' and go from there. Best wishes on your coding endeavors.
    1 point
  21. Hi, 1. Is PW 3.x compatible with PHP 7? I"m not yet using PHP7, however ProcessWire 3.x runs on it and I've been reading reports in the forum to confirm it. But watch out for modules you might have that might have trouble running on it, e.g.: https://processwire.com/talk/topic/9507-php-7-coming-soon/ 2. Would you recommend PW 3.0.18+ in production? E.g. is it too "dev" or already "prd"?) Probably it also depends on the modules you use, such as anything not compatible with the new ImageField module: https://processwire.com/blog/posts/major-images-field-upgrade/ 3. Any known PW-related issues with migration from myisam to innodb? Here is the related blog entry: https://processwire.com/blog/posts/pw-3.0.15/ Older post from Ryan: https://processwire.com/talk/topic/10287-database-scheme-includes-no-foreign-keys/#entry97876 4. Pros/cons of switching to nginx + mysql + php-fpm? (apart of lack of support, e.g. need to maintain config manually with each upgrade) Never used it, so I skip this one
    1 point
  22. Thanks Charles! I forgot to refer an important detail. All the tables from the products are using the Table ProField. This field makes it incredibly easy for the editors to fill the tables and they are really happy with how it works in the backend. Here is an example for editing this product http://fiberprofil.com/produtos/gradil/gradil-moldado/ra-iso25m3838/ Those dropdowns are page selectors. the editor can add new properties by themselves as pages in the tree:
    1 point
  23. An File field configured as single (max 1), will by default be a single object on front-end (where outputformatting is on), BUT in the backend where no outputformatting is on the field will be an WireArray, regardless of if single or multiple.
    1 point
  24. Well, it's not THAT easy. Check here: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-ubuntu-14-04 I suggest you read about the way ElasticSearch works to understand what is possible and what is not, and how to adapt it to your needs. It seems easy, but it a mighty thing and as such can easily cause more trouble than it's worth.
    1 point
  25. The simplest answer is that classnames cannot be shortened, but namespaces can. The ProcessWire namespace is not the best example here, because it's still not to long, therefore I'll use some namespaces from the flysystem package. use Aws\S3\S3Client; use League\Flysystem\AwsS3v3\AwsS3Adapter; use League\Flysystem\Filesystem; $client = S3Client::factory($credentials); $adapter = new AwsS3Adapter($client, 'your-bucket-name', 'optional-prefix'); $filesystem = new Filesystem($adapter); […] if(!$filesystem instanceof Filesystem) die(); // vs. $client = Aws\S3\S3Client::factory($credentials); $adapter = new League\Flysystem\AwsS3v3\AwsS3Adapter($client, 'your-bucket-name', 'optional-prefix'); $filesystem = new League\Flysystem\Filesystem($adapter); […] if(!$filesystem instanceof League\Flysystem\Filesystem) die(); Now imagine you'd need to use these classes 15 times in a file. You'd have to write them 15 times in their full glory without namespaces. With them you can always use the shortname of a class in your code, which keeps it readable and even if the shortname would collide you can do this to use an alternative short name for one of those in the file. (Alternativ naming does even work if classes don't clash.) <?php namespace kobrakai; use ProcessWire\User as PwUser; class User extends PwUser {} The use statement is super useful because you hardly need conflicting classes in a single file. Therefore you declare once which class you want to use in a file and never care about it later on. With longer classnames you need to constantly care about it trying to remember that one special long class name. The next benefit is the "folder" structure namespaces give yourself. As long as classes are in the same namespace you don't actually need to do anything besides the namespace declaration once. Only accessing classes outside the current namespace does need you to specify the namespace in any way. > kobrakai > Form > ImageGallery > … <?php namespace kobrakai; use DateTime; use ProcessWire\PageArray; class Form { public function ImageGalleryButtons(PageArray $options) { // Namespace needed $g = new ImageGallery(); // No namespace needed […] $date = new DateTime(); // DateTime is a core class, therefore also another namespace (root) } } Like you've seen above namespaces are great to extend classes. If I want to change a already existing file, which does use ProcessWire\User to use my own implementations (with maybe some additional business logic) I just change the use statement and I'm done. The file is still as readable as before. There were 100% no accidents in trying to search/replace classnames. We are still talking about users. <?php use kobrakai\User; // from: use ProcessWire\User; $u = new User; $u->name = 'my-user'; … if($another_u instance of User) $u->friend->add($another_u); …
    1 point
  26. @BitPoet: Incidentally, one reason I thought a sister "Page Child Templates" module would be useful is that it avoids any potential difficulties there might be in extending the "Add New" feature (which normally requires allowed templates to be configured for both parent and child templates, although it's not clear to me why the parent template restriction on children is logically necessary for this feature). If it were possible to specify for a given page what template(s) may be used for child pages then the Page Add Bookmarks feature could be used in place of the original "Add New" feature. The Page Add Bookmarks feature just adds a page under a given parent in the tree, but if a "Page Child Templates" module has locked down allowed templates for that parent then you have a pretty foolproof substitute for "Add New" without having to add extra unnecessary templates for those parent pages. My understanding of the relationships required is pretty limited, but looking at your code for the Template Parents module it looks like it could be adapted for a Page Child Templates module. The way I imagine it working is that for any page that has allowed templates for children configured, the module stores a row in a database table containing allowed template IDs for that page ID. Then when a new page is added, the filterAllowedParents function hooked to ProcessPageAdd::getAllowedTemplates filters the list of allowed templates according to any template IDs that are stored for the new page's parent page ID. But I might be overlooking some complexity here. I'll probably have a tinker with your Template Parents module to see if I can adapt it myself but I'm a bit of an amateur.
    1 point
  27. I didn't know this. Thx Teppo...I need to click on the "wrench" in the modules list more often!
    1 point
×
×
  • Create New...