Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. You would have to do it either manually or using the API. If it's only a few pages to deal with you could do it manually. Otherwise, use the API. Something like this. First, rename your current text field 'views_count' to something like 'views_count_old' Create an integer field called 'views_count'. Add it to your template (the one with pages requiring view counts) Backup your db Run the code below in a template file (doesn't matter which one) on a test install first if you can. If all goes well, run on your 'real' install If all went well, remove 'views_count_old' from the above template @note: Written in browser and haven't tested but it should work. If you have thousands of pages you will want to do it in batches foreach ($pages->find('template=template-with-views-count-field') as $p) { $p->of(false); $p->views_count = (int) $p->views_count_old; $p->save('views_count'); }
  2. Hi @Hantsweb, Glad you like the module. Technically, you can't 'attach' the module to a field in one of your templates . But I think I get what you are saying. You want uploaded files to be added to a field on some page(s). Before I dive into an answer, I hope in your upload implementation you've remembered to...'never to trust your users',...especially those who are allowed to add things to pages and whether what they've uploaded is immediately viewable on the frontend . Yes, the module does very thorough validation and will only upload what you've allowed to be uploaded but its always good to double check. Below are links to some code I've previously posted that will be of help. What is your workflow? Are user uploads immediately added to a page? Are there unique pages for each user? Are compressed files (zip) in play? Whatever the answer to these questions, the basics are the same: Upload files to your server to a specified temporary folder(s). During the process validate the files: JqueryFileUpload Iterate over the folder with the uploads: I always use PHP SPL class for this, e.g. RecursiveDirectoryIterator In each iteration, add valid files to specified pages (if those pages are not being created by the uploads): Use ProcessWire for this Delete uploads in the temporary folder Example code: https://processwire.com/talk/topic/10815-mass-create-pages-or-mass-upload-images-and-thus-create-pages/?p=101791 https://processwire.com/talk/topic/8416-importing-many-pictures-in-a-page/ If you are adding to files to pages directly after they've been uploaded, you will want to listen to Ajax requests sent by JqueryFileUpload like so: if ($this->config->ajax) { // you code here for iteration, creating and/or adding files to pages } Let us know if you hit another brick wall
  3. @joer80, I split your post (and replies to it) into a new thread since it was going off on a tangent in relation to the contents of this thread. The new thread (couldn't find an apt title - feel free to change it) can be found here: https://processwire.com/talk/topic/12765-distinct-pages-api-split-topic/ Let's continue your discussion there.
  4. Brilliant! Thanks. I was on a very old version
  5. I am having the same problem (also using paypal sandbox)
  6. Without changing the admin theme code (JS and/or CSS?), I think @Martijn's JS admin module could do the trick. I can't seem to remember its name atm...I'll check then edit this post Edit: The name is Admin Custom Files http://mods.pw/7i https://processwire.com/talk/topic/7588-admin-custom-files/ Edit 2: Or use the Reno Theme
  7. Hmm. It's not as straightforward as that. I was planning this as a commercial module so there are long term economic considerations to take into account. I am ready to listen to different proposals (and maybe we should start a new topic) about the way forward. What I have been working on is a full-blown calendar with a couple of bells and whistles - reminders, multiple calendars, categories, tasks, contacts, etc...the works...basically, a suite of features that a modern day calendar should have (but without going overboard with features to rival desktop alternatives ). We have a couple of alternatives to consider. Don't change a thing; go ahead as planned Fully funded by community - released for free to the community Fully funded by community - available for sale at a subsidized price Fully funded by community - released for free but with paid support Fully funded by community - initial release free, paid for upgrades Other variants of above, etc...
  8. @justb3a, RE comments, thanks for that. Silly mistake on my part. Now that I have gotten a little bit used to Magnific, I have been planning to replace use of Fancybox, even earlier than a 3.x release. Whichever way, it is going to happen, thanks.
  9. ProDrafts pre-release had a 'sale' (discount coupon) that run for 5 days ...It's gone now...
  10. ? You mean Ryan's ones? If other, Padloper recently had a sale, IIRC... Moving this to pub, btw..
  11. Module (version 002) now in modules' directory http://mods.pw/BN
  12. I think this is good idea. Personally I have a number of module ideas but have no firm idea what to prioritise. Something like this would be of benefit to me. As for a calendar module, I have been working on something for a while now. These are very old screenshots and will change. The module was based on dhtmlxScheduler but that will definitely change. Maybe I should release this module next
  13. Here's an old thread and Ryan's response A quick note for newbies....be careful not to invite the whole family ($page->find()) if you don't have enough room (memory)...you might need to limit numbers
  14. What? I get nothing for my troubles? ...Glad you got it sorted...
  15. In a hurry, short answer: http://processwire.com/api/variables/fields/
  16. Depending on your needs...http://kongondo.github.io/ProcessWireAPIGen/ E.g. method attr()
  17. Here you go German buddies (only 720p though on Vimeo)..
  18. Happy to announce that Media Manager (Beta 001) is ready for release! I had to change the view/edit modes to streamline these into one unified interface. I think it works better as can be seen in the video below (or if can't access YT, see this instead). I am working on the documentation this week and 'preparing shelves at the shop' with an aim to officially release the module next week or early the week after at the latest. If you can't wait that long and would like to get your hands on a copy soonest, please send me a PM. I am also finalising a pricing model. Initially, support will be via email. Thanks for your patience
  19. @jasonS, This is currently not supported but I can add it. If you could please file a request here so that I don't forget, thanks.
  20. How to use the API is right there in the first post in this thread
  21. @Ovi_S, Could you please mark your other two threads solved, thanks. Maybe also decide which of your three forum handles you want to keep
  22. Thanks @BitPoet. I read @Lenz post too quickly and assumed all the steps had been followed....
  23. Hi Citech. Welcome to the forums and ProcessWire. What @adrian said. Here's more info and workarounds/options:
  24. Hi Lenz, Welcome to ProcessWire and the forums I have not had a chance to test the module in ProcessWire 3.x (let alone install PW 3.x!!). For the time being, and this goes for all my modules, I have not had time to test (and hence will not be supporting) them in ProcessWire 3.x. I am just swamped with too much (other) work and might wait until PW 3 is official released to port over my modules. Not ideal for some, I know, but that's just my (current) reality
×
×
  • Create New...