Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/01/2019 in all areas

  1. Worth mentioning this module here: https://modules.processwire.com/modules/template-field-widths/ GIF: https://user-images.githubusercontent.com/1538852/49207167-0cbef100-f419-11e8-965a-ca46b4f256d1.gif
    3 points
  2. I always use the "Server directory" option because I'm using the profiles locally and so there's no point in an extra zipping/unzipping stage. So could be a bug with the ZIP export option.
    2 points
  3. SearchEngine 0.10.0 was just released. Not a whole lot of stuff in this release – basically just one new feature, one minor addition to the default theme CSS, and some PHPDoc improvements. ### Added - New Renderer::___renderResultsJSON() method for rendering search results as a JSON string. - Additional CSS rules to make sure that visited links appear correctly in the default output. While building an AJAX suggest search feature it occurred to me that it would be nice if SearchEngine could return search results as JSON out of the box. Newly added renderResultsJSON() method provides this capability, and new settings results_json_fields and results_json_options allow customising what gets returned, and how. More details (and an example of using this feature) in the README: https://github.com/teppokoivula/SearchEngine#json-output.
    2 points
  4. ? for the width adjustment, this is a really nice feature that makes setting up new templates and changing them much more convenient! Funnily, I just implemented a toggle inputfield myself and thought, oh bummer, I could have saved myself the work! Turns out, you weren't talking about a sliding toggle like I am working on, and the core toggle field type is a nice addition for cases where the choices need to be more verbose than a simple yes/no and on/off. It'll come in handy for some of the forms I have in the queue. I will have to rename my module, though ? It'll be CSS only. I still need to add color and size options, and it'll hopefully hit the module repo at the end of next week.
    2 points
  5. This latest version of ProcessWire on the dev branch adds a new Inputfield module called “Toggle” that is an alternative to the existing Checkbox Inputfield. It also adds a nicer way to make column width adjustments to your fields when editing a template. This post covers all the details with screenshots and a short video: https://processwire.com/blog/posts/pw-3.0.139/
    1 point
  6. Ok, this is a very good detail. I always use ZIPs as I push them - as they are - to the new system. I will try the Server Directory tomorrow and let you (all) know if this makes a difference here on my side.
    1 point
  7. This part is optional - it's exists in case you want your server endpoint to be something pretty like http://yourdomain.com/files/ But if it's causing you a problem you can leave out the tus-php .htaccess and set your endpoint to http://yourdomain.com/server.php or whatever with no rewrite needed.
    1 point
  8. Ryan's ProcessExportProfile module includes ready.php in the exported files. Based on your other comment, I think there may have been an error during the export process because I frequently install profiles exported by this module without any problems.
    1 point
  9. Normally I create more than that under home anyway, such as custom assets, tags, categories, etc... Normally I create a page under home called something like "Internal" – and move it to be the last one – to signal that pages under that do not directly map to public pages, and I explain it to the client. As it is a simple concept, even the less technically minded had no issues understanding it so far.
    1 point
  10. Did you try this solution? ProcessModules are great for custom user interfaces, but a settings page is - at least how I understand it - primarily for storing some data. That's a little harder to do using ProcessModules and it's exactly what ProcessPageEdit is built for. So I think the solution described by @Jonathan Lahijani is still the best option.
    1 point
  11. Dobro vece, You can try this in your template or _init.php: $cookieFile = $_SERVER['DOCUMENT_ROOT'] . "/pw-boilerplate/site/assets/cookies/cookies.txt"; // adjust this if(!file_exists($cookieFile)) { $fh = fopen($cookieFile, "w"); fwrite($fh, ""); fclose($fh); } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://localhost/pw-boilerplate/session.php'); // more about this below curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieFile); // Cookie aware curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile); // Cookie aware $result = curl_exec($ch); curl_close($ch); $result will now show the value of your outside session. pw-root/session.php does really only this: <?php session_start(); if(isset($_SESSION["outsidepw"])) { echo $_SESSION["outsidepw"]; } This means that if your non-PW site creates a session named "outsidepw", you just output it to the browser, in a page that sits in the PW root (not inside site/templates). Since such PHP files at root-level know nothing about PW, you can do anything you want (they're not bootstrapping PW). CURL will mimick a browser request, and that way you can get the external session var back into PW. Just tested it out quickly. Instead of a full-fledged PHP app in root, I just created a PHP file that instantiates a session and declares a session value. But the main logic should still work, as long as you know the external session var...
    1 point
  12. Well, feel free to write your own module then. It ain't so hard, really.
    1 point
  13. Today I exported a site profile. After installing a new PW instance and put my site-boilerplate folder in the root, and deleted the default site-profiles, PW just outputs an error on the install screen "no profiles found". I'm puzzled. When I put the default site profiles back in, it recognizes them all - except my own. Is this module even maintained anymore? After reading this thread, I also checked for any special characters in the profile name, there's nothing like that. I also compared the .json and .sql files in the install-folder: they look identical to me in structure.
    1 point
  14. https://processwire.com/talk/topic/14112-general-site-settings-module/ https://processwire.com/talk/topic/17536-settings-factory/ https://modules.processwire.com/modules/textformatter-multi-value/ https://processwire.com/store/pro-fields/textareas/
    1 point
  15. Hope you guys are having a great week. I'll keep this week's update short since everything I'm working on is in-progress rather than ready to post. But I can tell you about a few things you'll likely see in next week's post: First is that I've got multi-page/paginated form support just about ready to release in FormBuilder. What this means is that you can take forms (especially long forms) and break them up into multiple paginations. This makes for multi-part forms that are more digestible and easy to use for users. The end of each pagination has "Next" and "Prev" buttons for navigation between them. FormBuilder validates each pagination independently as it is submitted so that any errors are taken care of as the user proceeds rather than all at the end. And these are true paginated forms, rather than a JS manipulation of existing forms. More on this next week. I'm also working here on a new Inputfield module called InputfieldToggle. It's an alternative to the core InputfieldCheckbox and the intention here is to make it a selectable alternative for FieldtypeCheckbox fields. Unlike InputfieldCheckbox, it is presented as two radio buttons for "on" and "off" states. (It's also possible to have a "no selection" state distinct from the "no" state, where supported). It comes predefined with several toggle types (Yes/No, On/Off, True/False, Enabled/Disabled), along with the ability to specify your own (multi-language too of course). Like a checkbox, because it is a toggle, it holds a value of either true (1) or false (0). There is also null for no selection. While this is a relatively simple Inputfield, it answers a common need (at least in my experience) and often can provide a better experience than a standard checkbox, depending on the input need. Not to mention, it's a lot more efficient than using an Options or Page field to accomplish the same thing. In addition to sites and apps running in ProcessWire, I think this particular Inputfield has a lot of potential use in the core and its administrative forms, so I might include it in the core, though not yet certain. I'm already using it quite a bit in forms I'm developing for clients in FormBuilder, where in many cases I find it a better fit than InputfieldCheckbox. Lastly, there are some nice UI enhancements just about ready for manipulating column widths of fields in ProcessWire. It makes it a much simpler and quicker job than it currently is, so I'll have more on that next week too. Have a great weekend!
    1 point
  16. I am a bit lost here and am probably way off. To test things, I have installed my Blog module but did not do any manual save after that. My default settings are saved without doing any manual save...this is because I have this line in ProcessBlog...___install() $this->wire('modules')->saveModuleConfigData($this, self::configDefaults()); ...unless of course that is what you guys mean by manual save? I can immediately access the settings...e.g. did this in basic-page $settings = $modules->getModuleConfigData('ProcessBlog'); Edit: forgot to add...I still use the old way of setting module config + PW 2.7.3
    1 point
  17. Here's a tip for making your global settings / global options page easily accessible in the admin, without having to create a custom process module or going to the page using the pagetree. Let's say the page name of your settings page is called "settings" and it's directly under home. Now, create a *new* page under the admin page in ProcessWire. Use the "admin" template. Call this page "settings" as well. After saving, it will now give you the option to choose which process module this admin page will utilize. Choose "ProcessPageEdit". Now you will have a link in the main navbar to this Settings page, but when you go to it, it will error saying "Unknown page" + "the process returned no content". What you need to do is make this page load the /settings/ page you originally made. Using the special "/site/ready.php" file (create ready.php if it doesn't exist), you can add the following line of code to it: if($page->template=="admin" && $page->name=="settings") $input->get->id = $pages->get("/settings/")->id; Now go to the Settings page in the navbar. Nice, easy and "official" feeling.
    1 point
  18. Until I bought Lister Pro, I did not fully realize how much it could increase your productivity. Working with the tree (or using the built-in search engine for quicker access) is intuitive, and I'd say fast enough in most cases, but it's a one-size-fits-all solution. With the tree, there's no easy way to group pages under different parents, or search for pages that fit one or more criteria and view and edit them quickly. Since Lister Pro is a customizable search engine, you can target with precision which criteria you'd like to use to return the pages you'd like to view and/or edit. In a few clicks, I can set up my own results in a easy-to-scan table view. You can save these results, and they show up under the "Pages" dropdown menu for quick access, which for me wasn't clear from Ryan's description of the plugin. This is incredibly powerful. Let's take an example. Let's say I run an Website showing cultural events across the US, organized by cities (New York, Washington, DC, etc.) and categories (Music, Performing arts, etc.). I have various editors. One of them would like to view only the events he's been assigned to, e.g. all music events created this year in Washington, DC. I can easily create a customizable admin view for him: The results look like this (the columns can be adjusted to your needs of course, and the editor can also filter the results even further): The editor has super quick access to his own "admin view" from here (I've called this page "Recent events" in this example): I can go ahead and create various views for each of my editors. If I work alone, I can do the same to gain quick create, view and/or edit access to whatever views I choose. I hope you can see the power of this module, and I'm not even talking about the included actions that let you manipulate the results, such as email users, exporting to CVS (very useful to export results for offline data analysis in Excel), etc.
    1 point
×
×
  • Create New...