Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/01/2012 in all areas

  1. Hi All, Long time listener, first time caller. Just finished this site for an irish photographer Philip White. Was my first attempt using processwire and have to say I love it. Was such an easy transition for me from using wordpress for the last few years. And most importantly Philip loves it too. The backend flexibility is great! http://philipwhite.ie/ Cheers Seán
    4 points
  2. (Formerly "Two useful things I found today") When building forms, I've always liked having placeholder text in certain fields. I like my search boxes to say "Search" in them for example and have used jQuery in the past to make the text disappear when the field has focus and reappear if it loses focus but no text was entered. I was stunned a while back to find out that I'd been missing a trick in that you can simple add a placeholder attribute to your input field, but don't like that the placeholder attribute doesn't work in IE and can be flakey in other browsers. As an example for those that aren't aware, copy and paste this code into a HTML page than then in a browser other than IE, then click in the field and then back out of it: <input type="text" name="test123" placeholder="this is some placeholder text" /> Fortunately my prayers were answered today when I looked at using placeholders again instead of lots of custom jQuery code when I found this jQuery plugin: https://github.com/m...ery-placeholder It basically lets you just use the placeholder tag as above and in browsers that don't yet support it it adds workarounds to mimic that functionality Wow, I do ramble on a bit eh? Could have just posted a link there and saved burning off my fingerprints with all this typing The other thing I found today was a decent PHP class to show differences when comparing code: https://github.com/c...oulton/php-diff - it's worth a look and has basic highlighting all set up if you download it and check out the demo. Just thought those two things might be of interest to someone at some point
    3 points
  3. Personally, I don't use CSS frameworks (any more). I base all my projects on the HTML5 Boilerplate, but that's mainly because it gives me a solid starting point, mostly in terms of CSS normalization and .htaccess defaults. I really love it's build script since it takes care of a lot of small optimization tasks. I also have a set of CSS files (actually SCSS) to "enhance" it, i.e. stuff I often or almost always need, but I wouldn't call them a framework, especially because they're very much tailored to the way I work, which might not work for everyone. Those include basic styles for forms, a sensible typographic baseline, some Sass/Compass mixins for some common CSS "tricks" and a very basic fluid grid system. It's really more of a toolbox. The "market" on CSS frameworks has become insanely huge and crowded with a lot of so-called frameworks which cover only a fracture of what a framework should cover as well a some which try to cover everything. (And that back to IE 5.5.) It's really hard to give a recommendation since what they actually cover is so different. Are you looking for "just a grid system"? Do you want something which covers everything one might need in building a site? Do you need support for Sass or Less? Do you want just a CSS Framework or some JS/jQuery widgets included as well? Twitter Bootstrap is very popular these days, unfortunately, a lot of sites built with it tend to look very much alike. Zurb Foundation is pretty similar. YAML is always a nice alternative if you need support for older browser; unfortunately, it's rather big because of the browser support.
    3 points
  4. Hi, I have a small framework called HTML Kickstart. http://www.99lime.com
    3 points
  5. If implemented in the core, it should be an option, not a default, I guess. Or at least, it should be possible to switch back to the "old" behaviour. (You'd be astonished how many people have difficulties performing a double-click.)
    2 points
  6. It depends on what you need. Curious as to what limitations you encounter in Bootstrap. Also, responsive is all the rage nowadays but not everything needs to be responsive. Anyways, some nice ones: http://foundation.zurb.com/ http://www.getskeleton.com/ http://www.gumbyframework.com/ http://www.yaml.de/
    2 points
  7. Is it this one? http://illo.clientsite.net.au If so then each image is a page under 'portfolio'. The part that drives the thumbnails and the main image looks like this: <ul class="thumbs"> <? foreach($pages->get("/portfolio/")->find("template=work-item, sort=sort") as $p) { if ($page->parents->has($p) || $p === $page) { $class = ' class="current"'; } else { $class = ''; } echo "<li$class><a href='{$p->url}'><img src='{$p->image->eq(0)->getThumb('thumbnail')}' title='{$p->title}' alt='{$p->title}' width='61' height='61' /></a></li>"; } ?> </ul> <img src='<?="{$page->image->eq(0)->size(0,373)->url}"; ?>' alt="title" /> Regards Marty
    2 points
  8. Think I agree with you yellowled. Think you do a double click with a timer, than you could set the doubleclick time. Or set on 0, to disable it.
    1 point
  9. Thanks Nico, this is basicly what I do. Though I got other github url to deal with (though it could be easily changed) but good to know github api.. I actualy also looked at your module when creating my module. New update 0.0.8 I commited a new update yesterday. Added additonal check for "allow_url_fopen" and throw error if not enabled. I changed to use copy() instead of curl. I tested it locally and on a low budget hosting and a good one, now it works on all without problems (though locally I got permission problems though not relevant). I found that using copy or file_get_contents would work better, curl gave me "open_basdir" (low budget shared hosting) error on which would cause problems if not configured correctly on server. So this should be better now. Not sure about other restrictions and limits (size?). Also improved the remove function to recusively remove the extracted folder after content is copied, it now also deleted .* files like .htaccess. If you already got it installed just click "refresh" then "update" the module. Oh and let me know if any issues arises. Edit: Heh, just refreshed and new categories and modules pop up! Love it.
    1 point
  10. Here is the first release version of the Blog Profile! http://modules.proce...s/blog-profile/ It is now up on GitHub as well: https://github.com/r...ign/BlogProfile Below is a lot more talk about this blog profile and how it works, but if you just want to install the profile and test it, it's not necessary to read anything further unless you want to. I've simplified this a lot from where it's been. It does all the same stuff on the front-end, but the code behind the site is no longer a huge departure from the basic profile. I've rebuilt this profile 3 times trying to find the right balance between making it as flexible as possible and making it as easy to understand as possible. I think it's got a better balance now than before. It's now at a point where it does everything it always has, but the template code behind it should be a lot more accessible and easy to understand. There is no longer a separate module or API variable. Everything here just happens in /site/templates/ files. Consistent with making it simpler, I've also removed the drag-n-drop theme support. While it was cool to have, it always felt a little dirty introducing some kind of proprietary theme support that was so different from the way I'd build any other site. This thing is pretty darn simple to theme as it is (just edit a CSS file). Maybe we'll take it further in the future, but we don't have many PW site profiles out there right now (1 or 2?) and so I decided this profile needed to stay more accessible on the back-end. How the template files work In ProcessWire there are any number of ways you can use your template files. In this case, we are using our template files (in /site/templates/) to populate 3 variables ($content, $headline and $subnav) and then including an HTML file (main.inc) to output them in the right places. The $content variable represents the center (body) column, the $headline variable represents the text headline of the page, and the $subnav variable represents the navigation that appears in the left sidebar. Once one or more of these variables is populated, the template file includes the /site/templates/main.inc file. That main.inc file is just a big HTML file that outputs the $content, $headline and $subnav variables in the right places. We've made an attempt here to separate most of the logic used in the template files from the output. Most of the markup is generated from files in /site/templates/markup/. These files are included from the template files to output specific things like a blog post, comment, etc. Because a lot of output needs are similar among the various template files, we've created a file called /site/templates/blog.inc that has a few shared functions in it. If you look in any of the template files, you'll see that most of them include blog.inc as the first thing. This blog.inc file also initializes our $content, $headline and $subnav variables, mentioned earlier. Outline of /site/templates/ with this profile /site/templates/blog.inc Shared blog-specific functions included by most site templates. /site/templates/main.inc The main HTML markup file through which everything is output. /site/templates/markup/ Contains PHP files that generate markup for specific things like posts, comments, etc. This is separated from the site templates to make it simpler for you to modify the markup if you want to. This is primarily used by the blog.inc functions, but also included by a couple templates as well. /site/templates/skeleton/ This is the Skeleton CSS framework. It is identical to the one they distribute except we added a wider viewport to it. You probably wouldn't have much need to edit anything in here. /site/templates/styles/ Stylesheets used by the blog profile. The most useful one in here would probably be theme.css, which contains all the color definitions for the profile. /site/templates/scripts/ Javascript files used by the blog profile. Not much is happening in here at present.
    1 point
  11. Awesome module, Soma. JUST what I needed. Thanks so much for it.
    1 point
  12. Usually you'd handle this with two roles. One role that has page-edit and page-delete permissions to be assigned to the template used by the child pages. And another role that has page-edit and page-add permissions, to be assigned to the parent's template. By "assigned" I mean, check the box for it to be "editable" to each of those roles in the template's access tab. Then you'd give the user both of those roles. But I realized after trying it myself that it wasn't quite working as intended. I committed an update to the dev branch so that it should work now. Btw, your client won't be able to actually delete anything either way. The definition of "delete" to non-superuser roles is just to move to the trash. So if you don't want to move to the PW 2.2 dev branch just yet, at least take comfort that if your client happens to delete something you don't want them to, you can always go back and undelete it.
    1 point
×
×
  • Create New...