Leaderboard
Popular Content
Showing content with the highest reputation on 10/26/2012 in all areas
-
Interesting topic, thanks for creating it Joshua. We have had similar talks since Drupal seems to be a platform that many organisations know in Finland. Big boys only talk about Drupal or Sharepoint. I have had my talks with our clients about "PW vs Drupal"... today I just do what Ryan once suggested: show them PW - build something quick, let them see how you develop with it and how quickly you can make things. You know you can build the whole backend of "events management" or "custom application never build before" in just about 30 minutes. Just build it. But if you do want talk about PW and Drupal, you should mention these things (I am by no means a Drupal expert and too lazy to check all the facts, so take this with grain salt and please do correct me if I am telling lies): Drupal release cycle is too fast for many. They try to get new major release every two year and only two latest are supported. Also major releases do break APIs, so probably most of the custom development need to be redone at least every four year. This might be fine on some projects, but for our clients that is usually an impossible schedule. It helps a little that new versions usually don't ship on time, though - and also some community efforts are trying to keep older versions secure. Ask people about their Drupal projects... most are not too proud of those: "This is little hacky" or "We didn't follow most of the best practices here, since we were in hurry". Those comments we got from the company, that we bought to teach us Drupal development and wanted them to show us their best work... Many people build sites with Drupal without really knowing how it works... which is understandable since it takes about 6 months to learn that beast (heard that 6 months estimate from CEO of biggest Drupal company in Finland and my initial feeling and personal experience suggest that it is pretty accurate). Drupal development is very different from normal PHP coding: If you (and your co-workers) have invested 6 months to "unlearn" PHP development and learned Drupal, you don't want to think about alternatives on that point. Drupal projects are expensive. In Finland ie. "The cost of Drupal web projects usually begins at about 20,000 euros, but projects best suited to Drupal generally cost more than 100,000 euros." (source: http://northpatrol.c...nal-products-2/). I usually draw a picture where PW is lots of tiny blocks, that cover 80% of needs and very little goes away. So you just build the remaining 20% and you get exactly what is needed. With Drupal (or any other "big" platform) you do get big block that goes well over 100%, but has more than 20% of holes. So you do have to build the remaining 20%, but also end up more than what is needed. So if you want to get rid of all the bloat, you do have more work to do. I have personally tried and wanted to learn Drupal for many many times. I always end up with big frustration and sites that were "nearly there". That was before PW, of course. EDIT: This was all very technical, so might want to talk this language only with tech orientated clients. With others, I would focus on PW admin usability and flexibility on frontend.4 points
-
Hey are there any drupal convert/devs in here? I have been having an ongoing discussion with a number of firms about Processwire. I am always pushing Processwire pretty hard. I feel like I can do anything with PW! Faster and more elegant than with any other CMS. What I notice is that most good size firms that I talk to are heavily invested in Drupal. Every discussion I have had with developers and stakeholders is the same. They say that Drupal is pretty much the only option for large websites and that it allows them to produce anything extremely fast with all the modules etc. that people have produced... that they never have to reinvent the wheel. My experience with Drupal is that it is extremely cumbersome, produces pretty much the worst output I have ever seen. Has a very poor user experience for managing/organizing and editing content. And makes you work 5 times harder. Granted, you can click a lot of buttons and produce views and get content on the screen... but it seems like so much extra work.. almost like you spend all your time trying to clean up the mess Drupal makes with endless overrides and pounds and pounds of HTML & CSS... gah.... It seems a lot like the way Wordpress works... "there is probably a plugin for that...." But I feel so frustrated with CMSs that have your functionality, workflow, and user experience predefined. I am so tired of fighting a CMS. That is exactly why I love PW... It's never in the way. Let's me work the way I do. Almost all of the larger business/organization websites that I come across are Drupal... So I don't want to be biased and hate on it, that's not my intention. So I guess I am looking for feedback from people who know... Is there really anything in Drupal you cannot do with PW? Is PW a capable platform for large scale websites? (I believe it is, but I am having trouble demonstrating it to people) Is it really less work and more efficient to implement advanced functionality with Drupal vs PW? Thanks in advance for any feedback and contributions to this discussion.3 points
-
I respect Drupal, but strongly dislike using and developing in it. This comes from a couple years of developing sites in it. The problems with Drupal have certainly been a motivation in making ProcessWire happen. Out of the box, ProcessWire is going to be a lot better at the large scale than Drupal. ProcessWire's architecture, foundation and API are far better than Drupal (captain obvious). People may use Drupal at large scale, but I don't believe the product itself was ever truly designed for it. Like with WordPress, being used at the large scale is something that happend to Drupal rather than something it made happen. Drupal is a pig that people have affixed wings to because there wasn't any other way to do it at the time. You see similar things happen with the other big platforms (WordPress, Joomla). As far as pigs go, Drupal is a good one. There are some things to respect (though not necessarily agree with) about Drupal's roots and the original thinking behind it. There's no doubt that it is far better than Joomla, for anyone that cares about this stuff. Beyond that, where it excels is in all the 3rd party stuff written for it, to do just about anything. It's a diesel-powered cuisinart in that respect… whatever you need to blend, it will blend… but it'll be messy. Working at large scale, 3rd parties have built all kinds of caching, CDN and load shifting things to throw on top the pile (and likewise with WordPress). Even a pig can fly if you strap wings on to it. And Drupal has a lot of folks thoroughly invested in it to the point where they are making that pig fly. Drupal is also such a household name that it represents a low-risk position for decision makers (low risk of job loss from choosing Drupal). None of this makes it a good product, just a safe one for people that don't know any better. But for people that do know the difference, we want a panther, not a pig.3 points
-
Hi Joshua I think you're right in that you can do anything with PW that you put your mind to. I've had the same experience you've had with clients wanting to use Drupal but with WordPress, and have vowed in another thread not to touch any more work that comes my way where the client wants to use it - it was just that unpleasant an experience last time I used it. The problem I find is when someone else has implemented a dozen plugins and you have to go into someone's work and find out where the issues are if something doesn't work as expected - you spend more time bug-hunting instead of developing. That said, a lot of it can be to do with familiarity of a platform. I've got no experience with Drupal and little with Wordpress, so I'm sure if the roles were reveresed I'd struggle a bit with ProcessWire at first, just maybe not as much as I have with other systems. It's just the frustration of forcing a system to do what you want when you know there's a quicker, better way for a given type of project that really puts me off using some other systems nowadays. With enough time I think you can achieve anything with ProcessWire. Whilst I've not built a site exceeding more than a few hundred pages yet, I have managed to integrate it with forum software and built a file repository. I've never found myself thinking I couldn't do anything with it - it's just a matter of working out how to do something rather than if you can. For one project I did have to do a little work to mock-up a small piece of a site to entice someone away from another system to ProcessWire and it worked, so one way to do this if you feel they're open to suggestion is to put together a small demo that's relevant to their content and show them how it could work out better for them. Of course, this has to take into account whether they're receptive in the first place, plus it's a case of weighing up the chance they'll switch against time when you're not earning money, but it comes back to the saying "a picture is worth a thousand words"... I think "a demo is worth a short novel" applies in this case It's always easier if you have time to show someone something than to try and describe the benefit. I'm also really excited about a lot of the modules that have been released recently - for example some members here are talking about some interesting things with regards to Antti's shop module that look amazing (had a quick peek at the example linked in this particular post and loving it: http://processwire.c...isa/#entry18784 ). I'd love to soon be able to use ProcessWire for any type of site because I believe it's flexible enough to fit pretty much any role.3 points
-
I'd say that thing is everything here is relative; They use Drupal, because they (the developers) probably invested huge amount of time into learning all the ins and outs and quirks of that system. Also, Drupal allows to do things fast…, but relatively compared to how long it takes to untrained person. And then, it really is fast afterall. That being said, there are two different ways I think about this whole 'Drupal can do big things': Some companies thinkg 'big' when they talk about hundreds of pages, which, when IA is done well, isn't really that much (even might be easy to navigate) Big part of these Drupal sites are membership sites, which I admittedly can't really imagine that easily being built on PW Regarding membership sites: Yeah, have registered members isn't really a problem. But having real membership/social site is a different thing, and Drupal has this already… take http://openatrium.com/ for instance. That said, I despise drupal, I think it's a behemoth, it's ugly, the HTML is horrible and if you need to debug/change the HTML, you can straight up kill yourself (since there is like 12 entry points where modules can change something, and not all of them are equal).2 points
-
Wow! Looks good. Here is my first (and surely incomplete) list with things that have to be changed, if the shop module should be ready for the german market: https://docs.google.com/document/d/1xsvQQboXQwnrvJ-fnkln--yZ255e5Y3PAIM4onMk6GU/edit Please feel free to add topics I forgot.2 points
-
Yes, that's what it does. to make it more clear, here is the complete code: <?php $formCode = <<<FORM <!-- Begin MailChimp Signup Form --> <div id="mc_embed_signup"> <form action="http://link here" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> <label for="mce-EMAIL">Subscribe to my mailing list</label> <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required> <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div> </form> </div> <!--End mc_embed_signup--> FORM; $body = str_replace("{{MCsignup}}", $formCode, $page->body); echo $body; ?> First we assign the form code to the variable $formCode using the heredoc sintax (look for it here http://php.net/manua...ypes.string.php to be aware of what it does and cautions to have while using it). Here I'm using <<<FORM and FORM; to delimit the code, but I could use any other word. Then we find the chosen shortcode inside the body field and replace it by the form code with str_replace(), and assign the result to $body. Finally we echo $body. The shortcode could also be anything like ##myform## or **signup**. Just make sure it's something you wouldn't use inadvertently in the text.2 points
-
If teppo's suggestion doesn't work & you do go down the route of writing some code to solve this & if you need to do more than one substitution then take a look at the TextformatterTagParser as that was written to help in such situations (but I think it would be overkill in this case.)2 points
-
I build simple textformatter to convert text like www.something.com or www.something.com/site/index.html into: <a href='http://www,something.com'>www.something.com</a> Please test and comment (my regexp skills aren't that great...). <?php class TextformatterConvertLinks extends Textformatter implements Module { public static function getModuleInfo() { return array( 'title' => 'Text links to anchors', 'version' => 100, 'summary' => "Convert text links like www.domain.com to hyperlinks", ); } public function format(&$str) { if(strpos($str, 'www.') !== false) { if(preg_match_all('#\s*(www\.\S+\.\w{2,4}(\.|\,|\s+|/\S*))#', $str, $matches)) { foreach($matches[0] as $key => $line) { $url = $matches[1][$key]; $endChar = ''; $lastChar = substr($url, -1); if ($lastChar === "." || $lastChar === ",") { $url = substr($url, 0, strlen($url) - 1); $endChar = $lastChar; } $str = str_replace($line, " <a href='http://". $url ."'>". trim($url) ."</a>{$endChar} ", $str); } } } } public function ___install() { } public function ___uninstall() { } }1 point
-
you can use the $page->passwordfield->match("somepasswordstring") function to compare hashs.1 point
-
1 point
-
thanks netcarver & diogo - it's working and so simple to implement with PW. this is what i ended up with: <?php if(!$session->noPop){ include("./popup.inc"); $session->noPop = 1; } ?> -marc1 point
-
1 point
-
You're right, sorry... I understood wrong and complicated the simple. Try this on the home template: if(!$session->noPop){ echo "POP!"; $session->noPop = 1; } edit: netcarver beat me to it1 point
-
Hmmm. Does this work?.. if($page->template == "home") { if($session->noPop){ // No popup }else{ // Go popup... // But don't do it next time... $session->noPop = true; } }1 point
-
Add new field, select "password" field and enter name.. Ahhh you mean so it get's used as a real password field with encryption? I don't think but should be possible to add functionality through a module? Edit: look normal so far, it works without anything!1 point
-
I've never seen a panther fly... but if they would it would be more elegantly than a pig for sure1 point
-
Loving this Luis - looked at the link and it's very nice indeed, good work I looked at the Google Doc too and ran it through Google Translate - I think pretty much all of that fits for the UK and probably most of the rest of the world too. Some countries have multiple tax classes just to make things interesting (Canada is one of them I think) so I would suggest that as Antti has done any further development of new features be really easy to extend or override where necessary (pretty obvious I know ). Keep up the good work as it would be amazing to eventually have a shop profile with the most common features already set up that can be installed with a blank PW site as a starting point for e-commerce sites.1 point
-
I like the idea of this, but one potential issue: not all URLs begin with 'www'. For instance, you can't access processwire.com from www.processwire.com (it'll redirect you). So the proper way to link processwire.com is just http://processwire.com. Another example would be http://store.di.net, which is something different from www.di.net. I think what would be better is to have it auto-link URLs that start with a http:// or https:// on the front. That way there's not much chance of it autolinking things that it shouldn't. The regex would have to check that the http:// doesn't have a quote or equals sign in front of it (indicating an already-linked URL). This could be done by checking to make sure the http:// is either at the beginning of the source string (no characters preceding http://) or the preceding character is [^\w"\'] meaning not a word character, a double quote, a single quote, or an equals sign. I think that could be placed in a lookbehind to avoid including the preceding character in the match. http://www.regular-expressions.info/lookaround.html -- edit: looks like the forum has troubles with it's URL matching1 point
-
Hi Soma, First of all, thanks for helping to build and support this module. This is my preferred way to build multilingual sites and I hope to use this module in a lot of projects. I am testing this module on two different installations. The first installation has just been upgraded from 2.2.0.1 to 2.2.9. It has quite a few modules installed. The second installation is a test site I am using to play with the module. I recently upgraded it from 2.2.6 to 2.2.9. It is a pretty clean install and only has one extra module installed - an AdminHotKeys plugin - not sure who developed that They both have the latest module LanguageLocalizedURL installed 0.1.0 Both are setup in the root folder. On my test installation I have just setup a very basic pagination example as shown here http://processwire.com/api/modules/markup-pager-nav/ $results = $pages->find("id>1, limit=10, sort=title"); echo $results->render(); and it also has the same issues. Let me know if you need further information.1 point
-
1 point
-
The TextformatterVideoEmbed module has been updated to support responsive embed codes. To enable, grab the latest version (v1.0.4) go to the module configuration screen and check the responsive box. Now when your videos are embedded, they will be output in a width-flexible format that adjusts to the container.1 point
-
Nevermind, I must be blind. The setting is in the images field setup on the input tab - the last field in the fieldset, "Max Image Dimensions".1 point
-
Very nice!! Have a look at this solution by Apeisa for responsive images. It would at least cut some weight on the images for small screens.1 point
-
As much information possible to reproduce would be helpful, because pagination works fine here with whatever code. More code, module settings, setup, versions, PW in a subfolder, other modules that does something on urls or pagination?1 point
-
Ok, found some time today so I published a first version of a basic ecommerce template. The Shop Plugin is fully implemented. Every content is PW driven. You got the possibility to mark a product as featured or as topseller to let them shown at the homepage. Also you could mark a brand and a category as featured, so they will be outputted aside the slider. Slider content is generated from pages. My focus was to implement the most common options and to give the user a base template to work on. Built on top of the Twitter Bootstrap Framework. Still working on it http://process.besser-landen.de/ Plz dont laugh about the brands1 point
-
That's more or less what I though you were trying to do - so I'm thinking it was me who wasn't clear enough then. Because of memory limitations you can't foreach through the whole 3000 page resultset in one go, just like you said in the first place. Instead you can loop through the very same 3000 pages, but in 500 page pieces. In a hurry, again. Not sure about the syntax and definitely not tested, but you'll get the idea: $start = 0; $limit = 500; do { // replace "..." with your actual selector $results = $pages->find("..., start=$start, limit=$limit"); foreach ($results as $resultPage) { // do you magic here, collect the results that match to another PageArray maybe? } // free some memory $pages->uncacheAll(); // advance to next set $start = $start + $limit; } while (count($results) > $limit); Hope this helps. There could be another variable to make sure the do-while doesn't get crazy, but I left that out for now.1 point
-
Hi folks. I've almost finished a site using this module, it works fantastic so far ;-) One thing I noticed AND solved (temporary): When enabling caching on templates, then the cache file gets generated only for the language of the first request. Switching between languages does not work anymore, always the same language is loaded. That make sense, because PW stores a cacheFile per ID. Solution: PageRender module in the method "getCacheFile", add after line 118: //Check the language if ($this->user->language->title != 'default') { $lang = $this->user->language->title; $lang = $this->sanitizer->pageName($lang); $secondaryID .= $lang; } This code adds a secondary Cache-ID per language resulting in a cache file per language. How to implement this correctly? I think the getCacheFile method should be hookable so this module can modify the returned CacheFile name.1 point
-
ProcessWire removes duplicates grouping results by page id thus giving only distinct pages as a result. So no need for a distinct there. That 3000 records shouldn't include any duplicates assuming it's a result from a single $pages->find() call. Solution would be to add more restricting selectors to the find itself. If that's not possible then pagination is the way to go. Add start and limit selectors to get records from 0-999 (start=0, limit=1000) and loop that increasing start by 1000 on every iteration until you've got less than 1000 result rows returned. This way you'll end up with less Page objects in memory at the same time. Something like 500-1000 rows at a time should be fine, but that depends on how heavy data you've got there. (Actually, only autojoin fields and the fields you're accessing do count here.) You may need to call $pages->uncacheAll() after every iteration to flush the previous iteration's Page objects from memory. No example at the moment, sorry, got to go for now.1 point
-
Thanks Ryan! Seems to be working here as well. Just had a quick test with those selectors mentioned above, nothing more than that though. Will let you know if anything comes up after trying this out in the actual scenario where there are a couple of more selectors involved too. That "LEFT JOIN ... WHERE xx IS NULL" -thingie is something I never seem to get right at once. But I'm glad you did.1 point
-
It should already be replacing the original page when you hit "publish", if it isn't, there's a bug! It was doing that fine in the original code before I made some changes based on Mindplay's suggestions. It now utilises a specific "preview" page to render unpublished pages where before the page just sat with its sibling (the original) and could be viewed like any other. It is essentially publishing a copy rather than overwriting so anything relating to existing page IDs will be corrupted (linked pages etc). I may revert the code back to it's original form and implement Ryan's "hidden" suggestion as it is a simpler and more elegant solution. Thanks for all the input, I'll get to work trying to sort all this out. Ryan - any pointers on overwriting the original page content rather than deleting original? Can I manually manipulate the ID? That way I could just copy but then update the ID to match the original, which seems like the fewest steps to the desired result.1 point
-
lucas, it looks like you didn't login after the initial install and there's something wrong with your DB credentials. Look near the end of the file site/config.php and make sure the $config->dbHost line really does point to the location of the MySQL server. Whilst using something like "localhost" works ok on some web hosts, I know it doesn't on mine and I have to make sure that this is the name of the correct db server.1 point
-
you can also use a special tag and php to insert it in the right spot. lets say you put {{MCsignup}} where you want the form inside the body field, and in your template do: $body = str_replace("{{MCsignup}}", $formCode, $page->body); echo $body; i'm on mobile and doing this by heart, so you should check the correct form of str_replace because i might have messed up the order1 point
-
Hi, I just rebuild my website using ProcessWire: http://nico.is/ Should be working on all major browsers (that excludes IE). Two things: - The "browsers" are build with pure CSS3 (not the arrows) - Have a look at the footer / Nico1 point
-
Thanks Ryan, the /.../.../ was inserted by me. Ok I think i'll have to take a closer look to what modules I have (there's lots) on my playground. Edit: Yeah recent experiments on a save hook I forgot about was the problem...1 point
-
arjen hinted you the solution. 1 Loop: You have a page field with multiple pages (array) so you need to loop them. 2 Loop: Each page has files so loop it and output them. $file_pages = $user->files_link; if (count($file_pages)) { foreach($file_pages as $file_page) { // loop pages! $files = $file_page->files; foreach ($files as $file) { // loop files! echo "<a href='$file->url'>$file->description</a>"; } } }1 point
-
Hey Antti, Not a theme (yet) - just a few CSS tweaks I made. Nico has seen it and keeps encouraging me to make a theme out of it.1 point
-
Thanks Ryan, I managed to sort this out by sticking with the repeater option, but instead of using a repeater as a singular method for date entry, I used it for "additional dates". That way, the majority of events are entered with a typical start/end date, but events with more complicated schedules can use the repeater. I set the ready fields to 2, that seems like a good place to start. I think this will be less confusing to the people entering events — at least I hope. See attached. (note: tweaked the admin via FieldSet to create 2 columns for calendar entry, I love how flexible PW is.)1 point
-
1 point
-
I'm interested in this too, and did some research. Looks like OAuth2 is going to be the simplest and most durable way to go? I looked at bunch of libraries, and being a minimalist, I clearly favor Phil Sturgeon's implementation, here: https://github.com/philsturgeon/codeigniter-oauth2 This is purely a client, which makes this library really thin and easy to reference for integration with ProcessWire. This is a CodeIgniter module, but seems to have very few dependencies on CI, and has already been independently ported to other frameworks by various people. For some reason it does not seem to have a Twitter provider. I don't know much about OAuth as such, but does Twitter not support OAuth2 yet maybe? There's an OAuth (1) version of the same library: https://github.com/philsturgeon/codeigniter-oauth This one does have the Twitter provider. I wonder why that is... I think the three critical providers are going to be Google, FaceBook and Twitter - those must be supported. If that means we have to stick with OAuth1, maybe that's the way to go... Thoughts?1 point
-
Yes plz send me the PDF. Didn´t took a look at the module yet. Mh, I will set up some space on my server and host a PW site there, so everyone could help/feedback. EDIT: Out of the box Processwire: http://process.besser-landen.de Ok lets start1 point
-
1 point
-
OK, after lots of research, this video has made my mind up for me Think the PW community needs to hire him1 point