Leaderboard
Popular Content
Showing content with the highest reputation on 02/16/2014 in all areas
-
Another option would be to add a small module that hooks Page::render and replaces the paths directly in the output... when running on localhost. It could replace it with something like this: public function init() { if(wire('config')->httpHost == 'localhost') { $this->addHook('Page::render', $this, 'hookAfterPageRender'); } } public function hookAfterPageRender($event) { $event->return = str_replace('/site/assets/files/', 'http://domain.com/site/assets/files/', $event->return); }5 points
-
Hi Philipp, I was interested in the service since the first day, and I'm interested in the service today. - But there were some concerns I have asked for via email: does the service keep IPTC? This one is mandatory for my colleagues photo-archive with 35.000+ images. You advice to use a default quality setting of 100% with PW in the config.php for all images. That makes sense, but if the service is down for any reason, including expired licence key, you pass through uncompressed images (100% quality == 0% compression). You have no fallback in the service / system. (And if you add a fallback, please don't try to guess which quality-setting they may like for their images, ask them. - Means: make it configurable!) I don't want only one potential client who visits the site have to wait. Not only one. Instead of sending images to the service and back and let the visitor wait until all is finished, you better pass through the local fallback and trigger the service in the background. This is much faster at first request and equal at second request. But much better is to create the images when uploading new images to the site. This way only the owner and or coworkers have to wait, but no vistitors / potential clients. To find potential clients you need some reputation: which sites already use the service? What's about the feedback of some satisfied customers? I really would use your service together with that colleagues site, but actually the service is in an early beta state. There is need for optimizations. PS: I'm still waiting for emails about progress. Got only one directly after mine, (IPTC = ok maybe we can do; fallback = oh, we haven't thought of that) but nothing more then.5 points
-
No, in the module folder only modules should be. You can store them outside of PW: webroot |-customscripts |-site |-wire and you can include them with include_once() or require_once() in the site/config.php if you like. This way your functions are available in PW where ever you need them. You can access all of PWs API variables and methods in your custom functions through the wire() function: $pagearray = wire('pages')->find('mySuperDuperSelectorValue'); $homepage = wire('pages')->get(1); $homepage = wire('pages')->get('/'); $session = wire('session'); if( ! isset($session->myCustomArray['myCustomKey']) ) { $session->redirect('/'); } Please refer to the API: http://processwire.com/api/include/ for more info4 points
-
Ok, gotcha. I did this on a site a while back. I'll dig up the code and get back to you in a minute. Actually I did this on the very first PW site I built, so there might be a better way, but this still works. Create a new datetime field called last_page_load and add it to the user template (remember to "Show System Templates" so you have access to it). Put this code somewhere that is included on every page of the site: if ($user->isLoggedin()) { $user->last_page_load = date('Y-m-d H:i:s'); $user->of(false); $user->save(); } Then you can do this: foreach($articles as $article){ if($user->isLoggedin() && $article->modified > $user->last_page_load){ // echo article here } } Let me know how you go with that. I don't think I have missed any components in making this work, and maybe there is a better approach, but one advantage of this over cookies is that it won't matter whether the user clears their cookies or not, or if they are visiting from different devices. EDIT: Thinking through this - in my case I had already limited $articles with a find. You may want to do the same as foreach'ing through 100's/1000's of articles won't be a good idea, so you could use something like this: $new_articles = $pages->find("template=articles,modified>{$user->last_page_load}");4 points
-
@dfunk006: working with a ton of pages is going to be slow, it's simple as that. Sure, you can always add more muscle to your server, but honestly, how often do you really need to show something like 10 000+ results simultaneously? How is that ever going to be useful for end-users? Adding sensible limit and using pagination or infinite scroll etc. makes sense not only resource-wise, but also from usability point of view. To expand Martijns reply a bit: PW also loads fields defined as "autoload" (via field settings) automatically, so you'll want to be careful with that if you're expecting to handle huge numbers of pages. Unless, of course, you actually always need those fields3 points
-
@slkwrm Thanks for the hint. Actually it turns out that the repeater page's parent is not the page where the repeater field is, but this page can be got by calling the method getForPage. So the correct code is: $containerPage = $page; if ($page instanceof RepeaterPage) { $containerPage = $page->getForPage(); } // can be checked with echo $containerPage->id; I added this container page calculation at the right place (I hope!) in TextformatterHannaCode.module and the repeater field case now seems to work for hanna codes.3 points
-
Depends a bit on context, but especially for modules I prefer translating strings in module file, storing them in $config->js and then in JS file fetching from config var. Simple example: PageListPermissions.module => PageListPermissions.js (though I'd also suggest "namespacing" JS config content, i.e. instead of using config.i18n.*, use config.YourModuleName.* and/or config.YourModuleName.i18n.* etc.)3 points
-
How do you include your assets? Relative or absolute paths? Have you tried using base href? Otherwise take a look at site/config.php You can add your own config variables an use them everywhere (e.g. in a template wire('config')->yourVariable)3 points
-
2 points
-
I've surely written some crappy replies earlier, but this was first one bad enough to be removed No need to restore anything, really. Main point of that reply was that this module had a bug that @dragan uncovered. When more than two languages were in use, values were getting stacked, i.e. version_control_for_text_fields__data contained property values such as "data10141015" instead of "data1015", "data101410151016" instead of "data1016" and so on. This is fixed in current version at GitHub so I strongly suggest everyone using this module to update to that. To fix existing data you have to replace those nonsensical values directly in your database: UPDATE version_control_for_text_fields__data SET property = 'data1015' where property = 'data10141015'; UPDATE version_control_for_text_fields__data SET property = 'data1016' where property = 'data101410151016'; # .. and so on, depending on actual language page IDs (broken values should be easy to spot)2 points
-
@Radek: on windows one can check if virtualhosts are configured right with calling httpd.exe -S directly, (not restarting the service). This gives a screen like: VirtualHost configuration: 10.10.30.50:80 is a NameVirtualHost default server kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:49) port 80 namevhost kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:49) port 80 namevhost pw1.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:70) port 80 namevhost pw2.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:87) port 80 namevhost pw3.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:104) port 80 namevhost pw4.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:189) port 80 namevhost pw5.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:206) port 80 namevhost pw6.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:223) port 80 namevhost pw7.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:240) port 80 namevhost pw8.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:257) port 80 namevhost pw9.kawobi.local (W:/Apache2/conf/extra/httpd-vhosts.conf:274) Syntax OK Maybe it helps troubleshooting to go step by step. Also @BFD: have you updated your hosts file??2 points
-
Here's a very basic test page / proof of concept: http://fantastique.ch/pinterest/ Using underscore + backbone + colorbox. i.e. accessing http://fantastique.ch/pinterest/#backbone-js will load the desired url in the colorbox iframe (not just onClick).2 points
-
Also try enabling debug mode in your /site/config.php and look at the Debug link at the bottom of the admin theme. There is a list of all loaded modules (among other things). If you want to see how it's getting that from the code side, then have a look in /wire/templates-admin/debug.inc.2 points
-
I am currently digging a hole in the garden for the last of my Seblod projects.2 points
-
I know it is standard for a PHP setup to have a working mail() function, but I'm doing some work on a server where the local SMTP server has been disabled. While it's fairly trivial to set the SMTP server global variable to a remote server, it's impossible to setup authentication into the remote SMTP server. Therefore it would be useful to be able to hook into any functions which send email (eg forgotten password for admin login) and override it with phpMailer (or similar).2 points
-
Adrian, remember to restore the output formatting state of $user, i.e. $user->of(true); unless you sure you won't be outputting anything from user after that block of code. But safer just to restore it to of(true) after you've saved.2 points
-
I dont use Mac, but you can make VirtualHosts in apache and dont need to RewriteBase. Simple uncomment line Include /private/etc/apache2/extra/httpd-vhosts.conf in /etc/apache2/httpd.conf And make new configuration for your VirtualHost in /private/etc/apache2/extra/httpd-vhosts.conf <VirtualHost *:80> DocumentRoot "/Library/WebServer/Documents"</VirtualHost><VirtualHost *:80> DocumentRoot "/Library/WebServer/Documents/myweb" ServerName myweb.local ErrorLog "/private/var/log/apache2/myweb.local-error_log" CustomLog "/private/var/log/apache2/myweb.local-access_log" common <Directory "/Library/WebServer/Documents/myweb"> AllowOverride All Order allow,deny Allow from all </Directory></VirtualHost> Dont forgot restart apache and add to /etc/hosts 127.0.0.1 myweb.local2 points
-
Just guessing... 1. Copy contents of /wire/modules/AdminTheme/AdminThemeDefault to site/modules/AdminThemePete 2. Duplicate and rename AdminThemeDefault.module to say AdminThemePete.module + change the name of the class in the new file.... 3. Since you want to add to rather than take from the AdminThemeDefault.module, add your Pete theme selection option here...(in your module file) $field->addOption('pete', __('Pete')); , i.e. public static function getModuleConfigInputfields(array $data) { $inputfields = new InputfieldWrapper(); $field = wire('modules')->get('InputfieldRadios'); $field->attr('name', 'colors'); $field->label = __('Color Set'); $field->addOption('classic', __('Classic')); $field->addOption('warm', __('Warm')); $field->addOption('modern', __('Modern')); $field->addOption('futura', __('Futura')); $field->addOption('pete', __('Pete'));//Pete's new awesome colors! $field->attr('value', isset($data['colors']) ? $data['colors'] : ''); $field->optionColumns = 1; $inputfields->add($field); return $inputfields; } } 4. In site/modules/AdminThemePete/styles add your css file - main-pete.css 5. Cross fingers and install Just guessing...but see also... http://processwire.com/talk/topic/4650-new-processwire-admin-theme-on-dev-branch/?p=50881 Edit 1: I have a feeling though that this would duplicate the warm, classic, etc in Admin! This is because admin themes can now co-exists...so, maybe, remove all the other options in the field as well as their CSS, etc. and only leave yours... Edit 2: Just duplicate as in my first attempt, change the css as you wish, but remove radio options.....? Edit 3: I give up; am confused too....Ryan or Soma will clarify2 points
-
Usually you wouldn't do this real-time. I'd suggest cron job that periodically updates the source JSON. ProcessWire even provides nifty "lazy cron" module you could use, but for tasks like this I prefer proper cron job -- that way there's not even that (rare) slowdown for end-users and you don't have to worry at all about that process getting interrupted halfway. I've recently been working on converting some pretty large and active sites to PW and that's exactly what I did there. In my case JSON file is generated once a day, but of course you could build it much more often. Depends on how often your data changes etc. That sounds just about right There are certain things that are slower than others, but the PW selector engine is pretty well optimized already. What you can and should do is mostly just about keeping it simple -- fewer fields in a selector string is usually faster (take a look at Fieldtype Cache by the way), searching with $page->children("selector") is faster than $page->find("selector") but only finds direct children, comparisons using "=" should be faster than "*=" (which should be faster than "%=") etc. I'm pretty sure you could find quite a few posts about keeping queries fast around here. I'm definitely not the most qualified person here to comment on this. As a general tip forget the native forum search function, it's not very helpful -- do a Google search with site:processwire.com/talk and you'll get much better results..1 point
-
Ta! The actual profile download is a little more up to date than the site - for instance, the menu bar is "out of the box" foundation so it really is starting as close to foundation standard as possible.1 point
-
Table of contents Introducing the App and author Needs First version in PHP/MySQL without any Framework Why Processwire? App Version 1.0 Introducing the App and author Hi, my name is Luis and i´m a German based Web and Frontend Developer. I started 2010 with my own Internetbusiness and noticed at the very beginning of my business that it takes to much time to handle my accounting, invoices and clients. The main problem was that I needed for almost every task his own software solution, so the usual workflow in creating an invoice was something like open the CRM Software because the invoice software was good in creating invoices but bad in managing and searching clients, copy and paste the client into invoicing, create the invoice and handle it over to the accounting software. Not good at all... So I decided to create my own solution to fit my needs in the office management. Needs Invoicemanagement and creation Clientmanagement, very basic CRM Accounting Multi-User Simple financial stats about the Keyfacts of my business possibility to export the data for my tax consultant PHP / MySQL to work with it on intranet After pointing out my personal needs and writing down my usual workflow I started to develop the first version. First version in PHP/MySQL without any Framework In winter 2011/2012 I completed the very first version of my OMS (office management suite). The whole project was written in good old fashioned PHP from scratch. I´ve used this version till November 2012. Why Processwire? In mid 2012 I discovered Processwire and had no idea in how many ways this tool would change my life as webworker. After playing around with PW and developing the first little sites I had a little talk with my tax consultant, she said that my financial reports are pretty good and help to save money. (less time, smaller invoice from her) Why not publish the tool? Well, at this point my app was solely written for my needs, without possibilities for an Multi-User environment or for use in an companies Intranet. I finally decided to port the app to PW because of it´s flexibility, scalability and built-in user-roles. I had to dig deeper into PW at this point to see if I really could. Late 2012 I started porting the app in PW and was surprised how insanely fast developing could be. The whole database structure was ported into PW Pages, no SQL query is done by the app itself. It was possible to recreate the core functionality in about 2 weeks, implementing the Login and Multi-User functionality took another week. WebApp Version 1.0 https://youtu.be/PIgUMLZEcIU The app is now available for purchase @ www.misterui.de * also Processwire with an own eCommerce Script1 point
-
Ups - I accidentally removed Teppo's reply, while using mobile UI. Pete - do we have any way to restore it? Sorry Teppo...1 point
-
I have a suggestion for the admin when viewed on mobile devices. While it scales nicely, the drop down menus do not pause long enough to allow for a selection from the drop down menu but rather go to the first level of the menu. For instance if I user my tablet to select the drop down for Setup... I end up getting no time to make a selection. The drop down appears but the Setup page loads before I can select any items. I've seen it done before where on mobile or waits for input and you would then re-select setup if you truly wanted to go to the root. Just a thought Mike1 point
-
I have no idea why users are getting logged out in your case, but a few things I would look at: 1. How long was the user logged in at your site? Make sure they have completed at least one full page request as a logged in user before you redirect them elsewhere. You can accomplish this by redirecting to a local page first before redirecting to another site. 2. What URL does your payment gateway return them to? If the user started out on an http URL and returned on an https URL (or the reverse), that might be something to look at. What sort of switching between http and https does your site perform? 3. Is the user returning to the exact same hostname? i.e. www.domain.com and not domain.com ?1 point
-
Last example was accessible thrue http://myweb.local for http://www.myweb.local you can add ServerAlias. <VirtualHost *:80> DocumentRoot "/Library/WebServer/Documents/myweb" ServerName myweb.local ServerAlias www.myweb.local......1 point
-
I spent the last 10 days or so fiddling around with some Joomla/Seblod installs that I have to maintain and totally missed out on the PW2.4 release. Now I quickly updated the config.php of my pwfoundation5 template on github to reflect all the changes.1 point
-
I find this useful. And I have searched the core code (wire) and found only three function calls: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/shutdown.php#L73 https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessForgotPassword.module#L166 https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Fieldtype/FieldtypeComments/FieldtypeComments.module#L290 It could be replaced by a hookable function called pwMail() or something like that. public function ___pwMail($to, $subject, $message, $additional_headers=null, $additional_parameters=null) { return @mail($to, $subject, $message, $additional_headers, $additional_parameters); }1 point
-
PW caches any image sizes you create with $image->size(), $image->width() or $image->height(). They are all stored in your assets folder and called directly if they already exist.1 point
-
...and don't forget you also have $pages->get if you only need to return one specific item...(i.e. something other than this page)... http://processwire.com/api/1 point
-
@jean-luk Yes repeaters are in fact internal pages, so doing the following should help (not tested): if ($page instanceof RepeaterPage) { $id = $page->parent->id; } else { $id = $page->id; } echo $id;1 point
-
I think I've found another issue related to the use of $page in a Hanna code: if the field containing the hanna code is in a repeater, $page seems to point to something internal to the repeater instead of pointing to the page containing the repeater field. Example with a hanna code echoing the page id: // in a field directly in the home page echo $page->id; --> 1 // in the field from a repeater on the same home page echo $page->id; --> 1060 From what I understand by looking at the repeater module source code, repeaters are implemented with pages. So the observed behavior is probably a side effect of this. Any idea of how to fix this ?1 point
-
@stanimal - Ok, found it. Either you change the documentation or the implementation ;-) If you have a page called 'foo-bar' or 'foo_bar' using the 'Baz' template then you can optionally put a function called page_foo_bar in your BazController which will be called for that page. The part of page_ is on line 49 of the Controller.php function call() { $func = 'page_'.f8\Strings::snake_case($this->page->name); Works beatifull! AM1 point
-
Thanks for the feedback. Great thoughts. I think this should be our priority No. 1 for the next module update. Select the image-fields you want to minimize and done. We just have to decide what happens to image variants and how we can "catch" them. That was on my mind when writing the assumptions above. We couldn't clearly communicate the benefits of the module/service. That you will get faster page speeds because a webpage nowadays contains mostly (large)images. Question: Target more the developers or our "customers" (clients). As of today, the module will still work if our servers go down or your licence key expire. You just won't get minimized images because the module hands through the original PageImage. If you want to update your plan, buy another licence key... ? And again, the 1-click-solution as mentioned before. Got this one Our intention was never about "big money". The dev community here is small (compared to other plattforms) and we knew this. We could reach out to other CMS like Typo3 or Wordpress but thats not the plan and there are already other solutions out there. We just thought, that we would have more than a single "Free signup" after three weeks and maybe even a sale(!). We made the service commercial, to cover our server costs (currently a single instance for 20$/m) and maybe to get a little bit more to cover the costs for e.g. Ryans ProCache and FormBuilder for our own use. It's not for everyone to setup the scripts and a server to compress images. It should be as easy as possible and you should just have to focus on using the service rather than running it. It's hard to find prices and the right way to market your product. I think we still have to figure this out and see, where we will go. We will invest some more time but this might result in a better outcome for everyone (even other developers who might try to make a commercial service/module for ProcessWire).1 point
-
<qoute>experience with running $pages->find("selector") api call on over 10,000 pages?</quote> I Don't think you will have any noticeable slowness with that amount of pages to be searched. You can't compare getResources with the ProcessWire way of finding pages. So far I understand Modx loads all the fields with getResources & the custom fields if needed in your results. ProcessWire wil only load the fields when you access them, so there's no field load with a page find. Result, searching 100.000 pages is not a problem. Searching 10.000 pages, just a blink of an eye.1 point
-
Do you want to find something in a set of 10.000 pages or do you mean a find result of 10.000 items? Searching in 10.000 pages isn't a problem, PW is really fast. But if there are a lot of possible results it's generally advised to limit the pages->find call to 25, 50 or another sane value. http://processwire.com/api/selectors/#limit . If you want you can combine this with pagination. The reason for this (others can prolly explain better) is that the pages->find call will return a PageArray that gets put in memory and if there are a lot of pages in the array things will inevitably slow down. Of course, depending on the situation, 'slow' in PW terms may still be acceptable. I have grabbed hundreds or even thousands of pages in one go and it still performed pretty well.1 point
-
just as a reminder: there is no need to use profile exporter when upgrading from 2.3 to 2.4. It was required on 2.0 to 2.1 upgrade only.1 point
-
until now we are not sure how to place module translations on github. Therefore you can download the first 3 here. Zip contains the following module translations: CKEditor ModulesManager Thumbnails modules-de.zip BTW: actual ModulesManager needs also a translatable JqueryDataTables.module to get the full de-gui...1 point
-
With Lazy Cron you will not be able to guarantee exactly when a task will be run - a page on the site will need to be loaded, just as you noted. You could skip lazy cron altogether and use cron directly on your server, or you could use the technique that Ryan mentions at the bottom of: http://modules.processwire.com/modules/lazy-cron/ (How to make it not-lazy) If you are running your site on a shared host, you will probably find a tool in your control panel for setting up and managing cron jobs. If you don't have a control panel, you can simply google it and you'll get lots of tutorials: https://www.google.com/search?q=limux+manage+cron+job1 point
-
Just wanted to point out to others that if you are using this (and the Map Markup module) along with zurb foundation (I am still testing, not convinced it's worth the bloat) and you come across an issue with the zoom controls looking not right, it is due to: img { max-width: 100%; } I just added this to my site's css to override this and it seems fine again: .gm-style img { max-width: none; } Hope that helps someone else out.1 point
-
until now the 'cz' and 'de' translations are the most complete? language packs for the new PW 2.4. They contain 99 files. Here's a list with all translated files. Maybe this list is helpful for other translators, to complete their language packs. list of file paths: /wire/core/Pagefile.php /wire/core/AdminTheme.php /wire/core/Field.php /wire/core/Fieldtype.php /wire/core/Functions.php /wire/core/Inputfield.php /wire/core/InputfieldWrapper.php /wire/core/Pages.php /wire/core/Password.php /wire/core/Session.php /wire/core/SessionCSRF.php /wire/core/WireHttp.php /wire/core/WireUpload.php /wire/modules/AdminTheme/AdminThemeDefault/AdminThemeDefault.module /wire/modules/Fieldtype/FieldtypeComments/CommentFilterAkismet.module /wire/modules/Fieldtype/FieldtypeComments/CommentForm.php /wire/modules/Fieldtype/FieldtypeComments/CommentList.php /wire/modules/Fieldtype/FieldtypeComments/FieldtypeComments.module /wire/modules/Fieldtype/FieldtypeComments/InputfieldCommentsAdmin.module /wire/modules/Fieldtype/FieldtypeDatetime.module /wire/modules/Fieldtype/FieldtypeFile.module /wire/modules/Fieldtype/FieldtypeFloat.module /wire/modules/Fieldtype/FieldtypeModule.module /wire/modules/Fieldtype/FieldtypePage.module /wire/modules/Fieldtype/FieldtypeRepeater/FieldtypeRepeater.module /wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.module /wire/modules/Fieldtype/FieldtypeText.module /wire/modules/Fieldtype/FieldtypeTextarea.module /wire/modules/Fieldtype/FieldtypeURL.module /wire/modules/Inputfield/InputfieldAsmSelect/InputfieldAsmSelect.module /wire/modules/Inputfield/InputfieldButton.module /wire/modules/Inputfield/InputfieldCheckbox.module /wire/modules/Inputfield/InputfieldCheckboxes/InputfieldCheckboxes.module /wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.module /wire/modules/Inputfield/InputfieldEmail.module /wire/modules/Inputfield/InputfieldFieldset.module /wire/modules/Inputfield/InputfieldFile/InputfieldFile.module /wire/modules/Inputfield/InputfieldFloat.module /wire/modules/Inputfield/InputfieldForm.module /wire/modules/Inputfield/InputfieldHidden.module /wire/modules/Inputfield/InputfieldImage/InputfieldImage.module /wire/modules/Inputfield/InputfieldInteger.module /wire/modules/Inputfield/InputfieldMarkup.module /wire/modules/Inputfield/InputfieldName.module /wire/modules/Inputfield/InputfieldPage/InputfieldPage.module /wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.module /wire/modules/Inputfield/InputfieldPageListSelect/InputfieldPageListSelect.module /wire/modules/Inputfield/InputfieldPageListSelect/InputfieldPageListSelectMultiple.module /wire/modules/Inputfield/InputfieldPageName/InputfieldPageName.module /wire/modules/Inputfield/InputfieldPageTitle/InputfieldPageTitle.module /wire/modules/Inputfield/InputfieldPassword.module /wire/modules/Inputfield/InputfieldRadios/InputfieldRadios.module /wire/modules/Inputfield/InputfieldSelect.module /wire/modules/Inputfield/InputfieldSelectMultiple.module /wire/modules/Inputfield/InputfieldSubmit/InputfieldSubmit.module /wire/modules/Inputfield/InputfieldText.module /wire/modules/Inputfield/InputfieldTextarea.module /wire/modules/Inputfield/InputfieldTinyMCE/InputfieldTinyMCE.module /wire/modules/Inputfield/InputfieldURL.module /wire/modules/Jquery/JqueryWireTabs/JqueryWireTabs.module /wire/modules/LanguageSupport/LanguageParser.php /wire/modules/LanguageSupport/LanguageSupport.module /wire/modules/LanguageSupport/LanguageSupportFields.module /wire/modules/LanguageSupport/LanguageSupportPageNames.module /wire/modules/LanguageSupport/LanguageTabs.module /wire/modules/LanguageSupport/ProcessLanguage.module /wire/modules/Markup/MarkupPageFields.module /wire/modules/Markup/MarkupPagerNav/MarkupPagerNav.module /wire/modules/PagePaths.module /wire/modules/PageRender.module /wire/modules/Process/ProcessField/ProcessField.module /wire/modules/Process/ProcessForgotPassword.module /wire/modules/Process/ProcessHome.module /wire/modules/Process/ProcessList.module /wire/modules/Process/ProcessLogin/ProcessLogin.module /wire/modules/Process/ProcessModule/ProcessModule.module /wire/modules/Process/ProcessPageAdd/ProcessPageAdd.module /wire/modules/Process/ProcessPageClone.module /wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module /wire/modules/Process/ProcessPageEditImageSelect/ProcessPageEditImageSelect.module /wire/modules/Process/ProcessPageEditLink/ProcessPageEditLink.module /wire/modules/Process/ProcessPageList/ProcessPageList.module /wire/modules/Process/ProcessPageSearch/ProcessPageSearch.module /wire/modules/Process/ProcessPageSort.module /wire/modules/Process/ProcessPageTrash.module /wire/modules/Process/ProcessPageType/ProcessPageType.module /wire/modules/Process/ProcessPageView.module /wire/modules/Process/ProcessPermission/ProcessPermission.module /wire/modules/Process/ProcessProfile/ProcessProfile.module /wire/modules/Process/ProcessRole/ProcessRole.module /wire/modules/Process/ProcessTemplate/ProcessTemplate.module /wire/modules/Process/ProcessUser/ProcessUser.module /wire/modules/Session/SessionHandlerDB/ProcessSessionDB.module /wire/modules/Session/SessionHandlerDB/SessionHandlerDB.module /wire/modules/Session/SessionLoginThrottle/SessionLoginThrottle.module /wire/modules/System/SystemUpdater/SystemUpdater.module /wire/modules/Textformatter/TextformatterEntities.module /wire/templates-admin/debug.inc /wire/templates-admin/default.php list of file names: wire--core--admintheme-php.json wire--core--field-php.json wire--core--fieldtype-php.json wire--core--functions-php.json wire--core--inputfield-php.json wire--core--inputfieldwrapper-php.json wire--core--pagefile-php.json wire--core--pages-php.json wire--core--password-php.json wire--core--session-php.json wire--core--sessioncsrf-php.json wire--core--wirehttp-php.json wire--core--wireupload-php.json wire--modules--admintheme--adminthemedefault--adminthemedefault-module.json wire--modules--fieldtype--fieldtypecomments--commentfilterakismet-module.json wire--modules--fieldtype--fieldtypecomments--commentform-php.json wire--modules--fieldtype--fieldtypecomments--commentlist-php.json wire--modules--fieldtype--fieldtypecomments--fieldtypecomments-module.json wire--modules--fieldtype--fieldtypecomments--inputfieldcommentsadmin-module.json wire--modules--fieldtype--fieldtypedatetime-module.json wire--modules--fieldtype--fieldtypefile-module.json wire--modules--fieldtype--fieldtypefloat-module.json wire--modules--fieldtype--fieldtypemodule-module.json wire--modules--fieldtype--fieldtypepage-module.json wire--modules--fieldtype--fieldtyperepeater--fieldtyperepeater-module.json wire--modules--fieldtype--fieldtyperepeater--inputfieldrepeater-module.json wire--modules--fieldtype--fieldtypetext-module.json wire--modules--fieldtype--fieldtypetextarea-module.json wire--modules--fieldtype--fieldtypeurl-module.json wire--modules--inputfield--inputfieldasmselect--inputfieldasmselect-module.json wire--modules--inputfield--inputfieldbutton-module.json wire--modules--inputfield--inputfieldcheckbox-module.json wire--modules--inputfield--inputfieldcheckboxes--inputfieldcheckboxes-module.json wire--modules--inputfield--inputfielddatetime--inputfielddatetime-module.json wire--modules--inputfield--inputfieldemail-module.json wire--modules--inputfield--inputfieldfieldset-module.json wire--modules--inputfield--inputfieldfile--inputfieldfile-module.json wire--modules--inputfield--inputfieldfloat-module.json wire--modules--inputfield--inputfieldform-module.json wire--modules--inputfield--inputfieldhidden-module.json wire--modules--inputfield--inputfieldimage--inputfieldimage-module.json wire--modules--inputfield--inputfieldinteger-module.json wire--modules--inputfield--inputfieldmarkup-module.json wire--modules--inputfield--inputfieldname-module.json wire--modules--inputfield--inputfieldpage--inputfieldpage-module.json wire--modules--inputfield--inputfieldpageautocomplete--inputfieldpageautocomplete-module.json wire--modules--inputfield--inputfieldpagelistselect--inputfieldpagelistselect-module.json wire--modules--inputfield--inputfieldpagelistselect--inputfieldpagelistselectmultiple-module.json wire--modules--inputfield--inputfieldpagename--inputfieldpagename-module.json wire--modules--inputfield--inputfieldpagetitle--inputfieldpagetitle-module.json wire--modules--inputfield--inputfieldpassword-module.json wire--modules--inputfield--inputfieldradios--inputfieldradios-module.json wire--modules--inputfield--inputfieldselect-module.json wire--modules--inputfield--inputfieldselectmultiple-module.json wire--modules--inputfield--inputfieldsubmit--inputfieldsubmit-module.json wire--modules--inputfield--inputfieldtext-module.json wire--modules--inputfield--inputfieldtextarea-module.json wire--modules--inputfield--inputfieldtinymce--inputfieldtinymce-module.json wire--modules--inputfield--inputfieldurl-module.json wire--modules--jquery--jquerywiretabs--jquerywiretabs-module.json wire--modules--languagesupport--languageparser-php.json wire--modules--languagesupport--languagesupport-module.json wire--modules--languagesupport--languagesupportfields-module.json wire--modules--languagesupport--languagesupportpagenames-module.json wire--modules--languagesupport--languagetabs-module.json wire--modules--languagesupport--processlanguage-module.json wire--modules--markup--markuppagefields-module.json wire--modules--markup--markuppagernav--markuppagernav-module.json wire--modules--pagepaths-module.json wire--modules--pagerender-module.json wire--modules--process--processfield--processfield-module.json wire--modules--process--processforgotpassword-module.json wire--modules--process--processhome-module.json wire--modules--process--processlist-module.json wire--modules--process--processlogin--processlogin-module.json wire--modules--process--processmodule--processmodule-module.json wire--modules--process--processpageadd--processpageadd-module.json wire--modules--process--processpageclone-module.json wire--modules--process--processpageedit--processpageedit-module.json wire--modules--process--processpageeditimageselect--processpageeditimageselect-module.json wire--modules--process--processpageeditlink--processpageeditlink-module.json wire--modules--process--processpagelist--processpagelist-module.json wire--modules--process--processpagesearch--processpagesearch-module.json wire--modules--process--processpagesort-module.json wire--modules--process--processpagetrash-module.json wire--modules--process--processpagetype--processpagetype-module.json wire--modules--process--processpageview-module.json wire--modules--process--processpermission--processpermission-module.json wire--modules--process--processprofile--processprofile-module.json wire--modules--process--processrole--processrole-module.json wire--modules--process--processtemplate--processtemplate-module.json wire--modules--process--processuser--processuser-module.json wire--modules--session--sessionhandlerdb--processsessiondb-module.json wire--modules--session--sessionhandlerdb--sessionhandlerdb-module.json wire--modules--session--sessionloginthrottle--sessionloginthrottle-module.json wire--modules--system--systemupdater--systemupdater-module.json wire--modules--textformatter--textformatterentities-module.json wire--templates-admin--debug-inc.json wire--templates-admin--default-php.json EDIT: if someone is working with translations on an local Windows environment, there is a problem with the admin menu. Take a look at this thread. You have to edit one core file: wire/modules/LanguageSupport/Languagetranslator.php. In line 207 replace DIRECTORY_SEPARATOR with '/' Unfortunately this is not fixed until now..1 point
-
After ProcessWire 2.4 I had to translate a lot of things. Please check it out: https://github.com/biojazzard/pw_spanish I feel this is the latest working version, but since PW 2.4 is pretty new, some updates may come. Enjoy.1 point
-
slice is a method of WireArray and multifile fields are WireArrays too. see here for available methods: http://processwire.com/api/arrays/ or http://cheatsheet.processwire.com/1 point
-
Slice is right here: http://processwire.com/api/arrays/ and here http://cheatsheet.processwire.com/1 point
-
This works great for me: http://processwire.com/api/include/ On that example Ryan creates a executable file, but you can as well create a PHP file anywhere you want on the server and do the same: <?php include("/path/to/processwire/index.php"); // Do anything you want with PW. Remember to use wire('pages') and all the likes instead of $pages After that you can run it in the terminal like this: php path/to/your/file.php Or for your cronjob: @hourly php path/to/your/file.php You can even put some echo's on the file for debugging purposes and see them in the terminal. That worked great for me with scripts tat created hundreds of pages in one go.1 point
-
OK, I would recommend that you first learn the basics of PW (http://processwire.com/api/) and some PHP, if you haven't already. Otherwise, it will be difficult for you to follow any threads I point you to, for instance the below. One good way to learn PW is to go through the "Small Project Walkthrough" tutorial in the Wiki, creating a simple site. PW has nothing to do with the size of upload files. That is something you set in your server environment, in your php.ini. Google "php maximum upload size" and have a read. Also, have a look at these discussions (Google upload site:processwire.com) as well as this topic: http://processwire.com/talk/topic/3105-create-pages-with-file-upload-field-via-api/1 point
-
I am glad to announce first release candidate of stable Czech Language Pack for ProcessWire 2.4. Czech Language Pack Current version: 1.0rc1 (99 files) + README.txt Changelog: Added: wire/templates-admin/default.php wire/templates-admin/debug.inc Deleted: wire--modules--admintheme--adminthemedefault--debug-inc.json wire--modules--admintheme--adminthemedefault--functions-php.json wire--modules--admintheme--adminthemedefault--default-php.json Updated: Many strings and cleaning.Czech Language Pack for external modules. Current version: 0.5 (25 files) + README.txt Added: ShoppingCart (initial translation) site/modules/ShoppingCart/PaymentInvoice.module site/modules/ShoppingCart/PaymentSimpleExample.module site/modules/ShoppingCart/ShippingFixedCost.module site/modules/ShoppingCart/ShoppingCart.module site/modules/ShoppingCart/ShoppingCheckout.module site/modules/ShoppingCart/ShoppingOrdersManagement.module site/modules/ShoppingCart/ShoppingStepsMarkup.module Updated: ModulesManager InputfieldCKEditor Contains: FieldtypeCropImage InputfieldCKEditor TextformatterVideoEmbed FormBuilder ModulesManager ProcessPageDelete ShoppingCart pw_czech_1rc1.zip pw_czech_modules_05.zip1 point
-
InputfieldWrapper is the base class for a Form, Fieldset or Tab (InputfieldForm, InputfieldFieldset, etc.) It implies an Inputfield thats purpose is to contain other Inputfields. While Forms, Fieldsets and Tabs represent specific things, a regular InputfieldWrapper just acts as a wrapper/container for Inputfields, without any kind of visual representation. Because it is a type of Inputfield, it can take the place of a single Inputfield, while actually containing many of them.1 point
-
Thought I should actually put the demo up on my site: http://foundation5.stonywebsites.co.uk/1 point
-
I was working over this code from apeisa http://processwire.c...t__20#entry1364 and wanted to share the result with you all. Basically, this allows you to mirror the admin form from a given page to the frontend. To give some flexibility, you can fill an array with the fields to exclude —or else, the fields to include— on the output. EDIT: I forgot to tell... this works well with regular fields (text, textareas, checkboxes, radios, multiple choice, etc), but didn't manage to make it work well with images, for instance. So, here is the code: <?php // Get the page you need to edit $mypage = $pages->get('/some/page/'); // Populate with the names of the fields you want to exclude OR include (see instructions below) // Leave empty to output all the fields $myfields = array('body', 'email'); $form = $modules->get('InputfieldForm'); $fields = $mypage->getInputfields(); // If array is not empty use it to filter the fields if ($myfields){ foreach($fields as $f){ // Output all the fields minus the ones listed in the $myfields array // Instead, to output only the fields that are in the array, remove the (!) from the condition if (!in_array($f->name, $myfields)){ $form->append($f); } } } // Else, include all the fields else { $form->append($fields); } // Add save button $field = $this->modules->get('InputfieldSubmit'); $field->attr('id+name', 'submit_save'); $field->attr('value', 'Save'); $field->label = "submit herei"; $form->append($field); // Process the form // (code replaced by a new one provided by Ryan) if($input->post->submit_save) { $form->processInput($input->post); if(!$form->getErrors()) { $mypage->of(false); // turn off output formatting before setting values foreach($mypage->fields as $f) { $mypage->set($f->name, $form->get($f->name)->value); } } } include("./head.inc"); // Render the form echo $form->render(); include("./foot.inc");1 point
-
I've just added it to ProcessPageSearch and committed the update to the P21 source. Now you can do something like this: var url = config.urls.root + 'page/search/for?template=basic-page&body*=something'; $.getJSON(url, function(data) { console.log(data); }); The example above shows "search/for?" as the URL. When you add the "for" to it, it assumes that you are going to specify a selector in the URL. This works with either Ajax or regular mode. In ajax mode, it returns JSON. In regular (non ajax) mode it's going to output the results in interactive/html mode as usual. This "selector mode" isn't used in the search engine by default, so it's only used when you include the "for?" in your URL and specify a selector after it. I believe this selector mode is much more convenient than the regular mode for AJAX use, as well as regular non-ajax links to the search engine. The selector can be identical in format to a regular selector with the only difference being that you separate each part of the selector with a "&" rather than an ",". Here is an example: /processwire/page/search/for?template=villa&body*=luxury&bedrooms>5&bathrooms<=3 The above is a valid URL, but it's also a valid selector. If we replace the "&" with ", ", then we get this: template=villa, body*=luxury, bedrooms>5, bathrooms<=3 PW abstracts away the parsing of GET vars that lack an equals sign, like "bedrooms>5", and translates all of PW's 2-character operators just fine too (like *=, ~=, %=, <=, >=). Of course, you can also do this (specify a parent path): /processwire/page/search/for?parent=/path/to/parent&featured=1 If you want to specify what fields should appear in the JSON output (or the interactive table), then just add a "get=" var to your URL, like this: /processwire/page/search/for?template=basic-page&get=title,path,categories Separate out the fields you want to "get" with commas, like above. When you specify what fields should be included, it will include them in the output, in addition to the native fields that are included in all (like id, name, template, parent, etc.). Because JSON can represents objects nicely, PW will also include partial objects (like page references) as JSON objects. For something like a Page reference, it'll include most of the native fields for each page, as well as the title and path. By default it will paginate by 50, though you can increase that up to 250 by specifying your own "limit=123" var in the URL (where 123 is the limit you want to specify). To retrieve the next pagination, specify the same limit but precede your URL with the page number, i.e. /processwire/page/search/for/page2?template=basic-page&limit=100 If you prefer, you can specify a "start=123" var in your selector (just like with other PW selectors), to indicate the result number you want to start from. But I'm guessing most will prefer the simplicity of using the page number pagination. If you call jQuery's getJSON() on the search URL, you will get your results in JSON format. Here's an example of a call we might use: $.getJSON("/processwire/page/search/for?template=basic-page", function(data) { console.log(data); }); jQuery's getJSON automatically converts it to an object in jQuery, but the JSON string is probably the simplest way to envision it, so here is the actual JSON string as it's returned from that query. This query was performed on a stock install of PW 2.1 using the included profile. <?php // ignore the PHP tag, I just wanted syntax highlighting { "selector":"template=basic-page, limit=50", // just a repeat of the selector you used "total":"4", // total number of results found. if there were 1230 matches, this would be 1230 "limit":50, // the max number of results that will be in this request (default=50) "start":0, "matches":[ // array of matches { "id":1001, "parent_id":1, "template":"basic-page", "path":"/about/", "name":"about", "title":"About" // plus any fields you specify with get=... }, { "id":1002, "parent_id":1001, "template":"basic-page", "path":"/about/what/", "name":"what", "title":"Child page example 1" }, // and so on for each match ] } I'm sure there are tweaks and improvements still to be made, so please let me know if you find any issues or areas for improvement.1 point