Jump to content

Leaderboard

Popular Content

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

  1. You get this kind of itch. It normally starts just at the back of the legs where you have been leaning way to far forward on you chair and are creasing up the fat layers where there really shouldn't be fat layers. Your toes, which by this stage are pointing backward towards the rest of the world, are getting cramped from being hooked round the bar of the chair in nervous expectation. In an attempt to pick up from where you last left reality, you shoot your legs forward, push your clasped hands in the air, arch your back and lean backwards. And it is in those few seconds of frozen time when, just a little too late, you remember you are sitting on a stool and crash in a reverse double flip that would make Tom Daley envious, into what is left of your life. "I'm fine!" You say rather too quickly, with the note of desperation from one who has a sneaking suspicion no one was listening anyway. It is time to scrape your eyes off your ultra-luminescent, super-flat, fake-sapphire encrusted, Rolls-Royce screen and find something more interesting to stare at. I have various illuminating buttons on my desktop. Not that they light up, but I have a whimsy that they may take me to a place that is more enlightening than whichever place I think I currently am; long experience has taught me the folly of believing with my own eyes for that is the fate of the unwary conspiracy theorist. BBC News. No, I already play politics on an assortment of blogs, many of which have gotten me into trouble; I do not feel the need of a top up. Lagoonia. Lagoonia? There is something about Google Chrome that encourages you to collect buttons that you have little interest in pressing. Wurm Online. Nope. When you compose music for something, it is always best to leave them to their own devices. It was the original home of Notch. I wonder if he misses it? ProcessSomething. Ah, that thing. Let’s go there! For some reason, the forums at ProcessWire appear to be a frequent destination at the moment. Apart from a place where kind people unstick me when I need unsticking, it is a place that I can be old in and no one gives a toss. Ah, another person who thinks ProcessWire would be better if it were Wordpress. I used to think that about various things. Luckily for the residents of ProcessWire-Ville, that idea wore off before I got here. I eventually kicked the ambition to death in the Joomla UI forums when I realised no one cared anyway. Anyway, lets give him an essay to ponder over. Ummm ….. flexible …. No theming system needed … easier than you think … I think I am beginning to repeat myself because I keep saying this sort of stuff. But then Soma keeps trying to teach me the same lesson over and over again, with only the vaguest inkling of success (I will get there, mate! I promise), so I am sure I am allowed my little mantra too. Okay, press send and do some more work. I have converted myself to Sublime Text of recent. God knows why, to be honest. In many ways it is little different to half a dozen other programmes I have kicking around on my PC. Prettier though, and of course uber trendy! (how does one type an umlaut?) Just to enhance the prettiness, I have downloaded a Dreamweaver theme for it from somewhere and made the background a fetching off white. Around 13 years ago I spent a whole year sitting next to a guru of a programmer who could write Perl slightly quicker than I am writing this. He was in love with systems like Emacs and Vim and always went for the Laura Croft White on Black colour scheming. He was a giant of a man who made me look thin. Anyway, he took an early version of PhpNuke and turned it into something not far off what Drumlapress is now. The Nuke designers had spent 6 months trying to integrate a forum. He did it in a morning. In one week he found over 600 security holes (every one of which was then ignored by the then designers). Anyway, I digress. It was coding hell – if you could have something called “Deep Coding,” this was it. It out Matrixed the Matrix, long before that tortuous trilogy was born. It was dark, foreboding, gruelling and scarily efficient. I once asked him for a shell script to run cron backups on a machine for 8 different databases, staggered and then farmed out to two external safe machines. The script came back before I had hit send on the email. I installed it and 10 years later it is still running. I swore to myself that I would never look at a black screen again unless it meant it was switched off. If I ever learned to code it would be bathed in warm sunlight on a tropical island of an office and washed over by peaceful waves of colour matched screen harmony. So when Dreamweaver introduced pinks and blues and greens to their colour schemes I was over the moon and have used them ever since on just about anything. The trouble is, I think I am turning into a soft version of that king of the slashdot hackers (he still thinks GW Bush is secretly running the US and Obama is a remote controlled android front). I have discovered that I am spending huge amounts of time getting the spacing in my code “just right,” and the indents subtly mirrored. I even sit back and examine my comments for purity, judge them for content and consider entering them for the Booker prize. But I knew it was time to take a break when in a final attempt to reconcile the world of coding to my genteel British background, my brain had gone south and secretly replace all the $ signs in my script with Pound signs. Mind you, they are worth more than dollars… perhaps I should hit run and see what happens….
    8 points
  2. onjegolders: I feel your pain. But there are lot's of skills in web development and design that "don't get old" and learning and mastering those are beneficial now and tomorrow: design in general typography color theories coding in general drawing, illustrations usability accessibility relational databases coding patterns regexps you got the idea I used to try learn "all new things" as fast as I could. Now when I have over 6 years experience as a professional (+10 years as a hobby) I am much more skeptical about new and shiny things. Of course there are new things that are clearly beneficial (RWD, NoSQL, CoffeeScript, Mobile Apps, Node.js... list is endless), it doesn't mean that you should learn and use all of those. It also doesn't mean that your years of design/coding experience has vanished or that PHP/MySQL cannot be used in anything anymore, or that all sites should be responsive. Usually best practice is wait a little to see which of the new trends are just trends and which are here to stay for a while and proving to be interesting and beneficial for you to learn. I also recommend to read some basics about the topics that are popping from each corner: when you know what is it, you will stress about it much less: "Ah, so Node.js is basically javascript on server side, and it seems to be great in realtime apps because of some bizarre reason. Good to know, but I think that at this point I don't need to learn how to use Node in my work."
    5 points
  3. So why am I posting a profile in the pub? Well, it is currently so drunken that this is where is belongs. Also, it is a long way off being finished.... Sooooo The Bootwire Blog (of course) is a bootstrap / processwire blog profile that I have started from scratch, more as a learning exersise as anything. And it has certainly given Soma a good work out so far! It is sort of gone a bit beyond a blog, to be honest, and is rapidly turning into a magazine site. It has some interesting features: Categories Topics Tags Post types Authors Choose side bar items globally, or for all category pages, or for all topic pages Choose side bar items (widgets) for any single post Choose themes for posts Posts can have simple galleries added Choose themes for the site (very limited themes to be honest) Centrally control things like headers/footers, number of recent posts to list, lost of other things Posts can be featured on the front page and/or on their own category. Lots of other things. My basic premise that I started from is: 1. Everything is a post 2. Every post belongs to one category 3. Every post can belong to multiple topics 4. Every post can have multiple tags 5. Posts types are based on different templates 6. Themes can be applied to any template 7. Post are also listed by template type. Post types will include: Standard Blog Video Blog Reviews Recipes Photo Blog and so on. The way the categorisation works is quite complicated. But dont worry - here is a huge piece about it! The blog uses five sets of criteria to organise information: Categories Tags Topics Post Types Authors CategoriesThese are the most obvious form of organisation as they make up the main menu hierarchy. On this particular "hover" menu, all categories can accept posts. However, the click-to-open menu version cannot have posts associated with the top level since the top levels will no longer link anywhere. Consequently, it is difficult to switch from one version of the site to another without causing a lot of headaches! Generally it is best to organise the categories into obvious trees: Politics, Sport, Media and so on. Each category can have more than one child creating multiple branches from one top level category. However, making this too complicated or the categories too many layered could be problematical. (note, if this is for touch devises such as phones, too many levels will make it frustrating to navigate. TagsTags are very much what you would expect - single keywords or short phrases that can be associated with posts on a many-to-many basis. Clicking on a keyword creates a seach of keywords on the database.. There is no limit to the amount of keywords that can be created, but it makes sense to re-use keywords as much as possible! TopicsThis is a departure from the normal way a blog or news site works. Topics are broad subject areas that might be related to one particular category, but can be used by any post in any category. For instance, a topic might be created that explores the politics surrounding what we eat. That topic would be of possible use in both the Politics category and the Food category, depending on the post. Topics are far more detailed than tags, but they are limited in number. Unlike tags, they cannot be created on the fly, but are created centrally by the site editors to reflect the nature of the site. A post can be associated with more than one topic, though this may be unusual. Topics will often have long titles and could have long descriptions. A post can optionally display the full topic details in the side bar. Post TypePosts are separated into templates. The most common template is the standard blog which is similar to a Blogger or Wordpress blog. However, further templates are available for perhaps a photo blog featuring a single blog, a full blown gallery blog, a video blog, a review blog, a recipe blog and so on. These Post Types have different layouts and fields that suit their particular subject matter and bring the subject of the post to the forefront. Posts can be sorted by post type. AuthorsObviously, posts have authors. And posts can also be sorted by their author! Well, that is about it at the moment. I have got as far as getting the standard posts, the categories the widget system and the tag system working together with search. I am starting on topics (which I need to think carefully about - not from the tech view, but from the librarian point of view) and will then wonder onto comments. I am going to try and put both the normal system of comments on, but allow for disqus to be used instead. It currently looks like the following (sorry, it hasn't got enough posts in yet, so it is full of holes!) More to come over the next week or so. Joss
    3 points
  4. If RWD could just stay still long enough for me to get to grips with it, it would be much appreciated (that applies pretty much for any new web craze by the way!) I feel like the fat guy who finally catches up, wheezing, with hands on knees and bent double, only for the other runners to say "Right, let's get moving again!"
    3 points
  5. I'm (or was) mostly a designer but managed to make Processwire Pages. As everybody said before: You will get clean, structured and fitting pages for the cost of pre-made templates and 1-click-solutions. On the other hand, that's exactly how design works: You just can't stick together different parts (=plugins) to create a real outstanding design. It doesn't work. Every design is unique and so are most PW pages. And to complete the analogy, you can reuse some design patterns again (for example Sliders and the JS Code behind) in Processwire. If you have any trouble and lots of question, feel free to contact me via Skype or PM ( Auf Deutsch ist es vielleicht manchmal leichter / Sometimes it's easier in german)
    2 points
  6. Ok, i did it I put a repeater inside itself just to see what would happen, and the result is not pretty. As soon as you create a page with it, it creates a big number of repeater pages and breaks the system. It would be better if PW would just disallow this.
    1 point
  7. Maybe. Not sure. I hate settings
    1 point
  8. Minor addition: in cases like this you can limit save to a single field with $page->save('files'). Also, I'm not really sure about this and can't test right now, but if you're doing what Wanze explained above (hooking into pages->save() and running pages->save() there..) you could end up with a loop. By saving only files field at hook function you should be able to avoid that.
    1 point
  9. Thanks Wanze! That's really helpful. The ProcessWire community comes through again!
    1 point
  10. thanks, for pointing out the difference between the two systems. I have a better understanding now of how PW works. For me its way more important to make custom websites, have the freedom to design anything I want and have a clean code, than selling themes. So PW is obvious the better choice for me. Cant wait to start working with PW now
    1 point
  11. Maybe a "Payment Module" which handles all the complicated stuff behind. So to take your example: // Payment form was submitted if ($input->post->submit) { $payment = $modules->get('PwPayment'); $payment->method = "PayPal"; // ie. "AuthorizeNet" or "PayPal" etc... $payment->currency = "euro"; //... There must be some abstract base class "Payment" that provides common methods and variables. Maybe an interface too to exaclty define which methods need to be implemented for the different Payments. Then each payment could have its own class extending the base Payment class. Of course the actual implementation would still be hard because of the different ways each payment works. But with a pattern like this, the module could be used anywhere and always has all the implemented Gateways available. Pseudo code: <?php //The Module class PwPayment extends WireData implements Module { protected Payment $payment = null; //Overwerite the magic set method public function __set($key, $value) { if ($key == 'method') { switch ($value) { case 'PayPal': $payment = new PaymentPayPal(); break; } } return parent::__set(); } public function ___process() { return $payment->process(); } } //The abstract class abstract class Payment { public function addJs(); public function process(); public function checkErrors(); } //PayPal Implementation class PaymentPayPal extends Payment { //... }
    1 point
  12. Did you have a look at how http://ci-merchant.org/ achieves that? I noticed that they support lots of gateways, I just don't know if they have different code for each one of them, or if they do it in a more abstract level as you want. edit: hm, not that easy. There is a "Merchant-driver" class, and each payment gateway has it's own class that extends "Merchant-driver" or one of the other gateway classes. Some of them can get pretty complicated... edit2: have a look at this one also https://github.com/adrianmacneil/omnipay
    1 point
  13. Thanks Philipp, almost by chance, I've been put in touch with a guy who's great with graphics and is looking for someone to turn their beautiful designs into gobbledygook code. Will have to see how it pans out!
    1 point
  14. Keep it coming! Made me chuckle heartily but think our American and European cousins will have trouble with some of the references. I especially liked the Tom Daley bit... Anyway, when's the book out? You can put me down for a copy or two...
    1 point
  15. Maybe you can look for them on dribbble . Maybe graphic design students in you area might help you.
    1 point
  16. Hi bcartier, I think this is currently only possible with a little hack. I took a look at the source of Thumbnails and if I'm right, you need to uncomment the if on line 91 here: https://github.com/apeisa/Thumbnails/blob/master/FieldtypeCropImage.module#L91 //if ($this->w != $sizer->getWidth() || $this->h != $sizer->getHeight()) { $this->_copyAndResize($img, $imgPath); //}
    1 point
  17. +1 for the Starter Tutorial. It doesn't have to cover everything that PW can do. Just something that a new user or developer can follow and do in less than 10 minutes and get maybe a blog up and running.
    1 point
  18. first of all thanks guys for the quick reply! @Joss your links are really helpful! I will definitely check out the tutorial. I have seen the showcase section. There is some really great stuff. I think it would be cool if the best sites would be presented with an thumnail view and a small description, mudules used etc. somewhere on the website rather than only to show them in the forum. Maybe that could work to attract more people to this great cms. Just some thoughts... One thing thats great about the wp themes, is that its a great source of income for a small designer like me. And I was thinking if this will probably be something to be considered for the future of pw too. As right now the export/import function of themes in pw seems to be inferior to the way wp handels themes. Thats just a small issue I have. I defenetly cant wait to use PW for my next project! @onjegolders I will try my best to learn the basics in PHP. I have just finished the beginners tutorial from Rayn (http://processwire.com/talk/topic/693-small-project-walkthrough-planets/) and I needed some time to realise how easy it was! I think you are right about WP. Its a mainstream bloging platform mainly buld to do blogs for people not knowing any kind of tech stuff. While its possible to do nearly any kind of web project with it, it often feels that ist not realy build for that. What is great about WP for me is the big user base and the possibility to sell themes. @Georgson Its really cool that PW has so much core functionality and still is so easy to use. I hate the way WP works with all the plugins you need, to do just simple stuff (e.g. Advanced Custom Fields). Its allways good to be independent. Iam still a little worried about the photo galleries I have with the new projekt Iam working on. But with a little help from this great comunity it will all work out @niutech I heared about smarty (mainly as something to eat ) If I understand it right smarty is some kind of php framework which replaces the original php syntax with shorter code? Not sure if that will really help me that much. Maybe I just stick with basic PHP
    1 point
  19. Thanks for your feedback on this, Ryan. Your active involvement here on the forums is a major factor in my adoption of PW personally and in my day job.
    1 point
  20. Thanks for your feedback raydale. I think providing a link to edit the pages makes sense. I'll add this plus some permission checking in the next version. But I also think that the current system to search the pages with a selector is mainly for superusers. For non-superusers, another search-system would be better. I was thinking of adding the option to create some pre-defined searches as links, which store the selectors behind the scenes. For example: Display posts Display architects This could be done in the module config options with something like this: Display posts||template=post, include=all, sort=-created Display architects||template=architect
    1 point
  21. 17, can you imagine? All the friends going to parties while Nico stays at home coding
    1 point
  22. Hey jploch! Joss and onjegolders just said it! Actually my profile would sound quite similar to yours: designer with zero PHP knowledge - and little motivation to do so (though it grew once I started using PW). And I‘ve already bought a book about PHP in the first place, cause I was expecting lot of PHP to handle PW. But it turned out as Joss said: for solving problem I visit the forum or look around in the PW-API or About section - and I find the solution(s). I'm still learning an still working on my first to websites - which both were static and pretty close to finished when I decided to make them dynamic via PW. But being independent from themes, plugins or whatever makes PW so much fun to work with. PW works exact the way I always thought CMSs would work (but they didn't, as I found out). So I would suggest: give PW a first try - and try to solve your needs by getting galleries and blogs to work just simply using PW. I'm sure - with the help of this forum - you will succed. (I'm hoping the same for my projects. )
    1 point
  23. I'm in the middle of this one http://www.larryullman.com/books/php-advanced-and-object-oriented-programming/, and liking it a lot.
    1 point
  24. Well you've come to the right place, because a very high percentage of messages posted here have snippets of code. At least half of the messages I post have at least some code snippet. But we really try to focus on using code snippets to teach, and not so much for copy/paste. The reality is that ProcessWire is quite simple once you have a few basic concepts down. And once you've got them, you won't care about copy/paste, because you'll know how to do anything you could ever want. So our goal here is always to teach you how to fish rather than give you fish. That being said, there are no rules in that regard and all useful snippets are welcome.
    1 point
  25. Responsive images is what makes them behave inside the layout once the html, css and images are loaded, so all this max-width etc. Adaptive images is serving a resolution before it's loaded to fit screen size or bandwidth or whatever to not load unnecessary big images that wouldn't be needed for mobile for example. Oliver's solution is about adaptive images as far as I understand. Though yes it's arguably that the term can mean the same thing, but I thought it's how we make the difference in case of image delivery. Wilcox's solution doesn't require that much as you say, it's .htaccess with a cache folder, a script in head and you're done, no data-attributes required. I've used it and am quite happy with it. But will take a look at yet another solution if I got time. Thanks for sharing Oliver.
    1 point
  26. Thanks for your continued updates to this translation pack. I think this is the most complete translation pack available! I have made the text in the Comments modules translatable, and am just doing a little more testing here before pushing to the source. But they should be there soon.
    1 point
  27. Okay, it's not that complicated: Creating a shortcode in code Like in my example above you could for example create a sitemap like this: <?php $shortcode->add('sitemap', function($atts){ if($atts['page'] == '') { $atts['page'] = wire('pages')->get('/'); } else { $atts['page'] = wire('pages')->get('name='.$atts['page']); } function sitemapListPage($page) { echo "<li><a rel='follow' href='{$page->url}'>{$page->title}</a> "; if($page->numChildren) { echo "<ul>"; foreach($page->children as $child) sitemapListPage($child); echo "</ul>"; } echo "</li>"; } echo "<ul class='sitemap'>"; sitemapListPage($atts['page']); echo "</ul>"; }); ?> It's important to use wire('pages') instead of $pages inside the function. Same for wire('config'), wire('input'), ... Use the shortcode At first you have to add [sitemap] inside your textarea. You don't need to activate something spacial like TinyMCE or so for it. Just put [sitemap] or [whatever] (if you have something like "$shortcode->add('whatever', function($atts){ });") inside your textarea or textfield. It won't work automatically. You have to use the function in your template field: (if your fields name is "body") $shortcode = $modules->get('MarkupShortcodes'); echo $shortcode->render($page->body); Any questions left?
    1 point
  28. A child page of the Commercial Banks page is a descendant of each parent. So there is an assignment already that you use can by leveraging a selector in a template. You would use a has_parent selector to build the pages array that met that condition in your template. You can just leverage the page tree and the structure you build.
    1 point
  29. Just for the records: 1. I registered: processwire-cms.de 2. I got in contact with the guys behind processwire.de and asked them for their plans.
    1 point
  30. You don't have a scientific spirit
    1 point
  31. Oh well, it was pretty obvious that someone had to try this
    1 point
  32. Jasper, I didn't want to leave you empty handed, especially after you've tried this a few times and my suggestions didn't work. Here's an updated version of the ImportPagesCSV module that supports file and image filed importing. It supports both single and multi-file fields, so there aren't any limitations in that area. https://github.com/ryancramerdesign/ImportPagesCSV To import a multi-file field, place each filename or URL on it's own line in your spreadsheet, OR separate each by a pipe "|", OR separate each by a tab (you decide) – basically, you are delimiting the filenames/URLs within the field. In my own tests, I used the pipe "|" to separate the URLs and all seemed to work well. Of course, if there is only one image/file, you don't need anything other than the filename or URL (no delimiter necessary). I ended up changing quite a bit of code, so please let me know if you run into any error messages or anything – it may not be perfect yet, but hopefully close.
    1 point
×
×
  • Create New...