Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. It doesn't save on repeater fields. It saves for normal fields.
  2. Awesome with the rows! Great work I'm going to test now. BTW why didn't you use my slider field? I know it isn't in the core... just kidding. I'm testing it since yesterday and have had some issues, and some very strange issues. - Thumbnails doesn't work. The edit links isn't found. Not sure whos responsible for this - can't see the images in the RT from an image field in the repeater itself. - When I add element, add image then delete it after save, after adding a new element the image is still in the there. - I think the slider collumn field isn't saving, because I have to reinstall first? haven't tried yet. Strange: - When first time testing I did a repeater in a repeater and it doesn't seem to work. I removed the repeater and added new normal one text,slider,image,richtext. After that I experienced being showed the error by my own "soft edit page lock" module, after saving the page with repeater field, that the page is currently being edited by myself... Somehow does the session change or something? Now I only expereinced this 2-3 times and now since I created a new repeater without slider it haven't seen it yet again. Though I'll try test again see if I can reproduce.
  3. Great thanks Ryan! The shorter the better.
  4. I've left that to you Ryan... was going to put it but thought someone else will BTW why can't this work? with 12,32,42,42 instead of |, would be even shorter ? $pa = $pages->find('template=' . $templates->find('name^=basic-')); EDIT: Problem is it doesn't seem to work for me here. ? EDIT: Ok got it This is the right one: $pa = $pages->find("template=" . implode("|", $templates->find('name^=basic-')->getArray()));
  5. lol all at same time! BUuuummmmmmmm. Love it. And the winner iiiiiiis?
  6. Hi lance, welcome. PW is very flexible and has no "Site" title as it's mostly something you set/code in your template. However you could use any field or page title field as the site name from any page you like. So maybe use the root node "home" on the top of the tree to define a site title for your website. To for example simply output the title from the root page use echo $pages->get("/")->title; Or if you want you could create a simple textfield ie. "site_title" and add that to the "home" template in PW. Then you simply change the above to echo $pages->get("/")->site_title; Another possible route is to use config file to add a title in /site/config.php $config->site_title = "MyHomepage"; then to you can access it from any php template like echo $config->site_title;
  7. You could do something like this: $tpl = $templates->find('name^=basic-')->first(); $pa = $pages->find("template=$tpl"); more likely... $pa = new PageArray(); $tpl = $templates->find('name^=basic-'); foreach($tpl as $tp) { $pa->import( $pages->find("template=$tp") ); } Fun.
  8. Don't know what you mean by for fields native? ah get it.
  9. I think I saw some evidence of this in the source code Yeah that would be a good concept. Though does the hash # stay in the address even after save? I don't think so. Isn't there a redirect in the edit page?
  10. Great to hear! Yeah I started few weeks ago already and then put it away a little. It's only kinda proof of concept, but works well so far. Just some things to consider. Currently it's just saved as session, so it opens the last "saved" tab, even if you go to another page or close, repopen it. I wanted it to try to make it so, that it would only save tab when saving page. So when reopen the page it would first be on content tab again. But maybe it would be cool to always have the last selected open. I'm still not sure how it would be best. How was it in PW1?
  11. Thanks Ryan! Glad you like it. Wow thanks, did you read my mind? I was about to look for this particular function to see if there's a way to map those. Thanks for pointing out! I'll quickly put it in and update the repo. Edit: Just updated the fieldtype, tested and pushed to github. Now we can use range.min, range.max in selectors!
  12. This behavior has been integrated in current nightly build of PW 2.2. It can be configured via WireTabs module settings. StayOnTab (Module for Processwire2+) This new module remembers the active tab you are on and opens it after saving, or reloading page. https://github.com/somatonic/StayOnTab This is still in progress. Just wanted to share and recieve some feedback.
  13. Or ? $elem->value = 1036;
  14. Or you can even use it to set states. For example use it like an option 1,2,3 This would be possible, but then why have a slider? This also would require to implement some validation through js or the module. I suggest, if you have large numbers you can put it in the near and use arrow keys to get to the value you want. EDIT: Just found that there seems to be a bug with the left range handle not able to move with keyboard arrow keys. I found out that the current jquery 1.6.2 core included in PW is the reason. I copied in latest jquery 1.7.1 and it starts working.
  15. Yes this is using jQuery UI skinning. Thanks!
  16. I've reworked the whole module to use integer fields and it works a little different now. Best of it is, it now works in selectors and uses real integers. I have updated the repo on github just now and also the first post to reflect the changes. If you installed it already you should first uninstall it before updating.
  17. Thanks slkwrm for the feedback. Greatly appreciated. 1. Sorry I forgot in the hurry to remove the site link at bottom. 2. I overseen to update topnav.inc, though that won't translate topmenu per se. You'll have to do a translateion for /site/templates-admin/default.php yourself. 3. see 2. 4. Seems that's caused by the messed box model, I've set a padding to input fields, that will cause it to be acutally bigger than 100%, and map marker css sets the inputs to 100%. I've implemented the new css3 box-sizing and it fixes the issue, though only for modern browsers. But it's ok I think and not a "big" issue. 5. I've made it a tiny little bit smaller Thanks, I've updated the repo on github.
  18. Well I realized it still isn't as good as I wanted. It has still a text field for storing data. And the fact that it can used as one value and two value range makes it hard to implement with only 1 integer table field. I'm not sure how it would be possible to have 2 integer fields on a fieldtype. So this current version doesn't work with selectors. Would it be possible to have selector like "range[0]>100, range[1]<120" ? I don't understand how selectors works exactly. Simplest would be for doing ranges is having two single value slider with real integer field type. But I think it's not as ideal. So i'm kinda stuck here and little overwhelmed with how this else could be implemented better. Edit: I think I'm on a path that works. Even with page selectors. I'm doing a little more testing and experimenting. Actually I'm diving a little more int PW's implementation of fieldtypes and how it works. So it works now like "range.data>100, range.data2<120", and output is array like before $page->range["data"]. Will hopefully get it working soon and update the repo.
  19. I recently updated the theme to support latest PW admin changes. Like site link, language and some minor changes. I've put the "Site" link simply into the top main menu at front. That's where it makes the most sense to me and it's the one with the least resistance and cleanest (not another element to decide where it should go and something to maintain) https://github.com/s...theme-pw2/tree/
  20. Thanks guys! Glad you like it. Thanks for the idea. Not sure where this could be useful though. But something with a "code" field would be possible. I'm more thinking something to be able to do floats. This could be done with formatter function too. So you could specify digits precision and have 0-1000 would really mean 0-10.00 - but operations like this could be done on output too. Also there's still some other settings that might be useful but these are more visual than functional. I'll add 1-2 more for type max,min for regular slider.
  21. I dont' think this would be a big deal. By that I mean to support it, it would just be the opposite of the one we got already. Though I could get confused when using both. But certainly something to consider.
  22. I don't really get it. Notice class has something to do with flash session data?
  23. Before we can repeat, we can slide! ProcessWire2+ RangeSlider Fieldtype This fieldtype let's you create slider input fields in the admin using the built in jQuery UI Slider. You can use it as a regular single value slider, or enable "Range" setting under details of the field edit screen, which gives you two number. In the front-end templates you can use the field as follows: If used as single value slider echo $page->fieldname If ranged slider is enabled echo $page->fieldname->min echo $page->fieldname->max Use in selectors strings With a regular single value slider $pages->find("range=120"); If range slider is enabled $pages->find("range.min>=100, range.max<120"); It comes with various settings. ------------------------------------------------------------------- - range enable - width of slider (%) - default value - min value - max value - step - prefix for displayed value(s) - suffix for displayed value(s) Download ------------------------------------------------------------------- You can download the Module from Github. https://github.com/s...nic/RangeSlider How to install ------------------------------------------------------------------- 1. Download and place the RangeSlider folder in: /site/modules/ 2. In the admin control panel, go to Modules. At the bottom/top of the screen, click the "Check for New Modules" button. 3. Now scroll to the RangeSlider Fieldtype module and click "Install". 4. Create a new Field with the new "RangeSlider" Fieldtype. Once saved you can configure the fieldtype, with various options under "Details" tab. I have made some testing, and installed on different PW installs. But if you find any issue, I'd like to hear. Have fun!
  24. What diogo said pretty much sums it up. It's quite simple and works. In many projects I work directly/remote on the server, most of the time it's a subdomain like dev.domain.com, once ready to go live it's just a matter of transfering or switching dns. There's no "best" way, its always individual to the one developing. I also have a setup on projects, where I can transfer files and DB using shell and rsync from live to dev install and vis versa. It can be handy if you want to do major tasks on the site and don't want to break live site.
  25. How about a slider you could configure to go from 1-3 Maybe different types of input slider with ranges would make a cool new inputfieldtype like my colorpicker. I will consider maybe doing one soon.
×
×
  • Create New...