-
Posts
7,480 -
Joined
-
Last visited
-
Days Won
146
Everything posted by kongondo
-
User - display field values from their most recent created page
kongondo replied to Peter Knight's topic in API & Templates
Not necessary since he's using get(), which assumes these things already . http://processwire.com/api/selectors/#access_control -
Module Module: Matrix Fieldtype & Inputfield
kongondo replied to kongondo's topic in Modules/Plugins
For storage, no, for reference, yes. Matrix stores a page ID for Row, a page ID for Column and a varchar for the value of the matrix (i.e. row-column = value). Using the page IDs of Row and Column, you can use PW API to get the page and hence, any field on that page. Maybe not what you are after but thought to clarify anyway. -
How to deny access to images attached to not accessible pages?
kongondo replied to LAPS's topic in General Support
Would field level access work as well? Access tab when editing a field -
@geekpete, Welcome to ProcessWire and the forums. In addition to what has been said, especially the comment about roles and permissions, just remember to test your work/module as both a superuser and a normal user. Some stuff will not be viewable, editable, etc, by default for non-superusers.
-
Glad you liked the module . Yes, but a closed one for a couple of people who are still in the free upgrade period.
-
Preview of upcoming Media Manager Version 012 Better, cleaner, ProcessWire 3 UI! Custom columns (add custom fields to media templates; frontend access via API: e.g. $m->email; $m->body, etc) Edit media page directly Ajax update of Media Manager field on a page Disable media views centrally (e.g. manage only image media) Add extra images to image media field (e.g. front, back, top, side views, etc of an image) Better media previews More..... ETA: 3 - 5 weeks Early screenshots (some stuff subject to change)
-
Hence this discussion. I am learning as well, so thanks for your pointers .
- 35 replies
-
- 1
-
Thanks for the input guys! An app that you have to pay to use/install . So, I am told...but at the cost of what? You get a slower app? Just what I've read. But the point about using technology you already know (HTML, etc) is a good thing (most times). I think it depends on the language you are using. If developing. If using TypeScript + NativeScript, all you need to know is JavaScript (and CSS and (X)HTML)). Is this still the case or am I misunderstanding the below? https://auth0.com/blog/introduction-to-progressive-web-apps-push-notifications-part-3/ https://dockyard.com/blog/2017/07/13/safari-ios-and-progressive-web-apps Sound advice. I think I'll take this approach, albeit start with native and get into PWA's later.
- 35 replies
-
- 1
-
How to output wire message after running a hook problem
kongondo replied to Juergen's topic in API & Templates
Just a by the way, this code: if($page->template == 'event_businessvacations'){ $itemtemplate = 'single-business-vacation'; } if($page->template == 'event_dates'){ $itemtemplate = 'single-date'; } if($page->template == 'event_events'){ $itemtemplate = 'single-event'; } if($page->template == 'event_specialbusinesshours'){ $itemtemplate = 'single-special-business-hours'; } The conditions you are checking are mutually exclusive. A $page->template can only ever have one name. So, there is no need to check it four times. You can use if, elseif, etc (or case:), to have PHP break out of the condition check once a match has been found. E.g. if($page->template == 'event_businessvacations'){ $itemtemplate = 'single-business-vacation'; } elseif($page->template == 'event_dates'){ $itemtemplate = 'single-date'; } elseif($page->template == 'event_events'){ $itemtemplate = 'single-event'; } elseif($page->template == 'event_specialbusinesshours'){ $itemtemplate = 'single-special-business-hours'; } -
How to output wire message after running a hook problem
kongondo replied to Juergen's topic in API & Templates
Hmm. I don't think so. Both of these work for me $pages->addHookAfter('saveReady', function($event) { // here comes the logic #$this->message('Überraschung');// single quotes $this->message("Überraschung");// double quotes }); I have tested in both the old messages and the new(ish) system notifications. Normal Notification System Notification So, there must be something else going on (and yes, I tried without my English Text in there as well ). -
Uncaught ArgumentCountError: Too few arguments to function
kongondo replied to Peter Knight's topic in General Support
What Adrian said. It is not even a ProcessWire issue but a computer programming issue (are there languages that would ignore the error? I know JavaScript is pretty laissez faire, but even it would throw an error). I'm curious though, how come@Peter Knight didn't see the error at the old host? Did size() just fail silently? -
How to output wire message after running a hook problem
kongondo replied to Juergen's topic in API & Templates
I've tested with ProcessWire 3.0.88 and the latest, 3.0.90 and your code works fine in both. Maybe a code collision? -
Going forward, I have been thinking for adding the 'resize' slider like in ProcessWire's image field so that the user can select their default preview size. I wanted to implement this in the last version but ran out of time. I would like to incorporate the input for the percentage widths right within or next to the respective column definitions (in the asmSelect). I'll have a think, thanks I use the same theme, although I test in all themes. I'll test some more, starting with FF.
-
Migrate Processwire with Plugin but Backend does not work as expected
kongondo replied to Maxplex's topic in General Support
I have been bitten by this several times. Last time it happened, I had two AdminThemeUiKit, one under /site. I deleted that one and the theme was able to load correctly. Similar cases, have been reported here in the forums, albeit with different suggested solutions. Welcome to the forums. -
OK. Suggestions? However, I noticed that in Thumbs Grid view, if for some reason ProcessWire fails to properly create an image thumb 260px high, some crazy-wide images will be displayed. I ran into this in Media Manager which I am currently upgrading. I have made changes there and will do so in VPS as well. That is weird! I'll have a look. I don't have Win10 though... (blissfully stuck on Win7 )
-
For a while now, I've wanted to expand my skills into mobile app development. Having done some Googling and watched several YouTube videos regarding native versus hybrid apps, I decided to go native. I did my homework regarding React, Ionic, etc and decided to go native. I settled on the NativeScript + TypeScript combo although it seems most tutorials are about Angular. Anyway, after watching quite a number of videos, just when I was about to dive into things, someone turned off the lights! Progressive what? PWA? Haven't you heard about this? No, I haven't! Where have you been? Let's not go there... OK, so I don't know much about mobile apps as you can tell (or even much about frontend development as my personal websites do tell, ). At first, I dismissed Progressive Web Apps as another Google tech that is bound to fail....until I read that Twitter, Blah Blah, have joined the bandwagon and the thing is gaining serious traction. It was back to more Googling. I now know (I think) what Progressive Web Apps are (or are meant to be). Naturally, my first question was Progressive Web Apps versus Native apps. So, I asked Google. Google told me to stop asking that question. To be precise, it told me (at least with the first couple of results) that that was the wrong question to ask! I tried finding out why, but the answer was hidden down some deep mobile rabbit hole that I didn't have time to fully descend into. It seems I am back to where I started. Native apps seem to be promising first class citizenship (who doesn't want that?). On the other hand, I am being told, Progressive Web Apps are the bright shiny future that will solve all our problems (and maybe even shutdown the Play Store! ). Please be gentle with my ignorant self. I have asked Google but she hasn't bothered or cannot be bothered to reply or I am asking her the wrong questions. I simply want to know if Progressive Web Apps can or will one day be able to be used to: Build apps like WhatsApp, etc? Build games like Candy Crush (what?)? Build premium apps (how would that work?) Or...are Progressive Web Apps just a replacement for mobile.domain.com? Should I ditch my NativeScript?? If someone could help me out here (once you're done laughing at my silly questions ) and/or point me to resources that will answer my questions, I'll be forever grateful . Thanks
- 35 replies
-
- 4
-
Glad you sorted it out.
-
Page Reference Selector counting grandchildren
kongondo replied to hezmann's topic in General Support
We'll be hear to help as much as we can .- 3 replies
-
- page reference
- selector
-
(and 1 more)
Tagged with:
-
Hi @mikhail, Thanks for the purchase. Sorry for the confusion. We have the following in the docs about setting up here: If you read that but was still unsure how to proceed then we need to tweak it. Please let me know, thanks. Edit I've gone ahead and tweaked the docs a bit. I hope it is clearer now. Thanks for the suggestion.
-
I wanted to mention this but forgot. I have seen this several times in ProcessWire 3, but can't recall how far back I started noticing it with respect to the exact version. I think I've seen the issue in other admin themes as well (besides UIKit) but can't say I am 100% sure. However, a page refresh always works for me. I've never had to log out and in again. I think I trigger the network error if I click around too fast, saving in different tabs.
-
Wild guess.. Does it also occur if using other admin themes besides UIKit?
-
@theo, I'll have a look. I'm not sure about the ProcessWire side of things but MB itself does check for languages when installed in a multi-language site. It doesn't activate other languages when creating a menu (which are hidden pages in admin). Hence, when saving the menu it only saves the menu title as $page->title = 'My Menu'. Since no language is specified nor is there input for other languages, the title is saved to the current language's title field. When you switch to another language, there is no menu title to display since none was saved in the first place. By the way, this is the reason why in multi-language sites, menus cannot be rendered using their titles or names. You need to pass render() the menu ID or page. Back to the missing titles issue, it's an issue I have previously considered. Back then, I came to the conclusion that it was not worth having menu items with multi-lingual titles since I couldn't think of a scenario to justify it. Your use case demonstrates that I need to revisit the issue. I'll work on this for the next version. When creating and editing menus, there will be inputs for the different languages that are available (creating) and for enabled languages (when editing) [difference here being no need to edit the title of a menu title if that language is not enabled for that menu]. Above means I'll have to change the way menus are created. It has been suggested before that MB should lose the textarea for input of menu titles (one-per-line). I think I'll go with a simple table (like the one used when adding custom menu items) with columns for each available language or a ul list or div with tabs for each available language (i.e., mimic ProcessWire's language title field). To create additional menus simultaneously, one would only have to click on an 'add another menu link/icon'. This will also resolve the issue of rendering menu items using their titles in multi-language sites. If a menu title or name is passed to render(), we will look for a menu by that title in the user's language. Sorry for the long post! Some of these are notes-to-self to be honest .
-
Update: Menu Builder 0.2.3 Changelog Fixed a bug where inactive pages in multi-language sites would still be displayed in menus. Thanks @thmsnhl Available in modules directory. Thanks.
-
@thmsnhl, Could you please test the following for me before I commit? I have tested using both the normal way of generating menus (render()) and using the method getMenuItems(). I have also tested with include children and it works fine. As for include children, ProcessWire internally takes care of the inactive pages (I guess because it uses a find()), so I didn't have to touch that. In MarkupMenuBuilder.module, please add the following code after line # 216: if(!$p->viewable($language)) continue; Any issues? Thanks.
-
@thmsnhl, Just to clarify, are you saying you want the German version of the page to appear in the menu but not the English one? Meaning, if viewing the site in German, we see the page in the menu, if we view it in English, we don't. No, I've never considered such a scenario but now I see I should. If we are to skip that item from the menu, if it is a parent item, obviously, its children will also be skipped.