Leaderboard
Popular Content
Showing content with the highest reputation on 04/22/2017 in all areas
-
@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?6 points
-
At first I didn't understand foundation, then my lightbulb moment happened this morning. Then I built a demo page responsive flexbox layout in about 30mins using both the provided classes, then with the mixins provided instead to cut the HTML classes bloat. Then I was like this looking at my old small boilerplate css: Gotta love making stuff for the web3 points
-
@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.php3 points
-
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 it2 points
-
Thanks, that fixed it. There was a space between mystyles: and /site/modules/ ... the the correct syntax mystyles:/site/... and not mystyles :/site/... A note for other readers, the Styles drop-down wasn't displaying anything after the change quoted above. However changing the style name in the mystyles.js file from: CKEDITOR.stylesSet.add( 'default', [ to: CKEDITOR.stylesSet.add( 'mystyles', [ fixed the issue of the styles list being empty. @Macrura - thanks!2 points
-
@abdus thank you very much. That did the trick. I put the values (-> en_US.UTF8 ) without quotation marks in the translation field. Also i saw that there was already a string for the german language (-> de_DE), which i left untouched, but now i think it would be better to change it to de_DE.UTF-8 ... Anyway i strongly suggest to change the warning messsage to exactly the line you wrote me in your post, because that's clear and easy to grasp, imho. ok on hindsight - if one has a multilanguage installation - one should know what is meant by "please translate the C locale...", but still, i managed to misunderstand the original message whereas your line is 100% clear.2 points
-
@seddass Thanks for your great lesson. I have really learnt a lot! I lack the knowledge and sense to find out the potential threats. And, I should have made it clear about the existence of any open issues affecting the usage before using a library. I will dig deeper and try to resolve the issue. Your attached code would be a great help for this. I was using string as datatype originally. Hash is used because it is the only way I found that can let me to do calculation like finding recent active session using timestamp by ZADD. Thanks for poitning this out. I overlooked this one.2 points
-
You won't be modifying core files. You'll be working on translation files. From the top dropdown menu, go to Setup > Languages > [en/de] > Core Translation Files > Find Files To Translate > (pick language support module) > Submit > replace the values2 points
-
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/2 points
-
you have to follow the format: mystyles: /site/modules/etc.. you only have the path; also make sure to change the name of the styleset to add, so it doesn't conflict with the core.2 points
-
High Performance Browser Networking © Ilya Grigorik the complete book is online now for free reading: https://hpbn.co/1 point
-
It shouldn't be hard to support. When I set this action up I limited it to text and textarea fields, but it makes sense to expand to others - I just didn't have time to test it then. I'll see what I can do tomorrow to get this working for you.1 point
-
Swiftly updated for 3.0.61, thanks again to Manfred. Everyone, enjoy and please report anything you may find wrong or worth improving, ideally in a pull request at https://github.com/yellowled/pw-lang-de, please.1 point
-
1 point
-
1 point
-
@Karl_T Glad to save your time. If we join forces we can create a great Redis Sess Handler for PW. Hope @netcarver will help too. If it's just occasionally, I would try with strings using TTL (or PTTL) to get their expire time and to sort all the keys in php array. BTW never played with TTL till now. It has to be tested with a lot of sessions. The next feature will be to provide connection support for local socket and to multiple Redis servers with priority and auth. My experience with Redis started when I find out session_id() took 12 seconds because of many sess files.1 point
-
Actually, I've managed to come up with a very elegant solution now, and would like to share it. I've added a Page field (multiple options) to the template (for the pages that have lists of pages on them). Then I added the following code to the template file: $stories = $page->children(); if ($page->pageimport) { $stories->append($page->pageimport); } $stories = $stories->sort("name"); pageimport is the name of the Page field I mentioned above. Now you can select pages that you want to import and display as 'fake' children of other pages.1 point
-
Are you sure about namespaces? Do you declare them in _header.inc.php?1 point
-
Ah, the todo list... I can see a Module now.., Tailer—it tails your log files. You tailor the rules and leave it to Tailer to alert you tor any phrase or limit that interests you1 point
-
Thank you for this quite useful "changelog"! It should be turned into a "custom"1 point
-
Why are the modules not listed on the public reference page? for example the MarkupPagerNav is listed (under Additional) but the MarkupPageArray, and many more of the core modules are not (although they can be browsed in the Pro module). Also I agree with @adrian - the ability to see where the file is located and quickly open it would be helpful for learning (see @adrian implementation in the Tracy debugger module). If the API explorer could be used to document our own templates, CSS, SAAS, JS etc. files, this "edit / open file" feature would be useful when collaborating with other developers and might also be a good way for new users to learn about PW from site profiles.1 point
-
Very strange indeed, but I don't think they install bower for you. Are you sure you haven't installed it before for other projects? Anyways, don't lose your head over it. The differences between what can be installed are these: npm install foundation-sites This command will install only the CSS framework, you'll need to compile the Sass yourself. As their documentation says, you can use Bower OR npm. But, to install all the requirements to compile the Sass files (using node-sass), you should use their cli like below. This is useful if you do not have gulp setup yet for your project assets. npm install --global foundation-cli And, the final option, using Zurb template, which I recommend only if you are starting a new project and want to use their Panini library to build the pages statically and have an HTML prototype very quickly to show to a client and after their approval integrate with PHP. foundation new --framework sites --template zurb Be aware that it will install a lot of stuff!1 point
-
@FrancisChung, it sounds like a good idea, but I think I saw something like that before but couldn't find it. Although I've found a quiz on how to choose a JS framework, many questions can be adapted to create a new quiz using https://www.qzzr.com as well. Take a look: https://code.tutsplus.com/articles/quiz-choose-the-right-front-end-javascript-framework-for-your-project--cms-27739 And, maybe you haven't seen these two comparisons: https://www.vermilion.com/responsive-comparison/ http://usablica.github.io/front-end-frameworks/compare.html They can help a lot.1 point
-
Hello Vikestart, for that you can use "tags". To create "tags" there are many options and here is one: 1) create template "tags" 2) create template "tag" with only deafult field "title" 3) create field "tags", type page ( my suggestion is to use Lostkobrakai module Chosen Select ), and add it to "movie" template *** note: for page field "tags" set as parent page "Tags" (example below) As example here is some page tree: - Home - About Us - Movies --- Horror ------ Some Horror Movie (eg. template "movie" with your custom fields - and one is field "tags" (3.) ) --- Thriller ------ Some Thriller Movie ( -//- -//- -//- ) - Contact - Tags ( template: "tags", page/settings: hidden ) --- Horror (template: "tag") --- Thriller (-//-) --- Scifi --- etc After that inside movies set "tags" for every movie (one or multiple tags per movie). 1) Here is example how to get Some Horror-Thriller inside your category Thriller's: // on page "Thriller" $search_term = $sanitizer->text($page->title); // thriller $items = $pages->find("tags.title%=$search_term, sort=-sort"); // here you can add more precious filters... 2) You have some "Tags Cloud" widget (eg. in some sidebar) <?php // tags cloud $tags = $pages->find("template=tag, include=all");// include=all because of hidden parent ?> <div class="widget tags-cloud"> <?php foreach($tags as $tag): ?> <a href="<?php echo $tag->url;?>"><?php echo $tag->title;?></a> <?php endforeach; ?> </div> Maybe links inside "tags-cloud" are little confused, eg. "my-website.com/tags/horror" but that's part will be more clear if you watch main part inside tag.php and tags.php templates (below): // tag.php $search_term = $sanitizer->text($page->title); $items = $pages->find("tags.title%=$search_term, sort=-sort"); // tags.php $tags = $pages->find("template=tag"); $items = $pages->find("tags=$tags, sort=tags.title"); regards p.s. this principle is used here on some of my testing website (at sidebar column is tags-cloud widget)1 point
-
Interesting to see someone else using PW + Vue.js. Building components in Vue and using things like webpack and hot reloading has been kind of eye opening for me. I've just finished a small website/shop that uses Vue to render some elements. Things like the cart made a lot of sense, calculating/updating prices as quantities are edited for example. The cart in this instance is essentially a popover and doesn't need to be rendered immediately or visible for SEO purposes, which was a primary concern with this site. Where Vue was used to render actual content, I ended up writing duplicate templates in both PHP and using Vue components (the latter overwrites the former) which is obviously not ideal. I'm looking to eventually transition to using Vue/Vuex/Vue Router, moving away from writing PHP based templates and just using PW to expose JSON data via some kind of custom API. But as I almost exclusively build websites and not apps, things like SEO have always been a bit of a concern. I need to read a lot more about how to handle server side rendering with Vue for example. I wonder if there are enough people here who would be interested in some kind of PW/Vue/Webpack project template for use with Vue CLI or similar?1 point
-
Thanks all. There's really a lot wrapped into this. It connects to a lot more than I'm showing here. The test server doesn't show the other kinds of help desks we have. This one is the IT version, but there are 2 other variants of this system, one of which is for marketing (which has a bunch of additional fields when you complete a ticket). The original tickets are powered by FormBuilder. That way there can be all these ticket variants without having to create or try and reuse a bunch of fields. Once the ticket is created, it's sent to a PW page. The Formbuilder JSON (and the JSON for the actual Form) are saved to the page. This way, if the form fields ever change, it doesn't effect old tickets. Essentially the state of the form and the entry are snapshot together and attached to the page. The replies/internal notes are an extended version of the comments field so that everything is contained within a single page. It doesn't have to be that way, but I had already created this modified comments field for another project, so it was the easiest way to go with this project. Anyhow, It's not something I intend on releasing at this time, but may revisit it eventually if there's enough interest. I would remove the FormBuilder dependency if I made it public.1 point
-
Looks really great @renobird - I know you say it it is specific to your environment and not meant to be released, but are you rethinking that? The one thing that we discussed in the Tracy thread about this was the ability for the tickets to be initiated from a link on every page so the user doesn't need to specify the page, and also so that the devs can view tickets relevant to the page they are viewing. I'd hate to see us all reinventing the wheel here - how can we move forward?1 point
-
I haven't really read all of this thread, but just wanted to chime in with a brief overview of a help desk system I built. I can only show you screen shots from the test server — since the real one has sensitive data — but I think you get the idea. Unfortunately it's all pretty specific to our environment here, and was never intended to be released. Ticket List This is pretty small in the test environment. The lighting bolt icons open a modal that shows some "quick look" information for admins. Last comment, ticket history, etc... It's just a way to quickly peek into a ticket without opening it. Ticket View Many of these test tickets are filled with a ton of content, but here's one that shows some of the features. It's conversation based. You can attach specific equipment (we have several equipment databases managed in other PW modules). You can add files/images to any reply. Typical help desk stuff really. Reply options This is at the bottom of the discussion, a lot like it is here in the discussion forum. Agents can reply or create an internal note.1 point