-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
Quick question: Show Markdown code in field notes
LostKobrakai replied to wheelmaker24's topic in General Support
Ryan is not using a markdown parser for field descriptions/notes as they're only supporting a small subset of markdown (I think links/bold/italic and that's it) and it's faster this way, but that's probably the reason, why escaping doesn't work. -
It's not. The module does use the chosen library. I just wrote the wrapper to include it in processwire.
-
The file/image field is not really a field to "select" a file/image, but it's a storage field. You can select these file via the processwire api in your code or you can use the CKEditor plugin to add the link via the backend to a textarea field. What's currently not possible in the core is selecting a file/image in a field. Since a few days there's a community module, which does try to solve the latter part: https://processwire.com/talk/topic/10009-image-field-select-image-from-another-page/
-
I'm not sure why you'd need sql for that. Sql queries cannot supply you with a datastructure like you suggested it, it can only return data in a tabular structure, so you need to build up the array no matter how you tackle the problem. $usersWithOrders = $users->find("orders.count>0"); $orders = $pages->find("template=order"); $byUser = array(); foreach($usersWithOrders as $u){ $byUser[$u->id] = $orders->find("id=$u->orders"); }
- 1 reply
-
- 2
-
2500 queries for a single pageview? Is that normal?
LostKobrakai replied to pleini's topic in General Support
You certainly need to keep mysql connections and mysql queries apart. The first one is causing your db to crash, whereas the latter ones are using these connections. If 30 visitors are causing 400 (I'd expect concurrent) connections I'd check if mysql connections are properly closed. -
Set it to unpublished and on first login publish the user? But you'd probably need to detect this before the call to the actual login does happen.
-
You wouldn't want to optimize images multiple times. You'd rather want to hook into some point, where you you'd get the images, which are added successfully and just optimize those newly added ones. For details on which hook might be fitting you'd have to wait for other answers.
-
Cannot preview code internalisation translation
LostKobrakai replied to opalepatrick's topic in Multi-Language Support
You mentioned your pages having different urls, while having the same name supplied: /home/contact/ vs. /contact. The /home part is probably because of the name settings of the homepage. It lets you choose if you want all multilanguage pages to be under the same url or namespaced as /en/…, /es/… or whatever name you want to be there. -
Cannot preview code internalisation translation
LostKobrakai replied to opalepatrick's topic in Multi-Language Support
Did you adjust the name fields for the homepage (root page)? -
I'm really curious about the forms module. I've tested nette forms last week and it's probably the best forms framework I've ever used. Especially the combination with client side validation makes it's really mighty.
-
You're mentioning exactly the point, which does prevent that. It would need some kind of standard about language naming and that one is simply not existing in processwire (and even might not in the future). Languages (besides default) can be named however the admin does feel like. You could always implement a custom function into the install() method to check for languages named correctly and if so install any files. Other people would need to install them manually. Also a point about the default language. This one can be any language, but it's always named default. That's a problem as well.
- 4 replies
-
- 1
-
- module
- translation
-
(and 1 more)
Tagged with:
-
Filter find() by pages selected in page field
LostKobrakai replied to elabx's topic in General Support
id!=$page->myPageFieldWithPagesNotToBeLoaded Like that? -
You'd probably mix WillyC's code with the option to run the PageAction on a batch of pages if you want to circumvent memory issues.
-
Looks great. I'd just give the header navigation a bit more contrast to the background. Maybe I'll give it a listen later.
-
PageActions can easily be called from the api and with the IftRunner you can even queue them for later (or external) processing. wire('modules')->get("SendEmail") // Get PageActionModule ->set("email", "registration") // Set config values (if needed) ->action($page); // Run action on $page
-
@WillyC Why would one shovel all the data from mysql into the memory if the db can calculate the sum on it's own? And it's probably faster, because it's querying pages only once.
-
Creating a slideshow and grabbing each child with image field
LostKobrakai replied to Danjuan's topic in General Support
The best thing about your stylesheet is that it's stateless and therefore cacheable. Using php to generate it dynamically would deny exactly that. For stateful styles inline-styles are perfectly fine if you need dynamic files. -
I'd also suggest taking a look at this topic: https://processwire.com/talk/topic/2089-create-simple-forms-using-api/ It's essentially a community driven "what you need to know about the forms api". I wouldn't call it documentation, but you can learn a lot from the examples. Also attr() is essentially meant for those html attributes, which are not input specific, which type is.
-
Caddy is another webserver like apache or nginx. It's not meant to be a all-in-one dev environment.
-
None English Language as Default Language
LostKobrakai replied to lisandi's topic in Multi-Language Support
This part of the domain is set in the settings tab of the homepage on the name field(s). -
You could use WireArray's functionality, but it's not as easy as simply passing in an array. You'd need at least a class extending WireData, which holds those productsData.
-
And again the GEMA blocks it for germany. It's so great to hide content in order to "make money for their artists".
-
Afaik the header is just a convention. The usage of it in libraries might vary.
-
Related to this: https://github.com/ryancramerdesign/ProcessWire/issues/1728 ?
-
That looks really great and is certainly a quick and easy solution for websites, which need a overseeable amount of globally shared assets.