Leaderboard
Popular Content
Showing content with the highest reputation on 12/15/2017 in all areas
-
Hi guys, here is our most recent website http://patina-store.de/ Patina is a really nice vintage objects and furniture store here in Wuppertal. Pay a visit if you pass by We are aware of some flickering and strange scrolling (seems to happen with Safari on desktop and iOS) on the homepage initial transition. I'm looking into it, but if you guys could report how it's behaving with you, it would be a great help! A point of interest is the Lookbook page. For this we used the Image Marker module by @kongondo and @heldercervantes, which worked flawlessly. Thanks guys! Although the site is very simple, PW has a very important role, since we transitioned all the shop organization (mainly the products) from excel spreadsheets to it. We could say PW is acting as a small CRM, and Lister Pro is doing a great job at it.8 points
-
We are getting very close to our next master version of ProcessWire 3.x. This week work continued on covering issue reports, but we also added a few items from our feature requests repository as well. This post contains a brief summary of what went into the core this week. https://processwire.com/blog/posts/pw-3.0.86/8 points
-
5 points
-
Just had an idea: what if we created a module that creates some kind of static file that the IDE can read listing all fields of a given template. Maybe we could also extend this module to parse all hooks even for properties that where added via a hook does anyone need a challenge for christmas? to your question, pwuser1 (welcome btw): some use phpstorm, some vscode, some sublime, some atom...3 points
-
Add Image URLs A module for ProcessWire CMS/CMF. Allows images/files to be added to Image/File fields by pasting URLs or using the API. Installation Install the Add Image URLs module. Configuration You can add MIME type > file extension mappings in the module config. These mappings are used when validating URLs to files that do not have file extensions. Usage A "Paste URLs" button will be added to all Image and File fields. Use the button to show a textarea where URLs may be pasted, one per line. Images/files are added when the page is saved. A Pagefiles::addFromUrl method is also added to the API to achieve the same result. The argument of this method is expected to be either: a URL: "https://domain.com/image.jpg" an array of URLs: ["https://domain.com/image1.jpg", "https://domain.com/image2.jpg"] Example: // Get unformatted value of File/Image field to be sure that it's an instance of Pagefiles $page->getUnformatted('file_field')->addFromUrl("https://domain.com/path-to-file.ext"); // No need to call $page->save() as it's already done in the method Should you have an issue using the method, please have a look at the "errors" log to check if something was wrong with your URL(s). WebP conversion The core InputfieldImage does not support images in WebP format. But if you have the WebP To Jpg module installed (v0.2.0 or newer) then any WebP images you add via Add Image URLs will be automatically converted to JPG format. https://github.com/Toutouwai/AddImageUrls https://modules.processwire.com/modules/add-image-urls/2 points
-
I was going to add comments to my site and wanted to use disqus. I looked through the manual adding of this but thought this might be a good opportunity to learn how to make a module as I can't find one in the directory. Was thinking having a few fields or something, where config options can be set and they are then output somehow into the JS embed code. Not really sure about how any of it would work yet but gotta start somewhere. You'll notice on the disqus page that many other CMSs have dedicated plugins/modules to install it, so I'm looking to create the PW one. The manual instructions for disqus are here: https://help.disqus.com/customer/portal/articles/472097-universal-embed-code My immediate problem is, what category is a module like this? And what class would I extend? 'extends Process', 'extendsWireData' etc. It's not clear to me on the api page how you'd choose and reading the code from the base classes probably wont switch on any lights here. https://processwire.com/api/ref/module/ Maybe I'm biting off a little more than I can chew, but what the hell, it'll be a good learning experience, and maybe produce something useful at the end of it. I'll be digging into @bernhards process module tutorial this weekend but I don't think this is a process module.2 points
-
Beware of the large JS load that comes with Discuss, that's why I load it only if the user clicks the "Comments" button. It's possible to show the current comment count, calling the discuss API, but I didn't want it. Example page: https://ricardo-vargas.com/podcasts/think-about-how-to-connect-your-strategy-design-with-your-ability-to-deliver-or-pay-the-price/2 points
-
If you want a free IDE with code completion and conditional breakpoints, it might be worth trying Visual Studio Code. It's considered more an editor than a full blown IDE, but it supports intellisense (Microsoft's version of code-completion) and It's cross-platform, and unlike Netbeans, it does support Xdebug's conditional breakpoints and quite a bit more. I think the full-blown Visual Studio supports PHP debugging too, but Visual Studio is a bit of a monster and Windows only, so you probably need to be using it for other development already to justify it.2 points
-
I think it's an oversight that should be fixed - I think you should post a Github issue for Ryan to think about. He may not agree but I think that is the best way forward.2 points
-
I agree that it should sort this out itself, but just so you know, a Modules > Refresh is the correct way to fix this. As for clearing caches in general, take a look at: https://github.com/somatonic/ClearCacheAdmin - much more elegant than just deleting that table.2 points
-
2 points
-
@horst thanks for that tip. Love that I learn something new about PW's inbuilt power everyday2 points
-
yep, i know i talked to him during my writeup of the blogpost. i just wanted to help as i think 100mb for everybody is not the best solution. i'm fine now, but i think it makes sense to restrict new users more than active ones. thanks for taking care of it now!2 points
-
Hehe, it has crossed my mind a few times but... it's a massive can of worms with huge implications around support. The biggest problem really is there are so many cheap/free offerings out there that I think that's why there's not a huge amount of competition. In terms of "big players" commercially, you've got vBulletin and IPB, and unless you have a few hundred customers at their annual prices you're not paying one developer full time to work on it. I'm pretty sure something much simpler could be built though with less bells and whistles, but I wouldn't trust myself to be able to write something that could scale well. Ryan tells me he actually doubled the space last month so you should be good for a while and we'll maybe look into the increase per post count option in the meantime.2 points
-
would be a perfect fit as every developer should use tracy anyhow no idea how different the IDEs work or how difficult that would be (i guess it should not be too hard?), but it would be great to support different IDEs of course. at least vscode2 points
-
I'm not sure if it's the 'best', but I use Netbeans, although the way Processwire is structured, some possible code completion isn't available, eg if you select a variable like $page, it can't give you a list of page fields, as they're defined in the database rather than in code. With some other CMSs where you have to define a page class for the equivalent of each template in Processwire, you'd get access to those properties. It's not a biggie, as I generally know what fields I've defined for a template. Netbeans has PHP documentation built in which can be handy.2 points
-
Hi All, Recently I've been trying to improve my development skills with R&D projects. My skills are mostly with HTML, PHP and Javascript. I class myself as a front-end developer however I can build back-end applications. I remember when Web 2.0 was realised and there was a shift in ideology and a design guideline to come along with it. But recently things are moving quicker than ever. I'm seeing a huge amount of people dropping jQuery in favour of ES6. But more than that, they are using framework's like React, Angular and Vue. Recently I learnt about JAMStack, and idea that you use API's to generate a flat file website which you serve through an CDN and honestly, I'm feeling way out of my depth here. I really want to stay up to date, but it seems developing a website is like engineering an engine, once you get to the top end of "speed" making it go faster is 100x harder. Don't get me wrong, I'm happy with the performance of ProcessWire, but these JAMStack websites are blazing. I guess you could call this Web 3.0 and it's all about speed and lightweight. Things like ASYNC and lot of other things that can come together to make a pleasurable experience even on the slowest of mobile networks. Is all of this a fad or is it really the next big movement? Is that how we should be developing websites now, or are they just buzz-words? I do like the idea of the CMS generating flat files and routing that through a CDN, but also using Git to manage all the changes it seems very fluid. (https://www.netlify.com, https://github.com/netlify/netlify-cms). I would love to learn all of this, but I feel like there is so much to catch up on I don't know where to start. Like, what is gulp? postCSS? I guess they are pre-processing like LESS to have all this power but still serve small files over the browser. As you can probably tell, I'm overwhelmed by all these things and it doesn't stop, now the "next big thing" is Gatsby (https://www.gatsbyjs.org) and whatever happened to Node.js? I feel like I'm going crazy haha! My question is, how do you guys deal with all of this? Is it something that ProcessWire can be used with as ProcessWire uses a database and requires PHP. I recently read: which touched upon these things, but I didn't understand it all.1 point
-
How to install a customized ProcessWire instance in less than a minute All you need is to copy one file to your server, then upload a kickstartfile like this: <?php return [ 'pwurl' => 'https://github.com/processwire/processwire/archive/dev.zip', 'dbName' => 'kick', 'dbUser' => 'kick', 'dbPass' => 'Kix8s08$', ]; and if you want to customize your instance after installation you can create recipe files like this: <?php $this->installModule('TracyDebugger', 'https://github.com/adrianbj/TracyDebugger/archive/master.zip'); $this->installModule('AdminOnSteroids', 'https://github.com/rolandtoth/AdminOnSteroids/archive/master.zip'); $this->installModule('Repeater'); it needs a lot more cleanup and testing but any thoughts and ideas are welcome until i can finish it... BTW: it's not only about saving time - this could also be very helpful to share whole instances for debugging.1 point
-
https://www.baumrock.com/portfolio/individuelles-crm-und-controlling-tool/ I'm happy to share my biggest and most interesting ProcessWire project so far with you It's a 100% custom office-management solution that helps my client to keep track of all their contacts, projects and finance/controlling stuff. Conception was done back in 2016 and the software is productive since begin of this year. My client is very happy with the result and so am I. Some technical insights: Everything is done inside the PW Admin. I'm using the Reno Theme with some custom colors. In the beginning I was not sure if I should stay with the pw admin or build my own admin-framework but now I'm VERY happy that I went with PW Almost all of my custom Process Pages use my RockDatatables module - there are still some limitations but without it, this project would not have been possible For the charts I used Google Charts and chartjs - both play well together with the datatables and make it possible to display filtered data instantly: also my handsontable module was created for this project to have a nice and quick option for matrix data inputs: Lister and ListerPro were no options as i needed much more flexibility regarding data presentation (like colorization, filtering and building sums of selected rows): invoices are highly customisable as well and easy to create. PDFs are created by php and mPDF by the way: all data is dummy data populated via my Module RockDummyData have a nice weekend everybody1 point
-
I'm still looking for the best solution for my datatables module and I think there is no way around using direct sql queries... That makes it more complicated to setup but saves a lot of other troubles like proper caching, cache maintenance etc... Unfortunately such sql queries can get quite complex unless I'm missing any pw magic that makes it easier to do? This is what i have so far to query all pages of type "basic-page": select id, title.data as title, headline.data as headline, body.data as body, (select group_concat(data separator ',') from field_test_page where pages_id = p.id) as test_page, test_repeater.data as test_repeater from pages as p left join field_title as title on title.pages_id = p.id left join field_headline as headline on headline.pages_id = p.id left join field_body as body on body.pages_id = p.id left join field_test_repeater as test_repeater on test_repeater.pages_id = p.id where p.templates_id = 29 the repeater is a little tricky for example. it gets even worse when you have to handle multilanguage fields or you want references to other pages' field values... edit: maybe better like this? select id, (select data from field_title where pages_id = p.id) as title, (select data from field_field1 where pages_id = p.id) as field1, (select data11041 from field_field1 where pages_id = p.id) as field1_de, parent_id, (select data from field_title where pages_id = p.parent_id) as parent_title from pages as p where p.templates_id = 44 thanks for any hints1 point
-
Hi @matjazp - I discovered a bug when you have blank lines at the top of your file. Because you are using a PW InputfieldTextarea, the blank lines at the top are trimmed, here: https://github.com/processwire/processwire/blob/aa1f7dbd4718532896e209d694db0340c2d30067/wire/modules/Inputfield/InputfieldTextarea.module#L119 The problem is that when you save, these lines are removed. This probably won't ever cause any issues, but I don't think it's polite behavior for this to happen unexpectedly. The other issue relates to my new feature in Tracy which allows opening up errors/files to an exact line number - the line number can be off because of this bug. I actually wonder whether maybe the PW textarea shouldn't do that in the first place. What do you think? I think blank lines at the top should be valid? If you think this is a PW bug, or if you think there should be an option to not remove them, I'll file it with Ryan. Otherwise, maybe ProcessFileEdit needs to use a standard manually coded textarea. Any thoughts?1 point
-
I didn't integrate Disqus so far in any PW site (or anywhere else, for that matter), but I guess this very fine tutorial should get you going: https://abdus.co/blog/creating-a-simple-and-configurable-module-for-processwire/ Especially the "Building a configuration page" chapter.1 point
-
1 point
-
OK, I see. Maybe you've already discussed this elsewhere. If that's the case, apologies. Why would you need to query 10,000 rows at the same time? I suppose because you want to cache the data to make subsequent fetching faster. However, wouldn't pagination work better in this case (if you were to use a $pages->find() with limit)? You could even combine that with incremental caching, both server and client-side if you wanted. If you don't want pagination, you also have virtual pagination or infinite scrolling. I am just thinking out loud here. I haven't tested your datatables module yet. If I could avoid writing SQL queries myself, I'd go for it . Edit: I see you've already discussed this in your other module's thread. So, we better continue there.1 point
-
nice do you think you could extend this module to also store images pasted from the clipboard? PS: i think it would be great if the images were added via AJAX right after pasting (either urls or clipboard). what do you think @Robin S ?1 point
-
Do you know if the client is using the DomainServer Basic package. The FAQ pages say that htaccess files aren't even allowed for sites hosted on that service. It might be worth emailing the support folks at the host and asking the question direct to them.1 point
-
1 point
-
because it's a LOT more performant. constructing my datastring via pages->find() and a foreach takes 16 seconds for 10.000 rows and 5 columns (needing some extra seconds for every column added) whereas querying the database directly needs only some milliseconds. my other idea was to cache the table rows on the dedicated templates but that leads to problems when you have a "parent" or "category" column because then it would take several seconds to recreate the cache of the table when the name of the category changes (updating up to thousands of rows' cache). It also leads to a lot of redundant data. All of that problems are solved when the DB is queried directly1 point
-
glad it helped. actually i think that the usability of this site/module could be improved. it was also not self-explaining for me when i did my first steps with multilanguage setups...1 point
-
@bernhard I tried PHPStorm, Sublime Text but these paid editor does not offer siginificant advantages to Atom, VSCode, and even Brackets. The issue with with the most unpaid one is which plugins to use for PHP some of them overlap. So does anybody know how to setup Atom Editor for PHP and PW correctly? If there is a better alternative to Atom please let me know.1 point
-
https://themeforest.net/ https://templated.co/ https://html5up.net/1 point
-
Let me be nitpicky here ... „no“ ... I would describe it like this: Responsiveness is a characteristic of the resulting website or app. It is achieved through technologies like CSS grid, media queries, Javascript, etc. etc. ... but indeed, CSS grids can make it extremely easy in certain situations to create responsive websites. The question regarding „bootstrap vs. css grid“ is not if any of them is responsive, but wether you want to do some work by hand and learn the underlying tech (no bootstrap) or you rather want to build a website relatively quickly with ready-made pieces of code (yay bootstrap).1 point
-
Maybe u can take a look at snipcart. Edit: lol i just realised its post from 2013 . Anyways if someone looking for simular, snipcart is still relevant1 point
-
I think that's two totally different things... Migrator is for applying changes to sites in a programmatical way. So you can do... migrations Page Import/Export may be helpful when you transfer sites or parts of sites. But I don't think it will be helpful when you have a live site and want to add some new features while you cannot take the site offline and there might be changes in data/content while you are working on the updates. But I haven't used both of them so far. But I'm watching them for a long time... For me until now it was sufficient to work directly on the live server (having proper backups of course). I did some tests writing my own modules and applying update scripts... that was also quite easy. But there where situations where I wished I had a helper that takes care of some things like checking if the field that i want to create already exists, deleting all pages before deleting a template etc.; not sure how or if migrator handles that or what you plan exactly by your rewrite but I'm quite sure I would pay for a module that makes this process easier. And I'm quite sure that there is some demand on this staging/production migration topic... But I also think that tracydebugger has the bigger audience - so this would be more interesting as a business case1 point
-
1 point
-
Absolutely this, I like it! I couldn't work out the use for it, I see now. Thanks1 point
-
I would do the validation a little differently, to avoid loading any more pages than you need to: // if there is a URL segment 1 if($segment1) { // get catType page $catType = $pages->findOne("parent=/type/, name=$segment1"); // if catType page exists if($catType->id) { // add this to the selector $selector .= ", catType=$catType"; } else { // invalid URL segment 1 throw new Wire404Exception(); } } Not sure in what way you were considering using has(), but that method is for checking against a PageArray/WireArray that is already loaded to memory - better to load just the page (category) you want than to load many just to filter it down again.1 point
-
I just bought Crysis (never played it!) and MotoRacer (oh the good memories...). Thanks for the tip @FrancisChung!1 point
-
Don't be put off by what your competitors are doing. They can be wrong. Google gives lower ratings to pages that it sees as lower down the page tree... eg page abcd in the tree abcd.com.au/all/about/abcd would rate lower (probably 40%) than page all-about-abcd in url abcd.com.au/all-about-abcd (probably 80% as it's one page off the root) Google is also smart enough to recognise hyphens in URLs as spaces. The only suggestion I would make would be to rename the URL to abcd-is-about - that way abcd is up front Hope this helps1 point
-
Welcome to the forum @planetmarrs23 It's actually not an easy fix, and it's also not advisable because the slashes in the urls represent a new document. Not only in ProcessWire, but in the web in general. In your case this would mean that "all" would represent a document, "about" would represent a document below it and abcd even another. It's also not advisable depending on how long this document exists already. Changing it's name would break the links that might be directing to it from external pages. Is there any special reason why you want to do this?1 point
-
In the latest v0.5.5 there's a new optionchecked filter. I usually have a tough time when I have to check whether a Select options field has a given option checked/selected, so this filter is about simplify this. I've decided to use a "dot notation" because it makes things easier to read imo. The filter accepts the id, value and title too: // 3=show_header|Show header {if ($page|optionchecked:'page_options.3')} ... {/if} {if ($page|optionchecked:'page_options.show_header')} ... {/if} {if ($page|optionchecked:'page_options.Show header')} ... {/if}1 point
-
I was just looking over this one again a minute ago and may be useful here regarding how to structure the pages:1 point
-
Hi! My name is Vadim and it's my first site (http://asvetnik.by/), made on Processwire. The site was created for a non-profit organisation, based in Belarus, and it's main aim is to help children and grown-ups learn Belarusian language. Three versions of main page (desktop, tablet and mobile): What was created: Lesson pages with tasks and vocabulary: Vocabulary pages for single words: Quiz pages: And a bunch of other pages, like news and text pages and so on. Used modules: Croppable Image 3 ( @horst, you are my hero, superhero! your module made my work much faster and, what is more important, more safe to be used by 20-25 editors, most of whom can't (or, I'm sure, just don't bother to) remember what dimension must be pictures for main and inner pages ProFields: Repeater Matrix (to create simple, but yet powerful lesson LEGO-like constructor) ProFields: Textareas (for reasonably huge number of dictionary-related fields) ProCache (obviously, for speed) Comment (thanks @ryan for this modules and your help!) For example, here is the dictionary page enhanced by ProFields: Textareas: All technical information about a single word is stored in just one DB-row. No extra fields, no extra connections to the datebase! ProFields also helped me to easily create a simple, but yet powerful JSON-based live search through the dictionary: And this search (blame me, but for now it works properly only on desktop) was an instant success among the users (this library was used - http://easyautocomplete.com/). ProFields: Repeater Matrix was used to give teachers a possibility to 'build' lesson from different content blocks, to give them freedom of action and to make it easy to add new content blocks based on their request in future. Here is a small inside from admin, a typical lesson looks something like this: The best advert for ProFields: Repeater Matrix would be one of the teachers' note left for me: "It's like LEGO, I've got a bunch of building blocks and it's up to me how the lesson would look like". Thanks, @ryan, for this. What next. Site is in active beta now, it easily cope with 100-120 parallel connections and with 400-450 at picks. I know, that there are some mistakes in html and css, and they would be resolved in the next update. I'm trying to convince people to use jpgs instead of pngs for main page graphics, but not sure, that it is possible. For my own headache I've done all the graphics for the site (thank Favicon) and now teachers love 'ideal' pngs so much that nasty 'blured' jpgs drive them mad)) P.S. It's pity, but there is no studios in Belarus who are actively work with Processwire (and Wordpress for me it's something brrr after simple beauty and stability of Processwire), so if your are looking for a hard-working and eager to learn junior in your team - feel free to contact me in PM. Thanks for your attention!1 point
-
It's a fantastic way to give editors a way to control page content without mangling things into an RTE. Also, if you happen to have any sites around where you have used PageTable fields for this and feel like an upgrade to RepeaterMatrix, take a look at the one click converter included in AdminActions.1 point
-
Facepalm! How long have I been around here for? I didn't know Repeater Matrix allows different types of repeater items in the same repeater! Thanks @Ivan Gretsky!1 point
-
I submitted a request to include it in the core: https://github.com/processwire/processwire-requests/issues/1261 point
-
This was helpful debugging one issue. In later PW-versions you have to add findOne into $options array to make it work: $selectors = new Selectors("template=blog-post, limit=5, sort=name"); $pagefinder = new PageFinder(); $options = array('returnVerbose' => true, 'findOne' => false); $sql = $pagefinder->getQuery($selectors, $options)->getQuery();1 point
-
That error occurs only if $config->dbName is undefined (from /site/config.php). Usually that's a signal for PW to load install.php (installer) but it was also not found. If you can look in /site/config.php and see that $config->dbName is defined and it's correct, then you'd want to 1) Make sure you don't have a /site/config-dev.php overriding your /site/config.php; and 2) look at whether something is fishy or non-standard with the server paths. The good news is that debugging it doesn't need to go beyond your /index.php because PW is basically not able to load beyond that… the error is coming directly from /index.php.1 point
-
A way to handle this ( how i think could be managed, many options here). Extend the user template with the fields you need. Upon subscription, check is a user exists with email address and check its role. If user exists, update the data.1 point
-
Short answer: if it has to scale without a known limit use pages. Let's say a log module which saves pages with user login info you use pages since this might scale up to a large number. If you are creating a slider/carousel with a couple slides you can use a repeater. Also if you have to use the API extensively you better use pages since you can use selectors or PageArray to sort and filter data.1 point