Leaderboard
Popular Content
Showing content with the highest reputation on 06/22/2016 in all areas
-
You need to install the new ProcessTracyConsole helper module. This is installed automatically for new installs of Tracy, but for those upgrading, you need to manually install it. Because you can't directly call a PHP file from the modules directory in PW, it was either this or moving the file to the root of the site and I thought this was cleaner and potential less hassle for the user. Hi @bernhard - glad you're finding the Console panel so useful! Firstly, a friendly reminder about PW's each(): d($pages->find('id>1')->each("title")); Depending on your needs, that will give you much nicer output if you are testing a selector. Also useful is ->getArray() and ->getIterator() Back to topic now - thanks for pointing out the issue when converting the console into a new window - that is weird - hopefully I can fix it. Just a note that once the new window is open, it seems to manage the code fine after that. What I would really like is for Tracy panels to be drag resizable - maybe that's something I should request or build and PR them, but for now, I have made the console panel almost full width. This will be committed shortly, I just want to take a look at that weird code issue when opening in new window as well. Multiple consoles sounds pretty cool too, but probably not possible without core hacks, but maybe I can come up with something that achieves your needs in a different way. I am giving thought to the idea of a snippets manager so you can save and load snippets - this should certainly help in your case although may not be quite as convenient. Now that the console panel is full width, I think the snippets library can be in a sidebar on the right which should make it easy to switch between snippets. Thanks again for the feedback.2 points
-
hi adrian, thank you VERY much for the console. i will use it a lot i am sure. just used it the first time now and i have some questions/suggestions: is it somehow possible to adjust the width of the ACE field. or maybe set both ACE and the yellow output panel to 100% with? that would be great in a blank window: if you click on "open in new window" it opens in a new window but it creates some buggy code: 123foreach($pages->find('id>1') as $item) { echo $item->title . ' - ' . $item->path . '<br>';}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX also it would be cool to have the possibility for multiple console windows so that you can have some code snippets open and test different things without rewriting the codesnippet. at the moment it opens the console in ONE window. once more thank you very much for all the work with tracy. it has already sped up my daily pw work and i'm sure the console will save me some hours of reloading the browser in the future2 points
-
If your host is running mod_security that might be the culprit. I've struck odd issues like this before that were resolved by disabling mod_security.2 points
-
Hi iNoize, The editing of multi-langauge fields can be restricted with permissions: https://processwire.com/api/user-access/permissions/#multi-language-page-edit-permissions Cheers2 points
-
Explanation of quiet: https://processwire.com/api/ref/pages/save/ http://kongondo.github.io/ProcessWireAPIGen/dev/source-class-Pages.html2 points
-
This topic will serve as the thread for the Selectize.js family of modules, which utilize this popular jQuery plugin for enhanced tagging of images, fields, templates and page selection in Processwire admin. http://selectize.github.io/selectize.js/ The modules will ultimately include: JquerySelectize Base module that provides the library for use by other modules Github: https://github.com/outflux3/JquerySelectize Modules: http://modules.processwire.com/modules/jquery-selectize/ ----- SelectizeTemplateFieldTags Uses the library to init the tags field on fields and templates, and makes the icon searchable by name. Github: https://github.com/outflux3/SelectizeTemplateFieldTags Modules: http://modules.processwire.com/modules/selectize-template-field-tags/ Screens: Tagging a template: *******sorry but the forum upgrade destroyed these images -- you need to click on them to see them now ******** Search icons by name and see the icon: ----- SelectizeImageTags Uses the library for image tags field. Github: https://github.com/outflux3/SelectizeImageTags Modules: http://modules.processwire.com/modules/selectize-image-tags/ Screen:1 point
-
We will be performing a forum upgrade tomorrow if final testing goes well today. Why are we doing this? The current version is over a year old and the developers have since released a new major version - in fact they're now up to 4.1.x whilst we're still on the 3.x branch. They will not be supplying bug fixes or security patches for much longer. There are a lot of nice changes (and some confusing ones - more on that later) such as responsive design leading to a more complete mobile experience. We can also leverage some caching options to make things even faster when browsing the forums. What does this mean for you? Unfortunately there are a number of down sides to this: The forums will have to be taken offline twice for approx 20-30 minutes each time for several hours. During the upgrade process, the post content gets completely rebuilt and whilst this is in progress things look a mess, code samples look broken etc etc. We think it's better to take it offline than show broken code samples! We've decided to leave the forums open as the forums still technically work, new posts aren't affected, and we need the shop to stay online as well. There will be a learning curve with the new layout, but I'll do my best to post a "this is where to find stuff" post right here after the upgrade. Bizarrely the "best answer" feature has been replaced with a Stack Overflow-style voting feature which doesn't work everywhere we currently have the best answer feature turned on, so we will be making adjustments to some forums. You also can't make the first post in a Q&A forum topic the "chosen answer" which is a bit silly, but I'll be looking for a workaround for that. Possibly the biggest annoyance is that all unread posts you may currently have will get marked as read after the upgrade. Since this forum is a complete rewrite they've been unable (or possibly unwilling?) to do a complete migration of all data to the new version. There are plus sides though, right? Yep, there are: The reason the post content gets rebuilt is so that it's all stored as HTML in the database rather than BBCode that has to be parsed and isn't upgrade-proof. They've also finally stopped using their own-brand post editor and gone with CKEditor, so upgrades should be a little less chaotic as custom tags have been replaced with universally-recognised data-attributes. Theoretically this means that I have less of a headache if they choose to do another complete rewrite in 5 years' time. The code-base has been rewritten and they've removed some of the less used features to speed things up, plus it'll be compatible with PHP 7 soon which means that theoretically everything on the main ProcessWire site can be updated to work with PHP 7 soon and benefit from some nice speed increases. We should be good to stay on the 4.x branch for several years. I'm not anticipating the devs rewriting the codebase for at least another 4-5 years as they've decided to future-proof it as much as possible. Did I mention upgrades will be easier for me to manage in future? Wouldn't it be easier to build a ProcessWire forum module with all the same features? I do think this from time to time, but to be perfectly honest it takes a team of people at least a year to come up with everything you see here. I'm sure I could emulate much of it pretty quickly if I was paid to do it full-time for a year (including BETA testing etc) since the ProcessWire API and module structure is much more sane, but I might also go crazy in the process One day maybe... --- So at some point tomorrow, you will see a message here saying we're upgrading and to check back later. I can't give a precise time estimate, but it is a lengthy process - I would expect it to be at least 6 hours starting around 10am GMT - fortunately most of that is waiting for content to automatically rebuild - and then I have to apply some manual tweaks afterwards which will take about 30 minutes. Schedule TBC - hopefully still tomorrow - some of the final preparations are taking a little longer. Downtime will be kept to 2 blocks of 20-30 minutes maximum if all goes well. Existing post content will look quite odd for the duration, but new posts will be absolutely fine and we'll fix up the old ones afterwards.1 point
-
mod_security blocks processing based on regex rules: exactly what rules are implemented is up to the host or the person configuring the module. Perhaps your page contains a string that matches some overly-broad regex rule. The intention behind mod_security is good but my experience has been that running the module results in many false-positives and the resulting problems are difficult to debug. On many hosts you can't even tell when mod_security has been triggered. My shared hosting enables it by default on every new account but I always disable it to avoid headaches.1 point
-
Just keep in mind to maybe also check for a cookie or something, otherwise this will prevent users from manually switching to another subdomain / language.1 point
-
Any idea why do I get "Error: Unrecognized path" in the console every time I try to run some code?1 point
-
@icreation I like to keep the names/URLs to my admin pages 'secret'...You probably want to edit your post above?1 point
-
Ok, how about in the http server error log - not just PW's own log? If you are running on a *nix based machine, the server error logs are often found in a subdirectory of /var/log/ (on my local machine, the logs are in /var/log/httpd/error-<sitename>.log. If you are using php-fpm, you can check it's own logs too.1 point
-
1 point
-
at least they changed my php-settings and didn't say a word or changed them back... access logs seem that they logged in but i'm not sure if the REALLY tried to upload a file...1 point
-
Yes, you can copy over sites. The important things are: Correct db credentials in /site/config.php Correct array entries in index.config.php Correct salt value in /site/config.php (not 100% sure but I think good if salt values are different for different sites; not necessary, but good) Yes, logins are separate. If you want one login use 'multi-site option 2'. Yes, same core; update once, enjoy everywhere is the advantage here. Edit: I am assuming that those sites being copied over have previously been installed (i.e. there is a /site/assets/installed.php)1 point
-
Thanks for your answers. I decided to give a shot and try version 3. To be honest, I don't really know what is namespace and what to do with it but since I start from scratch, it may be better to go with the future stable version. I don't think I will really need modules other than the core so it shouldn’t be a problem. Next step is now finding my design...1 point
-
I developed modernrealestatesf.com which utilizes MLS listings. The approach I took was to have my client sign up with simplyrets.com which provides a clean and straight-forward way of accessing the needed listings. I then wrote a script which processes the data to our needs. The script runs a couple times a day. I'm not storing any images in ProcessWire since the images that are in the feed are already stored on Amazon which makes things convenient.1 point
-
Cool - thanks! i seem to be clueless on how to do this default data but will check out some other modules and see if i can hack it... in terms of the InputfieldSelectize i think it will be good though to provide the base code to select pages using their title only so then as you say the inputfield will at least be usable out of the box.1 point
-
Found the solution by myself. Maybe this helps others. It works if you use the so called subscript syntax From the Twig docs: You can use a dot (.) to access attributes of a variable (methods or properties of a PHP object, or items of a PHP array), or the so-called "subscript" syntax ([]): So instead of using {% if page.facebook %} Just use {% if page['facebook'] %} and it works1 point
-
I always hate those kind of answers. I mean they invested time to replicate or otherwise prove that it's not their fault, but giving any detailed information about the results cannot be done?!1 point
-
1 point
-
This morning's commits add to the color scheme: Red: The current page is using a different template. Orange: The current page is using it's default template file, but there are other pages on the site that are using a different template file (obviously via the Sticky option). Use "Reset All" to clear this when you're done testing. Green: All pages on the site are using their default template files. This is now documented on the blog post.1 point
-
Hello, What do you think about this entire article?: https://mindtheshift.wordpress.com/2015/04/02/r-i-p-rem-viva-css-reference-pixel/ Edit: I'll try to read all the article's comments.1 point
-
Macrura, great–glad that was it! I've updated the core Field.php file so that this should no longer be an issue: https://github.com/ryancramerdesign/ProcessWire/commit/c0b30dbb24d30845d98ab1c9d103bbead1a6e629 Still a good idea to define defaults for your module though. If you don't, there's a good chance the module will not work if someone creates a field and neglects to change any settings (and thus never saves any config data).1 point
-
Carousel: http://kenwheeler.github.io/slick/ As for the grid im using susy and make my own grids: http://susy.oddbird.net/ I dont use templates, all is custom build.1 point
-
Thought I would release a pretty simple module I made that integrates the awesome OneLogin PHP SAML toolkit into ProcessWire so you can use SSO with your ProcessWire website. Mainly developed for my own purposes as I have used SAML plugins with WordPress for many years and now that ProcessWire is my go to CMS I sort of missed the convenience of having SSO between sites and services. This is my first attempt at a ProcessWire module, it's probably not the best in terms of code, but it has been pretty stable in my tests. Here's a little demonstration of the module in action https://www.youtube.com/watch?v=YWcsV6RTh90 GitHub repo and Installation Instructions https://github.com/adamxp12/ProcessWire-SAMLAuth Any feedback would be appreciated. Even though this is quite a niche module.1 point
-
1 point
-
I'm not sure I can follow you. *confused* I think it's a matter of terms. To be more correct in PW termns there's Fieldtype and Inputfield. Fieldtype is more like the model while the Inputfield is the interface to the user, meaning resposible for rendering the value and inputs of a Fieldtype. Forms are build out of Inputfields. Now a "field" (if using the more general naming) added to a form (InputfieldWrapper) always has to be of type "Inputfield" . The error you got: You try to add a NULL to the form as the second argument! Now looks like your form get() call doesn't return a Inputfield but NULL so it's not found maybe. But you can easily test that. But you might know all this already. I'm not sure I understand, What "both"? InputfieldFrom (InputfieldWrapper) only allows Inputfields to be added, and not Fields (Fields as you get per a call like $template->fields. If you try to add those you get an error.1 point
-
Yah as you speak $form->get('field') or find.. Basically it's a WireArray. Rings a bell?1 point
-
I think the problem is this line: $cover=$item->LargeImage->URL; For instance, try this, and I'm guessing it'll tell you it's an object: var_dump($item->LargeImage->URL); When accessing elements like this, SimpleXML returns objects, not strings. You have to typecast it to a string, like this: $cover = (string) $item->LargeImage->URL; Many of the other elements you are pulling are already being typecast as strings by way of str_replace, preg_replace, strtolower, $sanitizer->text(), etc., so that's good. But you'll want to typecast these ones as strings too: $publisher=$item->ItemAttributes->Publisher; $isbn13=$item->ItemAttributes->EAN; $isbn10=$item->ItemAttributes->ISBN; $cover=$item->LargeImage->URL; This is one of those things about PHP's SimpleXML that has stung me more than once.1 point