-
Posts
7,476 -
Joined
-
Last visited
-
Days Won
144
Everything posted by kongondo
-
Yes, you were on the right track, although there could be other ways of doing it as well depending on the site's setup.
-
Welcome to ProcessWire and the forums @Re4DeR. Something like below added in /site/ready.php should do the trick. If you don't have a ready.php file, just create one and namespace it to ProcessWire; $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->hasField == 'categories') { $sitePage = $event->arguments('page')->rootParent; $siteCategories = $sitePage->child('template=categories')->children; if($siteCategories->count()) { $event->return = $siteCategories; } } }); With the above code, individual posts in Site 1 will only be able to select categories from Site 1 and for Site 2, they'll only be able to select from their site. Please note: The page (reference) field is called categories The template of the 2 Categories pages (i.e. the parents of your individual categories) is called categories. In the page field categories, we don't input anything in the Selectable pages section. Give us a shout if you have any questions.
-
Use the dev branch please, thanks.
-
Welcome to the forums and ProcessWire ?. ProcessWire does this only once. So, the next time, it will just load the thumbnail you requested, hence it is permanent unless you delete it. I think you mean 0x260. That is generated automatically by ProcessWire for backend use. You can create your own (other sizes) like shown below. This code goes into your template file. // Example of outputting a thumbnail gallery of Pageimage objects foreach($page->images as $image) { // $image and $thumb are both Pageimage objects $thumb = $image->size(250, 200);// width x height echo "<a href='$image->url'>"; echo "<img src='$thumb->url' alt='$image->description' />"; echo "</a>"; } You can use the above code to create the thumbnails outside a page load if you wish. Have a look at the docs here: https://processwire.com/api/ref/pageimage/
-
Agreed... I tried playing around with uikit cards and flex but had no joy. I failed miserably; CSS is not my thing ?. Yes, a PR would be welcome, thanks. I think being able to have different note colours is important. An organisation/team can use different colours as a visual grouping (.e.g editorial notes = yellow; customer service = blue, etc). Anyway, since colours are not forced on the user (the default is no colours), I think this shouldn't change.
-
Which Blog Module to extend an existing Website?
kongondo replied to pout's topic in General Support
No module (unless something changed). I believe they are just pages with the logic done in the template files. You can use normal pages, for instance: Home Blog Posts Post 1 (fields: body, images, categories_page_reference, tags_page_reference) Post 2 Categories Category 1 Category 2 Tags Tag 1 Tag 2 Or use the blog module if you want a blog dashboard and a few conveniences. -
Just a reference, not necessarily that it would work in this case, but related. Tread with caution if you go this route! Using multi-instance in PW3 https://processwire.com/blog/posts/multi-instance-pw3/
-
Fixed a minor typo introduced whilst debugging. No version change.
-
Update: Jquery File Upload Version 0.0.7. As of today and this version onward, ONLY ProcessWire 3.x is supported. Changelog Added option to unzip uploaded ZIP archives (works only in PW backend {hence custom modules}). Refreshed upload widget look and style. Added support for so-called 'Upload Anywhere' (no documentation currently, sorry. Basically this means you can use a whole page a files' dropzone). For those who care, this means Media Manager's release is imminent ? Screenshots Thanks!
-
Questions: Export and Import pages or fields using the API
kongondo replied to bluellyr's topic in API & Templates
In a hurry, so answering quickly.. Yes. For fields and templates have a look at the method setImportData(). For pages, there's different ways. I'll let others chime in. Exporting pages example. Yes, for pages, using previously exported JSON or ZIP and for fields using previously exported JSON and setImportData(). Examples of importing fields and templates from JSON. Yes. How you do it depends on the fieldtype... (others will chime in here) Not sure I understand this fully, but yes, you can do everything from the API or using the GUI. For pages, the PagesExportImport is still experimental but it works fine (for me). -
What @szabesz said above. My thinking was that this is used in the admin, meaning existing users with access to the module (permission dashboard-notes) are already trusted users. Yeah, I had "fun" with these ones. i went from using input strings to urlSegments and I must have forgotten to catch such errors. PR please ?. Thanks for testing!
-
News Update - 6 March 2019 Hi all. How time flies! It's been a while since I gave you an update on progress. Taxes Most of the current work has focused on Taxes. Although the last mini update talked about the GUI, the main work has gone into taxes. I went back and forth on this one but I think I've finally arrived at something I am satisfied with. Looking at other systems, I liked both the approaches of Shopify and Woocommerce, but especially the former. The approach we'll take will marry the best of both worlds. In a nutshell, taxes will involve/feature the following: You will first need to set up countries that you will be shipping to (this is done when setting up shipping zones). An overview of the shops tax settings. Tax Overrides: Use this feature to override the base tax rates and taxes on shipping per country and/or country state/province. You can create a product category (aka collection) to which a specific tax override will apply. Tax Exemptions: At each product level, you will be able to specify whether a product should be charged tax or not. However, you will also be able to exempt some customers from paying taxes on purchases. Currently, email addresses will be used to identify such customers. Option to choose if taxes should be charged on shipping rates or not. In cases where more than one tax can be applied, choose whether taxes are compounded (e.g. a country + province tax) or one used instead of the other. Specify whether digital products should be charged tax (e.g. EU VAT) or not. Evidence of buyers location for EU VAT. Specify if taxes are calculated based on origin (where you are shipping from/your shop location) or destination (where you are shipping to)[default]. Specify if stated/displayed prices include taxes already or not. Print out tax reports (how much tax you've charged over a given period). Taxes in the United States are a bit tricky to determine. We'll do our best to accommodate the needs of Padloper users in this country. Please note that although Padloper 2 will ship with base rate taxes for most/many territories of the world, including their states/provinces where applicable, and whilst we'll endeavour to regularly update tax rates, the responsibility to ensure that a shop/business is charging and remitting the correct taxes lies solely with the shop owner. Shop owners can use overrides to update their taxes in cases where Padloper 2 base tax rates are not up to date. We will not accept any responsibility for any wrongful tax deductions due to incorrect base rates and/or overrides. GUI i was hoping to have something for you to look at by now but I needed to sort out tax related logic first. I wanted the logic to guide the GUI design and not the other way around. So, you'll have to take a rain check on this one. Files We had a bit of a think on how to handle files (downloadable/digital products, site-wise assets, etc). No final decision has been made but the goal is to be as versatile as possible. Notifications We've started drafting plans on how this will work. More on this later but this will involve email notification to yourself, customers and shop staff regarding their orders. Some notifications will be (semi-) automated, e.g. sending order confirmation, order status change, etc. That's it for now. By next update, I'm hoping to have something for you to look at, however crude :-). Thanks!
-
We are off to the races.. Alpha version for testing and comments now available at repo. Please note (see what I did there? ??) This thing is in lazy development. Don't expect any more non-critical changes soon. Main issues for me CSS: When note sizes are small, the note titles are still large and look horrible. I'm not sure whether to truncate or reduce font size, or? Truncating long titles + long text in dashboard Note visibility can be limited by permissions, users and roles: Should we filter out system permissions? Continuing from #3, should we NOT display superuser names (in the dropdown of lists of users who can view the note, if one wants to set that) Continuing from #4, what about frontend users only; should we remove their names from the list since they can't view the backend anyway? I'm not sure how code this Continuing from #3, currently we check if a user title exists and use that value rather than name. Maybe make the field to check configurable? Notes layout? Currently, one can reply to several responses in the same note simultaneously. Is this OK? I think that's it. If I think of anything else I'll add it here. Thanks!
-
WIP here:
- 19 replies
-
- 1
-
- conversation
- messaging
-
(and 1 more)
Tagged with:
-
WIP module (90% done) following this request expression of interest ? by @szabesz. A (Process) module that allows the posting of Notes in the ProcessWire admin. Inspired by WP Dashboard Notes (see video in link above). The module is almost complete. As usual, I hit a snag with the CSS! PRs highly welcome, please! (see below). Setting note sizes and display was a bit tricky. Module is now available for alpha testing here. https://github.com/kongondo/DashboardNotes Contributing I should have mentioned this earlier and done it properly but I am lazy, so this is the rough guide. I know we all have our preferences but please note: No heredoc syntax No alternative syntax for control structures (i.e. endif, etc) Indent using tabs (4) Doesn't matter in this case, but no PHP short tags For methods, opening curly bracket on same line as the method name (there's a technical wording for this, I can't remember now) Features Set Notes priority (low/normal/high) Note text and background colours Enable/disable replies to Notes Lock Notes for editing Viewing of Notes can be controlled using users IDs, roles or permissions. Default is all Notes can be viewed by all who have access to the module Edit Note after posting Global note settings (accessible only to those with dashboard-notes-settings permission) - default colours, date format, if users can delete notes they did not create, if users can edit notes they did not create, note display dimensions, maximum depth of (nested) replies, maximum characters of note preview before truncate, etc.) Sort notes by date, title or priority Pending Bulk actions (delete, lock, change priority, etc) Reply/commenting on notes More testing on visibility Requests/Ideas Mine is: PRs are welcome! Especially with the CSS and/or Design (Use the Dev Branch please) Display Note author title (if present, or any other named author title field) rather than their (user)name? Other? Screenshots Thanks!
- 22 replies
-
- 20
-
Just had a thought, so revisiting this. Going by your screenshot, it seems to me that each message is a unique page, no? If that is the case then you may have your cake and eat it too if instead of storing a message's subject in the 'data' column of your Fieldtype, let it be the page's title? This means for multilingual sites, they can decide to have multilingual messages by using language field title and language textarea (assuming that is where the message body is). You would then need to use 'data' to store something else. Just my 2p.
- 21 replies
-
- 1
-
- groupmailer
- fieldtype
-
(and 1 more)
Tagged with:
-
I had a stab at this over the weekend (during my free time, ahem). I'm finalising it now. Hope to post alpha(-ish) version tonight. I'll start a separate thread.
- 19 replies
-
- 3
-
- conversation
- messaging
-
(and 1 more)
Tagged with:
-
I'm looking forward to seeing it in alpha! ?. Most of it (especially the backend) is already planned (going through several iterations) and all that is remaining is the relevant code.
-
There is one actually, sort of. Look at the 'images' field in a multilingual setup. As you are aware, for truly (I use this word reservedly) multilingual fields, each language has to have its own column. That makes it easy to search the columns in the language you want. However, in your case, since you want only one column to have multilingual features, you have two choices ( + a 3rd not very good one): Go the route of images fields. In a multilingual setup, the description column of an image field holds each languages' value, saved as JSON. E.g. {"0":"We're gonna need a bigger terminal.","1012":"Wir brauchen einen größeren Terminal.","1013":"Me tarvitsemme isomman päätteen."}. The index of the values are the language ID. In this case, 0= English, 1012=German and 1013=Finnish.The trade off here is searching in one language is limited. Change your database design pattern. No need to cram things in if they don't fit ?. Let your subject be its own multilingual field and let your other single value data live in their own non-multilingual field. Nothing wrong with that. I mention this 3rd option hesitantly. Stick with one field as your are doing but for your data (subject) column create a lookup table for other languages. I am no DB guru but the little I know tells me this 3rd option is not a good design at all.
- 21 replies
-
- 3
-
- groupmailer
- fieldtype
-
(and 1 more)
Tagged with:
-
I'm not really getting what the question is, although I haven't looked at your code in full. Are you sure about this? What do you mean by multi-language fields? Maybe install the multi-lingual site profile and see how things work? For instance, the field images works fine as a multi-language field and it is a multi-value field. I think I'm just not getting the question. if you Fieldtype is meant to store multiple values for the same page (meaning multiple rows in its database table for the same field on the same page) , then this code is not correct: In that case, you'll need to extend FieldtypeMulti. However, I may have misunderstood what you mean by multiple values. For instance, if you meant multiple database columns on a single db row, that's something different.
- 21 replies
-
- 1
-
- groupmailer
- fieldtype
-
(and 1 more)
Tagged with:
-
I'll have a look, cheers! Btw, for some reason I still thought Tracy does not support debugging in a modal?! I only noticed the setting yesterday when we were trying to help @JoshoB with the asmSelect problem! How this could have helped me recently, with VPS (lots of modal interaction)! I feel foolish ?. Thanks for Tracy again, @adrian!
-
Hooray! Any tip how to set this up for a linux box? Ta!
-
How helpful of them ? ?.
-
Excellent! It would be good to know what changed exactly...to help the next guy and all that ?.