Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/22/2017 in all areas

  1. Let's focus on solving the problem without making too many assumptions.
    6 points
  2. I am glad that this project is helping ProcessWire getting more devs on board :). I just want to say that I wouldn't have been able to finish ProcessVue if it wasn't for the amazing ProcessWire community. I believe that the community truly is the biggest selling point for new users (like me). Before trying ProcessWire I used OctoberCMS for a while but when I was stuck I got 0 support from the forums, so...althought the CMS is based on the amazing Laravel framework, I just left! I think that ProcessWire is extremely powerful and flexible and with time will become the tool of choice for frontend developers, the new GraphQL module will also help on this direction. Droves of frontend developers are looking for a CMS like this, they just don't know it exists! The usual keywords they use when looking for a SPAs CMS is "Decoupled CMS" or "Headless CMS", and I believe that that's exactly what ProcessWire is for! Some frontend developers prefer to use NodeJS, but the learning curve is huge if you need it for a non trivial project, and the worst thing of all is that after two weeks ANY js tool you may have used is outdated. See for example how Angular has been replaced with React or Vue, and Gulp with Webpack. That doesn't mean that I am against improvements in this regard, I just feel that it's just too much for us poor frontend devs to cope with! ProcessWire is stable, easy to use and won't change API every week. BTW, after that I migrate ProcessVue to GraphQL I am also planning to add Auth0 login integration with JWT, as I think that login/signup is a common feature in SPAs. I am sure I'll have to annoy @Nurguly Ashyrov and the rest of ProcessWire community for getting it in sync with ProcessWire users, but the result should be quite useful
    5 points
  3. "Everything has to be a thing, even if you don't use it as a thing"
    4 points
  4. The most UAs, regarding your screenshot, are a Facebook Browsers: FB_IAB/FB4A So, you first should check why / which Facebook-Apps are polling your site, and if they properly send session-cookies with each following request, or if they open a new session with every poll.
    3 points
  5. The person who marked this as CON did not understand Processwire... And they left out the same in the case of WordPress: "Everything has to be a 'custom post' even if you don't use it as a post". Same for Drupal: "Everything has to be a 'node' even if you don't use it as a node" This is just the chosen terminology, so the person who made it up does not understand too much
    3 points
  6. If you do not assign a title the autogenerated ID (Inputfield) will be taken. $inputfields->attr('title', 'Weird name'); To put the Inputfields (Tabs) in the right order you could use InputfieldWrapper::insertBefore() or InputfieldWrapper::insertAfter() instead of InputfieldWrapper::add(). Unfortunately this doesn't work in case of ProcessPageEdit. To get it working you need to add another hook to ProcessPageEdit::getTabs() The following code snippet should work. Place it in your /site/ready.php wire()->addHookAfter('ProcessPageEdit::buildForm', function ($event) { $page = $event->object->getPage(); if ($page->template == "bewerbung") { $form = $event->return; $inputfields = new InputfieldWrapper(); $inputfields->attr('title', 'Weird Name'); $inputfields->attr('name+id', 'WeirdTabNameAndId'); // we need both unique ID and Name $markup = wire()->modules->get('InputfieldMarkup'); $markup->label = 'Custom Lable'; $markup->value = '<p>Just a placeholder for any custom markup</p>'; $inputfields->add($markup); $pageEditTab = $form->find('id=ProcessPageEditContent')->first(); $form->insertAfter($inputfields, $pageEditTab); // inserting in the right place is not enough to set the tab order // we need the following hook wire()->addHookAfter('ProcessPageEdit::getTabs', function ($event) { $event->return = array_merge( array_slice($event->return, 0, 1, true), array('WeirdTabNameAndId' => __('Weird Name')), // should be identical to the weird name/title above array_slice($event->return, 1, null, true) ); }); $event->return = $form; } });
    3 points
  7. The person who marked this as CON did not understand Processwire...
    3 points
  8. For ages I used an admin helper module to do this. I finally decided to try this module, and whaddya know — works like a charm. Thanks Adrian!
    2 points
  9. The world is a sum of all its things.
    2 points
  10. Everything has to be something!
    2 points
  11. @kixe Your solution works perfectly fine. Thank you a thousand times Kudos! Thanks to @adrian as well.
    2 points
  12. PW #1 on Slant - never heard of Slant and none of the CMS options have many votes yet, but still https://www.slant.co/topics/5409/~php-cms
    2 points
  13. Hi @microcipcip - thanks for a really great commentary on PW, what frontend devs are looking for, and how PW can fit those needs. I am really excited to see your integration of GraphQL into your ProcessVue site profile - definitely planning on using it on an upcoming project. Thanks again for all your great work on this.
    2 points
  14. Hey AndreaPT, Do you have superuser access to the admin? Do you have FTP access to the server (or via a cPanel file manager type interface). Let me know about those and I'll see what I can do to put you on the easiest track to make the changes you need.
    2 points
  15. Hi all, My first – hopefully useful – ProcessWire related tutorial: http://szabesz.hu/blog/install-processwire-in-a-subfolder-on-shared-hosting-cpanel_ins-sub/
    2 points
  16. This module adds CSV import and export functionality to Profields Table fields on both the admin and front-end. http://modules.processwire.com/modules/table-csv-import-export/ https://github.com/adrianbj/TableCsvImportExport Access to the admin import/export for non-superusers is controlled by two automatically created permissions: table-csv-import and table-csv-export Another permission (table-csv-import-overwrite) allows you to control access to the overwrite option when importing. The overwrite option is also controlled at the field level. Go to the table field's Input tab and check the new "Allow overwrite option" if you want this enabled at all for the specific field. Please consider limiting import overwrite option to trusted roles as you could do a lot of damage very quickly with the overwrite option Front-end export of a table field to CSV can be achieved with the exportCsv() method: // export as CSV if csv_export=1 is in url if($input->get->csv_export==1){ $modules->get('ProcessTableCsvExport'); // load module // delimiter, enclosure, file extension, multiple fields separator, names in first row $page->fields->tablefield->exportCsv('tab', '"', 'tsv', '|', true); } // display content of template with link to same page with appended csv_export=1 else{ include("./head.inc"); echo $page->tablefield->render(); //render table - not necessary for export - just displaying the table echo "<a href='./?csv_export=1'>Export Table as CSV</a>"; //link to initiate export include("./foot.inc"); } Front-end import can be achieved with the importCsv() method: $modules->get('TableCsvImportExport'); // load module // data, delimiter, enclosure, convert decimals, ignore first row, multiple fields separator, append or overwrite $page->fields->tablefield->importCsv($csvData, ';', '"', true, false, '|', 'append'); Please let me know if you have any problems, or suggestions for improvements. Enjoy!
    1 point
  17. This module adds a "SEO" tab to every page where you can define a special title, description, keywords, etc. Try it http://aluminum-j4f.lightningpw.com/processwire/ Name: demo Pass: demo123 How to use You can choose between include automatically or use the following methods: $config->seo // includes all the default values and configuration settings // e.g.: $config->seo->title $config->seo->keywords $page->seo // includes all the default values mixed with the page related seo data // e.g.: $page->seo->title $page->seo->keywords // for rendering: $page->seo->render . . Screenshot Download You can download it in the modules repository: http://modules.processwire.com/modules/markup-seo/
    1 point
  18. FieldtypeFileS3 https://github.com/f-b-g-m/FieldtypeFileS3 The module extends the default FieldtypeFile and InputfieldFile modules and adds few extra methods. For the most part it behaves just like the default files modules, the biggest difference is how you get the file's url. Instead of using $page->fieldname->eq(0)->url you use $page->fieldname->eq(0)->s3url(). Files are not stored locally, they are deleted when the page is saved, if page saving is ommited the file remains on the local server until the page is saved. Another difference is the file size, the default module get the file size directly from the local file, while here it's stored in the database. There is an option to store the files locally, its intented in case one wants to stop using S3 and change back to local storage. What it does is it changes the s3url() method to serve files from local server instead of S3, disables uploading to S3 and disables local file deletion on page save. It does not tranfer files from S3 to local server, that can be done with the aws-cli's through the sync function. Files stored on S3 have the same structure as they would have on the local server. -------------------------------------------------------- -------------------------------------------------------- Been struggling with this for quite a while, but i think i finally managed to make it work/behave the way i wanted. All feedback is welcome!
    1 point
  19. Introducing Variations, an Input- and Fieldtype for product variations and their attributes. Product variations is a topic that has been coming up now and then, especially in the recent past. This module seeks to fill this gap. Though it's in its early stages of development, it is already functional and can be used as is. I decided to make an early announcement (modules development forum) in order to get early feedback from potential users. The module is an alternative take on how variations can be built for a product. Imagine the ubiquitous T-Shirt. The product could vary by ...Size, Colour, Material, etc...These variations could in turn have internal variations, i.e. attributes....so, Size [Small, Large], Colour [Red, Blue]...etc; you get the drift. The usual approaches to building variations have been either to use Multiple pages, Repeaters, Page Table, Table or Matrix (limited to 1x1 variations). In this module, we do it a bit differently. First, the variations occur not at the Field level (meaning all product pages would have the same variations and attributes for each template) but at the page level. Secondly, there are no multiple pages for each variation and/or attributes; a product is a single page. The variations and their attributes are defined by site editors at the page level. Once a variations configuration has been defined, it is applied to the page and all possible combinations are generated (i.e. the Red,Small,Cotton; Red,Large,Cotton, etc) in the Inputfield. There is no limit to the number of variations and attributes that can be defined, although you will be amazed at how quickly the combinations grow! Prices are entered for each combination when editing the page. Combinations without prices are not saved to the database. Please note that prices cannot themselves vary at the page-level. Meaning, you cannot have ONE variation configuration that has different price inputs per product in the same FieldtypeVariations field. The module ships with an API for outputting variation combinations in the frontend. Search, database and in-memory work as normal in the frontend. In the backend, DataTables provides a nice paginated, filterable table. Prices can be entered on any pages (of the table) without loss of data (meaning you can enter prices on page 1, scroll to page 10, enter more prices, filter or search the products table, enter more prices and finally save; no data will be lost). I still have a couple of ideas and plans pending but would love to hear from you, thanks. Below is a short video demo of the module in its current state. Things may/will change, both UI and features. Btw, the Fieldtype, although primarily targeted at commerce applications, is by no means limited to this. Other uses requiring combinations of whatever number of variables are very much within the remit of the module. Planned/Hoped for features Import/Export product variations and attributes (Excel, etc) Full integration with Padloper (I will have to discuss with @apeisa) SKU fields for each product variation Add/Remove extra subfields, e.g. multi-currency prices (currently there is only 1 input for each product variations' price) Product variation images? Etc... Please not this module is not related to this other planned module (but it may eventually). Sneak Peek Demo
    1 point
  20. Czech Language Pack for PW 3.0 Pre-release version is online. Check it at github. https://github.com/PavelTajdus/ProcessWire-Czech-Language-Pack/releases
    1 point
  21. The name is returned with the associated value assigned, as so: Change it to: name='submit' value='1'
    1 point
  22. @horst Thanks. Didn't know about that. Will have a look inside asap.
    1 point
  23. No problem - i'm poking in the dark the whole time....so every new hint is helpful - mostly i overlook something
    1 point
  24. I think the time I could invest in this workaround could be spent on adding ajax save to ckeditor
    1 point
  25. AOS triggers the save button only, what you need would be ajax save which is harder to implement. Maybe I'll check it some day though. Of course I could find a way to Maximize after ctrl+s but I'm not sure this won't be a nuissance.
    1 point
  26. @Wanze any success on this?
    1 point
  27. It sounds like the logo is hardcoded into head.php or main.php or something like that. We don't need to start hacking anything just yet - we just need a login for the host (cPanel and/or FTP) and everything will be fine. If @AndreaPT's organization owns the domain and pays for the hosting, they should have those details somewhere.
    1 point
  28. Not tested: http://modules.processwire.com/modules/inputfield-textarea-markup/
    1 point
  29. @jmartsch - you can see how I have done this in the BCE module when the editor interface is added in a new tab: https://github.com/adrianbj/BatchChildEditor/blob/4cd7f64e28d166b1f78eb02e83167cd7af031e87/BatchChildEditor.module#L374-L421
    1 point
  30. @jmartsch - I have a mostly working hack for you: $this->wire()->addHookAfter('Page::viewable', null, function (HookEvent $event) { if(!$event->return) return; $page = $event->object; if (strpos($_SERVER['REQUEST_URI'], "admin-actions") === false && $page->name == "admin-actions") { $event->return = false; } }); With this, non-superusers won't see the Setup > Admin Actions menu item unless they are already on an Admin Actions page, eg: http://mysite.dev/processwire/setup/admin-actions/options?action=CopyContentToOtherField I was trying to limit the return false to a specific process, but couldn't make it work as expected. Honestly, I feel like the right way to do this would be to ask Ryan to make: AdminThemeDefaultHelpers::renderTopNavItems (https://github.com/processwire/processwire/blob/35df716082b779de0e53a3fcf7996403c49c9f8a/wire/modules/AdminTheme/AdminThemeDefault/AdminThemeDefaultHelpers.php#L416) hookable, but without that, I think this is the best option, but maybe someone else has a better idea. PS - If you are running the Reno theme, it turns out that AdminThemeRenoHelpers::topNavItems is hookable. Might be a good argument for making it hookable in the Default and new UiKit themes as well. It think that approach would make this much easier.
    1 point
  31. For simple static sites you can use a javascript based approach like http://lunrjs.com/ Also, check https://www.algolia.com/ for a more powerful solution, although in this case a more complex solution to implement depending on your needs.
    1 point
  32. I don't have a code example for this, but if you look at these two modules by Ryan, you can do it: http://modules.processwire.com/modules/markup-rss/ http://modules.processwire.com/modules/rss-feed-loader/ And schedule the export/import with http://modules.processwire.com/modules/lazy-cron/ Also check this module: https://processwire.com/blog/posts/introducing-iftrunner-and-the-story-behind-it/#iftrunner-release
    1 point
  33. @Doc - the other option in Tracy is the ability to edit the page's template directly - you don't even need to post a different version: https://processwire.com/blog/posts/introducing-tracy-debugger/#template-editor-panel Just edit through the Tracy interface and click "Test". That will reload the page with the changes you have made without affecting how it looks/works for other users. Whether I use this or the Template Path Panel that tpr mentioned depends on the complexity of the changes I am making. The Template Path Panel option allows you to swap between various versions similarly to diogo's code, but through the Tracy debug bar GUI.
    1 point
  34. I am happy it works now . The plan is to add support for all core fieldtypes. That includes RepeaterField also. I will try to keep everyone updated via this thread, and you can also keep with the changelog.
    1 point
  35. Now it works!! This is so cool...I wish I could like this thread twice :). Do you have any plan of adding the RepeaterField? I don't know if it has been mentioned in this thread yet, but I found this cool GraphQL tutorial that may be useful for someone new to GraphQL. When I learn GraphQL properly I'll test this module more, as I think it has huge potential for introducing FrontEnd devs to ProcessWire.
    1 point
  36. No, it's not the permissions. You're doing everything properly. I never tried this module with axios before, therefore this error is new to me. It turns out that axios sets the Content-Type header to application/json;charset=UTF-8 instead of application/json. That's where the problem was, because the ProcessGraphQL module would parse json payload only if Content-Type was set to just application/json. I changed the behavior and now it will look to your query in json payload if Content-Type contains application/json string in it. Please grab the latest version of the module and try again. It should work now. Thank you for taking time to report the issue.
    1 point
  37. Database errors are always logged. You will find entry in your /site/assets/logs/errors.txt file 2017-03-18 16:05:27 ? http://example.org/?/ Error: Exception: SQLSTATE[HY000] [1049] Unknown database 'example' (in .../wire/core/ProcessWire.php line 375) Depending on your config.php settings an Email will be sent /** * Admin email address * * Optional email address to send fatal error notifications to. * * #input email * @var string * */ $config->adminEmail = ''; In case of fatal errors the following html file will be send <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html> <head> <title>500 Internal Server Error</title> </head> <body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>{message}</p> </body> </html> You can modify it. You'll find the file (default installation) in /site/templates/errors/500.html
    1 point
  38. I am happy that you like it @Sebastian, thank you for your support. I started the thread here because I thought this would be more like a discussion on how GraphQL and ProcessWire could fit together and wanted to get some feedback first. But this thread quickly become this module's official place here in the ProcessWire forums. Also @teppo included the link to this thread as the "dedicated support forum thread" in the 143 issue of the weekly.pw (which I was flattered to see ). Now I don't really know how to go on with this thread. Should we abandon it and start new thread in the modules section? Or maybe this thread could be moved to modules section? What @moderators think of this? Meanwhile, for those who are following this thread I wanted to mention that there are some additions in the dev branch, such as mutations that allows you to create/update pages and there is also support for FieldtypeMapMarker field. I stopped developing the module for some time because I thought that it needed a good testing before moving further with it and decided to built an SPA using this module, to see if there is something that need to be added or changed. But then I got carried away and started to make usage of third-party APIs such as Wikipedia and GoogleMaps. As a result the app does not make heavy usage of the ProcessGraphQL module, but it is still relevant to showcase the module's abilities. It is a US Skyscrapers app, duh... You can see it live here and the source code here (though I doubt that the code will interest you if you are not a React developer). I was finished with this demo SPA just couple of days ago. Now I will be back to continue to work on this module again.
    1 point
  39. There is a monolog plugin for Tracy: https://componette.com/nextras/tracy-monolog-adapter/ so if you're already using Tracy for logging errors in production mode (no debug bar), this might be an option. If people are interested in that approach, I'd be willing to add. PS - @BitPoet - not meaning to take away from your approach - just throwing another option out there.
    1 point
  40. The most flexible version would probably be a monolog (or compatible) implementation, just because how ubiquitous it's in the php community and all it's adapters to various logging backends.
    1 point
  41. Hey, @microcipcip! I actually do not know if it is possible to do with the profile exporter via setting . Though I am sure it should be. Removing node_modules should be easy - you can do it before the export (or temporary prefix the folder with a dot ). Adding .config type files is probably only possible the way you suggest. But as I said I think all those things should be eventually possible to do with the module options, as it is very powerful way to share one's work in PW. Please list the issues you cannot overcome in the module support board or even better on github. Edit: Seems like a .file issue is already present. I am going to add my voice to it. Please do too if you think it deserves it.
    1 point
  42. Just wait for about an hour, and @adrian will extend it too Thank you, BTW!
    1 point
  43. Just to add to @kongondo's code, if your site is not in English, you may want to consider: $p->name = $sanitizer->pageName($p->title, true); You can read more about that sanitizer option here: https://processwire.com/api/ref/sanitizer/page-name/ or: $p->name = $sanitizer->pageNameUTF8($p->title); https://processwire.com/api/ref/sanitizer/page-name-utf8/
    1 point
  44. You might find the Page Rename Options module useful - you can set it to keep page names in sync with page titles when they change.
    1 point
  45. foreach ($pages->find('template=basic-page, limit=50') as $p) { $p->of(false); $p->title = "My New Title";// if using a new title...otherwise comment out this line $p->name = $sanitizer->pagenName($p->title); $p->save(); $p->of(true); } If renaming in the thousands let us know so that we can adjust the code...
    1 point
  46. Now you can do it even easier: wire()->addHookProperty('Page(template=basic-page)::hello', function($event)) { $event->return = 'hi'; });
    1 point
  47. support plain text string and string with html tag function _t($text, $context = 'general', $textdomain = '/site/templates/_strings.php') { return html_entity_decode(_x($text, $context, $textdomain)); }
    1 point
  48. I have installed this module however, I have some pages that are hidden from the navigation, in which I still want them added to the sitemap. I have added a checkbox field called sitemap. This field allows the user to add to the /sitemap page. Here is what I use for the sitemap template: foreach($page->children("include=hidden, sitemap=1") as $child) sitemapListPage($child); I need to do the same thing but for the sitemap module. I am having some trouble accomplishing this. Any help would be great.
    1 point
×
×
  • Create New...