Jump to content

Leaderboard

Popular Content

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

  1. festisve sasson to all from willyc i is work.on theme two bassed on majani butt many better earely preview butt two moister.hunger here u.is looks.and learn
    8 points
  2. 1. I dont see a good way to check/inspect if my Jquery libs are correctly linked as are my CSS sheets. In Chrome, click 'inspect' element, then click the network tab inside the inspector, there you can see what is loaded.2. I want to debug step by step the PHP code. In your config.php put: $config->debug = true; // Under no circumstance should you leave this ON with a live site. echo out, var_dump variables, to see if they have the expected outcome. 3. Read or watch movies about PHP. 4. Be eager !
    2 points
  3. Field dependencies are coming in ProcessWire 2.4, and I just wanted to give you guys a little preview of it. The development of this new feature is being sponsored by Avoine, the company where Antti works (he also specified how it should work). Field dependencies are basically just a way of saying that one field depends on another. It dictates which fields should be shown in a given context. In our case, it also gets into whether a field is required or not. This short video demonstrates how it works: (switch to the 720p and full screen version, as YouTube's default settings for this video make it impossible to see): // Edit @Adamkiss: Here's link for those on mobile: youtu.be/hqLs9YNYKMM The implementation here is done both client-side and server side. Javascript handles the showing/hiding of fields and the required vs. not required state changes. On the server side, it doesn't process any fields that aren't shown, and honors the required rules. A separate processing occurs both client side and server side, ensuring that the user can't make their own rules by manipulating the markup or post data. These field dependencies can be used with any Inputfield forms. That means you'll be able to use it not just in ProcessWire, but in FormBuilder, and via the API too. It's very simple to use from the API. All you have to do is specify a ProcessWire selector to either "showIf" or "requiredIf" to the Inputfield, and ProcessWire takes care of the rest: // show this field only if field 'subscribe' is checked $inputfield->showIf = "subscribe=1"; // show this field only if 'price > 0' and at least one category selected $inputfield->showIf = "price>0, categories.count>0"; // make this field required only if 'email' is populated $inputfield->required = true; $inputfield->requiredIf = "email!=''"; This feature will be in the 2.4 core (rather than as a separate module), so it will also be ready and available for things like module and field configuration screens.
    1 point
  4. A small PW-based site for a Swiss photographer has just left the door: http://www.nicolasaebi.ch/ Nothing too fancy here. A couple of gallery-pages, using mainly isotope and fancybox. Responsive. Minimal.
    1 point
  5. I'm trying to resize a logo to fit in a boundary box. Works great with only fitting the box. (see first 2 pictures) But I wished it could add some automatic scaling factor. +---+----------+---+ +------------------+ | |\\\\\\\\\\| | | | | |\\\\\\\\\\| | +------------------+ | |\\\image\\| | |\\\\\image\\\\\\\\| | |\\\\\\\\\\| | |\\\\\\\\\\\\\\\\\\| | |\\\\\\\\\\| | +------------------+ | |\\\\\\\\\\| | | | +---+----------+---+ +------------------+ If the original image has the same pixel dimensions as the box, the image should be shrinked like the picture below. +------------------+ | +--------------+ | | |\\\\\\\\\\\\\\| | | |\\\\image\\\\\| | | |\\\\\\\\\\\\\\| | | |\\\\\\\\\\\\\\| | | +--------------+ | +------------------+ If the boundary box has the same amount of pixels as the re-scaled image, we should re-scale the image again, with the highest amount of 'compression'. If the image contains little bit less pixels then the box, we should scale it less then the maximum scaling rate. If the image has 30% of the pixels of the box, don't re-scale it. to use: // single page image $logo = $page->image; // initialize the module $module = $modules->get("ImageFitBoundaries"); // max. horizontal space <--+ +--> max vertical space an image can take $info = $module->load($logo, 200, 95)->info(); $width = $info['width']; $height = $info['height']; // create the thumb $thumb = $logo->size($width,$height, array('sharpening' => 'none')); // sharpening none, due bug in png resize echo "<img src='$thumb->url' alt='$thumb->description' width='{$width}' height='{$height}'>"; Which Math genius can help me out. I started a Gist.
    1 point
  6. you can use the api, and selectors to 'query' your data. For the page fields i believe you can use a subfield selector, like SelectProf.title i'm not totally clear on what you are asking - did you do the following before posting: 1.) Read (study) api section on selectors http://processwire.com/api/selectors/ 2.) Look at the source code of the various profiles including the default, blog and skyscrapers 3.) Carefully looked at the cheatsheet and gained an understanding of the $page object http://cheatsheet.processwire.com/ you should possibly post the code that you are using now and we can try to troubleshoot what you are trying to do. It's hard to help when you only post a sort of theoretical explanation
    1 point
  7. Are they using different templates? In which case you can either add their templates to the search, or divide them up later by saying if($tdsphoto->template =="name-of-template") { and then set out the layout you want for each type.
    1 point
  8. <!-- HTML fragment --> <head> <link href="/path/to/jquery.bxslider.css" rel="stylesheet" /> <!-- jQuery library (served from Google), or serve your own --> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <script src="/path/to/jquery.bxslider.min.js"></script> <script> // this is document ready, put this after the jquery $(function(){ $(".bxslider").bxSlider(); }); </script> </head> <body> <ul class="bxslider"> <li><img src="/images/pic1.jpg" /></li> <li><img src="/images/pic2.jpg" /></li> <li><img src="/images/pic3.jpg" /></li> <li><img src="/images/pic4.jpg" /></li> </ul>
    1 point
  9. Yes, but there are cases with techy clients where you can not avoid that such a conversation comes on the table. I simply say that the coded architecture of processwire is open for both cms and cmf usage. I show them the api and the unlimited creative usage it allows you with html - api and php.
    1 point
  10. Sorry guys, I didn't see it was posted in the jobs channel, not good, must go to bed earlier. Not easy because I got the taste of php lately. Will look better next time.
    1 point
  11. This would give you a pager without enabling PageNumbers on template, thus using /?page=2 instead of /page2 $pageNum = $input->get->page ? $input->get->page - 1 : 0; $limit = 5; $start = $pageNum * $limit; $result = $page->children("start=$start, limit=$limit"); echo $result->renderPager(); foreach($result as $p) echo "<p>$p->url</p>"; echo $result->renderPager();
    1 point
  12. Just to follow up here in case anyone else ever runs into something similar: WillyC was correct about the issue here. It just needed to be an HTML HannaCode rather than a javascript one. Also wanted to mention I've posted an update to HannaCode, version 0.1.4 which fixes a couple of bugs having to do with the Ace editor. It fixes the issue where extra whitespace was getting inserted at the end of the code. It also fixes the issue where Ace sometimes wasn't active after doing a 'save & test'.
    1 point
  13. I'm nearly done with a site that has a very similar setup. It is definitely possible. The module linked above works well. In my case each mini-site admin can see the other sites, but doesn't have edit privs. If you had to hide the other sites, you could probably hide the main page tree and create a custom admin page that showed a truncated page tree starting at the top level page the mini site admin is allowed to edit.
    1 point
  14. Hi Jonathan, Mary started a similar discussion a while back: http://processwire.com/talk/topic/4349-thousands-of-pages-one-site-with-multiple-pages-or-one-install-with-multiple-sites/ I don't think it touches on user roles but as Craig said some custom code might do the trick.
    1 point
  15. I think ProcessWire will be able to handle this fine, with a bit of custom code thrown in. Ryan created a Page Edit Per User "proof of concept" module to demonstrate how a role can be used to restrict the editing of certain pages, so this will be an ideal place to start at.
    1 point
×
×
  • Create New...