Leaderboard
Popular Content
Showing content with the highest reputation on 01/10/2016 in all areas
-
I understand your point. The information you need for building a module is not documented in one place but spreaded through the forum and sometimes you even have to look in the core to find what you need. However it takes a lot of time and effort to make documentation and even more time to write them in such a way that even beginners can understand them. Comparing with October CMS doesn't say much and neither does Processwire have a community like Drupal contributing to documentation. The history and nature of Processwire is totally different. But maybe there are more sources as you think that could help you making your own module: https://processwire.com/api/modules/ http://wiki.processwire.com/index.php/Module_Creation https://processwire.com/talk/topic/1641-learning-module-development/ https://processwire.com/blog/posts/new-module-configuration-options/ http://modules.processwire.com/modules/process-hello/ Things that are not covered for you in those posts you can always ask here in the forum.3 points
-
I know there is modules out there for this. However I would love to see it in the core and more integrated. I really believe in the a clean user interface for clients. At the moment in this current project, the interface is really clean and it's easy to know where all the content needs to be and how to add it using the PageTree. However, I'm adding a few new things such as a login page, that will not be ever used by a particular role. It's purely there to create the URL "/login/" and have that link up the login.php. For example how the 404Page works currently. It would be nice to be able to hide this from them so they don't get confused with it being there. I know this is a small trivial thing, but I imagine a few people would like this, for example if they had a settings page. They may not want that shown in the page tree for moderators and only for administrators. I've seen modules that hide pages that are uneditable, however all my top-level pages are uneditable. I've seen it done by user, however this will need to be by group. All I can imagine it being under Settings -> Who can access this page? as Settings -> Who can view this page in tree? and have tickbox groups, append to children that don't have their own permissions. All that good stuff What do you guys think? Am I being silly and this is already available? I feel like the permissions system is so good, it might be.2 points
-
You need to put every video – and only the video iframe – in a separate video-container. If you do that in the textarea or anywhere in your code does not matter, as long as it's there. Edit: Foundation 6 does already have a class for that http://foundation.zurb.com/sites/docs/flex-video.html. Just to make you aware.2 points
-
To store data in a database table there's no need for any custom fieldtype. These are only needed if you want to create custom fields. If your module does just need a place to store e.g. configuration, you could also just use standard sql queries and if that's to bare bone there's always the option to let a orm library handle it or rather any library that abstracts the sql queries for you. There's also the option to use the module configuration automatisms to store information, which is stored json encoded, but might be enough for smaller configurations. It's true that fieldtype development is not very well documented officially, but it's actually not much different from what the teaser video in the starting post does show besides the UI factor. It needs a table column setup (getDatabaseSchema()) and some runtime to database conversion (sleepValue()) and db to runtime conversion (wakeupValue()). While the fieldtype events plugin is mentioned in the forum as kind of entry point to fieldtype development I found it a bit overwhelming at first, as it's starting out as multi-value field and is therefore more complex than it would need to be in the beginnings. With just extending the core fieldtype class and changing up those three methods you should be able to get a fieldtype working and then you can add functionality like sanitization or subfields and so on on top of it.2 points
-
This topic has been brought up several times (a couple of them by myself ). This "little" thing could help so much in building variants of admin for different roles! I really hope that the extended permissions part of this plan will somehow deal with the issue.2 points
-
It's like an enhanced repeater, but it doesn't actually use multiple templates. It uses just one, and pulls a few tricks behind the scenes to make it all work, while remaining perhaps more efficient than if it were using multiple templates. One other update I've been working on this morning for regular Repeaters, and now have functional (though have not pushed to GitHub) is making all repeater items ajax-driven, so they don't load until you click on them. This enables Repeaters to scale just as well as PageTable. It's a configurable option, but one that I think will be good to enable for folks that have lots and lots of repeater items... it should make a major different in editor performance.2 points
-
PageTable is particularly handy if you need control over where the data is stored. Repeaters handle this part automatically behind the scenes, but with PageTable you have more options, such as making stored items children of current page, etc. In some cases the UI of PageTable is also preferable. Of course there's also the free vs. commercial point of view: with PageTable you get the multiple templates feature right out of the box, but with Repeaters you'll have to get the (commercial) Matrix version in order to pull that off.1 point
-
Who would forget this ?? v0.2.1 - Regardless whether a mail has been sent or not, if saveMessages is enabled, the data will be stored. Besides a corresponding log entry will be saved.1 point
-
In your page field settings go to Input, expand “Custom PHP code to find selectable pages” under “Selectable Pages”. You can fill your input field according to the template of the page being edited, by checking $page->template: if ($page->template->name === 'News') { return $pages->find('parent=/categories/news/'); } else if ($page->template->name === 'Product') { return $pages->find('parent=/categories/products-type/'); } else if ($page->template->name === 'Picture') { return $pages->find('parent=/categories/pictures-type/'); } Make sure to remove all the other options from “Selectable Pages”. Sometimes they don’t get overridden properly.1 point
-
You're including jquery twice: jQuery in <head>, add fancybox to it and the jquery before </body> does overwrite the previous jquery instance with fancybox.1 point
-
The point I was trying to make with my last comment, was that the OctoberCMS builder plugin seemed like its main task was creating something that handles a new data structure (and create the associated files). For that - in Processwire - it's not needed, because of the way we can combine templates and fields. In that essence, ProcessWire admin interface IS the builder. This module you're building - what is it's purpose? As you mentioned you're not an 'expert' (not that many of us are!), so maybe there are different ways of doing what you need without going down the module route.1 point
-
I can help in css but only about a week later, if all goes well.1 point
-
No problem. Nobody here expects people to keep track of everything, especially if it's not a topic in the forums. I just included it because it mentions the tech. difficulties around the feature.1 point
-
@Cerulan you could use http://modules.processwire.com/modules/fieldtype-select-ext-option/ which offers exactly what you want. No need to create a new module for this.1 point
-
Isn't the string you're seeing in the log from your inputfield, which you said to be setting a string currently? Probably the sane way to handling the data would be that the runtime value is always the image obj. The sanitizeValue method will make sure any other valid (user) input, like the db string format, is converted to the runtime obj. sleepValue und wakeupValue will only handle the string to runtime obj conversion for both directions.1 point
-
Here's a lot of the tech. discussion around such a feature: https://github.com/ryancramerdesign/ProcessWire/issues/3021 point
-
1 point
-
yes, debug mode is on. And no errors generated on web page or log file. Anyway, as u suggested, I will take a fresh installation with simple setup focus on this issue.1 point
-
I think so having a Gitter is a good idea, thanks for the comment, if there's any part complex in Processwire let me know, it's because my work involves me doing Cordova 24-7 i try to take a break doing Processwire to strike a balance.1 point
-
I think this: https://processwire.com/talk/topic/1176-hiding-uneditable-pages-from-users/?p=84916 is currently the best option for hiding specific pages from the admin tree, but I do agree that something better integrated in the core would be very useful.1 point
-
@Adrian shame on me... is the first time i see the Clear Compiled Files button. The login template it's working. Thanks for your help.1 point
-
Hello kuba2, If you are using sass $table-backgound: $white is in _settings.scss line 490(ish) Foundation 6 has a few options responsive tables depending on which suits your needed best. Scroll which scrolls the table horizontal at a set break point. Stack which will stake to on top or each other or responsive which keeps first column static and you can scroll the remaining. Couple of links worth checking http://foundation.zurb.com/sites/docs/table.html http://foundation.zurb.com/responsive-tables.html1 point
-
I'm not familiar with foundation, as I use bootstrap myself. Bootstrap does have responsive tables within a div tag. You may want to look there and transfer that styling into your style file. /$.021 point
-
I recently installed a client site at GoDaddy (I tried to talk them out of it, but had to work with what they had). It was one of those $5/month sites, not a VPS. I had to change the RewriteBase in the .htaccess file to "/", but otherwise found that it worked just fine. Granted it's not speedy, but everything runs acceptably for a low traffic site. With ProCache installed it's actually quite fast. Based on the things you've said, I would guess that there's a bottleneck somewhere, and that the GoDaddy server is just making that bottleneck more obvious. Speed should not be significantly affected by quantity of pages in the site, so it points to something, somewhere in the site that is loading a large amount of pages (most likely a hook or module). I would enable debug mode, and then view the Debug info in the bottom of the admin screen on one of the slow loading pages (though not Lister, since it ajax-loads its pages separately). Click on the "Pages" section to see what's being loaded. I'm guessing you might have something in there loading all 2000 pages. This might help to point to the source of the bottleneck.1 point
-
https://github.com/jdittrich/quickMockup It is HTML based and javascript-enhanced Found via this discussion: https://github.com/opensourcedesign/resources/issues/161 point
-
Currently working on an update with bug fixes, translatable links, and (hopefully) ajax refresh when new pages are added. I should have something ready tomorrow. Edit: Made a lot of progress this weekend but will need a bit more time to iron things out. I was able to get the field to refresh when the Add New modal dialog is closed, which works great for single item selects and allows you to select the new item without refreshing the page. However, for asm-style multi-selects, the refresh wipes out your existing selection when it reloads. Because of this I think that another approach will be required.1 point
-
Oh wow, that's perfect! So the Matrix field is basically an enhanced repeater with multiple templates? Similar to a PageTable except the fields are visible and editable inline and the setup is all automated? I think we are going to need to develop some sort of flow chart or documentation page specifically about the different types of repeating fields and why you would choose one over the other for a particular use case1 point
-
1 point
-
This thread is great, you are far more technical than me. I'm just a front end developer. So to see someone having such a good time with the advanced part of ProcessWire is really encouraging. I too came from WordPress. It was my main platform for developing everything, and had been for many years. As you can imagine, finding ProcessWire was a breath of fresh air. I must admit, I look at your code and I have no idea what's going off as I'm not that advanced. But you seem to find everything that is usually really difficult, easy in ProcessWire. I too have this. Only last year was I pulling my eyes out with pagination on WordPress. ProcessWire it's easy. As for official discussion for PW3, there really isn't one to my knowledge. However, I think something like Gitter would work as we can have trivial discussions without spamming the forum. I was thinking the same for the Brand refresh for PW.1 point
-
Video clip showing latest development...(note: previews of other types other than images are still a work in progress...)1 point
-
I think PageRenameOptions should be able to help you out - just use the "Prevent Manual Changes" option. Or, you could make use of Martijn's AdminCustomFiles to insert this JS (which is what PageRenameOptions uses): $(document).ready(function() { $('.InputfieldPageName input').attr("readonly", "readonly"); }); You would attach it to: ProcessPageEdit1 point
-
Hi everyone, I did a little thinking and coding on this issue last night. There is a gist on this post (https://processwire.com/talk/topic/8605-user-editsaddsmove-only-his-own-page/?p=84835) which hides uneditable pages, but be sure to read my comments in that post. And based on my comment about the issues with "is editable" checks and the need to display non-editable parents to allow a user to access editable grandchildren, here is a much more comprehensive module that allows the ability to hide specific pages (and obviously their entire branch of children/grandchildren) based on the user role. It is based off my Page Protector module so it will look familiar to anyone who have used that. It is just a first draft, so test carefully It is attached here for now. Any thoughts? AdminPageHider.zip1 point
-
You just get the textformatter module and use the formatValue(). It accepts Page, Field, String but you can also pass an empty page and field as most textformatters also don't use it except HannaCode I think. $str = $page->textfield; $modules->TextformatterModuleName->formatValue(new Page(), new Field(), $str); echo $str; This is deprecated, but should work for most textformatters still $str = $page->textfield; $modules->TextformatterModuleName->format($str); echo $str;1 point
-
The $page's next and prev functions return the next and previous sibling, according to whatever sort settings you have defined with the parent. However, you could still do it like this: $siblings = $page->siblings("sort=date"); // or whatever you want to sort by $next = $siblings->getNext($page); $prev = $siblings->getPrev($page); if($prev) echo "<a href='$prev->url'>Prev</a> "; if($next) echo "<a href='$next->url'>Next</a> "; Personally, I prefer using regular pagination to something like this. The skyscrapers profile has some good examples of using pagination with custom sorts.1 point
-
It returns the next page id. So you have to use $page->next->title to get the title ie. And a linked title: <a href='{$page->next->url}'>{$page->next->title}</a>1 point