Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/09/2013 in all areas

  1. Hi netzartist – welcome to the world of Pw! Don't use repeater fields for multiple images. You achieve the same with the "Image" Fieldtype by setting maximum files = 0. This way you can upload and store multiple images with descriptions. You can do these steps: - Remove the repeater from your template - Change the "maxiumum files allowed" of your images field to 0 - Add the image field to your template - Upload multiple images Then your code needs minor changes: foreach($page->children as $news_item) { ... //images is the name of the Image Field if (count($news_item->images)>0) { foreach ($news_item->images as $image) { <?= $image->width(250)->url; ?> <img src="<?= $image->width(250)->url; ?>" width="250" alt="" title="<?= $image->description ?>" /> } } } Here's why your code didn't work: foreach ($news_item->image_repeater as $image) { //$image is not yet your image field, it is an "Item" of your repeater which can contain multiple fields } //This would work, but if you only need multiple images, don't use a repeater foreach ($news_item->image_repeater as $item) { $image = $item->image; //... }
    2 points
  2. One addition to the code Wanze provided: when using urlSegments it is highly recommended to throw 404 when urlSegment is invalid. So in that case: $home = true; if ($input->urlSegment1) { $category = $sanitizer->selectorValue($input->urlSegment1); $c = $pages->get("name={$category}"); if ($c->id) { echo $c->render(); $home = false; } else { throw new Wire404Exception(); } } if ($home) { //Do your homepage stuff... }
    2 points
  3. jQuery 1.9 wouldn't work I think out of the box for many jQuery code in PW or modules, as it doesn't have .live(), .browser() and possibly some others. At least I know some that use live, and the admin theme main.js uses .browser() to block for IE7 browsers. Other than that I think at some point we can update and encourage module developers to check their modules and make js code 1.9 friendly.
    2 points
  4. I was originally thinking it would be something fairly simple where you could just swap out the files from the default profile with new files, and have it ready to go. And that would be plenty useful. But it would probably be better to go further and try to account for most of the elements. At least, I think this would be more useful to people that want to literally use it to build a site from. So it would be nice to have more than what's currently with the default profile... like a template that uses the slideshow (or ability for any template to use it), a contact form, ability to use the various list styles and menus/button bars, tables, captions with images, icons, etc. (we'll need Soma's expertise with configuring TinyMCE for some of this). All the while keeping the layout and look simple and generic enough that someone could also easily build from it as a base. How about you handle the front end and I'll handle the back end? Let me know if that's of interest, or if you have other ideas? Perhaps some of this overlaps with your plans for HTML KickStart too? If we were to collaborate on this, it seems like it would be not just another profile but more likely one to replace the default profile included with ProcessWire (which is in need of replacement). Though I do think it's important that the next default profile be a little more mobile-friendly than the current one is. Anything that takes the default profile further also means we should include a second "blank" profile with PW (which we don't currently do, but I think we should). I was also excited to hear about your plans for HTML KickStart. Thanks for the shoutout too.
    2 points
  5. Flourish for ProcessWire v0.9.0 ProcessWire wrapper around the great http://flourishlib.com'>unframework Flourish. This module has the same version as the framework, so whenever update happens, your http://modules.processwire.com/modules/modules-manager/'>Modules Manager will pick up new version and update the framework to latest version (if you're into that!). Happy hacking. Note: You should checkout the short module's code to see what I consider to be the cleanest approach on how to include other libraries/frameworks into your PW websites. Github: https://github.com/adamkiss/LibFlourish Modules directory: http://modules.processwire.com/modules/lib-flourish/
    1 point
  6. Thanks Adam, this couldn't have come at a better time for something I'm working on. Sometimes I feel like I've got a team of developers working in the same room as me, and other times like this I feel like you're reading my mind. GET OUT OF MY HEAD! *puts on tinfoil hat*
    1 point
  7. Hi all.. this is my first post in this forum, so I'm a bit nervous I've been dabbling with XML before, and the only decent alternative I found to Altova's XMLSpy is Oxygen (http://www.oxygenxml.com/), available on OSX too. Also, I remember there's a feature in the LibXML2 libraries included in PHP called pull parsing, that could be useful to handle big files. I haven't the need to work with it, but seems useful (http://www.ibm.com/developerworks/xml/library/x-pullparsingphp/index.html) Hope it helps.
    1 point
  8. Thanks, great - so no need to change it in the module itself.
    1 point
  9. doolak, you can adjust these settings in the config of the Module "InputfieldPagename". There I have changed mine
    1 point
  10. Whoohoo, first answer 10 minutes after posting, that's really fast And it works now, many thanks for your explanation. Once again I have the feeling that I think more complicated about an issue than PW
    1 point
  11. I was always working with windows, started with 98 - ME- 2000 - XP - Vista - Win7, I know them all I'm a Mac user since November 2010 when I started working as web-developper and needed a Mac. I remember my first problem: Damn, why can't I right-click in a folder and create a new file this way? Create every file from the editor? I hated finder (still think its not a great Explorer). On windows I was working with PsPad Editor, a free editor with Syntax highlighting for all + built in FTP. On Mac, there wasn't a free tool that could do the same Nowadays, I feel very comfortable on Mac, but I agree with apeisa: Win7 is a great Os.
    1 point
  12. This might be a dumb question, but... couldn't you just overlap? Pull the last 30 minutes, even if you only need 15. And then skip over any you've already processed?
    1 point
  13. Thanks for the testing JeffS. Glad to hear all is going smoothly so far. I would open a new thread... but don't really know how to do that and move these messages there. If I figure it out, I'll do it. I like staying on top of the latest jQuery, but the reality is they are prone to changing their API and breaking things in every major version. I think it's better to let those versions marinate for awhile in a dev branch before making them part of stable. So I'll update to 1.9 in the dev branch once we get 2.3 out there.
    1 point
  14. If dealing with potential large quantities of pages, a fairly efficient way to check if the page has visible children: if($page->child->id) { // page has children } else { // page has no children // or you are paginating and none are left } If you are going to be using $page->children either way, then it's better just to use it the way you are though. If pagination is involved (whether with the children or something else), then it's better to $page->children->getTotal(); to eliminate the possibility of count() returning 0 due to being at the end of a pagination set.
    1 point
  15. Yeah, that is pretty common cause of frustration for mac fellows. If you would use it daily, you wouldn't notice updates. I have been using Win7 few years now (prettty much got it when it was released) and it is hard to find anything bad from it. Very solid OS in my opinion. I am too lazy to learn new tools, when all I need are browser, editor and local lamp.
    1 point
  16. True words. Every time I do this, I have to wait 2 hours till the 175 updates are installed
    1 point
  17. Yep that belongs to the template file itself. But when you change for example fields like title, body, images etc in ProcessWire, Smarty doesn't know. You won't see the changes on your website until the cache time is up.
    1 point
  18. Lauri, this might help: http://stackoverflow.com/questions/1676688/php-mysql-connection-not-working-2002-no-such-file-or-directory See also the comments on approved answer. PW uses mysqli.
    1 point
  19. Yeeee Haw!!!! By George I think you've done it! Thanks Soma
    1 point
  20. Watch out for the nav2 malware just updated the gist...
    1 point
  21. @Jennifer S Take a look at this thread in the forums. Short answer is yes you could. Take a look at the API for repeaters and selectors.
    1 point
  22. Here's a solution that should work: Enable urlSegments on the homepage template, then in the home-template you need some logic to handle the segments: $home = true; if ($input->urlSegment1) { $category = $sanitizer->selectorValue($input->urlSegment1); $c = $pages->get("name={$category}"); if ($c->id) { echo $c->render(); $home = false; } } if ($home) { //Do your homepage stuff... } You need to create the links to the categories yourself.
    1 point
  23. Install - ProcessWire 2.3 dev Host: Ubuntu server - SMP - 12.04.2 LTS Apache Server: 2.2.22 PHP: 5.3.10 with suhosin patch MySQL: 5.5.29 Install success Admin console functional. Site pages loading fine (default profile). Added image to page , modified page content, installed optional modules. All ok so far.
    1 point
  24. Ryan, I ended up just moving the site over to our Rackspace server. It works perfectly well there. Without getting too technical, I think it was a combination of the PHP version, Magic Quotes, and an issue where the php.ini / htaccess methods of turning off Magic Quotes was somehow not allowed by the server. I don't think that you have to worry about this as being a bug that needs to be fixed, I think it was an unreasonable server configuration issue.
    1 point
  25. Install - ProcessWire 2.3 dev Host: OSX 10.7.5 Apache Server: 2.2.22 PHP: 5.3.14 with APC 3.19 MySQL: 5.5.25 Install success Admin console functional. Site pages loading fine (default profile). No other tests done.
    1 point
  26. WHAT IS THIS SPAMFEST?!?!?! Yeah, yeah… joker
    1 point
  27. I don't have access to a Windows machine at the moment, so was kind of limited on tools. Found a couple others, but they couldn't handle the file size. I tried a few more browser plugins and found one that worked nicely. A Chrome extension called XV seems to do alright with the XML file. It does take about 5 or so minutes to load this large XML file, but once loaded, it works pretty well as an XML browser. I'm feeling lucky--PHP's simplexml loads the file in about 5 seconds and has no problem parsing it. Somebody must have done something right with PHP's simplexml.
    1 point
  28. Hi Ryan, I have an existing site, but also wanted to setup a blog profile site. I'll try and setup a fresh install for starters, it might not be until tomorrow morning sometime that I get a chance to do that. I have an install I could upgrade also, but... Problem there is it will be awfully early, if I get to an upgrade to go clear through to item #6 I'm not a good daytime drinker, lol. My current install says, this for version number at the bottom (2.2.9), that would look to be newer, but it can't be. I've had installed for a few weeks.
    1 point
  29. Hey Ryan, Very exciting to think of 2.3 becoming the official version soon! Over the next day or so, I will run the installation and upgrade steps you describe. I have some test sites running ProcessWire, which are good for this. Looking forward to what happens next. Thanks for all your amazing work, Matthew
    1 point
  30. That's the point! Moreover, you don't give a hammer to a 2-year old and let him loose on your furniture Or to use another analogy, we're currently giving the client a full workshop, when maybe all he needs is a couple of tools. "With great power comes great responsibility", and so on - your clients probably aren't web designers or web developers, if they were, they wouldn't need you. And I would add to this growing list of arguments: WYSIWYG is probably the most common component in any and all CMS - it's the one tool that the client (most commonly) uses to edit the majority of the content on their sites. What I mean is, the majority of user-managed content in any CMS, is probably input via WYSIWYG. Yet, it's one of the most neglected features of any CMS - for the most part, we just pick an existing WYSIWYG and drop it in, with some configuration, or some minimal CMS-specific extensions for uploading/images, etc. I think we can do better than this? @ryan I skimmed through your article, and basically, it looks like you've had many of the same thoughts I'm having. WYSIWYG has been around for so long, it's hard to challenge it. WYSIWYM failed. Markdown (et al) found other niche uses, but couldn't replace WYSIWYG either. I have attempted at least 3 different things in the past, none of which were adequate. I can't seem to let the idea go though - there must be a better way. By the way, the idea I'm hatching is actually a variety of WYSIWYG - I'm not saying a content editor shouldn't show you what you get, I definitely think it needs to do that, for clients to understand and connect with what they're creating. I'm saying a content editor can be richer, more structured, and more user-friendly - it should be able to drive meaningful decisions, produce beautiful, consistent output, and, well, all the shit you don't get from an HTML WYSIWYG
    1 point
  31. New version uploaded! Solved some of the major headaches and changed the look and feel a little. PLUS - Updated to Bootstrap 2.3 https://github.com/jsanglier/Bootwire-Admin EDIT Had to roll back the JS of Bootstrap as there seemed to be something odd going on with (possibly) the JQuery installed in PW. It might need 1.9+ Of course, the only affect was the Modal Save and Cancel buttons that have plagued me previously - typical!
    1 point
  32. Ryan, you mean this one? http://processwire.com/talk/topic/2311-processwire-on-the-web
    1 point
  33. Just launched this site a few minutes ago. It's not totally done, as I've still got some detail work to do, but figured it was at a good point to share: http://www.houghtonacademy.org I did the design and development on this one. Like the blog profile, this one uses the Skeleton responsive CSS framework. Though I went a lot further with the media queries on the mobile side than I did for the blog profile. So you should see a nicely optimized layouts for tablets, mobile portrait and mobile landscape. So far only tested on iPhone though. Many of the graphics (though not all) are also optimized for Retina displays. When you get to the homepage, you should get a different photo and tagline on every page load. Highlights (in terms of ProcessWire development): Faculty Directory: http://houghtonacade.../about/faculty/ The data for the faculty directory is updated once daily and it pulls from a service called Veracross, that manages all their school systems. They are all represented as pages in ProcessWire, so the client can add unique biographies and such that aren't present in the service it pulls from. Form Builder is used throughout the faculty directory to power the individual employee contact forms. Events Calendar: http://houghtonacade.../news/calendar/ The events calendar uses jQuery plugin FullCalendar and it pulls from a ProcessWire-powered JSON feed. ProcessWire gets the data from a Veracross feed a few times a day, caches it, and creates a new feed specific to use with FullCalendar. The events data is also used on other pages in the site, such as the homepage. Photo galleries: http://houghtonacade...f/photogallery/ There are several photo galleries throughout the site, and they use the Photoswipe jQuery plugin, which is really great when using mobile as it duplicates the behavior of using the built-in iPhone photo gallery. Thanks to Soma for recommending this back in another thread. Video pages: http://houghtonacade...out/headmaster/ These are powered using the TextformatterVideoEmbed module and are responsive (per the latest update to this module).
    1 point
  34. And that does it. When I look at it now it seems obvious. I have more things to learn, but definitely worth it. The speed of this CMS is simply amazing, well done everyone!
    1 point
  35. So simple! I am used to overcomplicate things thanks to my experiences with other CMS's. Thanks.
    1 point
  36. Thanks, it is obvious now Decision has been made, I will do my new magazine website with ProcessWire, great response from the community made my decision easier. Two things left to try: how to handle tags/categories (is autocomplete available as an option anywhere), and how to handle PDF downloads (just as file attachments to posts, with possible access control). Anyone had any experience in transferring large Drupal site?
    1 point
  37. Without SQL you could do it with simple bootstrap or in a template: foreach($pages->find("template=basic-page") as $p){ $p->body = str_replace("/newsite/","/",$p->body); $p->save(); }
    1 point
  38. I've actually got a lot of updates coming for the PageLinkAbstractor module that I was working on in the last couple weeks. Beyond what it was doing before, it now also keeps track of links to deleted pages and deleted images or files. When it detects a broken link, it logs it and optionally emails you about it. It also keeps an alert at the top of the admin screen telling you about it with a link where you can go review it. Once you fix the broken links, it detects they've been fixed and clears the log of fixed errors. Here's a couple of scenarios that it covers: 1. Page /about/ links to /products/widget/ in the bodycopy (TinyMCE) field. The /products/widget/ page gets moved to the trash or deleted. Since /products/widget/ is gone (or at least, not accessible to anyone) the link is broken. 2. Page /about/ has a photo embedded in the bodycopy (TinyMCE) from the /events/bbq-fest/ page. That photo gets deleted from the /events/bbq-fest/ page, which causes a broken image to appear on the /about/ page. Both of those errors would be automatically detected, logged, and emailed to you, so that you can fix them. It's keeping track of this stuff so that internal broken links don't ever get to persist. With these additions, the module is also being renamed to LinkMonitor, LinkNotifier or LinkPolice (still deciding), as I think PageLinkAbstractor is just a bit too technical sounding.
    1 point
×
×
  • Create New...