Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/19/2017 in all areas

  1. A stock PW3 installation should actually be faster than PW2 – it certainly is on all of my installations. There's a lot more optimization in PW3 than in PW2. If that's not what you are seeing, then it's time to start looking for where the bottleneck is. PW3 does not have more significant overhead than PW2 except when it is compiling a file for the first time. The 30% increase numbers mentioned above sound to me like that is a request where PW is compiling a file. You can expect a request where it has to re-compile a file to take longer. But it only has to do that once, when a file changes and needs to be re-compiled. Maybe that's a common occurrence on a dev site, but should be a rare one on a production site. I'm measuring here with Chrome dev tools, ProfilerPro and my own timers using the Debug class. What tool are you guys using to measure times, and in what quantity? Before deciding something is PW3 related, I really suggest testing with a basic/blank profile without other modules installed. If you are consistently seeing any kind of increase in render times under PW3, my guess would be that something is getting recompiled on every request for some reason or another, or that there is another module involved that runs slower under PW3 for some reason. Edit--A few things to add: Debug mode is going to be slower in PW3 than in PW2, simply because PW3 is tracking a lot more stuff than PW2 did. With debug mode off there should be no difference though. Keep in mind debug mode is for development, and not something you should ever leave enabled on a production site. PW3 is more efficient with resources than PW2. PW3's boot time (stuff it does before executing your template file) is 20% to 45% faster in my testing. PW3 executes 20% to 25% fewer queries as part of the boot, and loads up to 50% fewer pages. Autoload modules become part of the boot process, so I test with no 3rd party modules installed. The file compiler can potentially add a little bit of overhead even when it doesn't need to compile, because it has to determine whether something needs compilation. But on a default site profile we're talking about maybe 10ms at the most here. If you turn off the template compiler, then that overhead is gone. While PW3 uses fewer resources on the database side, but sometimes more resources on the file system side. If you've got a slow file system, you might notice it more in PW3 than in PW2. For those of you seeing PW3 to be slower than PW2, if it's determined that 3rd party modules are not a factor, I would be curious what's happening in the template files. Perhaps there is a bottleneck in a certain API call or something that we're not aware of yet. It would be interesting to see the results of profiling the API calls in your template files using ProfilerPro or Debug::timer() calls. Mostly specific to Soma: PW2 and PW3 are identical in terms of how they use joins and indexes. Regardless of version, PW will use as many joins as it takes to execute the selector you give it. Just like you can create complex or inefficient SQL queries you can also create equally inefficient $pages->find() calls if you aren't being careful. Using PW's API doesn't mean you are somehow bypassing the database. Your find() queries still become SQL queries. So if you are working on big and complex projects, then you need to watch and profile your work. When you a come across a complex find() operation that is expensive, refactor it to be simpler or break it down into smaller parts. Pay attention to how many pages you load in memory at once. Don't use find() and children() calls without "limit" selectors when dealing with potentially large sets. With regard to indexing, PW logically indexes all the columns that are likely to be used in find() operations, but if you are querying columns in a table have no index for whatever reason (3rd party module that forgot an index, or column not commonly used for queries), you may need to add one. Most of us never need to do this, but since you mentioned "big and complex" you may be in the territory where you have to apply more consideration to these things.
    4 points
  2. Welcome to the forum @Cengiz Deniz About your question, you could use a Repeater for the aphorisms in your template. First read this doc : http://processwire.com/api/fieldtypes/repeaters/ , you should get an idea on how repeaters works. So for your example, you could make a new text field called aphorism_title and a new repeater called aphorism_repeater. Finally you add the text field 'aphorism_title' to the repeater. You should end up with something like that : In your page template, you add the repeater field you just created, and add some aphorism to it : Then in the template code, a simple foreach loop will do the job to show all the aphorisms in a list: <h3>ÖzlüSözleri</h3> <?php $aphorisms_list = ''; foreach($page->aphorism_repeater as $aphorism) { $aphorisms_list .= "<li>{$aphorism->aphorism_title}</li>" } ?> <ol> <?php echo $aphorisms_list; ?> </ol> Hope its clear enough, you can adapt it depending the output strategy you use, but do not hesitate to ask more information. Good luck!
    4 points
  3. We're going to be sticking with Font Awesome as our icon set. While Uikit comes with its own SVG icon set (and one certainly can use those) the scope and quantity of them is pretty limited relative to Font Awesome. Previous versions of Uikit actually used Font Awesome as their icon set, but in Uikit 3 they switched to their own set. There just aren't enough of them to cover our needs, plus I'd prefer to stay consistent with icon usage. So not planning to implement any features specific to Uikit v3 icons at this stage. As far as I know the Uikit cards aren't related to material design. They are a default styling that Uikit has for something that is visually offset in a different way. With the default styling that they've got, I've found the card view helpful when you get into nested Inputfield elements, as it makes it a little easier to visually identify the hierarchy vs. the completely flat look. I understand all-flat look is what's trendy right now, and my intention isn't to get into the design aspect at all. Though I appreciate that the Uikit folks recognize that there is a need for this kind of thing. So it'll be up to the people that get into the design side to interpret how one translates the card style in a Uikit theme. This one will also be open to interpretation in the actual theming process. I'm just trying to make the colors as obvious as possible at present.
    3 points
  4. Thanks LostKobrakai, you pointed me in the right path by suggesting the static google map. I've achieved the above by simply doing this in the pages2pdf template: <img src="https://maps.googleapis.com/maps/api/staticmap?center=40.714728,-73.998672&zoom=12&size=400x400&key=______"> which simply return a static image map. Useful enough!
    2 points
  5. Hi all. First of all, I want to thank you all who blessed us with this great CMS. I have done 20+ sites with this and I'm very happy. I love the API. In case anyone is interested in using Discord to chat and talk about ProcessWire, I made server for us. Discord is a free voice and text chat app designed specifically for gaming, but it's very good for our kind of communities too. Chatting is similar to IRC, voice is similar to TeamSpeak or Mumble, and there will be coming new features like video chatting. Also chance to use notifications when someone talking in a specific channel, but the server's default is only notified when mentioned. There can be multiple channels in one server; general, help, devtalk, security, specific languages. All can be public or accessed by only for a certain role. And if you're not there, let's say for five days, you can still search or read things what people have talked since you were there last time (if mod did not purge that channel). Windows and Mac clients are very good ones, but Linux is still in beta. And of course, there is webchat too. More information about Discord can be found here: https://discordapp.com/ Of course, all the ProcessWire developers can get moderator access to the server. Forums are, of course, very good place to discuss things (and I have found many answers from here), but that is not real time and getting the answers you need can take a lot of time here. People want to get their answers faster, right now, so that’s why Discord can be a very good way to grow our community. Think about it. Invite link to server
    1 point
  6. Last week we looked at progress on a new admin theme framework for ProcessWire. This week we’ll do the same, as development continues to move forward and we have a lot more screenshots to share (though keep in mind this is largely un-themed/stock). https://processwire.com/blog/posts/continuing-work-on-new-admin-theme-framework/
    1 point
  7. Now I got it. PW takes the Module name neither from the file name nor from the folder name nor from the class name but from the getModuleInfo function, which I have copied from a sample code.... Sorry!
    1 point
  8. Is that a "Yes, problem solved!" or a "Yes, I've ticked all the boxes but it still doesn't work!" ?
    1 point
  9. Hi @flydev, It works like a charm . Thank you, thank you. The only other thing i needed was a link/button to link the slide to another page/post. I'll try to do that myself first. If I get stuck will ask for your help. Thank you very much.
    1 point
  10. @Standard Forge, if you just want to make one or two minor changes to a rendered menu without having to build all the markup yourself (using getMenuItems()), you can do a quick str_replace. Example: $menu = $modules->get('MarkupMenuBuilder'); // cache the rendered menu $schema_menu = $menu->render('my-menu-name'); // alter the rendered menu to your desire $schema_menu = str_replace('<li ', '<li itemprop="name" ', $schema_menu); $schema_menu = str_replace('<a ', '<a itemprop="url" ', $schema_menu); // output the altered menu echo $schema_menu; Quick and dirty, I know. But if you are using delayed output anyway, it’s just one or two lines of code.
    1 point
  11. Maybe there is some confusion here. There is a topic discussing it:
    1 point
  12. This is incorrect. You can access files/images from other pages, be it any page, sibling pages, parent pages, children pages, a "media" page (for example), "media" (sub-)categories (and/or their children) pages, etc. It's quite flexible. Edit: I would just like a way to get to some page assets quicker sometimes, when, because of the structure I set up, I have to click many times in order to access them and to do it several times to get several images not far from each other, for instance, in the page tree. It would be nice to be able to bookmark "places" to get there in fewer clicks. Edit 2: I'm just thinking (again) that being able to select several files/images at once would be a big progress. Several from the same page and/or several from several pages before validating the insertion(s). I don't know if/how it could be done with the different options available for each file and/or image: cropping, title, etc.).
    1 point
  13. To refresh your understanding of GET variables, see this tutorial: http://html.net/tutorials/php/lesson10.php $input->get is a PW-specific way of retrieving GET variables but it's essentially the same as the native PHP $_GET. So these two lines... $keywords = $sanitizer->name($input->get->keywords); $q = $sanitizer->selectorValue($input->get->q); ...look for GET variables in the query string named "keywords" and "q", and then pass their values through a sanitizer. The result is assigned to variables $keywords and $q. And these two lines... if($keywords) { //... if($q) { //... ...check to see if the variables are "truthy": that is, if they evaluate as true when converted to a boolean. You are seeing "Title|Body Match" but this does not mean there actually is a title or body match - your if($q) test is passed so long as $q is not empty. And also consider that if($keywords) can never be true if there is no "keywords" variable present in your query string.
    1 point
  14. There is (ahem..) a commercial module for this kind of thing. It's called Media Manager (Disclosure: I am its author ) By the way, I don't think your post matches the content of this thread. It would be best if you started a different topic. We would then transfer your post and its responses to your new thread. Alternatively, if you can suggest a title for your new thread, we can hive off these posts into that new topic directly.
    1 point
  15. @flydev That's awesome. I'll try it out and report back. The Processwire version I'm using is 3.0.42. Thanks a ton.
    1 point
  16. I'm quite sure that pages2pdf does not execute any javascript. You might be able to get what you need using google's static maps api, where maps are rendered as images, but that's not part of the mapmarker module. Also I'd suggest reading the terms of service in detail, not that such operations are prohibited by google.
    1 point
  17. It is mainly to test different servers configuration as currently the AmazonS3 implementation is quite stable. And I found a way directly in the AmazonAWS console to create accounts and sharing keys for users. Anyway thanks for the suggestion, maybe I will give a try by curiosity
    1 point
  18. How to create a GoogleDrive service account step-by-step Edited the 2017-02-18 Go to https://console.developers.google.com Create a new project: Enable the API: Create credentials: Select "New service account" Click on Create and save the JSON key file Click on Manage service accounts : Copy the service account ID : Configure Duplicator by copy/pasting the service account's email and the content of the JSON key file :
    1 point
  19. Does anybode have this module installed online? Just would like to see it in action...
    1 point
  20. Just for the record, since it's closely related to this thread, there's a pull request in GitHub about SQLite support (opened back in May). There are quite a few changes and most likely it isn't in sync with current dev branch (it's based on the master branch), but still works as a nice proof of concept for SQLite support. If any SQLite user here is able to get that one running and could run a few tests to see how well it behaves (the questions Ryan asked in his comment to the PR, like how well selectors work etc.) it would be interesting to hear.
    1 point
×
×
  • Create New...