Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/31/2016 in all areas

  1. Media Manager Released 31 March 2016 https://processwireshop.pw/plugins/media-manager/
    8 points
  2. Hi all, My 1st submission here - MeBilling.com - A website for a medical billing solution provider. What I did in this: Logo, Website Design, Processwire integration Processwire modules used: Mostly utilised core 3.0.x modules, with Frontend editing feature for ease of content editors. Let the opinions flow in.
    5 points
  3. Visual Page Selector Released 31 March 2016 https://processwireshop.pw/plugins/visual-page-selector/
    5 points
  4. Some of you may have read about it: there are a new core images field in the works for the PW 3 branch. I want to wait until this is released and then update the Croppableimages to sit upon that. I think it will become a new version for PW 3+ only, as there is the current version available for the PW 2 branch. Besides some PW 3 namespace issues there should be implemented changes to work with the new images field in that way, that it only enhances this with the cropbuttons but leave the other UI as is (reuse it). I'm not very good with this UI stuff, so, if I will not be able to do this myself, I will ask here for help on that. If this will be the case, I will provide an intermediate version that works with the PW3 and new image field first. Everyone who can't wait until then should use the slightly hacky upgrade procedure provided by @KentBrockmann and @noodles, two posts above this one.
    4 points
  5. I've PM'd my module over to Ryan for testing. Let's see what comes of it over the next couple of days. If it works out we'll post updates here.
    4 points
  6. Media Manager Version 002 is ready Changes Specify allowed media types for a media manager field (i.e. the field you add to a template). Default is to allow all four types, i.e. audio, document, image and video. Setting is in 'Details Tab' of your media manager field Set the maximum number of media allowed for a media manager field (i.e. maximum per page). Set in 'Details Tab' Media Manager Field setting Example Media Manager Inputfield displays More media can still be added Media Manager field (for this page) full
    4 points
  7. Can't write a long reply at the moment, but your approach is not thread safe (as far as I can tell.) What would happen if another user added some other page between the calls to your two working hook functions? I have a module that can help. Will post more tomorrow. Goodnight!
    3 points
  8. A couple of requests to make working with templates in Admin more streamlined: 1. Display the "Label" field in the "New Template" screen - I always like to label my templates and currently this requires you to re-open the template you have just created. Also, I'd rather have the template screen remain open after adding a template rather than be sent back to the Templates overview. These changes would make the "New Template" process more consistent with the "New Field" process. But of course the likely reason for no Label field and the closing of the template screen is because it's actually "New Templates" plural not "New Template" singular. Myself, I've never felt the need to add multiple templates at once but I expect others do. Maybe "New Template" and "New Templates" could be separate commands? 2. When duplicating a template (Add New Templates > Duplicate fields used by another template) it would be nice if field overrides (widths, descriptions, etc) were included in the new template(s). It can be quite time-consuming to set these up, and if you are duplicating fields of an existing template I think you also want to duplicate the overrides more often than not.
    2 points
  9. Hi! Indeed it solved the Markdown issue! Though the newline characters are still messing with me, for example, in the Markdown lists that actually need the line break to format correctly. I thought it had something to do with my editor, but I just tried exporting/importing the same file and it doesn´t work. I mean, Excel or Numbers read the file just fine, so I am guessing there might me something off on how the module parses back the file?.. Just throwing rocks at the problem here Proof that I'm not going mad haha: http://imgur.com/FjfAXha Somehow I feel this will steer into something to do with encodings, a topic in which unfortunately I'm not very knowledgeable. Sorry if this is getting a bit off topic! Thanks for your help!
    2 points
  10. Your ProcessWire version is not new enough. setAndSave was introduced with version 2.6.9, this was one of the reasons why I set the compatibility for this module to 2.7.
    2 points
  11. Filter pages right on getting them: 1077)->children('template!=exclude')... Edit: shouldn't try being fast when on mobile
    2 points
  12. $categories = $pages->get(1077)->children("template!=exclude")->shuffle();
    2 points
  13. for help with the native resizing methods, there is also PIA available
    2 points
  14. Is there a way to contribute to the documentation or cheatsheet? I know, that the heavy users probably will now use kongondos apigen documentation or look at the core files themselves. But I think most users will first look at the documentation or cheatsheet. Often when I go through Ryans older blog posts, I find nice methods, that are nowhere else documented. Here are two examples: New $pageimage->maxSize($width, $height) method What's new in the core this week? New API syntax options! Those two examples can't be found neither in the documentation nor the cheatsheet. Also they can't be found through the site search and are hard to find through the Google Search. I wouldn't consider myself being capable writing the documentation, but I would like to post when I find something is missing. Should I do this in this forum or is there a form/mail address I can contact?
    2 points
  15. Hi! This is an awesome module! Just something happened to me right now, I was exporting/reimporting pages through CSV, and didn't notice that I had some fields using markdown, so when exporting it was the actual HTML formatting that was exported, so when importing back, things didn't make sense. I don't know if there should be "Respect markdown field" or something in the export settings. Maybe I'm just being nitpicky but thought I could just comment the case here. Also, I think this might be due to my CSV editor, but when importing the edited CSV, I had issues with line breaks in HTML, am I doing something wrong here? Because the initially exported CSV from the module, imported just fine inside the editor (Numbers) even with the line breaks in the HTML, but when importing back everything got messy Then again, thanks a bunch! I was looking for a "batch pages fields editor" and found this module to be very useful to edit a bunch of Youtube links, from a bunch of pages.
    2 points
  16. Hello everyone, I always wanted to try out an ajax autocomplete search function, but never knew where to start. Of course there is the Ajax Page Search module by soma, but it seems that it was build around the basic site profile. In my case I wanted something more custom and I discovered in this thread the jQuery Plugin Typeahead by RunningCoder, which seemed to be nice. After many hours figuring out, how to combine this Plugin with ProcessWire, I finally got it implemented and want to share my solution with anyone, who also struggles with this topic. 1. Set-Up Typeahead Download the Typeahead-Plugin from the website (I prefer via Bower) and include the following scripts and stylesheets in your templates: <html> <head> ... <!-- Optional CSS --> <link rel="stylesheet" href="/vendor/jquery-typeahead/dist/jquery.typeahead.min.css"> <!-- Required JavaScript --> <script src="https://code.jquery.com/jquery-2.1.3.min.js"></script> <script src="/vendor/jquery-typeahead/dist/jquery.typeahead.min.js"></script> ... </head> As next step we need the JSON data. 2. Install Pages to JSON To get the necessary data of all pages as JSON, I use the module Pages to JSON, which provides an easy way to output pages as JSON objects. Of course you can achieve this without this module, but I am not very experienced with JSON, so this module was really helpful. After you downloaded and installed the module, you can configure in the module settings page, which fields you want to output. You can select between own and system fields. For my purpose I selected only title and url to be outputted. 3. Output JSON Now, that we have the module configured, we have to output our search suggestions as JSON. I did it in my template file search.php like this: <?php namespace ProcessWire; // Check if ajax request if($config->ajax) { $results = $pages->find("has_parent!=2"); // Find all published pages and save as $results header("Content-type: application/json"); // Set header to JSON echo $results->toJSON(); // Output the results as JSON via the toJSON function } else { // Your own front-end template } To sum up, we search the pages we want as search suggestions and save them in a variable. Then we output them with the toJSON-Function by the Pages to JSON-Module. All of this happens in a Ajax-Request, that is the reason why we check first, if the page is called via an Ajax request. 4. Insert Form We can now embed the HTML form anywhere you want. Either in an header-include or a specific template. Also you can use your own classes, for this example I used the Typeahead-demo-mark-up and extended it a little. <form id="searchform" method="get" action="<?= $pages->get("template=search")->url ?>"> <div class="typeahead__container"> <div class="typeahead__field"> <span class="typeahead__query"> <input id="q" name="q" type="search" placeholder="Search" autocomplete="off"> </span> <span class="typeahead__button"> <button type="submit"> <span class="typeahead__search-icon"></span> </button> </span> </div> </div> </form> The action-attribute in the form-tag is the url of your search-site. This attribute is of course necessary to know where the form redirects you and where the JSON data is located. 5. Initialize Typeahead As last step we have to initialize the Typeahead-plugin jQuery like this: $(document).ready(function() { var actionURL = $('#searchform').attr('action'); // Save form action url in variable $.typeahead({ input: '#q', hint: true, display: ["title"], // Search objects by the title-key source: { url: actionURL // Ajax request to get JSON from the action url }, callback: { // Redirect to url after clicking or pressing enter onClickAfter: function (node, a, item, event) { window.location.href = item.url; // Set window location to site url } } }); }); We save the action url of the form in a variable, then we initialize Typeahead by selecting the input-field inside the form. As the source we can pass the action url and I included the callback, to link the search results with the site urls. Now you should have a nice ajax autocomplete search form, which of course you can further style and configure. I hope I didn't forget anything, but if so, please let me know. Regards, Andreas
    1 point
  17. Ok, I have added an optional "Format Export" option. It is on by default when you upgrade to the latest version of BCE, but you can easily uncheck this in the module config settings and then your imports should work as expected. As for the line break stuff - to make it easier for me to debug, could you please send me an example CSV export from BCE that shows the problem.
    1 point
  18. Hi @elabx - glad you're finding the module so useful. I think this line is the culprit: https://github.com/adrianbj/BatchChildEditor/blob/master/ProcessChildrenCsvExport.module#L106 I think there are use cases for wanting the CSV export formatted and cases when you wouldn't want it formatted. I will make this configurable so that the dev (and optionally the user) can decide. But before I do that, could you please comment out that line to make sure everything works as expected for you. Actually I see another line that will interfere for multiplier and file fields: https://github.com/adrianbj/BatchChildEditor/blob/master/ProcessChildrenCsvExport.module#L183 - this may or may not affect you. Thanks!
    1 point
  19. Hhm, for me it is working: D:/ProcessWire/PW-DEV/pw30/htdocs/site/assets/files/1/nikon2208.jpg D:/ProcessWire/PW-DEV/pw30/htdocs/site/assets/files/1/nikon2208.-pim2-pxtd.jpg I used PW 3.0.10 You may look at other modules that work with files and images. Maybe you can create a siteprofile with the exporter or are you able to temporarily disable site-modules in the original site? So, your code is working, the Pim2 is working, but not in your setup. If possible, I would disable all (autoload and file/image-related) modules, and try if it works then. If yes, enable one module after the other, and check if it is working or if it breaks again. Or the other way round: disable one module, check if it changes, if not disable the next one, ..., ... YOu may also first have a look to the Hooks-Section of the Debug Mode Tools in the admin footer to get an overview which modules hook into what, maybe this way you can spot primarily candidates very fast. It all depends on your setup I believe.
    1 point
  20. Sorry about that - you must be running PHP 5.3.x. I had some code in there that was 5.4+ only. I have made a fix so that it will work on 5.3. Please try again with the latest version on Github.
    1 point
  21. Hey @horst - you have created a beautiful lady! Thanks for giving me her number !
    1 point
  22. yes - give it a try...with some content. https://processwire.com/api/variables/user/ regards mr-fan
    1 point
  23. Nope. This module uses the built-in WireCache functionality which defines the following caching periods: const expireNow = 0; const expireHourly = 3600; const expireDaily = 86400; const expireWeekly = 604800; const expireMonthly = 2419200; This isn't possible, this module just uses the existing instagram endpoints.
    1 point
  24. I'm using pocketgrid effectively for everything I do but have played around a bit with susy and jeet. Depending on the sass that is used every mixin adds x ms to the compile time. Seems that the amount of spans you are using in susy affects noticeably, even with libsass. Susy has many different angles and it quickly starts to do far too much than is necessary. I would prefer jeet as it's really fast and makes much more common sense even with basic sass experience. http://jeet.gs/
    1 point
  25. I'm happy you find this tutorial useful. But since this topic is specific for the front-end and uses one of many plugins, I don't think this should be covered in the documentation. Because after all, ProcessWire doesn't dictate you how you should do things in the front-end.
    1 point
  26. @bernhard I had seen the page https://processwire....ldtypes/images/. The fact that until now, I have most often, if not always, "deactivated" these kinds of options in config.php (like cropping and other ones) and that the times I have used size, with the width and height chosen and/or with the dimensions of the images, I haven't had the opportunity to notice how it really worked, made me think that it was something different. I simply haven't used it enough.
    1 point
  27. I've never had problems using the command-line mysqldump database_name > dumpfile.sql to create a dump sql file, then on the target machine mysql new_database_name < dumpfile.sql In the past phpmyadmin had given me problems with large sql files, probably because of php configured limits to the size of an http post.
    1 point
  28. Thank you for the explanation. It would be nice if there was some processwire documentation that covered stuff like this instead of having to lurk/dig through years of forum posts
    1 point
  29. Also -.25em might not always the the size of the whitespace if there is one.
    1 point
  30. hi nifel87 found a hint in a forum that the rss still works without oAuth... It seems that nikola has fixed this problem: https://github.com/nvidoni/MarkupYahooWeather/commit/43f1f95e7942f6f7f02aa58c0b5cb255b1cf111e changed the URL should do the trick for the moment... // Get weather data old API http://weather.yahooapis.com/forecastrss?w=.... // Get weather data new API 15.03.2016 http://xml.weather.yahoo.com/forecastrss?w=.... it's a bit hackish not using their oAuth secret and token and it would for shure be a deadline sometimes...it's always the sh** with external services... Best regards mr-fan
    1 point
  31. Just guessing...probably has been spat out similar to what happens in ProcessWire admin...Look at the admin source...You'll see something like this: <script type="text/javascript"> var config = { "modals": { "large": "15,15,30,30,draggable=false,resizable=true,hide=250,show=100", "medium": "50,49,100,100", "small": "100,100,200,200", "full": "0,0,0,0" }, "ProcessPageList": { "containerID": "PageListContainer", "ajaxURL": "/processwire/page/list/", "ajaxMoveURL": "/processwire/page/sort/", "rootPageID": 0, "openPageIDs": [ ], // etc. } } </script> @soma talks about the technique here (@see Communicating with PHP).
    1 point
  32. @Christophe, I'm more woried about the margin-right: -.25em they are using on columns. They use it to eliminate the white-space between the columns. But when you properly minify the source, there's no white-space, so little gaps will show up.
    1 point
  33. The code example probably expects you to be in a non namespaced environment, where it would work. You need to either use a "use" statement in the beginning of your file or call the class with a leading backslash \Aws\S3….
    1 point
  34. Hello Christophe, old topic, but today one my client asked me the same question, and my answer was - insert caption at the end, as last step in content edit. Insert image(s), write some text, and when finish all, go back to image(s) and select and in popup check caption and write captions. Short answer: insert captions at the end. regards
    1 point
  35. as an update to this topic, after discovering the awesome power of Selectize.js, i have been able to implement really good tagging on the image fields which works much better than the technique discussed earlier in this topic. 1) place the selectize files somewhere in your templates folder http://selectize.github.io/selectize.js/ (i have placed them in a 'plugins' folder) 2) make the files load on page edit, from your AdminCustomFiles settings: ProcessPageEdit plugins/selectize/dist/css/selectize.legacy.css ProcessPageEdit plugins/selectize/dist/js/standalone/selectize.min.js 3) in your ProcessPageEdit.js file, init the plugin: /** * Selectize * ============================================ * init selectize tagging on field called images * */ $(function(){ $(".Inputfield_images input[name^='tags_images_']").each(function() { $(this).selectize({ delimiter: ' ', persist: false, plugins: ['remove_button','drag_drop'], options: [ {value: 'tag1', text: 'tag1 - use this for blah'}, {value: 'tag2', text: 'tag2 - this will do blah'}, {value: 'tag3', text: 'tag3 - a super special tag!!'}, ], create: function(input) { return { value: input, text: input } } }); }); }); Now you have a really good tagging interface: Notice how you can also add explanatory info right into the tag, but keep the tag value whatever you want; there are a lot of other options you can implement, check out the selectize docs. this is really now one feature that i believe should be included in the core or at least made into a module... first an inputfield/fieldtype single/multi select based on selectize which can improve selections when you have a lot of additional data to show about the individual select options; second would be to enable selectize.js on any image tag field and be able to define the option value/labels based globally or based on current template...
    1 point
  36. For images in an images field, you can create any sizes you need via PW's native resizing methods. For images inside an RTE field you can use a textformatter module. The idea would be to detect images in the RTE block and replace them with your own custom srcset markup. The Image Interceptor module is a good one to look at if you want to get ideas for a custom module. But there is already the TextformatterImageSRCSET module ready to go. And also check out the ImageToPicture module.
    1 point
  37. Thanks for educating me, teppo! I have never used GitHub (apart from downloading ZIP files and simple browsing) nor noticed the "forked from" line. Sooner or later I need to find the time to familiarize myself with GitHub, I suppose. And again, sorry for the off-topic question.
    1 point
  38. Check the name of the repository at GitHub. In this case there's this line right below it: That's a pretty good indication that this particular repository might be a fork In the GitHub workflow if you fork another repository you can send a pull request containing all your changes to the original repository / author. If you've changed the README in the fork, those changes will also be included in the PR. That's one reason not to include indication about this being a fork or anything like that. Of course you can get over this limitation by creating a separate branch for the changes intended for the PR, but that's extra work and most developers are just plain lazy
    1 point
  39. Thank you for the answer! Is it also standard not to reflect this in README.md and just copy it over? I mean, how can one tell apart the various forked versions? Just by looking at the "main pages" of the projects, they seem identical to me. Sorry if it happens to be an off-topic GitHub question.
    1 point
  40. The polyfill dude is lacking free time to complete his work. Do help with the issues, if you want to see it progress.
    1 point
  41. 1 point
  42. I enthusiastically approve of this feature request
    1 point
  43. Since there are a lot of topics about the same theme, I decided to write a small module which overwrites the core function ___SetupPageName(). The module allows now to populate the page name using proprietary date() function. Works like PHP date() with follwing exceptions: Everything between the brackets is detected as format string, meaning no 2nd parameter possible. No need to use quotes around the format string. Spaces not allowed. from any page property, page field including subfields, parent property, parent field etc. Meaning everything what you get with $page->get(); including dot syntax. The function will give error and warnings in case of unproper settings, but creates the page with name 'untitled' anyway. Download here: http://modules.processwire.com/modules/process-setup-page-name/ Some Examples The following settings in parent template 'Name Format Children' will assign name immediately. date(Y) date('Y-m-d') parent.title parent.parent.title parent.id template.id assign name after page saving and/or population of depending field. Overwrites 'untitled' after all fields which are defined in parent template are populated. id (any other page property) pagefieldname, multiple pagefieldnames show a warning. pagefieldname (value not populated)show an error. date() // empty, no format assigned date(Y // missing closing bracket date(Y md) // unallowed space notexistingfieldname notexistingproperty existingfield.notexistingsubfield The function in the module ___SetupPageName() could be completely copied as is to the core class $pages. @Ryan Would be nice to see this in core. Related topics: https://processwire.com/talk/topic/8576-name-format-children/ https://processwire.com/talk/topic/8217-name-format-for-children-based-on-any-field-not-just-title/ https://processwire.com/talk/topic/11628-custom-page-name/ https://processwire.com/talk/topic/11349-page-add-step-not-being-skipped-when-name-format-for-children-is-set/ https://processwire.com/talk/topic/10701-automatic-page-name-using-processpageaddexecute-and-pagetable/ https://processwire.com/talk/topic/10208-pagetable-automatic-page-name-format-when-multiple-templates-allowed/ https://processwire.com/talk/topic/9979-name-format-for-children-for-multiple-allowed-templates-for-children/ https://processwire.com/api/modules/process-template/ Any recommandations after testing welcome. Download here: Download here: http://modules.processwire.com/modules/process-setup-page-name/ Edit: small enhancement to prevent display of warning twice. 23.12.15 multiple values possible now 24.12.15 made compatible with PW 3.x 27.12.15 Update Version 1.0.8 09.01.16 Update Version 1.1.0
    1 point
  44. I have been the webmaster for my company's websites for over seven years using the eZ Publish (www.ez.no) CMS but now my Marketing Department wants a responsive site, which eZ Publish v4 does not do. v5 is supposed to be responsive but they want an arm and a leg for it so I am now looking for a different, more modern solution. I like the looks of Processwire and am trying it out using a Windows IIS 7 web server (a requirement by the IT department where I work. ) Thanks to everyone who has posted here, especially nikola and jamestflynn. Here's an update for those using later software versions: To successfully install Processwire v2.6.1-Master on a Windows IIS 7 Web Server with: PHP v5.6.9 MySql v5.7 Copy the following XML into a file called web.config at the ProcessWire root directory (Most of this file is from user nikola's post from June 19, 2011 with a couple of sections deleted): -------- begin snip ---------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <directoryBrowse enabled="false" /> <rewrite> <rules> <rule name="Handle request for missing favicon.ico" stopProcessing="true"> <match url="favicon\.ico" /> <action type="CustomResponse" statusCode="404" subStatusCode="1" statusReason="The requested file favicon.ico was not found" statusDescription="The requested file favicon.ico was not found" /> </rule> <rule name="Handle request for missing robots.txt" stopProcessing="true"> <match url="robots\.txt" /> <action type="CustomResponse" statusCode="404" subStatusCode="1" statusReason="The requested file robots.txt was not found" statusDescription="The requested file robots.txt was not found" /> </rule> <rule name="Access Restrictions: Keep web users out of directories"> <match url="(^|/)\." ignoreCase="false" /> <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> </rule> <rule name="Access Restrictions: Protect ProcessWire system files" stopProcessing="true"> <match url="^.*$" ignoreCase="false" /> <conditions logicalGrouping="MatchAny"> <add input="{URL}" pattern="(^|/)site/assets/(cache|logs|backups|sessions|config|install)($|/.*$)" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)site/install($|/.*$)" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)site/config\.php$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)(wire|site)/templates-admin($|/|/.*\.(php|html?|tpl|inc))$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)site/templates($|/|/.*\.(php|html?|tpl|inc))$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)site/assets($|/|/.*\.php)$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)wire/(core|modules)/.*\.(php|inc|tpl|module)$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)site/modules/.*\.(php|inc|tpl|module)$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)(COPYRIGHT|INSTALL|README|htaccess)\.txt$" ignoreCase="false" /> <add input="{URL}" pattern="(^|/)site-default/" ignoreCase="false" /> </conditions> <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> </rule> <rule name="ProcessWire Rewrite" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{URL}" pattern="^/~?[-_.a-zA-Z0-9/]*$" ignoreCase="false" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" pattern="(favicon\.ico|robots\.txt)" ignoreCase="false" negate="true" /> <add input="{URL}" pattern="\.(gif|jpg|png|ico)$" negate="true" /> </conditions> <action type="Rewrite" url="index.php?it={R:1}" appendQueryString="true" /> </rule> </rules> </rewrite> <defaultDocument> <files> <add value="index.php" /> </files> </defaultDocument> </system.webServer> </configuration> -------- end snip ---------------------------------------------------------------- As mentioned in several of the posts above, be sure to have the IIS URL Rewrite Module 2.0 installed. Also, before starting the installation you will need to replace some values in the .sql database installation commands located in the various site-*/install/install.sql files. In the definition of the "modules" and "pages" tables and in the insertions for the "modules" table replace the default and inserted values for the "created" field, which is a timestamp data type field. The values supplied are all '0000-00-00 00:00:00' which is outside the allowed range for a timestamp type field in this version of MySQL (see https://dev.mysql.com/doc/refman/5.0/en/datetime.html). Replace these zero values with a value within the Unix Epoch, like '1970-01-01 00:00:01'. Begin the installation and ignore the warning about "Unable to determine if Apache mod_rewrite (required by ProcessWire) is installed." Of course it can't be found because we aren't running Apache. Have fun!
    1 point
  45. You can be sure that 99.99% of your issues in near future are between your chair and your computer and not ProcessWire.
    1 point
  46. Hi all, I have been looking for a way to manage deployment of new sites, as well as versioning of the pw data model on sites already deployed, working with teams, etc. I've enjoyed the discussion on a few threads : https://processwire.com/talk/topic/6707-update-live-site-from-staging-server https://processwire.com/talk/topic/2975-team-development https://processwire.com/talk/topic/2117-continuous-integration-of-field-and-template-changes but so far, I have not found what I'm looking for, so I built two tools and have put them on my newbie github site for all to use and/or peruse. I hope they are relevant to this community. They are crude and only have been exercised in my relatively finite world of Windows/apache dev. See https://github.com/jeanrajotte/schlepwire and https://github.com/jeanrajotte/upgradewire Both "apps" are not designed to be modules, integrated into pw, but rather external simple apps serving their specific purposes, possibly usable in automated build systems via curl, for example. There's a bit of a diatribe in the upgradewire README.md about the goodness of keeping the model in version-able source files, as distinct from operating the pw admin to maintain fields and templates, even if these changes are being recorded, as mindplay.dk seems to be doing. That's really the philosophical thrust behind these efforts. It's a beginning. I hope it's of interest here. Again, thank you for this superb framework and this generous community. Jean
    1 point
  47. Programming inside this framework is a dream. It's a framework with on top the best admin interface there is.
    1 point
  48. I wouldn't do it that way though if it's going to be the case that you have pages in multiple locations a lot of the time. Take for example your first structure - most ecommerce packages would handle this y creating the category structure, then adding products and ticking a box in a category lost to assign that product to multiple categories. When browsing the structure you would have a URL of vacuums/wet-vac-cleaning-solutions and under that it would list your product, but when you click on the product it would appear at a URL of something like products/super-clean-2000 I would suggest handling it this way as well, as I'd you use redirects you're essentially taking the user from one category to a completely different category which would make them a bit confused I think. As such, I would make the structure of your categories under a page called "categories" and create a template for those pages called "category". Then create a page called "products" and a template called "products" for it to use. The product template would need a field called "categories" that uses the Page fieldtype which is set up to allow selection of all pages under the category page. You then simply add products and select the categories they appear in When editing the front-end categories template to show the relevant products in that category you can simply use a selector to find all products that are in that category. Sorry, that's a whistlestop tour of how I'd recommend doing it and doesn't sound simple, but it is pretty easy in reality and not as daunting as I've probably just made it sound
    1 point
  49. Absolutely! Here is a simple, but functional example for both login and logout templates. You would want to replace the markup with your own markup or includes. Likewise you'd want to change the redirects to redirect to whatever page you want them to go to after completing a login. /site/templates/login.php: <?php if($user->isLoggedin()) { // user is already logged in, so they don't need to be here $session->redirect("/somewhere/"); } // check for login before outputting markup if($input->post->user && $input->post->pass) { $user = $sanitizer->username($input->post->user); $pass = $input->post->pass; if($session->login($user, $pass)) { // login successful $session->redirect("/somewhere/"); } } ?> <html> <head> <title>Login</title> </head> <body> <form action='./' method='post'> <?php if($input->post->user) echo "<h2 class='error'>Login failed</h2>"; ?> <p><label>User <input type='text' name='user' /></label></p> <p><label>Password <input type='password' name='pass' /></label></p> <p><input type='submit' name='submit' value='Login' /></p> </form> </body> </html> /site/templates/logout.php: <?php $session->logout(); ?> <html> <head> <title>Logout</title> </head> <body> <h1>You have logged out</h1> </body> </html>
    1 point
×
×
  • Create New...