Leaderboard
Popular Content
Showing content with the highest reputation on 02/28/2015 in all areas
-
I'll just answer these one by one. It depends. You should always test updates locally before deploying it to the server, so you see if something isn't working on a newer version. It's still the work of the modules creator or the community to fix issues if present, so it's kinda the same principle as with wordpress. But you'll most likely not need as much plugins as for wordpress and more than that, you'll most likely won't need it for remodeling core cms functionalities but rather for smaller enhancements. There's also a compatibility list for each module in the modules directory and most likely a dedicated forum thread to each module, where you can always seek support. ProcessWire is quite easy to update. There's now even a module from Ryan, that does backup the database and the old wire/ directory for you. As your site and the cms are in seperate directories an update also can't change stuff from your site, so with the database backup and the wire/ directory you can always roll back if something broke. ProcessWire can easily handle lots of users. It has lot's of great caching methods build in and you could even buy procache which works on the .htaccess level to even bypass php (only useful for static sites) You can have as many templates as you need. It really depends on your usecases and on your way of handling templatefiles. You can use markdown with any textarea inputfield of processwire. Markdown is parsed by a textformatter and therefore isn't dependent on the editor. If you don't like CKEditor maybe have a look at this fresh addition to community modules: https://processwire.com/talk/topic/9164-release-inputfield-ace-extended/6 points
-
4 points
-
It's not only the same error in the log, but you're also doing the same thing wrong. You can't use $pages in functions because of variable scope. ProcessWire makes these object automatically available for the scope of the templatefiles, but inside a function is a new scope, so you need to either redefine the variable itself or use a function to get the object. // Template scope $id = 15; // simple variable, defined by you $pages = $pages; // the pages object, defined automatically by processwire function something(){ // this is now a new variable scope // neither $pages nor $id are available here. // the api variables are not a special global variable $pages = wire('pages'); $pages->find(""); // OR just wire('pages')->find(""); } It's the same reason, why you can't use $pages in modules. $page/$pages and the other variables are just convenient to use in templates. Everywhere else you need to call them differently.3 points
-
Well that's too bad… As for another weirdly named project, try Windows. http://nick-jonas.github.io/windows/ Also good luck finding it on Google.3 points
-
A highly configurable and flexible ACE editor input field. This module is sponsored in part by Nibiri, aka forum member Macrura which was a great jump start. So many thanks to him. See this short screencast to get an overview: Get it from Github or the Modules Directory. Roadmap add full screen mode expose a jQuery api for resizing, setting row count etc. add image handling like in Adam Kiss' version2 points
-
This tiny module is intended as a helper for Ryan's Hanna Code module by providing a way to select existing Hanna Code tags within the editor. This is something I felt our clients needed in order to start properly using Hanna Code tags. See attached screenshot for details -- there's really not that much to it at the moment. Each editor requires it's own plugin and currently I've only cooked one up for CKEditor, where the plugin presents itself as a context menu item (visible on right click). I'm planning to expand the feature set of that one slightly and then probably convert the CKEditor plugin to TinyMCE, but that's just about it. Ideas are welcome, though. Some of the code is pretty much duplicated from Ryan's original module. I hope he doesn't mind -- though for the record I've also tried to make it very clear in the source what part that is and where it's from.. GitHub: https://github.com/teppokoivula/HannaCodeHelper Modules directory: http://modules.processwire.com/modules/hanna-code-helper/2 points
-
https://github.com/ocorreiododiogo/pw-image-fields-markup http://modules.processwire.com/modules/textformatter-image-field-markup/ This is an old idea that I felt inspired to finish after reading this discussion https://processwire.com/talk/topic/9164-release-inputfield-ace-extended/?p=88717 This textformatter does more or less the same that my Image tags texformatter, but instead of using it's own tags, it tries to be completely agnostic while doing this, so you can use whatever method the markup language applied to that field uses. So, for example, If you are using Markdown on your that field, you would insert all images of a field called "images" on that page with: ![](images:0) or inserting the second image from the field called "images" with and alt text of "overriding alt text": ![overriding alt text](images:2) While for textile you would do this: !images:0! !images:2(overriding alt text)! As I said, this is language agnostic, so it should work with any markup language. The trick is to collect the images when they are already html img tags, and intervene only on those that are not urls by changing their attributes accordingly. I used the php native DOMdocument class for this. There are still things to be done, like targeting fields on other pages, defaulting to the first image field from that template and cleaning up a bit. But I'm not planning to do those at this point. Consider this beta.2 points
-
While MODX and Symfony are probably great systems, their goals are not necessarily the same as ours. I don't think that anyone here (or anyone in their right mind, for that matter) would ever deny that standardisation is a good thing, but I do believe that Ryan is doing the right thing by always putting things in the right context -- which, in this case, would be ProcessWire, it's target audience, and their needs. Also: all good things take time. Even if we don't act instantly, it doesn't mean we won't act when the time is right. This really isn't something that is going to happen overnight, and sometimes we just need to be patient By the way, I'm absolutely not trying to discourage discussion. I just hope that we're all on the same page here: no-one is opposed to these ideas, and I'm sure we'd all like to see them discussed even further, but especially bigger and more fundamental changes need to be properly evaluated first. "X does it like this" doesn't necessarily mean that it's the best thing for us to do, and so on.2 points
-
2 points
-
2 points
-
Some time ago I developed a module (FieldtypeImageExtra) which extends Fieldtype Image with the ability to add custom fields to an image. This worked well but it had a somehow restricted applicability and did not meet all of our needs. There of course are other useful image modules like CroppableImage or ImageFocusArea, but up to now there was no possibility to combine image cropping with custom fields support. So you had to decide whether to add image cropping or the possibility to add custom fields because each of those modules sets up their own field type (and input type) which cannot be combined. The new module ImageExtra allows you to have both functionalities. You can get the module from GitHub. For more informations have a look at this blog post. If you notice any problems or unexpected behaviour please let me know.1 point
-
Welcome to processwire. Let's face it, without offense, but wordpress has been quite a few times in the news, and recently is, about it's plugins being exploited and has millions of hacked wordpress sites. That must give you something to think about. Secondly with processwire you don't have to learn your way around a new system that: "let you" make websites. With processwire you are going to make websites directly from the core. That means that all the experience you already have learned in the past with html, css, php, etc. you can start using directly with processwire and make a website in any way you would like to see it. 2k visitors, 6K pages daily won't be any problem because Processwire has been made scalable from the ground up. About templates that is where Processwire really shines because you can literally make your own templates both in the backend (admin) and in the frontend. About markdown editor, here are some good reads: https://processwire.com/talk/topic/4213-markdown/ http://modules.processwire.com/categories/textformatter/ http://wiki.processwire.com/index.php/Text_Formatters Open this page: https://processwire.com/api/multi-language-support/multi-language-urls/ and read the part where it says: Changing the rich text editor About upgrading processwire in the future: https://processwire.com/talk/topic/52-how-do-i-upgrade-processwire-to-the-latest-version/ About making your right choice, no fanboy talk here but from my own (and others) experience if you compare processwire with the "popular" big 3 out there, processwire is going to save you a lot of time and headache. Isn't that what we all seek over "popularity" ? In processwire a lot of practical functionality is already included, no need for those to plugin afterwards e.g. you will have multi-language out of the box. Don't forget browsing the processwire api and the modules: https://processwire.com/api/ https://processwire.com/api/fieldtypes/images/ https://processwire.com/api/variables/templates/ https://processwire.com/api/variables/fields/ http://modules.processwire.com/1 point
-
When it comes to pure PHP regex testing, http://www.phpliveregex.com/ beats the crap out of every other tester out there. (Though regex101 looks pretty neat too.)1 point
-
Yes that's what I was meaning: contextual menu is broken here (latest PW dev). I see "paste" but nothing else.1 point
-
I don't know exactly, but does sort=sort not sort by the order of pages are in the pagetree? sort=created would sort by creation date. Also there shouldn't be a problem if children() returns the right order as child() internally calls children() and just returns the first page if there are children.1 point
-
I know alot of people won't be pleased to hear this but Hari is right, Standardization is very important, that way framework interoperability can be a reality, its not fun for a dev to switch different programming practice, a good example is the Symfony Components which is easily used in other Projects, an example of such project is the MonoLogger. That way we can leverage on exisiting libraries and boost Processwire rather than building everything from scratch. however these are my personal opinions.1 point
-
I don't know how Bea's ImageExtra module is working, but as far as I can tell one could give an image a custom name field, so how about supporting that, perhaps configurable, so that one can reference the images via name. This would make it sorting agnostic. images:header images:intro images:foo The image field is an extension of WireArray, right? So in your code module's you should be able to get it easily via $images->get('name=foo');1 point
-
1 point
-
This would mean, that you have to insert the password every time you save a user, which is definitely not the case. The "real" password isn't even stored in the db, so there's no way to pre-populate the password field with a value, thus it has to have a blank state, where it won't trigger a database comparison / save. Just un-/publishing a user should normally not intrude this behavior, at least in my opinion.1 point
-
Agree with only "images", but not the 0 index form. That may be more intuitive to some developers, but surely not for clients Exactly1 point
-
This helper render method on PageArray's is usually meant for a convenient tool when developing like scaffolding (although you can't CRUD). Although it is there to use if you want, I also always use the renderPager() method. If you want to output a summary but haven't got a summary field $page->summary. Since you can't modify the module, one could add the property to page object via property hook. Which means to add a property on runtime. You can see an example in the HelloWorld.module. Something like this will give you a $page->summary $pa = $pages->find("template=basic-page, limit=4"); wire()->addHookProperty("Page::summary", null, function($event){ $page = $event->object; $event->return = $page->headline; // return something for "summary" }); $content .= $pa->render(array('itemMarkup'=>"\n\t<li><a href='{url}'>{title}<br><small>{summary}</small></a></li>")); But what's wrong with creating your own foreach? $pa = $pages->find("template=basic-page, limit=4"); if($pa->count) { $list = ""; foreach($pa as $p){ $summary = limitWords($page->body); // your function to limit words maybe $list .= "<li><a href='{$page->url}'>{$page->title}<br><small>{$summary}</small></a></li>"; } $content .= "<ul>$list</ul>"; $content .= $pa->renderPager(); } else { $content .= "Nothing found"; }1 point
-
diogo, great one, thanks. I'd prefer a syntax that might be more intuitive? instead of: images:0 // all images:1 // first images:2 // second rather: images // all images:0 // first images:1 // second What do you think? Edit: Ha, did not know about the DOMDocument class, that's very useful.1 point
-
Still thinking about this frequently. Still reaching no satisfying conclusions. Lately I'm leaning towards a solution that completely avoids HTML altogether - I came across this Markdown editor, and really like the concept: https://markdown-it.github.io/ The problem with this, is there's no server-side (PHP) version of this otherwise excellent, fast, very complete Markdown implementation. Would rather not depend on Node for this. Would rather not have to port and maintain the whole thing. Wonder if js2php would run it, but the project has been unmaintained for 3 years. I would like to use this in conjunction with a simple token replacement system - so if you were to type in "{kittens}", the token would appear on a list, from which you'd be able to specify what you want to replace it with. This would have plugins, so you could add image features, a table builder, or other things for which Markdown isn't ideal. Just thinking out loud here... I'm working on too many other projects at the moment1 point
-
1 point
-
Aloha Editor is back with something new: http://www.alohaeditor.org/Content.Node/blog/goodbye-contenteditable.html http://www.alohaeditor.org/Content.Node/blog/introducing-aloha-ui.html1 point
-
I think this is not intended. I'd try to create a user manually in the admin, give it a password and check if this triggers the same behavior.1 point
-
Hey there, thanks for the awesome profile. I'm going to probably use it as an example for a simple site I'm doing as a class project. Here it is running on a raspberry pi. therestaurant.endoftheinternet.org1 point
-
I was thinking about launching a new CRM and calling it Vista — I don't see the problem.1 point
-
Hey, in a recent discussion we talked about one body field vs. PageTableExtended (or similar content splitting). Because of this I created a little Proof-of-concept including a CKEditor plugin and ProcessHannaCodeModal.module. As I don't have a lot of spare time in the moment (because I'm going on vacations for five weeks on monday So I have spare time but no computer to continue working on this ) I thought I share the current progress with you. Feel free to use those files to continue working on it or something similar. Here's a little screencast (I'm using the "lightwire" CKEditor skin in it): And here are the files: HannaModal.zip1 point
-
Eheh, I want to see how you are going to correct those two "know" that should be "now" in the text1 point
-
Modx going to make use of PSR standard and composer. Have anyone had a read ? https://medium.com/@drumshaman/keeping-modx-relevant-part-one-42dc6632f86b https://medium.com/@drumshaman/keeping-modx-relevant-part-two-15a37eab5b48 I do believe 3.0 should have bought some of these into lights.1 point
-
1 point
-
Thanks to everyone who has submitted profiles so far. As a special bonus, you can go to the main directory page each day tiles photos/logos behind the top button will display up to 39 random developers each day. There is some repetition now as we have less than 39 approved, but it keeps things interesting. It's just some code that loads random dev images and creates a background image using GD on a CRON job at about 5am (Eastern time? not sure what the server is set to) in case anyone was wondering.1 point
-
Thank you so much apesia, soma and adrian. @soma and @apeisa - I followed your advise. Thanks again now it is working fine (happy). @adrian - Yes adrian I put news-pager-index.php file under template directory. Just to recap: if we need use external template file other than the template name we have to use altFilename property. In the normal scenario we can use name property if the template file name and template name were same. Here is the working copy thanks to processwire and friendly community members. It might be helpful to newbies like me. class NewsPager extends WireData implements Module{ public static function getModuleInfo() { return array( 'title' => 'News pager', 'version' => 001, 'summary' => 'News pager template', 'singular' => true, 'autoload' => true, ); } public function init() { //todo add some listeners } /** * Install the module * */ public function ___install() { // new fieldgroup $fg = new Fieldgroup(); $fg->name = 'news-pager-index'; $fg->add($this->fields->get('title')); // needed title field $fg->add($this->fields->get('body')); // needed body field $fg->save(); // new template using the fieldgroup and a template $t = new Template(); $t->name = 'news-pager-index';//Used different name other than file name /* * altFilename property will accept file-name or file-name.php * or even $this->config->paths->templates . 'file-name.php' * Note: template file needs to be placed under * template directory */ $t->altFilename = 'news-pager-index-file';//name of the template file which is under tml dir. $t->fieldgroup = $fg; // add the field group $t->save(); } /** * Uninstall the module * */ public function ___uninstall() { $templateNeeded = $this->templates->get("news-pager-index"); $fgOld = $this->fieldgroups->get('news-pager-index'); if ($templateNeeded->getNumPages() > 0) { throw new WireException("Can't uninstall because template been used by some pages."); }else { wire('templates')->delete($templateNeeded); wire('fieldgroups')->delete($fgOld); } } }1 point
-
Ryan dont you think users unpublished should have strikeethrought?1 point