Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/20/2012 in all areas

  1. I just pushed a new module to Github. I really liked Soma's idea (and execution!) to learn new frontend stuff while building useful modules to PW. While Soma is learning Knockout, I actually find AngularJS more interesting. So here is my first "AngularJS-powered" module: FieldtypePoll. This is simple polling fieldtype for (not so serious) votings like: Q: How is the weather today? a) Fine b) Rainy c) I don't know, been coding all day This should be all usable already, so if you are adventurous and want to help me debug, this is how to get started: 1. Grab the code -> https://github.com/a...a/FieldtypePoll (actual fieldtype and inputfield) -> https://github.com/apeisa/AngularJS (AngularJS and AngularUI for PW) 2. Install the FieldtypePoll module 3. Create new field, choose "Poll" as a new fieldtype 4. Add field to a template 5. Edit your template file, output the field: echo $page->whatEverNameYouGaveInStep3 6. Add some css: .PollApe .percentage { background: black; font-size: 10px; min-width: 5px; border-radius: 4px; padding: 4px 8px; text-align: right; color: white; margin-bottom: 0.6em; } .PollApe .PollApeTotalVotes { border-top: 1px solid #ccc; }
    7 points
  2. It seems to be that your hoster does not allow overrides for your webspace and it begins causing that error with the lines (root .htaccess of processwire) Options -Indexes Options +FollowSymLinks You should convince your provider to set the apache configuration for your webspace to override the options, the apache option AllowOverride should be at least FileInfo Indexes Limit or AllowOverride All
    3 points
  3. You're my hero! Yes it seems this was it. I fixed it and while at it added check for if the image already exists to not create it everytime. Commited to the source. It's now on 1.0.2. Thanks
    2 points
  4. Greetings, onjegolders: I totally understand where you're coming from! I've spent the past three years using Joomla, and I am now moving away from it entirely in favor of ProcessWire. I still get clients that specifically ask for Joomla, and I have a couple of development partners that still want to use it. I'm convinced that it is my job to move away from Joomla. Maybe I can offer some general ways to approach this... I've got several opinions on this matter. But let me focus on one particular area that you mentioned... THE "CLICK TO INSTALL" ILLUSION When I first started using Joomla, I thought it was great to have all those extensions ready to install with a few clicks. But as time went on, I found that my clients wanted more specific styling and actions. Since every module and extension for Joomla is nearly a separate application, each one re-doing models and coding that often were already done by something else in the Joomla ecosystem (more on the Joomla ecosystem in another post), each one comes with its own (sometimes very extensive) styling and coding assumptions. These very often (let me emphasize very often) conflict with styling definitions you're using elsewhere in the site. If you just want to insert stuff into a pre-fab template and use it exactly as is, you can get along pretty well. But I have found it is inevitable that clients need something more customized down the line. At that point, all the time you "saved" with point-and-click is lost when you have to figure out what that extension developer did in there, or when you have to stop using an extension altogether and find another one that does something better and have to figure out how to transfer the arcane material from one extension's database structure into another one (for example). By contrast, in a community like ProcessWire, you can get the snippets of code necessary to do the same thing as the point-and-click operations. The difference is, the styling is up to you. Even more importantly, you are very clear about how the thing was coded and can re-code pretty quickly. The key here is having a strong community, because if there are people to help you out with the code it hardly takes any longer to do it that way than to install a "point and click" extension. Also, it's a real problem that in Joomla so many developers abandon their projects. Then you are left with a strange extension, and you are on your own anyway to decipher the code! I do agree that it's a difficult thing to convince people of this. But I'm becoming more confident in just stating that I can build the system they want, with more flexibility beyond the first stage. I've found that most clients do want to be able to add more features in the future. Another thing I have found: most people who say they want Joomla are only saying that because it's the first or second system that turned up in a Google search. But if you sit down with them and explain that you can go further with a system like ProcessWire, most clients will trust you. After all, the reason they are hiring you is because they want a professional to advise and direct them! If that were not the case, they would just build it themselves. I use a metaphor when sitting down with people who bring up the Joomla vs ____ comments.... It's like a horse race. At the starting gate, the Joomla horse jumps out to a fast lead. ProcessWire and CodeIgniter (for example) start off slower. By mid-race, it seems all but certain that Joomla will win. But more open systems build speed throughout the race. Coming around that last turn, you can see Joomla slowing down. By the end of the race, the Joomla horse is tired and confused, and often doesn't cross the finish line at all. Thanks, Matthew
    2 points
  5. 1. Download zip 2. Extract in your sites directory 3. Setup vhost (optional) 4. Create db via cli/phpnyadmin/whatever tool you use 5. Open local url 6. Follow installation 7. Done I always use vhosts for local development, so there is no need for me, but if you're running pw in folder ( localhost/pw-test/ or so), you might need to modify .htaccess, mainly RewriteBase. Search on forums if you have this issue, plenty has been written. Good luck with pw, it's supereasy and superfun
    2 points
  6. (Note: Module name temporary and will change) As recently mentioned here I am recently working on a little module. This module gives you a new admin page under "Setup" to create pages in a "batch" mode. What does it do - You can select a parent page where you want to create your pages. Then it will give you a list of templates you can chose from. Those should be permission and template setting aware. Also only parents that really can have children will work, else it will give an alert. - Add as many pages you like by clicking "+add Page". You can set the pages published or hidden status. Sort or remove the pages. - After you entered a template and at least a title you'll be able to klick "create Pages". If successful it will append the list of pages you just created with an open in page tree or edit link, and also the parent. - You can add pages and repeat the process to add pages to the pages you created simply by changing the parent page in the field above the table and go on. It's all ajax and not page load. Also the links of the created pages that get appended below will stay in the document and only the form entries get cleared. This is still work in progress, but I thought enough to share and if you like you can try/test/use it. Download: ProcessTools.zip Screen:
    1 point
  7. I'm sure someone may already have posted this somewhere but I've only just come across it myself: http://www.opera.com/developer/tools/mobile/ Very handy as I only have an iPhone to test mobile sites on, plus this will test some tablet sizes too
    1 point
  8. For those interested in text editors: http://net.tutsplus.com/articles/news/perfect-workflow-in-sublime-text-free-course/ Pretty neat for those looking into Sublime Text.
    1 point
  9. Hi All, I am interested in integrating IDX(Internet Data Exchange) for the Real Estate Multiple Listing Service into PW for realtor websites. Wordpress has such premium($$$) templates available but (having been a realtor years ago and more recently a realtors administrative assistant) I would like to offer such a set of templates built on a better framework-PW(!) which the realtors can easily upload, update, etc...self-manage. I just finished a website using processwire based off the included template to learn PW better and I love it! My desire is to offer sets of templates for real estate agent clients requiring websites with the IDX. My limited knowledge of code restrict my ability to do this on my own. So I want to know if anyone has an idea if; 1- Could this be best achieved by a module? 2- How much is entailed for such a project? Any/all suggestions from the PW community will be most helpful... Cheers, Grant
    1 point
  10. I still use Fancybox 1.3.4 in my projects, Fancybox 2.x is nice but it's cluttered with options and weight. So, I've made a modified version of Fancybox 1.3.4, stripped down IE6,7 support, removed bunch of sliced graphics that make shadows and such and made it use CSS3 instead. It's a 1:1 copy except title position outside that resembles one used in Fancybox 2. I've also used next, previous and close buttons from Fancybox (like the bigger buttons more ) It's only 25kb in weight, and consists of 4 files only. You can try it by downloading from the link below. Ryan, maybe you could substitute your version from the core with this one? You can see the demo here. ----------------------------------------------------------------------------------------------------------------------------- EDIT: It's done (see the post below) Download: https://github.com/nvidoni/fancybox
    1 point
  11. Hi encho. If you allow to upload multiple images, then your $field->images returns a WireArray. I think that's causing your problems. Take a look in the setup of your "images" field, under the Details. If you have the maximum files set to zero, this means no limit: Description: Enter 0 for no limit. If you enter 1, the API will dereference this field as a single file rather than an array (when the Page's outputFormatting is on, as it is by default). Try this code: foreach($page->repeater as $field) { //Grab first image of Array... if you set the limit to "1", then you could just write $field->images $image = $field->images->first(); $thumb = $image->size(286, 217); echo "<ul>"; echo "<li><img src='{$image->url}' alt='{$image->description}' /></li>"; echo "</ul>"; } With File Inputfields, it's the same
    1 point
  12. It is supercool. Be sure the check these short tutorials from Youtube: https://www.youtube.com/watch?v=IRelx4-ISbs
    1 point
  13. I think PW is the right CMS. The amazing api in your hands everywhere. Doing it the PW way it's much more direct then the MODX way. And interact with the logged in state in PW is so much more easy & friendly. Why I said I don't think it is the right way it's because, lots of people don't like to make an account everywhere. They're more comfortable just using facebook, google+ or some other login that they can use. I think to have community login extended with oauth2 will have much more success then without.
    1 point
  14. 1 point
  15. Oh, and few things I would like to add: Voting only for logged in users and once per user Vote multiple options Create more than one poll per page (or at least archive old ones) Better "have you voted yet" -checking. Not sure which would be best way to go and not looking for anything bulletproof here Using some csrf-token to avoid super easy "hacking".
    1 point
  16. Tested with current dev branch and first had some problems after uninstall the module. Couldn't login as it was "forged" and the sessions folder I deleted was missing, so also some warnings. But after creating the folder again and retrying to login it worked again. Installed the module again and it seems to work so far. No error this time when loggin in and out.
    1 point
  17. There's really not much to it, as json_encode() and json_decode() built-in to PHP provide everything you need to go to/from an array to JSON. So the main thing you have to do is just provide the data to FullCalendar in the format it is looking for. Most of your work will just be translating the format that the events come to you in, to a format that is useful to FullCalendar. In my case, my calendar template looks something like below. This is not the actual code I'm using, but it gets across all the important parts. Note that the getEventById(), getEventsByDateRange() and renderEvent() functions referred to below are fictional functions that do exactly what they say. I don't know what your event data source is, so how those functions are implemented would depend entirely on where the data is actually coming from. So think of them as placeholders for your implementation. /site/templates/cal.php function eventsToJSON(array $events) { $items = array(); foreach($events as $event) { // translate events from some source to a format recognizable by fullCalendar $items[] = array( 'id' => $event['id'], 'title' => $event['description'], 'start' => "$event[start_date] $event[start_time]", 'end' => "$event[end_date] $event[end_time]", 'url' => "./$event[id]", // event ID is the url segment ); return json_encode($json); } if($input->urlSegment1) { // event ID provided as a URL segment to this page $event = getEventById((int) $input->urlSegment1); include("./head.inc"); echo renderEvent($event); include("./foot.inc"); } else if($config->ajax && $input->get->start && $input->get->end) { // fullCalendar making an ajax request of events $start = (int) $input->get->start; $end = (int) $input->get->end; $events = getEventsByDateRange($start, $end); echo eventsToJSON($events); } else { // display the calendar $config->scripts->add($config->urls->templates . 'scripts/fullcalendar/fullcalendar/fullcalendar.min.js'); $config->styles->add($config->urls->templates . 'scripts/fullcalendar/fullcalendar/fullcalendar.css'); $config->scripts->add($config->urls->templates . 'scripts/cal.js'); include("./head.inc"); echo "<div id='calendar'></div>"; include("./foot.inc"); } FullCalendar gets instantiated by javascript, something like this: /site/templates/scripts/cal.js $(document).ready(function() { $("#calendar").fullCalendar({ theme: false, editable: false, events: "./", defaultView: 'month', aspectRatio: 4, header: { left: 'today prev,next', center: 'title', right: 'month,basicWeek,basicDay' }, eventClick: function(event) { window.location.href(event.url); // or load it in a modal } }); });
    1 point
  18. I'm using MAMP here, and I don't use vhosts... I just use subdirectories. So when I want to install a new PW, I do this: 1. Make a new database using MAMP's PhpMyAdmin. 2. Open a terminal window and go to htdocs dir: cd /Applications/MAMP/htdocs 3. Make a directory for your new site: mkdir new-site 4. git clone the latest PW into there: git clone git://github.com/ryancramerdesign/ProcessWire.git new-site 5. Load http://localhost:8888/new-site/ in your browser to complete the installation.
    1 point
  19. The problem here is that resizeThumb()'s implementation assumes that one can construct the server path to the file from the URL (see the first line in that function). But the URL and disk path can be very different things. You may be able to fix it by replacing the first line in that function with this: $thumb_path = $field->path() . basename($thumb_url);
    1 point
  20. While I still can't duplicate the issue, I did find discussion of there being an issue (on PHP.net) along with ways to resolve. I think I've got it fixed, but was wondering if you could test the latest dev, whenever you get the chance? I also have added some things to the SessionHandlerDB module, so you'll want to un-install and re-install the module before testing (couple fields were added to the DB table). Thanks for tracking down the issue.
    1 point
  21. I found this thread a bit ago and was like "oh, css framework? whats that? LESS scss? what?..." I spent the next few days getting blown away with thoughts of being uber productive from then on, after installing and testing the full customizable verisons of bootstrap and foundation. I was conviced that foundation was going to make my life a breeze ( i too favored the orbit script, and the modern style). However, I was doing a very specific and custom design and I jsut couldn't mold it to do what I wanted to. the scss code behind it really is huge, and its only easy to change the basic options. I scrapped the whole thing and rewrote it. plus I was waiting quite long each iteration to let compass recompile. I think the bulkier tools have their place with utility sites and web applications, but for a site focused on company identity, it seems too cookie-cutter for my liking. I resorted to using LESS with semantic.gs grid system. Its a very basic grid system, but allows me to control thing more with css, instead of too many classes in my xhtml. I think I like having more control over my tools, and thats why I like PW. Its kind of like the new lego... sure the starwars models look cool but, those giant peices used in a ship will only ever make another ship.
    1 point
  22. Here's a thread on creating a custom login: http://processwire.com/talk/topic/107-custom-login/ The ideas in that thread will let you create a front end login, but to keep users out of the PW admin you would need to create a custom module. I haven't actually developed any modules myself, but I'm sure someone can give you a nudge in the right direction.
    1 point
  23. Greetings, Thank you again to everyone for helping! It turns out that adding JQuery to ProcessWire is definitely natural and straightforward -- as I assumed it had to be, since everything else works so naturally here! I got my JQuery running properly on my test site now. To be honest, I don't know what was going wrong. I decided to just scrap all the files related to the script and start over... And this time it all worked. Thanks again everyone, Matthew
    1 point
  24. If it's a single page field $post->category->title If multiple, it's an array of pages $post->category->first()->title If think your example would have to be $pages->get($post->category->id)->title But no need to get the page as you already got it (or the bunch of them as pagearray)
    1 point
  25. I tried installing wordpress on the server and everything seems fine... Edit: NVM. I found the answer buried in the forums.
    1 point
  26. Ryan, it would be great to have also a sharpening option. I find that rescaled images commonly come out slightly blurry. PhpThumb uses this script to sharpen thumbnails: http://vikjavev.no/computing/ump.php Would that be something you'd consider?
    1 point
  27. I found this site by accident, and now I'm so happy that I did. Simplicity of PW really makes my life easier. Some other more popular CMS solutions have big forums with loads of members, but quantity != quality. I just started using this and already have two pages of helpful posts! Kudos to the 'fanatical support'
    1 point
  28. If you mean the Django CMS that is built on the Django framework, you can find a good starting point for the comparison here: http://cmsmatrix.org/matrix/cms-matrix/processwire http://cmsmatrix.org/matrix/cms-matrix/django-cms Just compare them both in the matrix. It is the old versions of both systems, so processwire has some more features then showed on that table, but it is still a useful comparison. For the comparison of the Django Framework (not the CMS) you could use sites like http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks. And I think that the information page http://processwire.com/about/why/ contains some good arguments for convincing the clients...
    1 point
  29. you.see templates->edit template->advanceded than.you see-> list of fields to display in admin page list for thumbnale check soma module
    1 point
  30. There isn't a method to grab width or height of single thumbnail. Never actually even thought about it, since you have defined those by yourself (they aren't actually dynamic values). I have been thinking of making cropping little less custom and work little like size(100,100) works. So you could say: $page->image->crop('thumbnail')->url; Then it would actually return pageimage and it would have all the methods normal pageimage has.
    1 point
  31. I have just made a little update to 101. The limit was hardcoded to 100. Since there's more than 100 now and some get filtered out, it wasn't showing all modules anymore. Added config option for apikey and limit and set limit to 200 by default. You should be able to update Modules Manager by Modules Manager.
    1 point
  32. jukooz asked me a while back how to stick the sitemaps into a template as he's using the multisite module and currently I guess that this module will pull the sitemap for EVERY site on an install...? This should work on a per-site basis having it in a separate template file per site as a workaround for now, but pay attention to the comments please as there are things to change per-site - please also note that this is un-tested and largely just pulled from the module and tweaked for pasting into a template for use instead of the module: EDIT: See attachment as the forum software tries to parse a URL in the code : sitemap.txt I've also updated the module (see first post) to v1.0.3 to check if the page is viewable before including it in the sitemap - I noticed that it was incorrectly listing pages that had no template file... oops!
    1 point
  33. Sorry about that... I am also discovering 'git' and I thought 'git fetch' was getting the last version. In fact, I used 'git pull' and now I have 2.2.9 and... Everything works as expected! Thanks a lot!
    1 point
  34. If you wish that content to stay same site-wide, easiest (and probably most logical) solution would to add field for that content on your home page and let the user edit it there. As an example, let's imagine that your content is plain text (or pretty much anything that doesn't need to be iterated through) and you've created a new field called "header_content" for it. After adding that field to your home template, you could do something like this in your site-wide header file: <?php echo $pages->get('/')->header_content; ?> I hope this answered your question!
    1 point
  35. This module adds basic capability to restrict page rendering to selected number of IP addresses. Note: this is only meant to be used as an additional security measure in addition to typical username/password authentication or something similar, not on it's own! Currently individual IPs (127.0.0.1), IP ranges (127.0.0.1-127.0.0.255) and CIDR format (127.0.0.0/24) are supported. You can also decide whether restrictions should apply to a) admin area and b) authenticated users. By combining these two options you could create a site with public access restricted to selected IPs while still allowing users outside those addresses to have full access after authenticating. Better description can be found from README. And once again: all comments, bug reports, feature suggestions etc. are more than welcome! So far everything seems to work as planned, but I haven't had the chance to test this nearly as thoroughly as I'd like (that's also why this little cutie is flagged "Beta" in the modules directory..) https://github.com/t...erIPRestriction http://modules.proce...-iprestriction/ How to install Copy PageRenderIPRestriction folder to your /site/modules/, go to Admin > Modules, hit "Check for new modules" and install Page Render IP Restriction. That's it. How to use Default out-of-the-box settings don't introduce any restrictions. You can edit module settings (Admin > Modules > Page Render IP Restriction) to include those IPs you wish to allow access to your site for. Once you've filled in at least one IP address and saved module settings restriction will be immediately effective. Please note that if you fill in at least one IP address and check both "Restrict admin access" and "Restrict access for authenticated users" you will no longer be able to reach Admin without valid IP. Make sure that you've tested everything properly before turning those options on (and avoid turning them on at all unless you're 100% sure that you know what you're doing)
    1 point
  36. The latest version of Form Builder (0.1.7) now has a File Upload input type, so we're a little ahead of schedule on having this ready. It's currently in beta test, but available for anyone that wants to try it out as a download from the Form Builder support board. So for anyone that was waiting for file upload capability in Form Builder forms, we've now got it.
    1 point
  37. Couldn't agree more with Adam. If what the client wants is exactly what Joomla, WordPress or some other system already has to offer (very unlikely, but possible) that's fine by me -- honestly, I've absolutely no problem with that. Actually most of time it'd be waste of time and money (my time, their money) to reverse-engineer an existing solution. Not to mention that it's just no fun at all. One thing ProcessWire is very good at (and many other systems seriously lack) is flexibility. As a ProcessWire user you can freely discuss with a client what she really needs, throw in wild ideas and if you both agree that those ideas would benefit the client more than some existing plugin/module with tons of unnecessary features, bells and whistles you can just build it -- without any unnecessary hassle and with remarkable ease. This way you're actually selling solutions, not features. Of course with ProcessWire you can also be sure that whatever you build with it is most likely more secure, way more flexible and much easier to maintain than anything you could build with pretty much any other platform. And just for the record, this comes from someone with years of experience maintaining WordPress installations. ("Years of testing", yeah right -- more like "years of hastily fixing bugs by replacing them with new ones.") All that said there are probably situations where you should either consider going with another system or just ditch the case. Sometimes it's just not worth it.
    1 point
  38. 1.) He's using Joomla. He can't understand this. 2.) It's not about the number of features. Actually, the less, the better- are you really using all of them? 75% of them? 50% of them? 3.) Years of testing… Right. (come on. If anything has 100% of code years-tested, it's probably outdated) 4.) Want to do it different way than your precious module? Yea, fuck you. [This is 95% applicable for WP/drupal as well) --- With building on huge CMS + modules, you end up doing a lot of compromises, which I'm not willing to do. And those are also the bad compromises, the ones users see (unlike e.g. Rails, which makes do stuff his way, but output and experience are in your own hands) --- Ultimately, I'm not selling my clients my ability to stick modules together. I sell the best possible website (in terms of Bussiness Goals and UX) I can create.
    1 point
  39. Any modules that extend: Inputfield, Process or ModuleJS will auto-load their CSS/JS files if they have the same name as the module and appear in the same directory. However, in order for that to work, their init() method has to be called. So if your module extends one of those, and has an init() method, then make sure to call the parent init() method: public function init() { parent::init(); // ... then your code }
    1 point
×
×
  • Create New...