-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
That's right. However, Padloper 2 also uses custom Fieldtypes and custom (non-PW) tables where it makes better (technical) sense to do so.
-
Thanks. I only noticed this yesterday but have not had time to fix it.
-
Hi @k07n. Yes, I am OK, thanks ?. I do have some good news but cannot share it now. There was a bit of a rethink about the GUI/UX but we are making some great progress. Hi @Mikie I am not sure what you mean by custom data store. Currently everything will live in the site DB (i.e. accessible via ProcessWire's $database). I'd like to hear more about your line of thinking, thanks. All, sorry it's been a while since the last update. Rest assured that we are working on this as fast as we possibly can with great enthusiasm and motivation without sacrificing quality ?.
-
Hi @MilenKo. Apologies for the late response. I am not sure what you mean by block title. However, this count() will not work: echo "This menu has: " . count($cat_menu); as $menu->render() returns a string. PHP will return 1 (a boolean) but if you had Tracy Debugger it would throw an error about using count() on a non-iterable variable. If you need to know the number of items you can use the method getMenuItems() introduced here and documented here. You can use the method to either return menu items as a an normal PHP array or as a WireArray. In the examples outlined in the first link above, you can use getMenuItems() with a custom recursive function to render your menu however you wish. In your case though, you can just use it to check number of items. For example: $mb = $modules->get('MarkupMenuBuilder'); // menu items as PHP Array $menuItemsAsArray = $mb->getMenuItems(1108, 1, $options);// param 2 = 1: return array echo 'Number of Menu Items (count($menuItemsAsArray)): ' . count($menuItemsAsArray); // menu items as WireArray Object $menuItemsAsObject = $mb->getMenuItems(1108, 2, $options);// param 2 = 2: return WireArray (the default) echo 'Number of Menu Items ($menuItemsAsObject->count): ' . $menuItemsAsObject->count; In case you just want to know if a menu item is not empty, you can simply check if the return value of $cat_menu is a string. For example: // Render the menu by title $cat_menu = $menu->render(1108, $options); if(is_string( $cat_menu)) { echo $cat_menu; } This, however, will not give you the count as explained above. You'd need getMenuItems() for that. In case you want to know if a menu item is a parent/has children, etc, you can use the WireArray option of getMenuItems() as shown above and use ProcessWire WireArray methods to filter items. For instance: $someChildItems = $menuItemsAsObject->find("parentID=2"); // OR $someParents = $menuItemsAsObject->find("isParent=1"); I hope this helps.
-
OK. However, my point was that multisite option #1 works with subdomains as well ?. Yes but to some extent No. Let me explain: Core Modules (e.g. AdminThemeUikit) will be physically shared between the sites since they live under wire/modules. By physical is meant the module files. However, optional core modules such as AdminThemeUiKit can be installed in some site-* but not others. Since site-* each have their own databases, site-a might have AdminThemeUikit installed whereas site-b might not. Install just means a reference to the installed module in a site's database. Custom modules, i.e. those that live in site-*/modules are not physically shared. Unless you are using symbolic links (which can be problematic!) each site-* will have its own modules folder. This means site-a/modules can have SomeModule and site-b/modules can also have the identical or same SomeModule. Of course, their respective databases will have references to their respective SomeModule. So, back to your problem. Did you physically copy AdminThemeUiKit to both your site/modules and site-stirnweiss/modules? This is in addition to the core copy in wire/modules/AdminTheme. If you did so, that is wholly unnecessary. If the answer is no, then you are experiencing a different problem, maybe a server configuration issue. It's hard to tell without more information about the 500 errors (apache logs, ProcessWire error logs, etc.
-
Subdomains work fine for me. Maybe you are a having a 'www' issue? Does this not work? sub.mydomain.de
-
Hi @nurkka. Sorry for the late response. I have been away. This is an excellent suggestion! I'll have a think on how to best implement it but theoretically, it is doable. Another great suggestion! I would have to rethink the GUI a bit since tabs (Filter: Icons, Filter:Photos, etc) would quickly become unwieldy. On a related note, I have been planning to refactor the items shown in the Inputfield Selector (the filters) as there are a number of things not directly relevant to Media Manager that would confuse editors. For instance, the Inputfield shows non-Media Manager fields, items like Path/URL, etc. I am planning to work on your suggestions and the refactoring in the next update. I might call on you for a bit of testing before release, if that's OK. Thanks.
-
That's what @elabx said! :-) ?? Good to see you (again) as always ?.
-
@elabx was right :-) Here't two ways in addition to @dragan's above: Method 1: Call Hanna inside your function function SomeFunction(){ $out ="<div>"; // hanna in here $hanna = wire('modules')->get('TextformatterHannaCode');// @note: wire! $out .= $hanna->render("[[hello]]"); $out .="</div>"; return $out; } $out = SomeFunction(); echo $out; Method 2: Pass your function an argument/parameter with Hanna rendered output $hanna = $modules->get('TextformatterHannaCode'); $hannaString = $hanna->render("[[hello]]"); function SomeFunction2($string){ $out ="<div>"; // hanna in here $out .= $string; $out .="</div>"; return $out; } $out = SomeFunction2($hannaString); echo $out;
-
Great! I am glad it got resolved!
-
@Ben Sayers, I hope you can forgive my 'ineptitude'. I have been royally swamped. I tried to install Jumplinks but was inundated with the errors reported by others above, so I gave up on that. Anyway, that was just for testing redirects. My solution below, since Jumplinks isn't working for me (I tried all the way back to version 1.5.50), is to use ProcessWire session redirects. I don't know what that means for you in respect of SEO. I hope I am not polluting Jumplinks' support forum but I need to offer a bit of an explanation. The template blog-posts has URL segments enabled. If you visit: domain.tld/blog/posts/an-existing-post/ ProcessWire successfully resolves that since 'an-existing-post' exists. In other words, 'an-existing-post' is not considered a URL segment. If you visit: domain.tld/blog/posts/non-existent-post/ the URL does not resolve to an existing post. ProcessWire knows that and considers 'non-existing-post' to be a URL Segment. However, since we have URL segments enabled in blog-posts, ProcessWire lets us deal with the situation. We do this in blog-posts template file. I don't know how Jumplinks works but I assume if we threw a 404 error, it will pick up on that and redirect to our desired URI. Again, I am just guessing here. However, since Jumplinks did not work for me, I suggest the following (session redirect), even as a temporary measure. You can try the 404 option to see if it works. Please report back, thanks. At the top of your blog-posts template file, insert the following, just above your first include: if($input->urlSegment1) { // @todo: test this with Jumplinks. In that case, comment out "session" code below //throw new Wire404Exception(); // redirect to main blog page. if using this, comment out 404 exception code above $session->redirect('/blog/'); } include('./_head.php'); // include header markup I hope this helps. Apologies again for the delay.
-
-
Hi @Ben Sayers. Actually, yes, I have. I was to write something earlier this week but didn't get time to get to it. I have two suggestions. Could I please get back to you here over the weekend? Thanks.
-
I edited this to read "posts" NOT "post" to avoid further confusion ?. I think the key is in what @teppo stated above: Your blog-posts template (file) is not throwing a 404 exception for the missing (deleted) posts. I am not sure whether manually throwing a 404 will resolved the issue but I am sure the other guys will have better knowledge of this. Meanwhile, please show us the contents of your blog-posts template file.
-
@teppo, @Ben Sayers, Given my conversation with Ben in the blog module forum and given the correction made therein (?what?) and given Teppo's suspicion of URL Segments, I now wonder whether Ben's issue has to do with the term 'blog' at all. I suspect it is the 'posts' in the URL Segment since the posts templates utilises URL Segments as I listed above. Edit: for clarification, Ben's correct address to the blog posts, is, f.ex. domain.com/blog/posts/some-post/
-
Please confirm this. According to your post here: it seems your posts are structured as: (domain.com/blog/some-post/). This would make it a Blog Style 2 and not Blog Style 1 which would be structured as: /domain.com/blog/posts/some-post/
-
Blog has only one hook, used in the backend, limited to save of a single blog post (addHookAfter) to set its blog published date (@note: this is NOT the PW published field but the blog pages date field) The following blog templates have URL segments enabled: Blog Archives (blog-archives) [virtual parent of blog archives; virtual since no real children; works becaue of URL Segments] Blog Authors (blog-authors) [virtual parent of blog authors; can also display multiple authors] Blog Comments (List) (blog-comments) [virtual parent of blog comments; can also display multiple comments] Blog Posts (blog-posts) [parent of posts; can also display all posts] Blog Tag (blog-tag) [a single blog tag] Cross-reference
-
Hi @Ben Sayers, Sorry for the late response. I have never used Jumplinks before. I have read the posts you link to but cannot think of any reason why the blog module would be the cause of the issue. In addition, @wbmnfktr seems to have successfully tested blog and Jumplinks, so it must be something else in your install. However, in your post you say: What do you mean by removed? Secondly, what 'blog style' did you use on install?
-
Integrate Vue.js in a ProcessWire module
kongondo replied to dotnetic's topic in Module/Plugin Development
Thanks @Jens Martsch - dotnetic! Excellent write-up. You've sort of answered the question. What I meant was if you had images and such would they still live under /public? Thanks. I thought the integration would have required to point to a different index.xxx (maybe an index.php) file inside ModulesManager2's folder. Good to know this is not the case. I suppose then that the API endpoint in ModulesManager2 is execute()? A lot! Thanks. -
Hi @gornycreative, Apologies for the late response. I've only just seen your post. Interesting thoughts there, many thanks. Although there are no current plans to take Padloper in the direction of the product you've described, I'll keep your thoughts in mind. Many thanks.
-
Hi @MateThemes, Unfortunately there will be a bit of a delay due to some unforeseen circumstances. It could be winter before we see the first release.
-
Hi @jens.martsch, This looks awesome! Even without the todo list, this is a huge improvement to the current way of installing and searching for modules. I really like the listing of modules. Some quick questions: Why call it Modules Manager 2? Why not just ModulesManager? I might have missed it; Is it possible to read/find modules that have been moved physically to the modules folder on one's site but have not yet been installed? This will cater for modules that are not online in ProcessWire's module's directory Great work! PS: Nice overview video, btw!
-
Variations: Pro Module for (Product) Variations & Attributes
kongondo replied to kongondo's topic in Modules/Plugins
Variations 002 (released 16/09/2019) Happy to announce the latest release of Variations. Changelog ProcessWire 3.x support only. New GUI to match AdminThemeUiKit Save and exit or save and add more variations configuration or attributes (in modal) More granular control of custom column types and definitions: DECIMAL, FLOAT, DOUBLE, TINYINT, INT, VARCHAR, TEXT, DATETIME, TIMESTAMP, BOOLEAN, etc Decimal type better suited for price data compared to Float/Double Boolean type, useful for Yes/No type data, e.g. for sell out of stock? yes/no Datetime/Timestamp fields if required. Column definitions: null, precision, scale, length, default value, etc. Required fields: if column is not nullable and no default provided, it becomes a required field. E.g. can set price not to be null. Default fields: For uses such as prefixing SKU- Apologies that this has taken a while to update. Upgrading If upgrading from version 001, ProcessWire's Filecompiler will fight you. You might get errors such as Class ProcessVariations not found in file..... If you get such errors, first, try to clear your cache and compiled files several times. As a last resort, if clearing cache doesn't work (and I don't like this workaround), temporarily change the code in the offending file, e.g. in VariationsRender.php, where it says class VariationsRender extends ProcessVariations, change that to class VariationsRender extends WireData. Refresh the modules page until the errors disappear, then revert back to the original text (class VariationsRender extends ProcessVariations). I hate to ask you to do this but I've had it with the Filecompiler. Documentation Documentation can be found here. However, it still needs updating to reflect latest changes outlined above. For now, please note that we've added an extra setting for setting the default date and time formats for datetime/timestamp custom columns/subfields. This is available in the Input Tab of the field. Screenshots Thanks!