Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Thanks for the kind words. Glad you like it. I also like it and thought long time about it. Happy it get's recognized ;D Good idea, I also worry about not being recognized by some. I'll give it a try. That would make sense I think. Well I thought judging by "used rarely" not always fits. I always worry about useful functions "rearely used" not being recognized when using simple mode. But I still also think having as few as basic as possible, will not overhelm the user on first sight. – I'll move them to advanced mode. There's a few such things that came to mind. Like this you mention here. For sure I will gladly add it. I think such things, mainly taken for granted by us experienced users, are dangerous to assume the users/new users will digg it. I remember not recognizing some things at first and getting confused a little. On the other hand it can get confusing for not so experienced php coders to have too many different ways to the same. I know of co-workers that don't like such things. What you guys think?
  2. Thanks Ryan, I think this was it. Not sure how this happend, cause I never played with autoload. I think I even reinstalled it. And before attaching it I reinstalled again, but I think I wasn't looking at the code after. Somehow I successfully messed up and after doing it right I didn't look correctly... Now it works, and gets loaded after jquery core. If you uncomment the scripts add in ___execute, and remove the module js one it should work. I commented them out to test. HF
  3. There's nothing special, pretty much what you describe. Theme doesn't matter... No other modules... I attached the module. But it's just rough code, nothing serious yet. DataTable.zip
  4. Thanks formmailer, you're too kind! Glad you like it.
  5. In the module's hook function you can do something like this: <?php public function someCustomFunction( HookEvent $event ) { // get page object $page = $event->object; // get first argument $some_id = (int) $event->arguments[0]; // current language $lang = $event->arguments[1];
  6. I'm asking myself why youre trying to make a loop to get 3 random images. Can't you just use $result = $page->images->getRandom(3) ? Then loop the returned three images? Haven't you used the Cheatsheet???
  7. I've done major update, just commited. - some restructuring, adds and removes - minor tweaks overall, typos, ordering - added "advanced" mode ADVANCED mode: Mainly it started with only "System Configurations" being advanced, but I added many of the more advanced functions overall to the advanced mode. 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. It will be cached on http://processwire.com/api/cheatsheet. Or avaiable also on http://somatonic.github.com/ProcessWireCheatsheet/
  8. I was also thinking about this... That looks like a great datepicker addon, didn't know it exists. thanks!
  9. Thanks, Ryan. Yes I'm doing it this way already to get it working. I add it through API. Yes the example getModuleInfo is untouched and there's nothing else, when I try again to have it loaded automaticly it get's added as first script before jquery core with the code posted. class ProcessDataTable extends Process { static $columns = array('id','title','path','modified','modified_users_id','actions'); public static function getModuleInfo() { return array( 'title' => 'DataTable', 'summary' => 'Provides ajax driven data table for pages.', 'version' => 100, 'href' => 'http://processwire.com/talk/index.php/topic,637.0.html', 'permanent' => false, 'singular' => true, 'autoload' => false, 'permission' => 'page-edit' ); } public function init() { parent::init(); } public function ___execute() { ...
  10. Ryan, if something could be there to make this possible, that would be awseome. The thing is I use the edit/add hook to make WHOLE branches from the root editable, like for whole language tree of a multilang site. So there's de-ch,en-ch,fr-fr,en-fr,de-de branches, and I give edit access on user level via page reference field to one or two of those, so the other languages are also visible and a little confusing, as there are so many in one PW install (I know now I could use symlinks to setup a PW for each and share templates, but I think it isn't really an option as there is central branches that all language sites need access to). I know there's different needs and situations but if used like for whole main branches it works straight forward. I don't need to give user access to a subpage only. It only root pages and all subpages of it.
  11. Ryan, the modules is autoload=false I just copied one to start with... class ProcessDataTable extends Process { static $columns = array('id','title','path','modified','modified_users_id','actions'); public static function getModuleInfo() { return array( 'title' => 'DataTable', 'summary' => 'Provides ajax driven data table for pages.', 'version' => 100, 'href' => 'http://processwire.com/talk/index.php/topic,637.0.html', 'permanent' => false, 'singular' => true, 'autoload' => false, 'permission' => 'page-edit' ); } public function init() { parent::init(); }
  12. Hehe funny. I'm using "_images_tab" for tabs. The other day I was trying to get them more visible by renaming them to something like "____________images_tab" - but it wouldn't let me and rename it to _images_TAB, seems like only one "_" is allowed. I was a little bit sad, but found it's ok for now, and was sure it will come up somewhere. Good Idea with the indent Ryan!
  13. Do you know there's tabs fields you can use to create custom tabs and put fields there. I'm using this quite a lot.
  14. ... or maybe "Tree" I agree, and good idea. As this is what I'm needing too, to define it per template. We were already discussing such things. Also a good feature would be to have an icon per template that show in the tree.
  15. Great, I'm glad it was helpful for you. Thanks for sharing your experience! BTW I'm just working on a update with some things removed and some things added. Ryan helped some to double check everything is right and he made suggestion to move some parts or make them as an advanced mode that can be turned on or off. I think I'll have it ready this weekend.
  16. That's what I got already. I add parent pages/branch they can edit to the user. It then is like a workspace. Other branches/pages then just don't show the edit/new actions, only view. Again it's like workspaces for language trees and other branches/sections, so I'm not defining it per page, but it can do it. So this is not an issue much. I'm not willing to release it as an official module. It's too simple and something I still think should be possible with PW out of the box. It's too specific, depends on setups like the roles etc.. so it would require much more to make it work well as a plug in and ready to go module. And since I'm not sure what PW brings in the future, I tend to not go so far and leave it as a simple "modifiy to my needs" hook module. But I posted the code example in the forum two times already. Here for example http://processwire.com/talk/index.php/topic,524.0.html
  17. I have a setup where I use a simple module to define editable page(s) for users via a page reference in the user template. The module has hooks after into Page::editable and Page::addable to then check for pages that are editable. This works fine so far. But how would it be possible to just show the editable pages in the tree? So other branches are not visible? I tried with a hook after Page::listable , then if it's the root node "/", it returns true. But the branches are still all listed. When I clik on one he has no access, it throw the exception. So is there a way I don't see, am I missing something?
  18. Hey, congrats on the module. This can be very useful I guess, will check it out soon.
  19. Hold on ... , usually he's much faster! ;D
  20. Hmm.. it just a normal process module extends process. On install I create a custom admin page using the standard admin template and add it to the admin folder. Nothing special here. I create a JS file with the same name as the module and it get's loaded automatic, just on top of the js scripts as the first. Don't know what could be different from others or special about it.
  21. Hey tsd, welcome to the forum! PW is designed to work flexible in many areas. Pages are, data objects, models what ever you call them. "Page" is more seen as an abstract term for what is a container for whatever data you want. I ust built a big webpage, 3 domains, 3 websites each in 2 languages trees all in one PW. And there's all kind of reusable stuff, central download elements for all languages zentral and also local, many different types of accordion elements (done with subpages) so you can felxibly create them and sort them the way you want. And it scales and works very well, all things are used the same way and once you get on how to set up various things, and know all the tricks, you can't beat it. It's not a workaround, it's how PW is designed to work. It just feels wrong but you have to get rid of thinking it's a workaround mainly. So it's right to use page reference to have elements on "homepage" for example. I see the way you want to go with the separate tree only for defining a navigation, will probably work very well, but why not use the structure to build the navigation. Though I think it's possible to use it like this, I think it could have some side effects on complexer sites. Though, I agree there's room for improvement as with all, also as it's still a young project. There will be many improvements here and there I guess, we soon will have things like flexible content elements on a page and many more to come. After a while you will realise it's not as a little software as you might thought. It's a Weightlifter in the body of a ballerina. So I like to discuss such things, and share thoughts an experience between users how different things can be archived.
  22. Yeah I used it in some projects too. It has many great features that can be used and the API is great. Since I knew already how it works, It took me only a few hours to get it fully working, combined with PW's selector API it's as easy as pie, though has some pitfalls, someone not so experienced will have hard time. Tell if you want my current version as a starting point. But it's very rough code still.
  23. yes, and in modules you can also use $this->pages->find(); $wire->pages->find();
  24. Yeah, it's fully ajax. Pagination, filtering, sorting... and it saves state, so if you come back it's on the same spot. It's very cool and fast. I see this as a great alternative to the page tree, when dealing with large lists of products.
  25. ProcessWire DataTable 1.0.0 (https://github.com/somatonic/DataTable) This module enables you to find and edit (fancybox modal iframe) pages at a small and very large scale. So far it has: ajax suuport masked pagination state saving (datatable using cookie, template filter using session) template filter (only showing templates user has edit access) search text filter (using title|body field) multilanguage support (PW's language translator) Superuser will see all pages and system templates. Users only those with view|edit access and pages in trash. This Module is still very simple and only in "lazy" developement and testing and this is the first official release mainly to get it out for others to see and use. It also could provide as an example/kickstart for someone. Everyone is encouraged to help and contribute to further improve or add features. The module is hosted on my github account: https://github.com/somatonic/DataTable The plugin used in this module is the excellent jQuery Plugin DataTable 1.8.2 - http://datatables.net/ I've chosen it, because I used in in some other web projects and was really happy about it's power and ease to setup. It supports jQuery UI styling, which makes the deal perfect for a ProcessWire module. Thanks and have fun trying it out. ------ (original post, kept for nostalgic moments) Ok, I started trying to implement the great jQuery dataTables plugin into ProcessWire. So far it works very well and is very powerful and fun. Best of it it support jquery themeroller. Not sure how far this all can go with configuration and how to define which pages should be displayed, what collumns etc... Many many things to consider. But if it could provide as an example on how to implement it, it would be great tool for site builders. Here you can see a short video of how it looks and works.
×
×
  • Create New...