Leaderboard
Popular Content
Showing content with the highest reputation on 03/26/2016 in all areas
-
Hi Guys, since i start with Processwire last year, i miss a module for filter Spam at the comment field without any external service. I know about a good module from the time i use Wordpress. Now i have move the most part of the module to work on Processwire. I have write about the Module idea previously: https://processwire.com/talk/topic/10028-comment-spamprotection-without-akismat/#entry116684 And now there is a first alpha on Github: https://github.com/kreativmonkey/antispam-guard Actually functions: Check bbcode Check regexe Check if the commenter is knowen as approved or spam Check the IP is no fake Automatically approve ore pending no spam comments Automatically approve trusted commenter Automatically mark spam Check Gravatar Check external Spamdb Future: Local spam IP database Add Honeypot to Commentform Only permit certain languages Testing For testing the module you need some Modification to the FieldtypeComments.module : if($field->useAkismet) { $akismet = $this->modules->get('CommentFilterAkismet'); $akismet->setComment($comment); $akismet->checkSpam(); // automatically sets status if spam } else { $comment->status = Comment::statusPending; } if($field->useAntispamguard) { $antispam = $this->modules->get('CommentFilterAntispamguard'); $antispam->setComment($comment); $antispam->checkSpam(); // automatically sets status if spam } else { $comment->status = Comment::statusPending; } Now you place the CommentFilterAntispamguard.module and CommentFilterAntispamguardConfig.php in the same Folder as FieldtypeComments.module and activate it in the Processwire Module admin section. At the last step go to you comment field -> options and activate "Use Antispamguard". I am pleased with your feedback and suggestions for improvement6 points
-
In this week's blog post, Adrian Jones introduces his new Tracy Debugger module for ProcessWire. Enjoy this in-depth overview and tutorial where you'll learn a lot of new and useful things. An epic post on one of the most useful modules for PW! https://processwire.com/blog/posts/introducing-tracy-debugger/4 points
-
Thank you, Adrian! People like you make PW community so pleasant to be involved in. Not only the code you share has helped me and many others numerous times, but your attitude: friendliness, passion and commitment. This module of yours is a true example of the best international open source spirit. Thank you for your marvelous work. And... please keep it going) The post is awesome too . It is kind of hard to go through the dozen pages of the original module forum thread and not get lost at the first time. Sum up for it is a great idea and there is no better place for it than the official PW blog. Congrats!4 points
-
So this is a nice example of the confusing nature of any "long-do-this-or-that" interface constructs. I never liked them. They are used all over the place (tv front panel controls, watches, touch screen devices) but it does not mean it is an intuitive control method. Luckily the virtual screen of a computer is not limited to a few number of buttons, so I do not understand why this confusing way of controlling things should be used at all.4 points
-
Hi @ottogal, I have just committed a new version which handles both your requests: hiding the instructions about the shortcut to protecting the entire site ability to set a default Prohibited Message in the module's config settings. Let me know if you have any problems with this.4 points
-
Just wanted to let you all know that I added a new section to the blog post. Hard to believe I had missed anything given how long it already was, but this new section deals with Access Permissions / Restrictions and how they are controlled/related to the Detect, Development, & Production Modes. Here's the shortcut link to this new section: https://processwire.com/blog/posts/introducing-tracy-debugger/#access-permissions-restrictions Hopefully you'll find it useful in understanding who has access to what with which settings. Please let me know if there is still something that isn't clear or even if you have suggestions on how the settings/logic might be tweaked.3 points
-
Thank you Ivan - very kind words indeed There is definitely something about this community - Ryan has managed to foster an environment where people really want to share and help others - almost addictively. I think it's a very rare thing we have here. I completely agree - I was actually wondering myself how I was going to manage to make something useful out of all the info in the support thread. I guess it should probably end up in the ReadMe at some point, but then I don't really like having unnecessary screenshot images in the Github repo, so the blog request by Ryan came at a very good time in the evolution of this module. Thanks again.2 points
-
I'm not a developer either, and without PW I wouldn't really have bothered with PHP to this extent. PW is easy to use, but it's the documentation that holds it back, but you know that already I'd be glad to work with more people on this and also the forum module. I have a lot of ideas, but not the best coding experience. I'll be in touch, and thanks for your kind words. Again, thanks for your kind words. Chin up and onwards.2 points
-
I just added another option to this module that can limit the automatic naming to match the title to only unpublished pages. If the page is published, the name will be left untouched. This might help out those users who are steadfast in their opinion that the URL to a page should never change - not judging this opinion by the way - it is a very strong argument. With this new setting you can change the title multiple times while it's still in unpublished (in draft if you will) and the name will change automatically. Once it is published, changes to the title won't affect the name. Hope that wins a few more users over2 points
-
hi benbyf, the images are tremendously huge!! the first for example is 2248x3000 @ 1.9MB it's so easy to fix this with PW: <img src="<?= $page->your_image->size(1000, 1000, array('cropping' => false))->url ?>" alt="..."> and it will keep its aspect ratio. keep in mind that on first load it will need lots of memory + cpu so there may be some timeouts, but when all the images are resized the following pageloads will be faster2 points
-
Hi everyone, New version just committed. It comes packaged with both stable (2.3.10 - what it was using before) and master (2.4 dev) versions of Tracy. If you have PHP 5.4.4+ it will use the master/dev version which among other improvements, adds support for monitoring of, and allowing dumping from, AJAX calls. One quick way to see the AJAX monitoring in effect is to check "Backend" under the "Show Debug Bar" config option. Then hover over the PW menu in the admin to one of the AJAX-driven submenus - notice the new row in the debug bar showing the time etc for the AJAX request. You'll also see this popup when clicking on the Children tab when editing a page, and several other places throughout the PW admin. Of course this will also work for any AJAX requests on the front-end of you site. Here's a screenshot showing both rows (normal and ajax) with the Dumps panels for both. I have two bd() calls - one "classic" and one via "ajax". Please let me know if you notice any issues with this new version.1 point
-
I have a hook after saveReady that change some SEO fields on publishing the page.... my editors should publish a page when the work is nearly finished so content and other things are on the line and i can with some functions create my semiautomatic SEO fields content. Most editors don't care about SEO fields and SEO tab i have to create the content...in the example i use the summary (or in german "kurztext") that exists in article pages, if that summary is not there (like on normal pages) i cut some text from the first textfields of my pagetable contentblock templates...so you can skip this part if you just set the summary to seo_description! So Users could overwright the seo fields but could not leave them empty... Extracted example for seo title and description ignore some own functions for formatting proposal...: /** * Hook for changing seo_* fields if empty on Page Publish */ $pages->addHookAfter('saveReady', null, 'changeSeoFields'); function changeSeoFields(HookEvent $event) { $page = $event->arguments[0]; //for this template only if($page->template == 'artikel'|| $page->template == 'seite') { // page is about to be published if($page->isChanged('status') && !$page->is(Page::statusUnpublished)) { // check if seo_title fields are exist and if they are empty if (!$page->seo_title) { //get the default value that would used as fallback if ($page->headline) { //Headline field is used for seo_title $default_title = ripTags($page->headline); } else { //Headline field empty - page title is used $default_title = ripTags($page->title); } //set seo_title on publishing $page->set ('seo_title', $default_title); } // check if seo_description fields are exist and if they are empty if (!$page->seo_description) { //get the default value that would used as fallback if ($page->kurztext) { $default_desc = ripTags($page->kurztext); } else { //is there a main content block as pagetable field pt_inhalt? if(count($page->pt_inhalt)>0) { //get the first text field in the pagetable and use it for the seo description $first_item = $page->pt_inhalt->get("template=part_text|part_text_image_left|part_text_image_right|part_text_spalten"); $first_content = ripTags($first_item->text); $default_desc = wordLimiter($first_content, 160); } } //set seo_description on publishing $page->set ('seo_description', $default_desc); } } } } Best Regards mr-fan1 point
-
It is hard to manage time theses days, so haven't tried this yet. Your module can help enormous with debugging so probably will be a real time saver. Big thanks for the module and the extended blog post. I will look into this soon. Thanks again Adrian!1 point
-
Opcache (as really any cache) is useful for production sites, but the least in development.1 point
-
The second change could easily be made by a hook to FieldtypeComments::getConfigInputfields, where $event->return is the form you can edit. $f->insertAfter() will make this really easy to add in.1 point
-
Also, since opcache is enabled, make sure that opcache.use_cwd is enabled. Otherwise, strange things may happen.1 point
-
1 point
-
@Christophe and @jploch - I have committed a very quick fix that allows this module to work even if you don't have ffmpeg installed. Obviously the ability to grab poster images for the video won't work. Also it won't be able to determine the length of the video. Both of these require ffmpeg. I will revisit this again when I am back from vacation and add the ability to manually upload a poster image, but for now at least this module will work and you can now have the benefits of automatically playing videos with a simple: echo $page->video_field->play; Hope that helps as an interim improvement.1 point
-
Thanks for the kudos - and yes, I will look into adding that Xdebug helper module (https://componette.com/jsmitka/nette-xdebug-helper/). There is actually another one that I didn't mention in the post: https://componette.com/milo/xdebugtracepanel/ which is for showing Xdebug traces in a Tracy panel - it is currently abandoned, but the author says he is working on a new version, but not sure on the status of that. I shouldn't be, and I am not really - I was just silly enough to check my email the other day and saw a request from Ryan for a blog post. I am actually away on an extended trip, so I don' really mind1 point
-
URL segements are great you could create a own little routing with the different segements to your scripts (login, logout, register...) But if you go the template way with a Adminbranch for example /app/ and subpages like /app/login/ you could take a look at this module from adrian: https://processwire.com/talk/topic/11499-admin-restrict-branch/ regards mr-fan1 point
-
Hello Ivan, there is no long-click action on the save button. Only on the edit and view buttons in the page lister, as you already know. I think you mixed it up, with the long-hover over the save button to get more options.1 point
-
1 point
-
As those don't need custom content you probably can go for urlSegments instead of real pages.1 point
-
1 point
-
Tracy Debugger for ProcessWire: https://processwire.com/talk/topic/12208-tracy-debugger/1 point
-
Hi, I don't know if this is the right section for this but I collected some thoughts and a kind of manual about how to increase the performance of your website under load with nginx and fastcgi_cache. At best, this could be a kind of ProCache for nginx users, as not everyone is using Apache and thus not able to use ProCache on their sites. Additionally, this solution comes with the benefit of server side mobile detection and selective caching. http://svn.matthiashaak.com/website-performance-with-processwire-nginx-and-fastcgi_cache/ Please let me know your thoughts or questions about this. Be aware however, that with this solution you end up serving static pages, so no hooks or PHP functions will be called. I am currently working on a module that eases the cache purging, so kindly be patient if you need this. "Wait, and thou shalt receive"1 point
-
What kongondo wrote is right but unfortunately this doesn't work in MarkupSEO (at least I couldn't get it to work). Fortunately it's very easy to override values because all seo fields are real fields: $page->seo_title = $page->seo_title . ' - My custom suffix here!'; And you can do this with all the MarkupSEO fields. To set a new value for the og:image, modify the "seo_image" field (untested).1 point
-
That's a good point. I remember that I changed something like that a long time ago. I found my snippet sql errors - check (mysql 5.6.15): sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" remove STRICT_TRANS_TABLES1 point
-
Hello, I'm working on my first project with PW. Working with PW is amazing so far. As I am coming over from the Joomla world I am used to adding scripts to individual pages with a Joomla built in method. Searching for the PW way of doing this, I came along that post where I found this snippet of code: $config->scripts->add($config->urls->templates . "scripts/lightbox.js"); Great, I thought. But using just that snippet wouldn't include the script. I had to add a second snippet foreach($config->scripts as $url) echo "<script type='text/javascript' src='$url'></script>"; (which I also found in that other post) to actually load the script wherever I wanted in my template file. Lets assume you are working with the default PW Profile on a fresh install and want to load the lightbox.js only on the homepage and the template file for your homepage is home.php. Then you would include the first snippet in your home.php. The second snippet goes either in your head.inc into the head section or in your foot.inc at the bottom (whereever you prefer to load your js). This is a quite generic way to include scripts. If you wanted to have another script loaded only, lets say, on a contact page with template file contact.php the you just need to add a snippet, e.g. $config->scripts->add($config->urls->templates . "scripts/contact.js"); to contact.php. The second snippet foreach($config->scripts as $url) echo "<script type='text/javascript' src='$url'></script>"; already sits in your head.inc or foot.inc where you put it before and it will take care of including also contact.js because of the foreach loop. I guess that most of you already know this. But for a newbie like me I had to write this down to properly digest it and maybe it is helpful to someone else. Cheers gerhard1 point