Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. Just to see if the module has been loaded anytime previously to then get data that has been set to it for output at the end of output. It's just to not load it on every request and on every page, just on pages I need it. But I guess I can also solve it differently with populating a variable, anyway.
  2. Ok , class_exists() doesn't work as the class is loaded even if the module not loaded.
  3. Ahhh yes of course. But as a $mouldes->isInstalled("module") already exists it might be cool to add that too
  4. Is it possible to have a non autoload module and then if I load it somewhere in the templates to check later if the module has been loaded? Does this make even sense? Example, as soon as I call the module somewhere $modules->MyModule; it is loaded. So something like this exists? $modules->isLoaded("MyModule");
  5. That would render the cart.
  6. There's a readme in it with a step to step guide to install and run a Shop. You put all files in a folder for example "Shop" or "ShoppingCart"
  7. You could try reassign the field and its content manually or with the api. But currently not at computer. But maybe someone else. Although you have to attach all the right processes so not easy.
  8. You're screwd. I don't know how to recover cause that's most important you removed. Maybe a backup?
  9. The only drawback I see is that WireArray is always single level and not nested, so chunk() would have to change that concept. I think if you post this in Wishlist forum, Ryan will have to tell.
  10. $arr = $page->images->getArray(); $arr2 = array_chunk($arr,2); foreach($arr2 as $key => $chunk){ $content .= "chunk$key<br>"; foreach($chunk as $c){ $content .= "$c->url<br>"; } } Though not sure if getArray() really is optimal, but I guess so. But like the idea of chunk() for WireArrays maybe.
  11. Don't be afraid of PW and its modules, hooks etc. They're worth learning and not really complicated if you grasp the concept, really. Compared to other systems this is fairly simple. I showed you an example of a property hook in the RSS markup thread remember? Also there's some infos on the forum or other resources that would help you understand (I think teppo's write up here is also good). And of course the HelloWorld.module that comes with default install shows exactly those simple hooks. Play around with it and be in awe!
  12. Just as a sidenote regarding clients uploading tremendous large images: Also wanted to mention that you can set a max image dimension in the image field input settings. This allows to for xample say 1280 x 1280 is max and any image uploaded that exceeds the max with or height gets resized to 1280. This is one of the best settings cause it helps keeping images in a reasonable size when uploaded. If you combine it with the ImageMinSize module you could even have a min size.
  13. Resize it to something that is used at maximum size. Adaptive images would be the next step but there's no best way I'm afraid.
  14. Have hard time understanding your namings and relations and some of the code doesnt make sense to me imediately. I dont know google maps marker module as i never used it yet but looking at the description of the markup module i think you have to specify the fields name in the option array and not a value like you do with $feature->url ... It would have to be the name of the field like 'url'. See https://github.com/ryancramerdesign/FieldtypeMapMarker/blob/master/MarkupGoogleMap.module#L73 you seem to misunderstand this, same as with the rss feed markup module. As you dont give a field name the but a the url of the last item in your foreach loop i can imagine the markup module doesnt find it and gives url of the page. Since i think you dont want the url of the page that you give to the markers via your page array but from one of your relation to another page, you would need a simple property hook to set that url to a new property (=field) for each page, that you can then give the name to the options array. Or since you already loop and add your pages to the markers page array you could set it right there. So bfd_events_places_id_list is now what exactly? A page field? If its a single page field... The id in the name is confusing to me as it would be a Page object actually and not an id. Anyway. If it is a page field you could try using it to add a url to it on the fly. $myentry = $feature->bfd_events_places_id_list; $myentry->markerUrl = $feature->url; // or whatever url $markers->add($myentry); Then use that 'markerUrl' we added to the marker page in the options array... 'markerLinkField' = 'markerUrl'
  15. What is bfd_events_places_id_list exactly? PageArray add doesn't work with ids it would have to be a page or PageArray. Also this && $feature->bfd_day in the if is strange as it would be the last from the previous foreach. So is the $feature->url in the $options...
  16. Pageimages suggests you have a image array and try to call heigth which of course doesnt work. I'm not sure this ever changed and was always like this. So I think you have some code that worked beacuse it was an single image.
  17. You need to first delete the.variation to get a new of the same dimension. removeVariations()
  18. Modules can have configurations where you have the buttons. This is already there if you implement the configurable interface. You add them and check for them via input name. There's many modules that have this already so you should study them. Also a possibility is to create a custom admin page using a process module so you have your own screen to add forms and buttons and do whatever you like with using api. ProcessHello is a example of such a module.
  19. RT @bitnami: @alessio_dev @processwire Nice work! We're looking forward to having @processwire in the Bitnami library.

  20. Ahhhh thanks! Ha, now all together!
  21. I'm so bad at english i hardly understand the lyrics. Im too shy to ask but Is that "Soma.. la la" at the beginning?
  22. RT @bitnami: Reviewing logs we found votes from multiple IPs but sharing same cookie. Both @processwire (274) and @ametys (539).We are remo…

  23. U need to set locale to utf8 like fr_FR.utf8
  24. Or a WireData module usually for autoload hooking modules. Process modules are usually for admin pages. But it would work too.
×
×
  • Create New...