Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/06/2014 in all areas

  1. Hello guys, long time listener, first time caller (or something like that) Night Attack is the new independant version of the NSFW show podcast hosted by Brian Brushwood and Justin Robert Young. And I'm sure you'll all be happy to hear it's powered by ProccessWire. The quick feature list: Processwire 2.4.0, nginx + php 5.5.9 with cloudflare in the front Includes 3 different quality podcast feeds (all based on the data on episode pages) Uses the alternate template filename for render, wrapper has this at the top: // Get the page content ob_start(); include "{$page->template}.php"; $content = ob_get_clean(); and then content is output with <?= $content; ?>. This way the templates can even be just html Made in less than a week (might had started 4~5 days before going live, can't remember) Modules: AIOM+, Page Edit Soft Lock, Piwik Analytics and a custom module to ensure rss feeds have correct content type when cached I mainly focused on the code side while the design was done by sebgonz.
    5 points
  2. There's also a way to add day to page on the fly. foreach($result as $res){ $res->day = strftime("%d",$res->getUnformatted("date")); } $results->sort("day");
    5 points
  3. Further down the rabbit hole…. A function for responsive (retina) slideshows using Filament Group's responsive carousel and picturefill function slideshow(){ $page = wire('page'); // Resposive Carousel from Filament Group // https://github.com/filamentgroup/responsive-carousel $out = "<div class='carousel arrows' data-paginate data-autoplay data-interval='8000'>"; foreach ($page->images as $image){ // create required images sizes (based on 16:9 aspect ratio) //large $large = $image->size(920,518); $large_2x = $image->size(1840,1036,array('quality' => 25)); //medium $medium = $image->size(720,405); $medium_2x = $image->size(1440,810,array('quality' => 25)); //small $small = $image->size(540,304); $small_2x = $image->size(1080,604,array('quality' => 25)); //extra small $xsmall = $image->size(300,169); $xsmall_2x = $image->size(600,338,array('quality' => 25)); // serve 2x thumb to all devices $thumb = $image->size(200,106,array('quality' => 50)); $out .= "<div data-thumb='{$thumb->url}'>"; $out .= "<span data-picture data-alt='{$image->description}'>"; // extra small $out .= "<span data-src='{$xsmall->url}'></span>"; $out .= "<span data-src='{$xsmall_2x->url}' data-media='(max-width: 399px) and (min-device-pixel-ratio: 2.0)'> </span>"; //small $out .= "<span data-src='{$small->url}' data-media='(min-width: 400px)'></span>"; $out .= "<span data-src='{$small_2x->url}' data-media='(min-width: 400px) and (min-device-pixel-ratio: 2.0)'></span>"; // medium $out .= "<span data-src='{$medium->url}' data-media='(min-width: 800px)'></span>"; $out .= "<span data-src='{$medium_2x->url}' data-media='(min-width: 800px) and (min-device-pixel-ratio: 2.0)'></span>"; // large $out .= "<span data-src='{$large->url}' data-media='(min-width: 1000px)'></span>"; $out .= "<span data-src='{$large_2x->url}' data-media='(min-width: 1000px) and (min-device-pixel-ratio: 2.0)'></span>"; // Internet Explorer 8 and older have no support for CSS3 Media Queries // serve large image to older version of IE desktop. $out .= "<!--[if (lt IE 9) & (!IEMobile)]>"; $out .= "<span data-src='{$large->url}'></span>"; $out .= "<![endif]-->"; // Fallback content for non-JS browsers. Same img src as the initial, unqualified source element. $out .= "<noscript>"; $out .= "<img src='{$large->url}' alt='{$image->description}'/>"; $out .= "</noscript>"; $out .= "</span>"; // end picturefill // use image description field to generate a caption $out .= $image->description ? "<div class='caption'>{$image->description}</div>" : ""; $out .= "</div>"; // end slide } $out .= "</div>"; // end carousel return $out; } In your template <?php // render slideshow if there are images if (count($page->images) > 0){ echo slideshow(); } ?> *gah, formatting got a little mangled in the forum. You get the idea.
    4 points
  4. $array = json_decode($jsonstring)
    3 points
  5. We have this already http://modules.processwire.com/modules/service-pages/
    3 points
  6. We used to get this at the studios where one client would tell another client that they could act as producer, effectively cutting us out - it happened a few times. Every time it happened, however, the final result was dreadful, but still there was little or nothing we could do about it, other than refuse future business. But in a competitive world, that does not amount to much. As for your ex client - this is rather common with Wordpress in particular, but honest people will at least put "template by...." at the bottom. In my old job (films and productions) it was expected that everyone involved would get a credit, programme space allowing. The longer the list of credits, the more professional it looks, to be honest, though that does not work so well in the purely corporate environment where space/time is at a premium and the client has legitimate worries about diluting messages. The best version of false claiming of credit I ever came across was a turkish voice over who recorded a voice for a corporate video with a colleague of mine. Because the colleague was a little new to the job, I had a quick listen and was very surprised to hear a bit of extra voice over at the end which had no matching original English. A quick check with another voice over and we confirmed that the Turkish chap had given him self an audio credit for writing and producing the video (which he hadn't) and even gave out his phone number. Needless to say, he never worked again in the very lucrative foreign voice over field - it is a very small part of the industry and the story did get round pretty quickly. (Having a secretary with a drink problem and who could not keep her mouth shut had its advantages!)
    2 points
  7. Hi SadlyMistaken....I am sorry that you are "sadly mistaken" about two things [sorry, I couldn't resist!] : You are not disturbing me and you shouldn't apologise - you are too kind! The module is not RIP - it is a bit dormant though.....but we will get back to it sometime. Wanze (see posts above) and I who were working on this are currently very much occupied and haven't had much time to give some love to this module. Hopefully this will change soon. Meanwhile, you can have a look at the helper class on Wanze's Github. Currently, there is no Admin interface for the module. This alpha version is primarily for developers. Eventually, an Admin UI (Process Module) will follow... Cheers /k
    2 points
  8. Exactly what I've been doing too. Too lazy to go through install routine, I guess..
    2 points
  9. @NikNak, i think all of the things you are mentioning are definitely doable in PW; For subscriptions, you might want to take a look at Foxycart, it's an ecommerce system by has quite advanced subscription features, in addition to being a full-fledged cart solution; i've integrated into 2 PW sites so far and working on a 3rd. i think also the mandrill thing would be easy as far as sending out email from processwire (using the new wireMail for smtp) but as far as sending out automated emails like announcements, newsletters, you might need to consider a solution like Sendy it's like having your own mail delivery service and uses Amazon SES
    2 points
  10. I read this yday and didn't get it. I have re-read it today and still don't get it fully. Why would you add a pagefield (the reference to the image) on the tag template? Shouldn't it be the other way round? You tag images not "image tags" if that makes sense. So, I would do it this way: 1. Tag templates - 1 field only = title [the tag, e.g. Oz] 2. Images templates - 3 fields (at least) - title; image and multiple pagefield for the tags In the selector, all I need is to $pages->find("template=images");//Here's your array. It includes page references to the tag pages associated with each image page... Of course, you can filter further in the selector, e.g. find only images tagged with Oz. This sounds too basic....so I feel like I am missing something here and you are actually after something else
    2 points
  11. The easiest way is by infected third-party applications. Also on Bower or Composer, its possible, that compromised packages can be delivered. I have currently identified no scenario targeted at Process Wire, rather it is one of my personal programming rules. Just do not make it possible. Asset files belong in the template folder. This approach I have always in development, regardless of platform or environment. I have some clients who work with sensitive data, and the safety requirements are very high. Therefore, this is my natural data schizophrenia.
    2 points
  12. a more feature rich solution: http://mobiledetect.net
    2 points
  13. Another approach would be to have a duplicate of your template folder where you use diffferent code inside your templates. I use this a lot for development in a live site, but its an easy solution to use it for a mobile website too. When your normal site is finished (or while developing) make a duplicate of the template folder and name it "templates-mobile". The goal here is to have exactly the same template files in both folders. Paste the following code at the bottom of the /site/config.php file and change the m.domain.ext to your needs if($_SERVER['HTTP_HOST'] == 'm.domain.ext') { $config->urls->templates = '/site/templates-mobile/'; $config->paths->templates = $rootPath . $config->urls->templates; } This way when you visit your website on m.domain.ext it will use the templates out of the templates-mobile folder while it still uses the same data from the database, assets folder and the modules.
    2 points
  14. We've just implemented a voting functionality for a site which is currently under heavy development (i'll post it here, soon). Users can send in Videos/Photos and win prizes. Every entry can be voted. The way we've done it is like this: - Users can vote via FB and Twitter without any further authentication (social network id, origin + timestamp stored in db) - Users can Vote with their E-Mail Adresses. To avoid fake votes they can vote for as much entrys as they want but their votes aren't counted until they click a link in an opt-in mail. After the adress is validated they are handled the same as twitter/fb users. E-Mails Adresses are Checked against a list of disposable/trash-mail services before storing them (E-Mail Users got a seperate table with a is_confirmed flag) We've also discussed using a service like https://www.rafflecopter.com/ or http://www.voycer.biz/en to use their (very cool) social voting features (tweet to win...) but most of them are either created explicitly for raffles that are based on a single question/item or just support facebook as sign-on mechanism.
    2 points
  15. Lots of people have been asking for a way for ProcessWire to support sending of email, outside of just using PHP's mail() function. I haven't really wanted to expand the scope of ProcessWire that deep into email sending, but I have been wanting to setup a way so that people could override how emails are sent, with modules. For people that are interested in making other ways of sending email in ProcessWire, I've setup a new module base class called WireMail, and a new function called wireMail(). The wireMail() function will use whatever WireMail module is installed. If none is installed, then it will use PW's default WireMail implementation (based on PHP's default mail function). The wireMail() function replaces all instances of PHP's mail() function in ProcessWire's source. It works in a similar way as PHP's mail() except that supports a few different usages. Standard usage would be this: // to, from, subject, body wireMail('user@domain.com', 'ryan@runs.pw', 'Mail Subject', 'Mail Body'); Another usage would be to give it no arguments, and it'll return whatever WireMail module is installed for you to use yourself. If no WireMail module is installed, then it returns ProcessWire's WireMail. $mail = wireMail(); $mail->to('user@hi.com')->from('ryan@runs.pw'); // all calls can be chained $mail->subject('Mail Subject'); $mail->body('Mail Body'); $mail->bodyHTML('<html><body><h1>Mail Body</h1></body></html>'); $mail->send(); Since all of this stuff is only on the PW 2.4 dev branch at present, I'm posting this primarily for people that are interested in creating WireMail modules. For instance, I know that both Teppo and Horst (and perhaps others?) have put together such modules and ideas, so this is all aimed at coming up with a way for those ideas to be easily integrated into PW by way of modules. To make your own WireMail module, you simply create a module that extends WireMail and provide your own implementation for the send() method. Of course, you can go further than that, but that's all that is technically necessary. I've attached an example module called WireMailTest that demonstrates a WireMail module. When installed, it is used rather than PW's WireMail. This WireMailTest module includes lots of comments for you in the code of it, and you may find it helpful to use it as your starting point. WireMailTest.module For you guys developing modules, please throw any questions my way and I'm happy to help. Likewise, let me know if you think I'm missing anything important in the base interface that the modules are based upon and we can update it.
    1 point
  16. In some previous posts, I demonstrated a simple proof-of-concept CRUD “application” for PW using jTable. I really wanted to use DataTables since it is older, wiser and with a huge fan base. One thing I wanted was for the CRUD system to be as simple as possible and possibly be Excel-like (more below). With DataTables plugins, you can perform stuff like inline-editing and Auto-fill. The latter works just like in Excel and allows you to quickly populate cells (quick copy). But that’s as far as it goes. Google led me to other Table management systems. Some of the front runners include jqGrid and SlickGrid. SlickGrid is nice and using virtual rendering can display millions of rows with ease. Its support for displaying data delivered on demand (Ajax/server) is minimal; it requires you to download all your data before it starts manipulating it. Someone has created an Excel-like extension for it allowing copy-pasting between SlickGrid and Excel. Awesome! But, it still didn't rock my boat completely, especially the Ajax content issue. Then I stumbled upon Handsontable, a new kid on the block that describes itself as “a minimalistic Excel-like data grid editor for HTML, JavaScript & jQuery”. Though relatively new, it is as Excel-like as you can get. You can copy-paste from/to Excel [single to multiple cells and multiple to multiple cells], use the usual shortcuts (Ctrl-A, Ctrl-X, Ctrl-C, Ctrl-V, Ctrl-Y, Ctrl-Z - i.e., undo/redo, etc., and tab navigation, etc.), use Auto-fill (vertically and horizontally), freeze cells/columns, make cells/columns read only, Right-click context menus, insert/delete rows and columns, perform inline-editing, etc. Double awesome! Handsontable (HoT) is minimalistic but comes with a rich API. However, most of the implementation is down to you (sounds familiar?). It will render the Table and provide you with Methods/Events/Options to manipulate it. You just have to provide the data as an Array or JSON defining your columns and containing your data. Soma has a DataTable module that is currently read only; you cannot edit the displayed data directly in the table. It is also in lazy development . So, I started toying with the idea of using HoT as an Excel-like CRUD system (module) for PW. I wanted something that could quickly and easily do mass editing (Batcher-like). Imagine quickly creating basic pages/records by copy-pasting from Excel. Or quickly changing records by dragging (Auto-fill) or pasting new values over old ones. Well, the result can be seen in the screencast below. I’d like to hear your thoughts whether this is something that I should consider developing into a module; something that could be used by Superusers. Depending on implementation, it could be used by other users as well. All HoT needs is data. What you do with that data is up to you (the developer) and your code! This can be very dangerous if not implemented correctly, of course! You could easily delete important records! However, HoT does not touch your database! Deletions, insertions, etc., will not alter your database unless you specifically write the PHP code to do that. All it does is send data to the server via a method your specify (post, get, Ajax, etc.), and even that is your implementation. You do not need to implement deletions or additions. You can use it for updating content only or as read only, but where’s the fun in that ? In the screencast , apart from the table itself, all the other implementations are custom - the buttons, selects, auto-save (can be tricky? can DDOS your server?). The current implementation is not perfect; it is a demo after all. Certain stuff would need to be implemented differently . I didn't want to spend too much time on something that would not be useful in the end. All CRUD operations are via PW API and/or vanilla PHP. Deleted pages are Trashed and not permanently deleted. If there is interest for a module of this kind, I would request all the help I can get to develop it please. I would put it up on Github of course. In the demo, this is running off Diogo’s ACP module. Let me hear your thoughts please. Should a module like this see the light of day? Thanks Wasn't sure in which forum to post this...
    1 point
  17. I'm building a website that creates pages, sets the template and once a payment has been processed the page needs to be set to published. I need to know how to set this in the PHP Page class. Is it just $page = new Page(); $page->published = FALSE;? I couldn't find out how to do this in the docs. Thanks Clint
    1 point
  18. Hey guys! Our first PW project is online, finally: www.typneun.de So, please do not look into the code TOO close - we are designers, not coders, OK? We started to develop this little portfolio site about 2 years ago, but didn't find time to finish it. So it took nearly 1,5 years to get it done till oct 2012. That's why much stuff is not perfectly coded right now. The site was developed with static html-files - until tonight when I launched the PW-website. Modules we are using: procache multilanguage/german redirects formbuilder (not yet, will come soon) Actually this site was our second one on PW, but the first one is still in development and will go online in a few days. The experiences we made with this first site and the help I found in this forum made me switch to processwire for our own website. So, thanks to all of you guys! Any ideas or criticism to make the site better? Comments are welcome...
    1 point
  19. Aaah, I understand. A variation on Pete's way might be to create a hash and save that for future comparison. Something like this to save (pseudopwcode) $page->hash = md5($myjsonUnsanitised); $page->json = $sanitizer->text($myjsonUnsanitised); $page->save(); And then use the hash as selector later $hash = md5($jsonToFind); $query = "template=whatever, hash=$hash";
    1 point
  20. But he needs to find the page with that JSON string I think, which is much more difficult given single and double quotes. The only way I can think of to do this is have another JSON field called something like "sanitizedmyjson" and on page save, strip out all quotes and store that copy in that field, then do the sanitized selector based on that field. Sanitizer probably strips out other stuff too, but you get the idea.
    1 point
  21. Played with it some time back - not sure if it has matured further, but worth a look: http://sparkleshare.org/ Also, Pydio now has a sync tool - again, not really ready for prime time, but their web interface is a great way of sharing files with clients: http://pyd.io/ Or if you are a linux geek and want ultimate configuration: http://www.rsnapshot.org/ (you could of course use cron and rsync, but this is a nice addition to managing things)
    1 point
  22. Hi all, seems like everybody sticks with the major players. maybe the best you can do ... That's a killer-feature and one i liked with Wuala in particular. But Gdrive offers the same via its web frontend ("manage history" or so).
    1 point
  23. Anyone have also problem with that? When hovering over the ">" on a field (right side) it should show the field name beside the field label. Ryan implemented this couple month ago and sometimes it's working and sometimes not. Sometimes it does work for some fields and not others, sometimes not at all. Apart from that, regarding this feature: This is sort of Ryan implementation of what I did with HelperFieldLinks module (one of my first modules). But I'm not really happy about what Ryan did here... It's not helpful at all and showing only the name on hover doesn't help me anything that much, when then I have to go to search the field anyway. It is also hidden feature, so that you don't really get it without knowing it. What I would like is some better solution to see name and a link to go edit the field directly. This should be in core and visible to superusers. Current implementation doesn't really help me, and I still need to install my HelperFieldLinks module, which I'm not really keen about supporting and updating it all the time cause it's broke already a few times. What you guys think about it? Edit: Since Template label can also be different than the template name, I would welcome it to also show the template name along with the template label. So I don't have to search for it.
    1 point
  24. Since the 2.4 update the Fontawesome icons start with fa-
    1 point
  25. There's also https://www.insynchq.com/ for google drive.
    1 point
  26. A 404 exception will interrupt the render process and render the 404 page instead of the requested one along with a 404 header and url stays the same. So the render of the 404 page in the background calls the _init.php again. When using the prepend file _init.php you always have to keep in mind that it's called on every $page->render() (you might also do manually in a template to render another page). Depending what you do in the _init.php it may cause trouble cause it's called multiple times for a request.
    1 point
  27. PHP doesn't like Exceptions in included files and (assuming that it's prependTemplateFile) _init.php is included during page rendering. I'd suggest putting together a simple module for this. Edit: you could, probably, also do this in your home template, right? Assuming that old URL's were always "/?id=*", they should always end up on your home page and that should work just as well.. or even better?
    1 point
  28. Antti, I'm really looking forward to that new Afghan Whigs record. Although, Rick McCollum (guitar) isn't on the record, so I have a feeling that Dulli wrote all the songs and it will sound like a Twilight Singers album. Nothing wrong with that, but it won't be the same without Rick. TEPPO!!!!! *Shakes fist at the sky* I finally managed to get that song out of my head, and what do you do? https://www.youtube.com/watch?v=nPv607Z57sE New (American) Krautrock.
    1 point
  29. OK ,its was $config->debug = false and it's not enabled. Still I don't consider this feature that useful. I would prefer a HelperFieldLinks type integrated in core.
    1 point
  30. Hi totoff, I've been using http://www.bittorrent.com/sync for a little while as an alternative to dropbox and google drive. Currently I use to sync my Sites directory between machines. What I like about it is you don't have to have the exact same folder name on both machines. eg: Machine 1:Sites can sync to Machine2:Sites backup There's no intermediate storage either from what I can see so your machines would need to be on at the same time.
    1 point
  31. Many people still have old idea's or opinions about Linux Desktop, (not saying you have) but Linux Desktop has come a long way. It is no longer only for nerds or specialists. Some distro's are very much the same in look and feel as windows. http://manjaro.org/
    1 point
  32. You surf cute animals? Is that legal where you are? I would think using a surf board would be kinder.
    1 point
  33. 7. I am not a number! (Damn, I wanted that to be number 6....)
    1 point
  34. You can also just zip the entire site up, put it in the new location and change the DB values in config.php. I always work like that - I develop on an old box locally that is set up with ubunto and virtualmin so that I am always developing as a root installation and then just move the entire thing to wherever it is needed. Much easier for a non-tech like me. I never use export profile to move a site, just to create profiles for multiple use. Edit; oh, yeah, I forgot you need to export/import the DB ... But quick and easy to do.
    1 point
  35. I'm currently working on a couple modules that require newer versions of ProcessWire and newer versions of specific modules (as dependencies). Currently, there is no way to specify versions with module dependencies other than having your install() method throw an exception. As a result, module dependencies have been updated (on dev branch, 2.4.1) to include support for module versions, as well as PHP and ProcessWire versions. The best way to describe it is to show an example of how you'd use it. I'll take an example from the first post here and update it (note the 'requires' line at the bottom): public static function getModuleInfo() { return array( 'title' => 'Log Master (Process)', 'version' => 100, 'author' => 'Lumberjack Bob', 'summary' => 'Displays the logged actions in the admin', 'requires' => 'ProcessHello>=101, ProcessWire>=2.4.0, PHP>=5.4.0', ); ); The 'requires' line above specifies that this module has the following requirements: ProcessHello module version 1.0.1 or newer ProcessWire version 2.4.0 or newer PHP version 5.4.0 or newer If no particular version of a module is required then you'd simply omit the operator and version, as you've done with dependencies in the past. Another thing to note above is that the 'requires' line accepts a CSV string. Before, you had to use an array if you wanted to specify multiple dependencies. You can still use an array if you want to, but it's not required. The above 'requires' line as an array would look like this: 'requires' => array('ProcessHello>=1.0.1', 'ProcessWire>=2.4.0', 'PHP>=5.4.0') For ProcessWire or PHP versions, you need to specify a 2-3 part version string like "2.4.0". But for modules, you can specify either an integer or a 3 part version string. It's more consistent, and thus a little bit preferable to specify an integer (like in my first example) since that is already how versions are specified in the getModuleInfo 'version' property (i.e. 101 rather than 1.0.1). However, it doesn't really matter.
    1 point
  36. If all you want is to comply to baidu suggestion, just make a responsive site in abc.ext and point m.abc.ext to it like you probably did with www.abc.ext
    1 point
  37. It is a nice concept but you can achieve more or less the same with dropbox with symlinks. Just put a symlink of any folder inside the dropbox folder, and dropbox will happily let itself fooled.
    1 point
  38. Media queries are your best bet. If you need to rearrange elements based on device you could try using http://intentionjs.com/
    1 point
  39. I've posted the first iteration of the directory here: http://processwire.com/about/sites/ – I plan on doing a lot more with it (including a landing page for each site), but just wanted to get something posted quickly since we may be getting more traffic coming in soon with the Bitnami release. Thanks to those that have submitted their sites so far. Thanks especially to Marty (stillmovingdesign), one of the most prolific ProcessWire users, for taking the time to submit all of his ProcessWire sites in there. We went from having about 5 sites to having 30 after he submitted his. Now we've got about 64 sites in there. Please keep submitting posting your ProcessWire sites. We want to show a comprehensive diversity of work in the directory, and it's already coming along really well! I've added a few of your sites for testing purposes. If you already see your site there and want to change something about it, just re-submit it and I'll overwrite the existing one.
    1 point
  40. 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 product
    1 point
  41. Nienburg Mittelweser is a Region in Lower Saxony/Germany. Our Job was to create an official campaign that engages young familys and skilled workers to settle down in Nienburg. The campaign tries to communicate the benefits of deceleration and living in an rural region in a sympathetic way. Apart from developing the whole Logo/CD/Imagery/Text our job was to create a Microsite that gives interested people a brief overview of the benefits of living in this region. The microsite is (of course/as usual) powered by processwire. http://einfach-lebenswert.net/ For those who don't speak german ( ) here are the 3 keyvisuals headlines translated in english: --> GROSSBAUSTELLE = Large construction site [in Nienburg-Mittelweser] --> KONSUMTERROR = pressures of a materialistic society [in Nienburg-Mittelweser] --> RUSH HOUR = Rush Hour
    1 point
  42. I can confirm, this doesn't seem to work for me either. I'm not yet sure why it doesn't work, but will look into this. Currently dependencies can't check if there are options available in a selection field... it can only tell if something is selected and what is selected. I'm not really sure how I'd suggest solving that particular issue, short of a custom module. But for starters, it might be good to set the visibility state of the field to "collapsed only when blank", which should help to keep it out of the way until needed.
    1 point
  43. Actually, you can do this on the dev branch. Lets assume that cities are children of countries and that is reflected in your page structure (i.e. /countries/france/paris/). Create your 2 page fields (country and city), and configure 'country' as a single page field with "parent" set to "/countries/". Next, for the "city" field configuration, use the "Custom selector to find selectable pages", present on the "input" tab. In that field, enter "parent=page.country". Save and try it out. This works with select, selectMultiple and asmSelect fields (and possibly others), though not yet with checkboxes, radios or PageListSelect.
    1 point
  44. There was a request that I add an official thread for this module, so here it is. MarkupTwitterFeed generates a feed of your tweets that you can output on your site. When you view the processwire.com homepage and see the latest tweets in the footer, this module is where they are coming from. This module was recently updated to support Twitter's new API which requires oAuth authentication. modules.processwire.com page GitHub project page Usage instructions
    1 point
  45. u need.to upgraded yer processwires ver 2.3
    1 point
  46. 1 point
  47. Hi jukooz, please see this post for more information. In theory: great idea. In practice: could be more difficult than expected, not necessarily due to PDO (which does allow good connectivity between backend DBs) but perhaps due to the little differences in the dialects of SQL that they all use which could be sources of incompatibility. This needs careful investigation as, AFAIK, ProcessWire's selectors can generate some pretty complex SQL.
    1 point
  48. The page statuses are a bitmask so it's possible for there to be multiple statuses on a page, like unpublished and hidden. So it's best to add and remove statuses with the addStatus and removeStatus functions, i.e. $page->addStatus(Page::statusUnpublished); // same as: $page->status = $page->status | Page::statusUnpublished; $page->removeStatus(Page::statusHidden); // same as: $page->status = $page->status & ~Page::statusHidden; You can also check the status of a page by using the is() function: if($page->is(Page::statusUnpublished)) { ... } // same as if($page->status & Page::statusUnpublished) { ... }
    1 point
  49. It's one of the statuses you see in the top of the Pages class. So you can set the status using it like: $page->status = Page::statusUnpublished; Edit: Have you looked on the Cheatsheet? For reference under "Page Status" http://processwire.com/api/cheatsheet/ BTW aren't you the guy with the processwiresexy, whatever? I'm kinda surprised you didn't know this.
    1 point
×
×
  • Create New...