-
Posts
7,479 -
Joined
-
Last visited
-
Days Won
146
Everything posted by kongondo
-
How do I edit multiple pages at once, based on a WHERE criteria?
kongondo replied to desbest's topic in Getting Started
This: $a = $pages->find("template=yourtemplatename, field=fieldname"); should be matching a value for the field...not the field name itself... $a = $pages->find("template=yourtemplatename, fieldname=search_criteria"); If only saving the one field, it is more efficient to do: $b->save('fieldname'); -
Not, it's not late at all. In fact, I forgot to mention it. I was looking for name suggestions! (one of the reasons I still left it in Alpha, actually). Thanks! I like sites manager. Let's see if there are more suggestions. All, Module Name Name suggestions for this module please? We currently have: Sites Manager Upgrading Please note, version 002 includes some templates not in version 001. A re-installation is required I am afraid.
-
Update: Multi Sites Version 0.0.2. Multi Sites can now install single/stand-alone sites! The Multi Sites in the name now means installing and managing multiple sites ! For single sites use, the module now downloads, strips, compresses and save ProcessWire versions of your choice for reuse (rather than downloading each time you install a single site). These ProcessWire files can be refreshed on demand, e.g. when a new version of ProcessWire comes out. README is now complete. See changelog for more details. Download from GitHub. Changelog Support for installing single/stand-alone sites. Added Type or Paste and Install Configuration methods for creating sites. Create and edit site install configurations. Download, store and restore various versions of ProcessWire (for single-site installations). UI enhancements. I'll update first post later. Screens 1 2 3 4
-
Hmm. I must be doing something wrong then. I tested on 3.0.77
-
Using a selector, how do I find a page created by a specific user?
kongondo replied to desbest's topic in Getting Started
More info from the Docs Get: http://processwire.com/api/ref/pages/get/ Find: http://processwire.com/api/ref/pages/find/ -
Just a little FYI, for those who might try this in PW 2.7, this... ..only 'works' in PW 3.x. @tpr, I tried the code but it's only returning one page, the immediate parent of 'Sub-child 2', i.e. Child 1? Is that how it works? @thetuningspoon I'm not sure I follow your requirement. In the text you say: You want all pages, meaning your want parent, grand-parents, etc, i.e. Child 1 and Page? However, in the illustration, you say: Here it seems you only want Page but not Child 1? If you want Child 1 and Page (and any other parent in between) you can also do: $parents = $pages->get(1028)->parents; I have a feeling you already know this, meaning I misunderstood you .
-
Big Numbers, when integer is not enough. What to do?
kongondo replied to bobbit6k's topic in General Support
Hi @bobbit6k Welcome to the forums . MySQL INT (unsigned) can store up to 4.2 billion. I think ProcessWire uses signed INT for integer fields, so, you get about 2.1 billion. If you need something bigger, there is MySQL BIGINT. If you need to manipulate the data as numbers, one solution is to create your own custom Fieldtype that extends FieldtypeInteger and uses BIGINT in its database schema. We can show you how if you wish...Otherwise, if you just need a "number", you can go with a text field. FYI https://dev.mysql.com/doc/refman/5.7/en/integer-types.html https://planet.mysql.com/entry/?id=13825 -
FYI, sometimes it is simpler to do an in-memory search of the WireArray. E.g. $oneItem = $myWireArray->get("id=20");// id is a property in the WireArray if($oneItem) echo 'we got the item folks!'; $multipleItems = $myWireArray->find("price>500");// price is a property in the WireArray if($multipleItems->count()) echo 'We got several items';
-
3 more lists (there will be duplicates, certainly) - haven't checked them all out, so be careful. http://mentalfloss.com/article/61003/10-funnier-alternatives-lorem-ipsum https://www.buzzfeed.com/saraboboltz/18-lorem-ipsum-alternatives-for-design-nerds-af7c?utm_term=.dtLA3o6mO#.tqQLJyEBK https://www.sitepoint.com/10-lorem-ipsum-alternatives/ I like filerati but their website seems to have been hacked?
-
Yes, please. Some of my modules extend ProcessPageLister, for instance.
-
Thanks for reporting @zkriszti. I'll have a look.
-
Update: Jquery File Upload Version 0.0.6. Changelog Added support for SVGs (to be recognised as images, etc).
-
Hi @Tom H, Sorry for the delay in resolving this. Changes had to be made to Jquery File Upload module and not Media Manager. I have done that. Please upgrade to version 6 of Jquery File Upload.
-
The links pasted by others above should help with this. To be more specific have a look at this post: from the sub-section /site/templates/includes/hooks.php as also discussed here.
-
I recently switched to VSCode from Sublime Text and I haven't looked back since. Was hoping to make a demo of how I'm using it in my development...but haven't got the time...yet. I'm getting intellisense, step-by-step debugging (including CSS debugging!), terminal, grep, diff checker, push to Github, JS/HTML/CSS/PHP documentation, phpDocs, etc...the works!
-
Thanks for reporting @Zeka, This line is the problem. The array index gets overwritten (since duplicate). I'll see what to do.
-
Just to clarify to those that might be confused by this line. This module is not a multi-site solution. It is a multi-site helper. You will still be using the official ProcessWire mulit-site solution. The module only helps you to auto-mate some of the manual tasks. The only notable difference is the how index.config.php is structured. I am not keen on splitting the module like this since it can, with a little tweaking, already achieve a standalone(single) installation. The only differences between a multi-site and single site are: multi-site location of site folder - located in same folder as the main site folder (e.g. /www/main-site/site/ for the main site and /www/main-site/site-something/ for the installed site site folder named site-something uses the existing wire folder (/www/main-site/wire/) needs index.config.php single site location of site folder - located in its own folder (e.g. /www/another-site/site/) site folder named 'site' uses its own wire folder (/www/another-site/wire/) does not need the index.config.php This means that all we have to do is (like you suggested earlier) tell the module in which directory on your server you want to install the single site, do the htaccess.txt renaming and copy over the wire folder as well as its index.php, LICENSE.txt, etc. That's all there is to it. The database stuff routines remain the same. So, I am thinking of a radio button to choose whether you are installing a single versus multi site, blah blah. Edit: In respect of selecting ProcessWire versions, the module could check if you have a zip file in a designated folder to unzip from and if not, download the ProcessWire version of your choice, or something along those lines. What is a standard setup ? I am a bit jittery about the module communicating with any URL. I would prefer all that such setups are loaded locally. Maybe I am just being paranoid here . I was thinking of saving this locally. That's what I was intimating by this:
-
Yeah, I had similar thoughts when drafting the module. This is quite easy to accomplish. Actually, one other reason the module is alpha is that it could end up being more than a multi site thingy, hence I would need to change the Class name. Cool idea. I'll have a think.
-
No, they are not different. I have not used ProcessExportProfile (but I've been thinking, how nice we have it; it will play nicely with ProcessMultiSites). I assume though that it exports the same type of profiles that ship with ProcessWire (the site-default, etc). so it should work. What I meant is that, say, you have a blank profile. You want to use that to install several sites. Those sites have different module needs. When creating a site you will be able to paste or select module class names to fetch (live) and install along with the site creation. I haven't thought it through properly and it would mean a delay while the modules are being downloaded.
-
Multi-Site, adding entries into index.config.php
kongondo replied to swampmusic's topic in General Support
Created a Process Module for this . -
Sites Manager 16 September 2018: FOR NOW, PLEASE DO NOT USE THIS MODULE IN A PRODUCTION SITE. A RECENT ProcessWire UPDATE HAS BROKEN THE MODULE. I AM WORKING ON A FIX. ################ Sites Manager is a module for ProcessWire that allows Superusers to easily create/install ProcessWire sites on the same serverspace the module is running in. Only Superusers can use the module. You can create both stand-alone and multi-sites. Single/Stand-alone Sites Stand-alone or single-sites are sites that will run in their own document root/directory with their own wire and site folders, .htaccess, index.php, etc. In other words, a normal ProcessWire site. Multiple Sites Multi-sites are sites that will run off one wire folder (shared amongst two or more sites) each having their own site folder and database. In this regard, it is important to note that Sites Manager is not in itself a multiple sites solution! Rather, it is a utility that helps you create multi-sites to be run using the ProcessWire core multiple sites feature. For more on this core feature, see the official ProcessWire documentation, specifically the solution referred to as Option #1. Option #1 approach requires the site admin to initially install ProcessWire in a temporary directory for each new site. The directory then needs to be renamed as site-xxx, where ‘xxx’ is any name you want to use to differentiate the installation from other sites, before it is moved to the webroot. For instance, site-mysite, site-another, site-whatever. In addition, the /wire/index.config.php file must be copied/moved to the webroot. Each time a site is added, the index.config.php has to be edited to add ‘domain’ => ‘site-directory’ key=>value pairs for the site. This process can become a bit tedious. This module aims to automate the whole multi-site site creation process. The module is based off the official ProcessWire installer. Creating a site is as simple as completing and submitting a single form! You also have the option to type and paste values or reuse a pre-defined install configuration. The module will: Install a ProcessWire site in your named directory, applying chmod values as specified Move the directory to your webroot Update/Create a Superuser account as per the submitted form, including setting the desired admin theme and colour For multi sites, update sites.json (used by index.config.php to get array of installed sites) For multi sites, the only difference in relation to the core multi-sites index.config.php is that this file is slightly different from the one that ships with ProcessWire. Download from GitHub: Sites Manager (Beta Release) Features Install unlimited number of sites in one (multi-sites) or independent (single-site) ProcessWire installs. Install by completing a Form, Typing or pasting in configurations or using pre-created install configurations. Choose an Admin Theme to auto-install along with the site installation. For single-sites installation, download, save and reuse ProcessWire versions of your choice. Install and maintain site profiles for reuse to create other sites. Create install configurations to speed up installation tasks. Client and server-side validation of site creation values. Edit uploaded profiles (e.g., replace profile file). Lock installed sites, configurations and profiles to prevent editing. Bulk delete items such as site profiles, installed site directories and/or databases (confirmation required for latter two). View important site details (admin login, chmod, etc). Links to installed sites home and admin pages. Timezones auto-complete/-suggest. Pre-requisites, Installation & Usage Please see the documentation. Technicalities/Issues Only Superusers can use the module. ProcessWire 2.7 - 3.x compatible Currently using ProcessWire 2.7 installer (install.php) For multi-sites, potential race condition when sites.json is being updated on a new site install vs. index.config.php accessing the json file? Not tested with sub-directory installs (for instance localhost/pw/my-site-here/) Currently not doing the extra/experimental database stuff (database charset and engine) Future Possibilities Install specified modules along with the ProcessWire install Profile previews? Credits @ryan: for the ProcessWire installer @abdus: for the index.config.php reading from JSON idea @swampmusic: for the challenge Video Demo Demo showing how quick module works on a remote server [YMMV!]. Video shows downloading and processing two versions of ProcessWire (~takes 7 seconds) and installing a single/stand-alone ProcessWire 3 site using the new Admin Theme UI Kit (~2 seconds) on a remote server. Screens 1 2
-
Page rendering limits other queries in sidebar
kongondo replied to MilenKo's topic in General Support
That's the normal behaviour. Have a look at this thread for a solution: -
Mod note: The OP was a spammer. They've been banned. The original thread is now here with Peter Knight as the OP.