Leaderboard
Popular Content
Showing content with the highest reputation on 02/13/2014 in all areas
-
I like this solution: $events1 = $pages->find("template=event, date>=today"); $events2 = $pages->find("template=event, date<=today, date_end>=today"); $events = $pages->find("id=$events1|$events2, sort=date, limit=15"); // now you can paginate $events6 points
-
I just installed it, and WOW! As an Expression Engine developer this latest visual upgrade make me feel even more at home in processes wire. I love the look of the new fields. I'm in heaven! getting much more user friendly. The new module manager is awesome! Big "thank you" to the theme development team.Joyful is how I feel setting up my first site in 2.4. Thanks.5 points
-
Bram, if you read a bit through the forum you'll see that this is all about writing code. If you don't want to use an oven to make bread, you will go to the bakery and buy it ready You can also buy an oven and learn how to use it of course. The pro backers at the forum will be there for you4 points
-
This is already old news to many of you here, but I finished writing up the full announcement today so figured I should post it (click the link below). Numerous upgrades and refinements make ProcessWire 2.4 our most friendly and powerful version yet! ProcessWire 2.4 is focused on listening to the feedback from of our users and answering with the best CMS experience for web designers/developers and their clients. Read the full announcement. For those upgrading from a previous version of ProcessWire, please read all of the upgrade instructions. Hope that you enjoy this new version! A huge thanks to Avoine for sponsoring the Field Dependencies feature new to ProcessWire 2.4!3 points
-
Hey guys, This is Fixate's second PW site - first one launched. It's for an orthodontics practice based in Johannesburg, South Africa. http://hugoorthodontics.com This site was built with an earlier version of our PW MVC Boilerplate on Github, with a discussion in the PW forums. Since abandoning WordPress for ProcessWire, we've never been happier with the flexibility in design and development! Thanks for an awesome product3 points
-
There's a couple threads about this. This is where my solutions are: https://gist.github.com/somatonic/5420536 Pagination module works only for a single find. You can set the start limit and total yourself to get a working pager, but you have to load all pages everytime. Means it works better for smaller amounts.3 points
-
So far it's running without issue on PHP 5.2.17. — of course it does. I'll keep a close eye on it over the next few weeks. Also, just spent some quality time exploring how the admin themes work as modules. So good!3 points
-
There aren't many tools I look forward to using every single day. PW has always been a joy to use and this release makes it even more so. Thanks Ryan and everyone who worked on this release!3 points
-
I tried with more than 5000 IDs and it worked (they were the same IDs repeated, but I don't think it makes a difference) Edit: With 8000 still works, but with short more than that it breaks Edit2: false alarm, it was a mistake in my code. With more than 25.000 IDs it takes long but still works. With much more than that it doesn't, but I'm guessing it's because of PHP time limit. Edit3: "Maximum execution time of 30 seconds exceeded"2 points
-
Tested and so far working fine in PHP 5.3.2. Not that I'd be against updating PHP (I'm not!) but it should still be noted that most GNU/Linux distros backport security updates to bundled PHP versions. At this particular server I'm, for an example, running PHP 5.3.2-1ubuntu4.22 -- so technically it's not same thing as "vanilla" PHP 5.3.2. As long as you're using PHP bundled with your distro and a distro that takes security seriously, you should be safe. As long as that particular distro version is supported, that is2 points
-
Hello and welcome! The line echo "<ul>$out</ul>"; should be outside the foreach. Like this: foreach($albums as $album){ $out .="<li><a href='{$album->url}'>{$album->title}</a></li>"; // <- not here } echo "<ul>$out</ul>"; // <- but here2 points
-
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.2 points
-
Not sure, but it looks to me like you're logging in with a user without any editing privileges. Is that possible?2 points
-
You'll want to test ahead of time, but I think it'll still work. There are some bugs and security issues in PHP 5.3 versions prior to 5.3.8, which are good reasons for nobody to use those versions. That's the main reason I set 5.3.8 as the minimum. But the reality is that it should still work fine in any 5.3. Chances are it would still work fine in 5.2 as well, but I want to take that monkey off our back so we can move forward.2 points
-
Ryan, Such great work! 2.4 feels like a massive leap forward. Your hard work is much appreciated. Many thanks to everyone who as contributed ideas, testing, code, sponsorship of development, etc.., etc... It's a joy to work in ProcessWire every day.2 points
-
Field dependencies are coming in ProcessWire 2.4, and I just wanted to give you guys a little preview of it. The development of this new feature is being sponsored by Avoine, the company where Antti works (he also specified how it should work). Field dependencies are basically just a way of saying that one field depends on another. It dictates which fields should be shown in a given context. In our case, it also gets into whether a field is required or not. This short video demonstrates how it works: (switch to the 720p and full screen version, as YouTube's default settings for this video make it impossible to see): // Edit @Adamkiss: Here's link for those on mobile: youtu.be/hqLs9YNYKMM The implementation here is done both client-side and server side. Javascript handles the showing/hiding of fields and the required vs. not required state changes. On the server side, it doesn't process any fields that aren't shown, and honors the required rules. A separate processing occurs both client side and server side, ensuring that the user can't make their own rules by manipulating the markup or post data. These field dependencies can be used with any Inputfield forms. That means you'll be able to use it not just in ProcessWire, but in FormBuilder, and via the API too. It's very simple to use from the API. All you have to do is specify a ProcessWire selector to either "showIf" or "requiredIf" to the Inputfield, and ProcessWire takes care of the rest: // show this field only if field 'subscribe' is checked $inputfield->showIf = "subscribe=1"; // show this field only if 'price > 0' and at least one category selected $inputfield->showIf = "price>0, categories.count>0"; // make this field required only if 'email' is populated $inputfield->required = true; $inputfield->requiredIf = "email!=''"; This feature will be in the 2.4 core (rather than as a separate module), so it will also be ready and available for things like module and field configuration screens.1 point
-
Hi folks! tonight i searched a tool for create an UML directly from the source code of PW. The result is a 9MB of PNG Enjoy it http://zoom.it/hT0q1 point
-
Welcome to ProcessWire gunter... Just to add on to what Adrian has said..., technically, there is no relationship between a template file and fields. There is a relationship between templates and fields. That's why you need to clarify your situation. If you want to change the template of a page (call it template 1), and the new template (template 2) you are changing to does not have the same fields that are in template 1, then PW will give you a warning: "Warning, changing the template will delete the following fields:". It will list the fields that will be deleted. If you click the checkbox "Are you sure? Please confirm that you understand the above by clicking the checkbox below." they will then be deleted...Other than that, template files are used by the user (technically instructed by the user) to grab what's in your fields and display the output to the browser1 point
-
1 point
-
@joe - that video is coming straight from YouTube - nothing fancy on our side. The nav glitches are definitely not intentional! Which browsers / devices did you get those results on? I see you're on Opera - I'm guessing Opera Mini, since Opera Mobile tests were all perfect. Opera Mini is a mysterious beast. We'd better take a look (seems like a weird stacking issue with the logo, which is bizarre considering the nav is in a completely different context). EDIT: the main wrapper is not shifting off-page - most likely some sort of issue with Opera Mini and CSS translate. Stacking is still bizarre, though. @diogo - ye, the dropdowns have bothered me a while. I'm iffy about not having a pointer on the link, but I agree, I think we need to remove the hover state at least. Haha, you don't want to know what went into making the illustrations on our site, and then getting them to work responsively! The response has been great, though, so well worth it. It does need a port to ProcessWire - but I'm terrified of touching those headers again O.o Thanks for the kind words, guys1 point
-
Nice, localization working fine and button is hidden in trash. I am using this small module on all projects, so thank you for your good work!1 point
-
Tried fixing everything. Have a look and please tell me if it's working: https://github.com/NicoKnoll/ProcessPageDelete1 point
-
That's also a nice solution by diogo. But will increase loading all pages even more along with memory.1 point
-
First one we can't tell without details 2nd: google this: site:processwire.com Maximum function nesting level of '100'1 point
-
A couple of posts that might help you out: http://processwire.com/talk/topic/3384-search-with-merged-pagearrays-pagination-not-working/?p=33360 http://processwire.com/talk/topic/4257-ordering-by-date-reversed-then-time-normal-order/?p=423651 point
-
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.)1 point
-
Check in your site/config.php $config->adminEmail = ''; It notifies on "fatal errors".... Make sure to test that the server environment can send emails, of course... Maybe there is a module about too? I can't remember..1 point
-
Then I suggest you really have a lot of reading to do bram. To be able to use ProcessWire, you need some understanding of PHP, CSS and HTML. jQuery is optional.1 point
-
$modules contains all the loaded modules, so you can foreach through that and echo the $module->name. This returns them in alphabetical order though, so I am not sure how to determine the order they are loaded. Not sure exactly what your requirements are, but if you want to know if a specific module has been loaded at a certain point in the code, this recent post might be helpful: http://processwire.com/talk/topic/5477-check-if-a-module-is-loaded/1 point
-
You lifesaver, that's right after exporting the profile I lost role permissions. Thank you very much.1 point
-
If you are worried about possible overwriting with users uploading at exactly the same time, perhaps you should consider uploading each user's files to a unique subfolder within the tmp_uploads folder. If the users are logged in users, rather than guests, you could name the subfolders based on the user's ID. If not, generate a unique name - lots of ways to do this in PHP. Anyway, just some ideas for you.1 point
-
The multi-language support is simply mind-blowing in 2.4. I've just tried it on a new site this week, and it just works out of the box.1 point
-
Many thanks Ryan and all the contributors to make ProcessWire even more amazing.1 point
-
hey renobird, I'm not sure if someone including Ryan could give a proper answer to that, but searching for enhancements with PHP 5.3.8 or looking only to the fixes between 5.3.3 and 5.3.8 http://php.net/releases/5_3_4.php http://php.net/releases/5_3_5.php http://php.net/releases/5_3_6.php http://php.net/releases/5_3_7.php http://php.net/releases/5_3_8.php are good points to rethink about upgrading PHP. Otherwise you just have to try, I think. EDIT: Ok, while writing my answer, Ryans answer came in, and he can give a proper answer! (I haven't thought)1 point
-
bbeer, I was in a hurry and didn't explain something. You don't have to use the IDs in this case. Same thing could be achived by: $parents = $page !== $page->get('/holidays/') ? $page : $page->children; and, in the selector; $reisen = $page->find("parent=$parents, sort=reise_abfahrt"); Just for reference1 point
-
1 point
-
Great work Ryan! I've already been using the new stuff for a while now but reading this announcement reminds me of how much actually changed or has been added since 2.3 stable. And all for the good. Awesome.1 point
-
Ryan, thank you so much for your titanic efforts in pushing PW forward and making it a true top-notch CMS. I'm afraid, my evening leisure time is now, how they say on Bloomberg, "officially compromised". Congratulations, everybody!1 point
-
Thanks for ProcessWire. The new admin theme really makes it feel years ahead of the old version and the new API features and little improvements are great. Maybe you can update and extend the Roadmap?1 point
-
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}");1 point
-
Nice work mvdesign, I like the concept here. It's similar to something I'm working on at the moment (I'm switching it to PW 2.4 admin concept so I've delayed its release until it's done).1 point
-
Thanks for all your tips, for anyone also looking for a solution int he future ill describe what I did: I created a wrapper called tags and a new template tag. In the template I made 2 fields, title and page (A single page array) Then I created a searchbox and the following code: if($input->post->submit){ //form has been submitted; $tag = str_replace(',','|', $input->post->tag_search); $results = $pages->find("template=tag, tag=$tag"); } This is for searching on multiple tags.. This works like a charm and it is very, very flexible! Thanks everyone for your time & help!1 point
-
Actually class_exists() should work, but WillyC missed an important part. ProcessWire doesn't include module files that aren't autoload unless some information about them is requested, like $modules->getModuleInfo("className"), or the like. In the same manner, a class_exists("className"); call triggers the autoload mechanism and causes the file to be loaded. But you can prevent that by specifying false as argument 2 to class_exists(): if(!class_exists("ModuleName", false)) { // module is not loaded }1 point
-
1 point
-
Since we are at it, here is one more website we built with PW—this one for a Chauffeur Service in the UK—and launched already some time ago (we were too busy building our own website, and forgot to post it here ). http://www.signaturevip.co.uk/ http://www.milktop.co.uk/projects/signature-vip-chauffeur-service/1 point
-
THen there's this $a->setTotal() $a->setLimit() $a->setStart() on page arrays we can use to configure built in MarkupPagerNav to work with merged page array in memory. Kind same as my above example but much simpler. /** * here is a example with using the built in pager * we can use $a->setTotal($n) to configure page array to work with pager */ // create new page array for storing pages $pa = new PageArray(); $res1 = $pages->find("template=mytemplate"); $res2 = $pages->find("template=house"); // import the found pages $pa->import($res1); $pa->import($res2); // configuration for pagination needed $limit = 10; $total = $pa->count(); $start = ($input->pageNum-1)*$limit; // example output with limited list we filter from the complete page array foreach($pa->filter("sort=-created, limit=$limit, start=$start") as $p){ echo "<p>$p->title</p>"; } // page array let's you set the parameters for pagination manually $pa->setLimit($limit); $pa->setTotal($total); $pa->setStart($start); // now the renderPager() on the page array works as usual echo $pa->renderPager(); Added this to the previous gist snippet here https://gist.github.com/somatonic/5420536#file-paginator_manual-php1 point
-
Greetings, Funny you ask this, because I have recently been thinking about how complex my bookmarks have become in Firefox. I am always organizing them. It's worth the effort, but I would be glad to hear about systems people use to better organize and use their bookmarks! Below is a screen shot of my bookmark folders in Firefox, which are arranged alphabetically. Sorry, the shot gets cut off at "u"! And this doesn't even show all the sub-folders! Thanks, Matthew1 point
-
book ams.i writng also good for all in.deph and comperhansive.topkicks for.it begnner and.master pw user1 point
-
$value = $pages->find( "title%=$q" ); $pa->import( $pages->find( "template=abc, …|…|…=$value" ) ); $pa->import( $pages->find( "template=abc, title%=$q" ) ); What should that do? You have to explaing a little more for a short minded like me. I have an example that shows how to construct your own pager using the PW PagerNav class: // include paginator class require_once($config->paths->MarkupPagerNav . "PagerNav.php"); $pa = new PageArray(); $res1 = $pages->find("template=xyz, title%=space"); $res2 = $pages->find("template=abc, title%=hal"); $pa->import($res1); $pa->import($res2); // config paginator $baseUrl = $page->url; $limit = 4; $start = ($input->pageNum - 1) * $limit; $total = $pa->getTotal(); $pagerNav = new PagerNav($total, $limit, $input->pageNum); $pager = $pagerNav->getPager(); // construct paginator markup foreach($pager as $link) { if($link->pageNum == $input->pageNum) $class .= "on"; if($link->type == "separator") $item = '…'; else $item = "<a class='$class' href='{$baseUrl}page{$link->pageNum}/'>$link->label</a>"; $pagerMarkup .= "<li>$item</li>"; } // output paginator markup echo "<ul class='pager'>" . $pagerMarkup . "</ul>"; echo "total: $total<br/>"; echo "start: $start<br/>"; echo "limit: $limit<br/>"; echo "<ul>"; foreach($pa->find("start=$start, limit=$limit") as $p){ echo "<li>$p->title</li>"; } echo "</ul>"; Also in my ever growing gist examples https://gist.github.com/somatonic/54205361 point
-
Hi Aren I haven't used EE so I can't help you "translate" However, I will just deal with the slideshow for the moment. I will assume that the slideshow is just an image for the moment. You can do this with just one field - create a new field using the Images type. Call it slide_images (or anything) You can set that field to upload as many images as you like. It also comes with a description field which you can use for a basic caption. Add it to a template. The images field will return an array of the images. So, in the template file do: <?php foreach($page->slide_images as $image) { ?> <img src="<?php echo $image->url; ?>" /> <p><?php echo $image->description; ?></p> <?php } ?> That will return all your images - all you need to do is to make that work with your favourite slider! If you want a much more complicated system, you can use "repeater" fields, which is a way of grouping fields together and repeating them in the form, and also the Thumbnails module, which is an alternative image field (crop-image) that allows you to create whatever thumbnails you want while uploading image. http://modules.processwire.com/modules/fieldtype-crop-image/ http://modules.processwire.com/modules/fieldtype-repeater/ Joss1 point