Jump to content

Ivan Gretsky

Members
  • Posts

    1,450
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by Ivan Gretsky

  1. My opinion is that there always should be a verbose, but obvious way to do things. And a cool shortcut way like the +. The verbose obvious and native to PHP way would probably be the 3rd argument. With variables we just do .=, which is a language native construction and easy to understand by anybody, not only someone like @horst , me or anyone who loves PW and reads every blog post.
  2. It is always important to eat your own dog food. It is interesting how coming to site design with PHPStorm at hands can change the whole API paradigm at once) As now we have at least 3 ways to call an API variable it would be incredibly important to have a detailed explanation about how to take a decision what to choose. Most of us used to use $page, but newcomers starting with demo profile will be using page(), and we are not even touching on wire() and $wire. It seems like @ryan is more into the function interface (you wouldn't be inventing it other way, would you). Please consider making an article about when to choose what, if you got time. I really like the regions functionality, but the + at the beginning and at the end seems magical and probably goes against the initial functional interface intention to have closer IDE integration. I do not think this could be advised by IDE (or am I missing something?) Is there or should there be other more convenient way to append and prepend to regions?
  3. Ok, I think I got this figured out. When you call something like $map->render($page, 'map', array('id' => 'jsMap',)); with the id option the wrapper MarkupGoogleMap js object is created with the same name as id provided. The google maps object is accessible as its map property, like this: jsMap.map; with all the good stuff from the API at your disposal.
  4. Cool! That immediately comes to mind is some wild wishes: add a generation script @LostKobrakai's Migrations and we got a nice GUI-based migrations for PW; add comparison to remote installation. Big thanks!
  5. @bernhard Thanks for that. But the thing I do not understand is how to get the right map object in js. It should be instantiated already by that render method (hope I am using the right terms))
  6. Good day! Really sorry if this has been answered - I really tried to read through 17 pages of this topic, but I could easily miss something. I need to implement map re-center on window resize. I found this tip among others, but I just do not know where to put the code). I generate markup in php the standard way like this: <?php echo $map->render($page, 'map', array('height' => '400px')); ?> Please point me to the place I can put all those event listeners from the Google maps API.
  7. That is a nice question that has been risen a few times in a context of paid ryan's and apeisa's modules. I do not think there is a solution to this yet.
  8. I think this one little upgrade is worth being mentioned in the blog post. If I get it right, we are finally able to address page save and field save events for the page in one hook! Wow!
  9. I have large images on a site which I will be creating variations from. The customer wants to watermark-protect large images. That is possible to do with @horst's Page Image Manipulator. I will be also creating thumbnail images, which do not require watermark. The problem is it is quite easy to guess the url to the original image from the variation name. Is there a way I can restrict the access to original images?
  10. I think that embedded goggle map object will auto scale to its container and will fit much better, than static image. I would do that if there were no restrictions on using it.
  11. I can't remember where and if it is even true at all, but it seems to me I saw some helper functions in PW to do exactly that - summaries limited by words + ellipsis. Does anyone know what I am talking about?
  12. You got me right. Ok, will go for CustomAdminFiles.
  13. I got all tabs but Content turned off. So the lonely Content Tab seems unnecessary and confusing. I thought that it would be better to see no tabs at all when only one is present. I know I can rename it, but that hardly makes it look any better. I surely can live with this tab, just wanted to know if there is an easy workaround.
  14. Not sure if this one is connected with the module directly, but still... Is there an easy way to hide the Content tab if all the other tabs are disabled with permissions?
  15. @LostKobrakai You should try to communicate that to Ryan if you have the means to, as it is something important for marketing. I did try to mention it earlier, but with no luck. I think there is still time to rethink and redo the transition to the new repo.
  16. Numbers do not mean a thing in themselves. It is the human perception that makes any kind of symbol play role in the real life. So this one is to help our perception make ProcessWire a lucky piece of software)) P.S. And this is another call for everybody on github to star the new main repo, as the stars from the old one obviously were not transferred)
  17. Good day! It seems like I got about the same question, so will post it here. I have this code $nextAction = $p->next_action; try { $this->$nextAction($p); } catch(Exception $e) { bd($e, 'Exeption!'); } and it does not work if a call a method that does not exist. I get a WireException, and it is not caught by try/catch. Is there a way to make it work? P.S. bd() is from awesome Tracy Debugger. If you do not use it yet you certainly have been away to a far away planet or do not do any code in PW .
  18. Good day, @adrian! Is there anything preventing you from publishing this one in module directory? I only found it 'cuz I knew where to look for .
  19. Good day! I got a repeater with 2 Page fields inside of it. The second one is only visible if the 1st one has a value. This is possible since this release. Now I need the selectable pages of the second Page field to be the children of the 1st one. And this is where I am in trouble: the $page variable returns the page that the repeater is attached to, and $this return the InputField. Is there any way to get the current repeater page in the Custom PHP code to find selectable pages?
  20. @Jonathan Lahijani Great post and a wonderful case! Could you tell a bit more about how admin workflow is organized and how admin interface is customized for each role? It seems like there is something going on both in frontend and admin at least for some roles. And the admin theme seems to be modified (at leas there is no PW logo at the top).
  21. So there is no way to format it in List of fields to display in the admin Page List template config? I could not put no php functions like date() in there. Am I missing something obvious?
  22. That is the topic I was looking for... What if I need to output a created date? Could not find output formatting for it.
  23. Come on, @horst! You could be a modest person, but publishing modules under different names is too much. I am used to rely on authority a bit while choosing a module to download. Your name and the vast amount of good stuff made under it has always assured me I can trust that another one new. Probable same for others. Or is some technical issue?
  24. I guess you can use this method to check the existence of a filename: $page->template->filenameExists(); But it will probably not cover all cases. For example, when there is only one controller-like template for all templates. And I did not find a selector for that, so only in a foreach loop.
×
×
  • Create New...