Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/15/2012 in all areas

  1. Share your experiments. I thought I'd share something I've done a little while ago experimenting and trying out things you can do with js and SVG. So vector graphics for the web even older browsers can (IE had VML). 1. One is the famous Chromachron watch, I've created an accurate browser version (with a little twist in the center, which is not on the real clock). Done using the amazing javascript SVG library RaphaëlJS. http://soma.urlich.ch/chromachron/ 2. A fun experiment with RaphaëlJS for drawing and toxiclibjs (from java), a great physics library for the physics. You can click to fix the tail of the spring. (better have a fast browser) http://soma.urlich.ch/toxictale/ Have fun.
    2 points
  2. I'm gonna release this in couple of days, still isn't finished, polishing up the details. Here is a sneak preview...
    2 points
  3. One of the ways is to extend user template (don't forget to set filter to display system fields in the list) with a new field "viewable_pages" of a Page type and let site admins select pages that user need view. In order it to work you have to add additional check if the current page is accessible to a user into all of your templates (you can do it in the header you include in each template). Then if the page is in the list you output it's content to a user otherwise you redirect them or show them an error message. Should be something like this: if ($user->viewable_pages->has($page)) showUserContent(); else showError(); This is one of the basic methods, there are many of them, as always in PW
    2 points
  4. I finally started a Cheatsheet for ProcessWire2.1+ Now it's also on processwire.com (auto fetching it from git) http://www.processwi.../api/cheatsheet The github project page: http://somatonic.git...WireCheatsheet/ And there's the git repository: https://github.com/s...sWireCheatsheet I'll continue to add or remove things as times goes by. At some point this will get converted to a PW App. 02.06.2012: - added with $input->urlSegments - added support for GET param in url to &filter and set &advanced - added support for hash in param to filter section 06.02.2012: - updated urlSegment($n) description to avoid confusion - remove some of the alternative syntax 17.12.2011: - added new section "Files" to the sheet - minor structuring of some advanced entries 08.12.2011: - added fix to menu when scrolling - moved some entries to advanced mode - added toggle button on sections - minor changes 04.12.2011: - some restructuring, adds and removes - minor tweaks overall, typos, ordering - added "advanced" mode 27.11.2011: - Added index collumn on left side - You can now toggle sections using the index - Also toggle show/hide all description of a category when clicking on blue titles. - It resets all if you click in the table somewhere (in white space) ADVANCED mode: Mainly it started with only "System Configurations" being advanced, but I added many of the more advanced functions overall. I don't know if it really is the thing to go, but I thought why not try to have very simple and basic version so it would fit on a matchbox . So they're my guess on to what would be the more advanced stuff, and I had kinda hard time to decide what to do and how. After long back and forth I decided to just give it a go and see what people think. Filter I noticed that in mozilla, the live search filtering wasn't working after the changes i've done to it. I figured mozilla has no innerText, which is very practical to get content of a node but not subnodes. I had to use textContent, which returns all text including subnodes, so the search filter doesn't work as good as in other Browsers. May I find a way to work around it. *Found that restructuring the markup was the only way to solve this problem. It should also now work much better in FF for the live search. --- Bug reports, feedback and suggestions are always welcome. Hope you like it!
    1 point
  5. I've been asked how to integrate Will Bond's Flourish library with ProcessWire so I thought I'd post the code I use. I downloaded the Flourish classes (not the whole flourish project) and put them into /site/.flourish. I then pasted the following into the top of my head.inc file. function flourish_loader( $class_name ) { // Customize this to your root Flourish directory $flourish_root = wire('config')->paths->root . 'site/.flourish/'; $file = $flourish_root . $class_name . '.php'; if (file_exists($file)) { include $file; } } spl_autoload_register( 'flourish_loader', true ); After that, you should be able to use flourish classes anywhere in your templates. NB, if you do download the whole flourish project into .flourish, then read Alan's post on how to adapt the above to your layout.
    1 point
  6. This I like more: http://www.photoswipe.com/ Ok not really lightbox, but nice gallery for different devices.
    1 point
  7. Hi mrs, Are you using a language gateway approach like on the example website? e.g. /en/contact or /de/contact where /en and /de are gateways that change the language. If you have a language gateway setup you could use something like this : //what is the current language $lang = $user->language; //this line sets the language to sites default. //"default" is the name of the sites primary language, in this case it's English $user->language = $languages->get("default"); echo "<li><a href='/en{$page->url}'>EN</a></li>"; //this sets the language to German, so you can get the pages URL in German $user->language = $languages->get("de"); echo "<li><a href='/de{$page->url}'>DE</a></li>"; //this sets the language back to current one again $user->language = $lang;
    1 point
  8. Just stumbled upon Fresco. It features a responsive (even my mother is responsive these days) lightbox, fullscreen zoom, retina-ready skins (sweet), Youtube and Vimeo integration for HTML5 video and a powerful Javascript API (seems cool). Haven't used it, but looks really nice.
    1 point
  9. Hi everyone, Here's a site for Bettina Guthridge, a talented book illustrator from Melbourne. http://bookillustrator.com.au/ Regards Marty
    1 point
  10. i.am first you can puut this in your head.inc tamplate or some includeded file before.u are doing $page->url $pages->addHookAfter('Page::path', null, 'hookPagePath'); function hookPagePath(HookEvent $e) { $page = $e->object; if($page->template == 'article') $e->return = "/blog/$page->name/"; }
    1 point
  11. Alan, You got it! Yes, PW's default .htaccess file prevents web access to directories starting with a period. Also, like Soma said above, all of the flourish classes need to be in that .flourish directory, not some sub-directory of it, if you want the class loader I posted to work out of the box. Have fun!
    1 point
  12. Looks like the date class isn't loaded. Make sure you have all classes in /.flourish and not in a subfolder. So should be like /.flourish/fDate.php.
    1 point
  13. I do need to make a follow-up tutorial, and am planning on it. I think the best next-step in the documentation would be to read these, in this order: http://processwire.com/api/templates/ http://processwire.com/api/selectors/ http://processwire.com/api/variables/pages/ http://processwire.com/api/variables/page/
    1 point
×
×
  • Create New...