Leaderboard


Popular Content

Showing most liked content since 03/29/2017 in all areas

  1. 18 likes
    Hi @mvdesign. So sorry that I could not respond earlier. I decided to make an introduction video for this module to help people that are trying to use it. But then, I never made a screencast video before, and on top of that, the last time I spoke english was 2011. So I had to take dozens of try-outs till I got something watchable. So here is the video. It shows how you would create/update pages with this module. The video is far from OK, so I will probably record another one after I get some feedback. Until then please refer to this video to learn about how the module works.
  2. 15 likes
    Hi guys, after several months I finally released my most complex ProcessWire project so far: https://ricardo-vargas.com About the client: Ricardo Vargas is a specialist in project management and strategy implementation. He's an accredited professional and author of several books. Since 2007, he publishes a bilingual podcast about project management with millions of episodes listened. From 2012 to 2016, he worked for the United Nations Office for Project Services (UNOPS) in Copenhagen, Denmark. He currently lives in Portugal. The previous site was developed in 2009 using Wordpress by my team at the agency I was working for. In 2011, Ricardo invited me to work with him and I started to maintain the site ever since. The front-end side was good, performance-wise, but the backend started to become horrendous to work with so in 2012 I started my quest to find a better CMS and found PW. After developing small projects and messing around with it I convinced my client/boss last year to let me develop his new website with PW. I did all the stuff (design, frontend, backend, and server ops) so if you find something buggy or strange, let me know, please! I'll appreciate! The site is currently running on Digital Ocean droplet with 2GB of RAM. Nginx and Cloudflare (for SSL mostly). I'm using forge.laravel.com to manage it. Approx. 3,000 unique users per day doing 72,421 requests (Cloudflare stats). Key features: Pages are loaded with ajax using https://github.com/miguel-perez/smoothState.js so the podcast player (Soundmanager ) can continue to play the podcast episode as the user navigates other pages. Member area where the user can see the books his own (and download their files) and also see his bookmarks and reports. I imported and the users (+ 4k) from the WP database and decided to get rid of passwords (the future!) so after some research and tests, I chose Auth0 login system. I've mentioned the member area on this topic (there are a couple of screenshots there): Modules used AdminLinksInFrontend AdminOnSteroids AdminTemplateColumns Auth0Login (Custom made) BatchChildEditor ClearCacheAdmin FieldtypeRuntimeMarkup FlickrAPI (Custom made) FormBuilder InputfieldCKEditor MarkInPageTree MarkupLoadRSS PageReferencesTab PageViews (Custom made) PduReport (Custom made) PrevNextTabs ProCache ProDrafts ProcessDatabaseBackups ProcessJumplinks ProcessSendyAPI (Custom made) ProcessWireUpgrade ReaderAreaManager (Custom made) SlideshareAPI (Custom made) TemplateLatteReplace TextformatterAccordion TextformatterHannaCode TextformatterMarkExternalLinks TextformatterMultiValue TracyDebugger UserBookmarks (Custom made) WireMailMailgun importPagesCSV
  3. This post cannot be displayed because it is in a forum which requires at least 10 posts to view.
  4. 14 likes
    I'm proud to present you: "The Crafters" Premium cocktails from Belgium! Enjoy! https://www.crafters.be/ (Front-end build with https://semantic-ui.com/)
  5. 12 likes
    This week we’ve got lots of details on our successful migration to Amazon AWS services for the processwire.com network of sites. We've also got updates on the current core and ProDrafts status. https://processwire.com/blog/posts/amazon-aws-now-powering-processwire.com-sites/
  6. 12 likes
    Little admin helper module: Using this module you can view all template cache settings at once. E.g. cache status, cache time (configurable). Furthermore it adds the functionality to clear the entire template cache or just the template cache for a given template. Note that this may cause a temporary delay for one or more requests while pages are re-cached. GitHub: https://github.com/justb3a/processwire-templatecacheoverview
  7. 12 likes
    Hey! This is a very early/experimental/alpha not for production environments release of a new module I'm working on. Just testing the possibilities and the interest that might be for such a thing. The idea is to be able to quickly create fields while working inside the template files without having to go to the admin. For example, in an early stage of development when creating a layout, insteading of putting a placeholder headline and then going to the admin to create the headline field where the real content will be, you can create the field directly from the template file by doing: <h2><?=$page->field("A nice headline", "headline", "text")?></h2> This will create a new "headline" text field when it doesn't exist in the system and add it to the the template of the page you're working on and add "A nice headline" value to it. On a second run the module will recognize that the field already exists on that template and will simply return it's value. The method accepts three string parameters in the order ( value, field name, field type ). Value and name are required but field type will assume "text" when omitted. $page->field("A nice headline", "headline"); // creates a text field $page->field("A nice paragraph", "body", "textarea"); // creates a textarea field The method also accepts a boolean parameter in any position: TRUE forces the value to be saved into the field on that page, FALSE (or omitted) sets that value to the field when it adds it to the template, but leaves it how it is when the field already exists in the page. This is the only situation when this module can be destructive, and it's only concerning the value of the field on that page: $page->field("Another nice headline", "headline", TRUE); // will create or add a text field and add the value to the page even if the field already exists there The method also accepts an array as parameter. This array will be used as options for the creation of the field. The options array will override the string parameters when they clash. $page->field("A nice headline", "headline", array( 'name' => 'subtitle', 'label' => 'Subtitle' )); // will ignore the name "headline" and use "subtitle" instead As soon as the fields are created and added to the template, all the method will do is return the value, just like if using $page->headline, unless you use the TRUE parameter which will override the value of the field by the value in the first parameter. -- With this module you can, for instance, convert an existing HTML template quickly, just by pasting the html into a template with no fields created yet, and going through all the code, replacing the content by calls to my field() method. In the end you should have a working page with all the fields created in the template. Now you just need to go to the fields and adjust their preferences. So, just download it > install it > test it > tell me what you think! dynamicPageFields.module.zip -- Edit: Multilanguage fields threw an error but they don't now. You can create a multi lang text by doing: $page->field("A nice headline", "headline", "textlanguage"); that third parameter is just a case insensitive simplification of input field names to make it easier to write. You can still use the original input field name like "FieldtypeTextLanguage" if you prefer.
  8. 11 likes
    This week we've merged the dev branch to the master branch for ProcessWire version 3.0.61 master. This replaces the existing master version 3.0.42. What's the difference between 3.0.42 and 3.0.61? Quite a lot! In fact, we might usually call this a major version and just name it ProcessWire 3.1, but we're saving that version number for when we get at least the new Regular site profile included (and perhaps the new admin theme), after Uikit 3.0 is out of beta. In this post, we'll cover some of what's new with ProcessWire 3.0.61 relative to the previous master version… https://processwire.com/blog/posts/processwire-3.0.61-master/
  9. 10 likes
    Hello, I know there are a lot of installing processwire tutorials out there, but here I put mine (with images and other little things) https://dev.to/clsource/installing-processwire hope you like it
  10. 10 likes
    While mostly just routine updates, this week we have a new core version on the dev branch with several tweaks and PRs. Work also continues on the Uikit admin theme framework, and more: https://processwire.com/blog/posts/processwire-3.0.58-core-updates/
  11. This post cannot be displayed because it is in a forum which requires at least 10 posts to view.
  12. 9 likes
    I wanted to hide the Tree dropdown menu for some roles, so I made this simple module. https://github.com/Toutouwai/RestrictTreeDropdown RestrictTreeDropdown Allows the Tree dropdown menu to be hidden for selected roles. Usage Install the RestrictTreeDropdown module. In the module config select one or more roles to hide the Tree dropdown menu from.
  13. 9 likes
    Hey! My pull request with an integration for PW for the Toggl Chrome button was just accepted, yay! https://github.com/toggl/toggl-button/pull/788 For those who don't know, Toggl is a really great time tracker, and they have a handy Chrome extension that integrates with web apps by adding Toggl buttons to tasks and projects. Generally, these integrations are with task manager apps and CRMs, but I thought I could develop an integration for the PW admin. Although I did it mostly for the fun of it, I think this can be useful in some cases, and definitely it's great to see PW featured on their extension and github page!. They also seem to be quite picky with these integrations, so I'm glad they accepted the pull request. Here are some images to give you a taste of it
  14. 8 likes
    To show our *.module files with the correct PHP syntax highlighter is now possible on Github. With new repos, you first need to add a .gitattributes file to it. After that you can view *.module files with the PHP syntax highlighter applied: MetadataExif.module So, this doesn't work with already created / comitted repos by simply adding the .gitattributes file. But it will find its way through different caching layers on github if you add it to your repos and further committs to them. (https://github.com/github/linguist/issues/1792#issuecomment-286379822)
  15. 8 likes
    I really think that using frameworks for medium to complex projects can help a lot, reducing significantly the time required when dealing with browser issues. I can't see a REALLY good reason, from a technical and a business point-of-view, not to use one as nowadays as almost all of them have generally good documentation, are battle-tested in all major browser versions. I really don't want to remember you how it was like in the days of testing a site over and over again in Netscape and IE. When I'm planning a project I decide which framework to choose based on these questions: 1. Will the project have many different pages layouts? 2. The client's brand require a custom design? Meaning, will the developer spend a lot of time creating a layout that's specific for the project, or the project can have a more default layout (based on the framework's default styles/components) 3. How much time/budget do I have to work on the project? 4. In the future, will be other people maintaining the project of just me? And if so, are we going to be thankful as I used a framework with good docs or should I expect a desire to break my (own) knees with a baseball bat? The choices can be, for instance: Zurb Foundation – for projects that require a lot of different pages down the road and a lot of customization. And I always use the Foundation Stack to have maximum control of the settings. Foundation is, like they said, the most advanced framework out there. Twitter Bootstrap – If I'm creating something with Laravel and it's an internal project, tool, or just a prototype, as the Laravel community have a lot of things already done using Bootstrap that can help. UIKIT – If the project can benefit from its more opinionated designed elements, meaning: can I stick with the defaults and do just a little customization and call it a day? --- Unless your project really needs to have the smaller CSS/JS footprint possible, like if you are targeting some users with crappy 2G connections and/or old browsers, you can go with a framework like the above. I used a lot of Foundation's CSS components on ricardo-vargas.com and the CSS is less than 30kb gzipped. --- For personal projects, I usually search around and give smaller frameworks like Tachyons, Kube, Bulma a try as it's fun!
  16. 8 likes
    Here's how you might dynamically create it with ProcessWire without tinkering with .htaccess files. Create a new template, call it robots, and set its URLs > Should page URLs end with a slash setting to no, and Files > Content-Type to text/plain. You should tick disable Append file and Prepend file options as well. Optionally set its Family > May this page have children to no, and Family > Can this template be used for new pages to one. Family > Optionally Set allowed templates for parents to home only. Create a new page under homepage, set its template to robots, and name as robots.txt. Create a new template file at /site/templates/robots.php, inside it you type <?php namespace Processwire; // render different robots.txt depending on your own conditions. if ($config->debug) { // use PHP_EOL to create multiline strings echo <<<PHP_EOL User-agent: * Disallow: / PHP_EOL; } else { echo <<<PHP_EOL User-agent: * Disallow: PHP_EOL; } and done. You should be able to see robots.txt at the url /robots.txt.
  17. 8 likes
    The latest core dev branch coming soon to the master branch, plus several Pro module updates and more. https://processwire.com/blog/posts/processwire-3.0.59-module-updates-and-more/
  18. 7 likes
    I built this one on bootstrap 4 with a number of extras. ie. Animate on scroll for photos and carousels, navbar animate on scroll, lightbox, facebook sdk for page embed, google map embed, and font awesome. I am using the page tree as a row builder instead of navigation. I detached the menu system from the page tree to give more control on external links, single page website situations that need to link to sections, and add new window target options. It also lets you have different footer links vs header links this way. You can add something like a privacy policy to the footer and not the header and still have one place that controls your menus. Extensions used: Color Picker, Inputfield ACE Extended, Google map marker, MarkInPageTree, Media Library, and Hana Code. I made a little module that will combine all of my ACE code fields into one merged javascript file and one merged css file on page save also. (Filename time stamped for cache busting.) Its pretty neat! I have code tabs on pages that contain css and js ace fields tied to various things. containers, themes, quick styles, and my sitewide code snippets can all have css or js that are merged on page save. While the page rows are great for adding elements to single pages, the sitewide snippet template is very powerful also. Located under the template page, these are filed under the location name. It has fields for files, css, js, php, and html code. By adding this one page to the correct location; Top, Head, Body, Bottom, it will autoload and add code to various locations all at the same time and keep everything organized. ie. Install a header file, and it pulls in all of the related css styles and javascript code at the same time for you. You can check out my screenshots to see how it all works! You can insert bootstrap rows, columns, and add bootstrap elements to columns. https://www.lakehamiltonoutfitters.com/
  19. 7 likes
    Hi All, I know I've been distant, but work has kept creeping up on me and I simply haven't been able to commit time to continue work on Jumplinks 2. At this stage, it's difficult to tell when I'll be able to continue, but I do hope it will be soon as I'd like to deprecate v1 as v2 is already so much better. Again, truly sorry for the delays...
  20. 7 likes
    @seddass, @Karl_T I'm a little out of the loop regarding Redis, at the moment, but I like the idea of collaborating on this. As I have the original repo on github, how about I add you both as collaborators, and we can make this a more community oriented effort?
  21. 7 likes
    Here is the scenario. You have developed a blog or news site or blog section to your site and you have created a basic tag system using a Page Reference field. How can you add related articles easily? This is one way by using Hanna code. I like this method because it gives me the choice of showing or not showing related articles and choosing the tag. My articles use a template called basic-page which includes a Page Reference field called tags. This is a multiple select field. I have created a Hanna code called "tagsearch" and given it the attribute "tag". In my textarea field it is used thus: [[tagsearch tag="fish"]] The Hanna code simply searches the title field of the tags pages for the single term and returns the pages that have that tag. I have limited the results to 8. From the results, we pluck the title field of the pages, the small image that I use for my thumbnail, and the url. However, we do not want to also return the page we are displaying, so we simply eliminate it by making sure that that none of the results have the same page name. Here is the commented Hanna code. <?php // Find the pages that use the specified tag $articles = $pages->find("template=basic-page, tags.title=$tag, limit=8"); // Start the loop foreach($articles as $article){ // Check we are only displaying articles that are NOT the current page if($article->name != $page->name){ // Add a thumbnail, but check it is there so we don't get errors if($article->image_small){ echo "<a href='{$article->url}'><img src='{$article->image_small->url}'></a><br>"; } // Grab the article title echo "<br><a href='{$article->url}'>{$article->title}</a>"; // end the check to make sure we do not show the current page } // end the loop } And that is it.
  22. 7 likes
    https://processwire.com/blog/posts/processwire-3.0-alpha-2-and-2.6.22-rc1/#compiled-template-files "It can be disabled globally by setting $config->templateCompile = false; in your /site/config.php file. If you do disable it, you'll likely want to add a namespace ProcessWire; to the top of your PHP template files where necessary." In practice, the simplest solution is to always add <?php namespace ProcessWire; if none other is required.
  23. 7 likes
    The PW Backend is basically a highly-specialized frontend to your data, so if you set your permissions correctly you can let whoever you want have access to it.
  24. 7 likes
    <?php foreach ( $pages->find('template=calendar-post, limit=8, Start_date>=today, sort=Start_date') as $single ) : ?> You can use Start_date>=today as a selector to only show items with a Start_date that is either today or in the future.
  25. 7 likes
    I'll have a look on the above issues/requests later, nowadays I'm busy with a 4.04 kg newborn who thinks he can steal all the hours in a day (and night)
  26. 7 likes
  27. 7 likes
    Thanks @adrian! I rerecorded the video many times before I could make it watchable. Trust me, you wouldn't say the same thing for the very first ones About the field access rules. Yeah that's true. By default the behavior is the opposite to the one in ProcessWire. I think it would be better for security if the module initially treats everything private. But I get what you mean. In cases where you have dozens of fields in one template, it would be too tedious to configure access for each of them. That's why there is an option to reverse the behavior in the advanced section of the module configuration. You can learn more about it here. This option basically makes all fields without Access rules available to the public and you can restrict access by enabling rules only to couple ones.
  28. 6 likes
    This is a story of desire, stilted romance, triumph, and discovery of a simpler way. TL;DR: ProcessWire has hidden goodies in it, but it makes me wonder what else I'm missing. The other day I was thinking, "Hey, I make a lot of navigation. Lists of links, glossary-style HTML sitemaps with links and descriptions, nested menus, etc. I wonder if I could automate some of the markup and stuff by making a custom function?" So normally, I might build a navigation menu in ProcessWire like this: $menu = $pages->get('/')->children; $out = "<ul class='my-menu-class'>"; foreach($menu as $item) { $out .= "<li class='my-item-class'><a class='my-link-class' href='{$item->url}'>{$item->title}</a></li>"; } $out .= "</ul>"; Within this, there are only a handful of things I might want to handle differently for different menus: The classes, the HTML elements, the pages included, the sort, and the limit, for a few. After some amateur writing and testing, I came up with a new object class that would take some config and return a menu in HTML: $out = ''; require_once('./ClassMenu.php'); $menu_settings = array( 'pages' => $pages->get('/')->children, 'label_class' => 'my-label-class', 'label_tag' => 'dt', 'desc_class' => 'my-description-class', 'desc_tag' => 'dd', 'desc_field' => 'description', 'wrap_class' => 'my-list-class', 'wrap_tag' => 'dl' ); $menuzilla = new Menu($menu_settings); $out .= $menuzilla->render(); The above menu would return something like this: <dl class='my-list-class'> <dt class='my-label-class'><a href='/about/'>About</a></dt> <dd class='my-description-class'>About page description…</dd> <dt class='my-label-class'><a href='/products/'>Products</a></dt> <dd class='my-description-class'>Product page description…</dd> <dt class='my-label-class'><a href='/misc/'>Miscellanium</a></dt> <dd class='my-description-class'>Miscellanium page description…</dd> <!-- etc. --> </dl> It worked great, and it was pretty flexible. As I considered adding more complex functionality, I remembered Soma's tutorial about building forms with ProcessWire, and I wondered if I could learn something about building markup from ProcessWire's render method. That's when I found MarkupPageArray. MarkupPageArray, for those who don't know, adds a render method to page arrays, giving them the ability to generate HTML without further ado, like so: $out = ''; $menu = $pages->get('/')->children; $out .= $menu->render(); But what if you don't like ProcessWire's default markup or classes? You can override that simply: $out = ''; $menu = $pages->get('/')->children; $out .= $menu->render(array( 'listMarkup' => "<dl class='my-list-class'>{out}</dl>", 'itemMarkup' => "<dt class='my-label-class'><a href='{url}'>{title}</a></dt><dd class='my-description-class'>{description}</dd>" )); This renders the same HTML I posted above, using only ProcessWire's own API and no custom functions. It brings a tear to the eye. So my question is this: What other common site components are hidden in the API waiting to be uncovered by the hapless and meek in their thrashing about for wisdom?
  29. 6 likes
    Greetings. I am here to share my first module. I make this module because I cannot find one to suit my need. I like SessionHandlerDB but I do not want to use mysql database to store session for performance. So, Redis seems to be the best choice. I have tried to use netcarver's SessionHandlerRedis but it lacks something I need, those are the active session checking and the easy module configuration while I do borrow some code from it (thanks to netcarver). So I take this chance to merge them together to form a new module. I am new to use github and I don't know if it is appropriate to publish another similar project, or fork from them. You may grab this from Github: SessionHandlerDBRedis I hope this could give somebody a help. Caution before use: this module lacks support for session lock. It will be implemented for the next update. Updated to v0.3 changelog: v0.3 - added ability to get forwarded IP instead of normal remote IP.
  30. 6 likes
    This week we have ProcessWire 3.0.60, which is likely to be our next master version. We’ve also got a few more Pro module updates, as well as a major update to our online API reference… https://processwire.com/blog/posts/processwire-3.0.60-core-updates-and-more/
  31. 6 likes
    ProcessWire is mentioned in the repository Awesome UIkit:
  32. 6 likes
    You have to perform the check for the template name inside your hook function. $this->page or wire('page') returns whatever page in which the module code is executed (admin page editor, custom page with the code...). Pages::save on the other hand is called with the page object being saved, which is what you're looking for. public function init() { $this->pages->addHookAfter('Pages::save', $this, 'syncMobileDE'); } protected function syncMobileDE(HookEvent $event) { $page = $event->arguments(0); if($page->template->name == 'TemplateName') { // Run your code } }
  33. 6 likes
    Hi-- to follow up, I was able to finally track down the web designer (using my internet super-sleuthing skills) and request that he add a staff member as a superuser-- a member of our IT department. He did so without a fuss. I appreciate everyone's input and willingness to help-- even Pwired....
  34. 5 likes
    Some more links you might also find useful: Multiple templates or parents for users front-end system to handle logins, password resets and changing passwords (old but should still help you a lot if you wan to implement it on your own without Front-End User module) @adrian's Some User related actions @adrian' Tracy Debugger with loooots of developer tools, such as User Switcher Panel lots of other info in the forum Hope this helps too.
  35. 5 likes
    Go to Setup/Templates: You should now be able to add any additional fields that you need.
  36. 5 likes
    You can do this with a few lines of JS (function(){ let inputs = document.querySelectorAll('.InputfieldWrapper .Inputfield'); [].forEach.call(inputs, item => { let input = item.querySelector('[name]'); if(!input) return; let label = item.querySelector('label'); if(!label) return; let inputName = label.htmlFor.replace(/(\w+)_(\w+)/, '$2'); let span = document.createElement('span'); span.style.display = 'inline-block'; span.style.color = 'tomato'; span.style.border = '2px solid'; span.padding = '0.25em 0.25em'; span.margin = '0 0 0 0.25em' span.innerHTML = inputName; label.appendChild(span); }); })(); Run this in Developer Console on your browser and you'll get this To automate this, you can put this script in a JS file in /site/templates/admin/labels.js, and enqueue it inside your /site/ready.php // /site/ready.php if ($page->template->name === 'admin') { $config->scripts->add($config->urls->templates . 'admin/label.js'); }
  37. 5 likes
    Hi, here is a very useful tool that check your images in websites against responsiveness: https://github.com/ausi/respimagelint
  38. 5 likes
    @Karl_T It's great of what you have done. I can feel your excitement about using Redis. Haven't had the chance to dig deeper into your code but of what I saw, you are not using session lock. Forgive me if I am wrong. I was using phpredis (the php extension) as a global session handler replacement in php.ini , but it lacks support for session lock. I was having trouble because of this and I wrote my own solution attached here. I just prepend it. When using session with files - the files system have lock on write. When using SessionDB - the database has a row or table lock depending on the table engine. Memcache have lock implemented and it's suitable for replacement in php.ini. Of what I saw in the phpredis code, there is no lock and have to be implemented externally. My issue because of this here. This guy here explained more about the session lock and session fixation. Here is the related issue/feature request at GitHub/phpredis. Magento's dev opinion here . Also many recommend igbinary as a php serializer of the session data before to be stored in Redis. Of course, it is not installed by default on a shared hosting. Just as a reminder, there were many ways to decrease the memory usage. Some prefer using "strings" instead of "hashes" as a datatype if not using millions of sessions and shortened keys for memory optimization. Also, just saw a cron job deleting the expired keys. Redis have native key removal for the expired keys and there is no reason for garbage collector or a cron job to delete the old keys. Sorry if I am wrong about your code. I am keen to test it in the morning. Hope this helps. Peace! session_handler_redis.php test_serializers.php
  39. 5 likes
    I feel really sorry. I have had some problems in recent months that have caused my brain to stop working .. And so I hesitated to launch the module knowing I could not give support. Anyway, I'm better and I resume the development as soon as I have my internet connection operational (should be good for monday). Sorry again guys!
  40. 5 likes
    Guys, if you have a lot of time to spare, you can kill some by checking out this list: https://github.com/neiesc/ListOfMinimalistFrameworks
  41. 5 likes
    It is very difficult to choose a framework, that's why I never use one . I just use SASS with normalize.css, bourbon bitter and a grid system I've built. This requires more work at first, but you avoid the bloat.
  42. 5 likes
    Hi Teppo, As a superuser I find the Tree menu great, but I have some roles for whom edit access is quite limited - most pages in the site are not editable by them. For those roles I think the Tree menu is less useful and it can be confusing. If you click a page in the Tree menu that you do not have edit access for you are taken to view that page in the frontend. I think that is unexpected and not helpful to the user. At the time I made the module there was no way to visually distinguish between editable pages and non-editable pages, although I think Ryan plans to fix that soon (might be done in v3.0.60). Also, although the pages shown in the Tree menu are the same as those shown in the page list, my perception is that it makes some of the pages that site editors don't need to concern themselves with (e.g. the FormBuilder iframe page, the 404 page) more prominent than they are in the page list. I could see myself having to deal with support requests from clients confused about what they see when they click these pages. I didn't think the Tree menu was worth it for those roles so wanted to selectively remove it.
  43. 5 likes
    While you say that it's legitimate traffic, what kind of traffic is it? What I'm wondering is what exactly happens during that spike: are there more requests to a specific feature than usual, etc.? While a code review could definitely result in some ideas about what to optimise, usually the best and first thing you should do is properly analyse the data you have, i.e. your log files. Find out any abnormalities in the requests, see which requests were particularly slow (you should get this data from the web server logs), and see if the MySQL slow query log (if you have it enabled) contains any additional clues. As an example, one site I help maintain recently got a lot of heavy traffic all of a sudden. Turns out it was a result of a campaign where each request included a similar GET param, and that in turn made the site skip cache. Note that I'm not saying that this has anything to do with your specific case; it's just something I couldn't tell from the amount of traffic alone, but it was really obvious once I took a closer look at Apache logs On a related note, it could also be that this has nothing to do with the code itself. It could simply be that your server -- or server configuration -- is the bottleneck. That too could be a result of an increase in a specific type of request, so again taking a closer look at the logs is where I'd start from. Edit: It seems that you're running an nginx reverse proxy in front of your site, but for every request I get a response header X-Proxy-Cache: MISS. Doesn't seem that this proxy is doing it's job too well if none of the requests are served from the cache. I'm not an expert on this particular topic, but in my opinion there's something fishy about your setup
  44. 5 likes
    At a quick glance, one thing you should look at is applying a limit to the selector in your search template. Search results like this could quickly become a problem, particularly if there was some kind of bot hitting the site: http://drydenwire.com/search/?query=a
  45. 5 likes
    Sounds like you have a good handle on how the process will work, so no reason to worry I think. I've just done something very similar so I can attest that it's quite simple to do in PW. Regarding 1 & 2: most likely you will be querying an API endpoint that will return a JSON string to you. You'll probably find the WireHTTP class useful here - that's what I used. The getJSON() method will convert the JSON response into an associative array that contains all the data you requested. Tracy Debugger will be useful for exploring this array. Then you will use some part of the data as a unique identifier (you could use the title string but there's probably some kind of reference code that will be a better candidate) and based on whether you can find an existing page with that identifier you will either create a new page or update an existing page. Then it's simply a matter of matching items in the array to fields on your page and saving the page at the end. You can use a lazy cron function to automatically query the API endpoint every 24 hours. To delete pages that are no longer contained in the JSON response you can collect all of the unique identifiers in the response and then use a PW selector to get pages not matching any of those identifiers. Those pages you delete.
  46. 5 likes
  47. 5 likes
    Hi, This issue is partially discussed over here:
  48. 5 likes
    Hi there, I created a new module called TextformatterMixcloudEmbed. It is based on the Soundcloud Embed Textformatter by Marvin Scharle and the Textformatter Youtube Embed by Ryan and is working the same way. I hope you like it! Download: https://github.com/TomasKostadinov/TextformatterMixcloudEmbed Screenshots:
  49. 5 likes
    Yeah, I Know.. but with PW you can do whatever you want!! lol
  50. 5 likes
    Just playing around a little with it and it's amazing having a blast. Just wanted to mention I got caught by a redirect scenario and language stuff. If you have multilange installed and configured to have language segments "/en/", "/de/" ... so trying out ajax requests to "/graphql/" would redirect to "/en/graphql/ " but you get a response: {"errors":[{"message":"Must provide an operation."}]} So it took me a while to figure out and was looking at the query instead. Doing the request to "/en/graphql/" works flawless. I was testing the languages and the graphql pages you create don't have alternative languages active. This also might get you caught, when graphql is installed when there is more than 1 language set up. Permission so far seem to work. The template access setting seem no to be inherited, I guess that is intentional? I may have missed it and it was mentioned. Then I'm sorry. – Like in a default install "home" has guest view access enabled, so all pages inherit that (unless you set it no to). But I had to give basic-page explicit guest view access to get querying. I think it's ok to not have all templates inherit access for graphQL. Thanks and keep up the good work!