Jump to content

Macrura

PW-Moderators
  • Posts

    2,765
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Macrura

  1. hey joe - what about something like this https://processwire.com/talk/topic/4991-sub-arrays-dates-times-and-pure-hell/?p=48484 which starts with the events and creates the array of years from the unique values of the event years, sort of coming from the other direction i guess..
  2. you might need to make an array for your options and then use array_unique on the options list..let me know if you need code example; running the 2 loops should work fine, i think that is the processwire way, because you are pulling a value from a page so there is no way of knowing which are duplicates until after you put them all in that array http://www.php.net//manual/en/function.array-unique.php
  3. i usually do this: $totalPages = ceil($total / $items_per_page); edit: ah - just noticed adrian got there first...
  4. have you checked the console - maybe there is some error; last time something like this happened to me there was an issue with a conditional field which was causing an error and halting parts of the editor screen to load....
  5. i'm actually referring to PageTable but i don't know if there is a dedicated thread yet for that one; it would allow you to manage your child pages (add, edit, delete) from the parent page, in a sortable list; you can click on the item and edit it in a modal lightbox. you can also configure the fields to show in the table, and also custom auto name for the child page titles; so all in all, a very handy module, and the pages you manage don't have to be children, they could be somewhere else and you would make the pageTable field and setup the preferences there.
  6. this module is really helpful - here are some example use cases that i'm using for: 1.) i made a field at the top of a gallery item template which reminds the user to crop the frames and center the images prior to uploading, as well as some suggestions for naming conventions; so now when someone is adding an item they see those instructions right at the top of the editor; if there is a particular problem with any item in the gallery, i could as the superadmin go to that item and make a further note that this item has a problem.. 2.) i have a template for a class session which is edited using the PageTable module, and when editing that info in the lightbox it can be hard to sometimes remember which class you are editing, so i have a field at the top that says "you are editing a session for {class.title}" so i'm using this for context-aware inline help
  7. @pleini - welcome to the forum. to make it easy i would keep the editing all on one screen; then use URL segments to show the different field on each of the virtual pages; but if you need something where the fields are not fixed and you can't predict what the child pages are, you could use the new PageTable module and use the child pages for those; in that case you would still be able to manage the child pages directly on the main page;
  8. ok, figured it out, sorry for posting an error that wasn't really this module... it was something to do with the conditional visibility of fields that was breaking my repeater... thanks again.. this is all sorted!
  9. @teppo - great! thanks again for this module.
  10. @Martijn, thanks, i'm not sure what the problem is, just can't get values to save in these repeaters i have; i will keep testing/troubleshooting this; i tried changing the path, checking/unchecking the hide file extension, and i checked the database.. they just don't save.. thanks for you help.. nothing urgent...
  11. @martijn, thanks for that update! this works for sure now with regular pages, only issue is that i can't seem to get it to work with repeaters, i looked at the code but nothing popped out at me as to why this would be the case..
  12. @Adrian - looks really good! In the use case i have, my video page has options for youtube, vimeo or local video; with the local video, some of them were very large sizes so i didn't feel like bothering with the uploader; for the html5 video, i have mp4 and webm versions of both, plus the poster image...so i have a media folder in /site/ for all of those things.. having the ability to let the user select the video file makes this whole thing possible.. but i will look into your module for sure on future stuff and i'm redoing a site now and will probably upgrade my system to use your module... will comment on that thread soon!
  13. hi Martijn - i'm pretty sure the value is not stored; i ran a quick selector and the field is showing as empty...
  14. having an issue with this, the select works fine, but the field doesn't save... any idea what might be causing that? cheers!
  15. $blue = $pages->get('name=blue');
  16. Having an issue here with this - the markup field shows for the non-superusers, but they are not able to save the page, basically they get an error saying they are not able to edit that field, even though that field is not being edited... this is such a great module, and so needed for inline help and instructions, notes etc.. hope this is not a hard fix!!
  17. this is great...! i was trying to write this module about 2 months ago and couldn't figure out how to do it.. edit: brilliant, works perfectly, and even works using ../ to get out of the templates folder... this is going to be extremely useful for html5 video, selecting files to be used instead of uploading to processwire page.... and in other situations where we want to store large media assets somewhere else in the filesystem.. many thanks for this.
  18. hi jordanlev and welcome. processwire is so flexible that you could probably emulate all of your favorite features of Concrete5 very simply and quickly, using some custom modules... I started with Joomla way back in '06 and i probably still retain a couple of concepts that i liked about that system (they might have had 1-2 good ideas); for example i tend to favor building my own navigation system like Joomla does, since i always tend to need a ton of flexibility with menus and i can't deal with being tied to the page tree. likewise there are plenty of wireites who defected from modx but still retain some of the logic of how that system worked, and apply it to their PW workflow; Recently kongondo released a blog module that is sure to close the argument for any remote reason to mention wordprass*... I started helping a couple of clients build shopify sites, and after using that system, looking at their templating language and seeing the backend management, i was surprised because i thought it would be more advanced; a simple example is with PW's image handling, which in itself saves huge amounts of time; with most other systems you have to resize the images prior to loading them into the cms.. but of course the thought immediately occurred to me about how easy it would be to 'build' a clone of shopify with PW, maybe using the shop module and a custom admin theme... so i really appreciate you explaining the pros/cons of Concrete5, and what innovations, workflow benefits etc that it uses... and i think some people here on the forum will probably come up with suggestions for how to implement those things with PW; i think you'll discover that because the way PW is structured, you can typically accomplish the same thing in PW in about 1/10 to 1/20 the code. (I know this for a fact as i have converted a couple of really complex wordpress themes to PW and the code trash was quite significant).. *spelling attributed to willyC
  19. interesting suggestion, and i know what you mean... if you have a lot of files, then it would be easier if the uploader was on top
  20. @benbyf - many thanks for checking this out.. (also want to compliment you on your sites, haven't commented yet, but they look awesome!) @lpa - not sure what the issue could be, i tested on 10.6.8 with Safari 5.1.10 and it does work.. *however* this site is using cloudflare, so i would have to surmise that cloudflare is messing something up.. because the mp3 player is based off soundmanager2 which is like the most reliable html5 play engine out there... i wonder if anyone else is having any issues? this is the first problem report i have received...
  21. I've figured out a way to have this work in both scenarios, though still a bit hackish.. https://gist.github.com/outflux3/0a013ea20b46e706a6f9 say you have pages being managed by PageTable, and they all live somewhere other than children of the page managing the pageTable items, and you want to be able to have a visible page reference field on the PageTable items; when editing the item from somewhere other than the PageTable, the module first checks to see if it is already in the PageTable array and if not, it adds it (using the page reference).. when you add it from the page managing the items, i have the users leave out the page reference and then when saving the page, it sets all of the items that don't have the page reference, to the page where they are now associated with.. hope i'm making sense...
  22. i tried using the shortcode module, and it is promising, and quite different than hanna codes; shortcodes allow you to have an opening and closing tag so you can enclose things within, which allows you to use them for things like tabs and accordions; hanna code is very usable/flexible, but it doesn't know about things between each instance of itself (no opening/closing)... also the shortcodes module doesn't allow for using more than 1 shortcode on a page.. i think it needs more work; but it would be good if we could have a shortcodes module that works as well as the wordpress shortcodes, since there are still some rare use cases where shortcodes can be useful... custom fields replaces and is superior for the most part to the concept of shortcodes, which is probably why the need has not come up much on PW. And end users always mess up with shortcodes, like putting them in the wrong place in the RTE (like inside a heading), or forgetting to use the closing tag, and consequently break the layout on pages too easily...
  23. What i would do is have a custom management page with a table showing all the tracks and then i would output the page ID in it's own column so they could double click it and copy it into foxycart. but short of that, yes you would need to grab the page id from the URL... funny though - most labels i work with already have catalog #s for their albums; a good sku setup would be the page for the album - page for the track (like 2034-9812) then you could at least see which tracks are part of the same album...
  24. 1.) $var = $page->mytextfield->placeholder 2.) don't know 3.) no, you can't do what you are requesting; if you need that behavior, use repeaters. 4.) you can't, the filenames need to be sanitized, and also they need to be maximally compatible, which is why lowercase and no spaces - also no international characters (though there is still a bug with uploading files that contain characters with accents etc.)
  25. i always use the processwire ID for the code in foxycart; <input type='hidden' name='code' value='{$page->id}' />
×
×
  • Create New...