Leaderboard
Popular Content
Showing content with the highest reputation on 02/08/2016 in all areas
-
Thank you sir. I must say that i fell in love with Processwire when i discovered it by chance. My Autism makes it difficult for me to grasp concepts sometimes and with Wordpress i had a tough time. Put Processwire changed everything for me. It sounds silly byt its like a dream come true. Processwire totaly make sens to me and the way the API works and as a fan of jQuery i love the route Ryan Cramer took with it.8 points
-
Hello all PW fans. I wanted to contribute with a simple but short tutorial on how i created a simple visitor counter to have a rough estimate on what pages got visits on my website. This tutorial assumes that you have setup a field on your page template that you want to monitor with a name of visit_counter of the field type integer. I put this simple code together by reading some answers by the Excelent Ryan Cramer here on the forums and decided to make a few changes to his implementation. This is because i did not want the code to count my visits to the site if i was logged in. Instead the code shows the current pages visits if i am logged in, and hides it if i am not. Enough talking. Here is the code: <?PHP /* simple code for recording current page visit count to its visit_counter field of "integer" type. But only if the visitor is not currently logged in. */ if($user->isLoggedin()) { /* if the user is logged in */ echo("<p>Visits: {$page->visit_counter} st.</p>"); } else { /* if the user is NOT logged in */ /* get current visit counts and save them plus one */ /* turn of output formating so PW do not give an error when we change the value */ $page->of(false); /* increment the current integer plus one */ $page->visit_counter++; /* save the visitor_counter field */ $page->save('visit_counter'); /* turn on output formating so PW work as it should */ $page->of(true); } ?> I also put this code in a PHP file by itself and named it _visit_counter.php so that i could easily include it in whatever page i want to monitor. You could potentialy expand this and make it more advanced. i would look at the "roles" and "user" section of the: http://cheatsheet.processwire.com Bonus Tip, in the PW admin go to your template that you have the field setup in and on the "advanced" tab look for the "List of fields to display in the admin Pagelist" section and in that field put: {title} - Visits: {visit_counter} This again assumes the fields name is visit_counter . Now in my page list in admin i can see the title followed by the number of visits. Handy This is my first post to these forums. And i will try to help out where i feel my abilites come to the rescue. Hope this helps anyone out there working with Processwire.7 points
-
I got an email from a knowledgeable ProcessWire member about a possible issue with this Fieldtype. PLEASE DO NOT USE THIS FIELDTYPE RIGHT NOW. Thanks for that mail! --- I have a Fieldtype and Inputfield that does what you ask: https://github.com/Da-Fecto/FieldtypeMyCrypt. Passwords are salted again with the ProcessWire salt in /site/config.php, so encrypted passwords only work in 1 install. When using this Fieldtype, be sure that you use https else your passwords will still be plain text when submitting6 points
-
Sadly, I wasn't able to do all the mock-ups this weekend as I was away. However I've managed to make a start on the edit page. @LostKobrakai - Thank you for your feedback, I let the sidebar in for this exact reason. I also have some ideas on how to fill out that space when only the Page link is available (due to permissions - editorial role). My idea is to have maybe the recently edited appear as like widgets in the sidebar - or something along those lines. I really need to think about it. This will be just be a theme I'll be building mostly to gain experience on the system but also to use in my personal projects. I will be releasing it for others to download. Anyway, here is the edit page (http://i.imgur.com/kp96yng.jpg):6 points
-
@Nukro: A few points that may help you get into the right direction: Never use ECB mode. With the same key, it always produces the same output for the same input, thus making patterns obvious and rainbow table attacks cheap. If you see an example on a web page that uses ECB, navigate somewhere else (that includes the examples at php.net). Never store keys in clear text or with weak encryption on the same system where you hold the data (or have it easily accessible), or you're replacing security by obscurity. Whenever you use symetric encryption, use an initialization vector (and make sure your cipher mode, e.g. CBC, supports IVs). It is much like the salt in password hashes and needs to be random for each encrypted entry and reasonably unique. Prepend the IV before you store the encrypted data and extract it for decryption. Depending on how you model your system, implementing a secure system can get slightly tricky. If visibility of information shouldn't be limited to a single PW user, they all need to know the key (let's call it the 'master key') used. To avoid storing it in plain text, encrypt and store the master key for every user. Use a secure, repeatable hashing function to generate a long enough encryption key from the user's password for this step. On password change, re-encrypt and store the key (and, again, don't forget to use IVs). Of course, in such a system, all user passwords need to be strong, or an attacker with access to the DB contents could easily crack the encryption to the master key through brute force. To populate the encrypted master key for new users (or if you add the feature to a system with existing users) you have to assign their password from an account that already has the correct master key. This way, at least no plain encryption key is ever stored in the system. There are more elaborate (and, of course, even more secure) approaches, but these would require an automated pulic/private key infrastructure and off-site services. That's what the "good guys" among the big internet companies use, but things get really complex at that point.5 points
-
There were also a proof of concept by @netcarver here: http://modules.processwire.com/modules/crypto-ppp/ Maybe this can become useful at some point.3 points
-
3 points
-
3 points
-
@gmclelland - it should be really simple to achieve an add to calendar, especially with processwire. 1.) check for url segment and if it is valid echo your ical, and exit... /* HANDLE SEGMENT AND ROUTING -------------------------------------*/ if($input->urlSegment2) throw new Wire404Exception(); if( strlen($input->urlSegment1) ) { $pageName = substr($input->urlSegment1,-4); $pageName = $sanitizer->pageName($pageName); $event = $pages->get("name=$pageName"); if($event->id) { header('Content-type: text/calendar; charset=utf-8'); header("Content-Disposition: inline; filename={$input->urlSegment1}"); $options = array( // associative array: // send vars to your vevent processor here... ); wireRenderFile('./inc/vevent.php', $options); exit(); } } } here is the alternate way if($input->urlSegment2) throw new Wire404Exception(); if($input->urlSegment1) { // if urlSegment1 render the single camp $pageName = substr($input->urlSegment1,-4); $pageName = $sanitizer->pageName($pageName); $event = $page->child("name=$pageName"); if($event != '') { header('Content-type: text/calendar; charset=utf-8'); header("Content-Disposition: inline; filename={$input->urlSegment1}"); $options = array( // associative array: // send vars to your vevent processor here... ); wireRenderFile('./inc/vevent.php', $options); exit(); } else { // if the event does not exist... throw new Wire404Exception(); } } you can generate the VEVENT using a class, function etc..2 points
-
I would like to thank all the Nice people giving me likes for this post. It realy gives me encuragement to come up with future tutorials when i have something usefull to share.2 points
-
In addition, when using https, make sure that your connection is using a strong protocol version and cipher suite. Reference: https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet2 points
-
Please review the following information https://github.com/ryancramerdesign/ProcessWire/tree/devns2 points
-
Just like I've shown you in the example above . No need to do merges and such. See below (including the comments in the code); hope this is now clearer. $paginationOptions = array( 'nextItemLabel' => "Forth", 'previousItemLabel' => "Back", 'listMarkup' => "<ul class='MarkupPagerNav Zurb pagination'>{out}</ul>", 'itemMarkup' => "<li class='{class} not necessary class'>{out}</li>", 'numPageLinks' => 5 ); $defaultOptions = array( // array of MarkupPagerNav options // you have to use the index 'post_pagination' and its value MUST be an array // here, we've passed it the array $paginationOptions that we created above 'post_pagination' => $paginationOptions,// the value here must be an array; the index must be named 'post_pagination' // other stuff you already had in your defaultOptions 'post_more_text' => 'mehr', 'post_whatever_option_1' => 'blah blah blah', 'post_whatever_option_2' => 'foo bar', ); $content .= $blog->renderPosts("limit=5", true, $defaultOptions);2 points
-
Thanks for responding. We are going to test it thoroughly. That's why I'm looking for all options. Pity you haven't used it yet. IftRunner with (Page) Actions are really simple as a concept, but quite powerful. Antti wrote about their use case a while ago.2 points
-
Update: Version 2.3.7 Following this question, it is now possible to pass MarkupPagerNav options to renderPosts() if you wish to customise your posts' pagination. All the MarkupPagerNav options listed here can be passed as an array within an array to renderPosts() as shown in the example below: $blog = $modules->get("MarkupBlog"); $paginationOptions = array( 'nextItemLabel' => "Forth", 'previousItemLabel' => "Back", 'listMarkup' => "<ul class='MarkupPagerNav Zurb pagination'>{out}</ul>", 'itemMarkup' => "<li class='{class} not necessary class'>{out}</li>", 'numPageLinks' => 5 ); $options = array( 'post_pagination' => $paginationOptions,// array of markup pager nav options 'post_count_text' =>'Article',// other posts options passed as normal ); echo $blog->renderPosts("limit=5", true, $options);2 points
-
Tom, Can you try the branch, here? I think it might solve your sub-sub-field request. Not sure I fully understand your issue with the Field Change Notifier. Could you elaborate?2 points
-
I just want to remind you all, that "users will often only see pages" is an assumption from your experience, but may not be the case for all setups. I'm using lots of custom modules for myself and I've also seen other forum members heavily using custom listers or other custom modules, which all reside in the navigation. @adrian I think your problem with switching between page list and page edit is mostly down to the fact that the page tree is being reset in state all the time and that the page does fully reload. If it would act more like a single page app, which would hold/just update the state of the page tree and maybe even load the page edit interface via ajax this would already feel much more smoothly without trying to cram both interface parts into a single page. In the end a user is most of the time either updating a page or browsing the page tree. Also the gained speed improvements would make switching between both interfaces much more frictionless.2 points
-
Hi Guys I have an Question about Encryption/Decryption in Processwire. Does Processwire has an encryption Library which provides two-way data encryption for sensitive data? I mean something like the Encryption Library from Codeligniter. I saw the Password.php class in the core which uses some encryption magic, but I don't think, that the purpose of the password class is to provide a two-way data encryption. Because I don't see how it should be possible that I can read/decrypt the password from the database since it hashed(one-way encryption). Why I need a two-way data encryption or. why I am asking? In the near Future I must make a "Password/-Login Manager(included Customer / project management)" where a Processwire User can create Logins(FTP, MySQL, Processwire Login etc...) and assign them to different Projects. Since the Passwords for the Logins are very sensitive data, they must be stored encrypted in the Database, but they must also be listed in Plaintext in the Password Manager Interface. Because of that I am writing this thread to collect some Information about Encrypting/Decrypting in Processwire and some experience from other developers regarding Encrypting/Decrypting. Why I am developing a Password/-Login Manager? My Company uses Active Collab for managing Customer Logins/Projects etc. It works very well! The Problem is that the Password Manager Plugin doesn't exist anymore in the new update of the Tool. So we decided, that i develop a Password Manager in the beautiful CMS/CMF Processwire. It also serves as a perfect final exam for my education as a apprentice in Web-Developement/Informatics. Finally a Code Snippet regarding the Encryption Library from Codeligniter: include 'Crypter Class/Classes/Encrypt.php'; $data = $page->pwmessage; //normal text field in Processwire $ci_crypter = new CI_Encrypt(); $ci_crypter->set_key("r7kl-icfc-8ext-p"); $ci_crypter->set_cipher(MCRYPT_RIJNDAEL_256); $ci_crypter->set_mode(MCRYPT_MODE_ECB); $ci_encrypted = $ci_crypter->encode($data, $ci_crypter->get_key()); $ci_decrypted = $ci_crypter->decode($ci_encrypted, $ci_crypter->get_key()); $outBody .= "<strong>Original:</strong> ".$data."<br>"; $outBody .= "<strong>Encrypted:</strong> ".$ci_encrypted."<br>"; $outBody .= "<strong>Decrypted:</strong> ".$ci_decrypted."<br>";1 point
-
Hey Guys, here is another website we made at WPWA back in 2013, for the German luxury home accessorie brand "Twillow". The page is quite puristic and based on PW V2.3.0. We build in some cool features like the 360deg slider on the product pages. http://www.twillow.de/ Latest projects coming soon!1 point
-
I'm sure there may have been a topic talking about this previously, but ironically i couldn't find it when using the search box in the forum. Recently i've been using Processwire as more of a CMF really, which i've found it really easy to mould and shape to the application needs. The one thing that concerns me though is the fact it only uses the MyISAM DB Engine. These days InnoDB seems to be the standard, and seems to fit better with the way PW stores things, for example Foreign keys help the DB understand links of data across different tables (PW stores each field in a separate table). This would also benefit greatly from transactions, making sure that every SQL operation needed to store an item and its field data would either all be successful, or wouldn't happen at all. This gives guarantees that no data went missing during the save due to DB issues and crashes. Row locking (InnoDB) rather than Table Locking (MyISAM) is a huge advantage, take the situation where i want to save an item that has a common field, like field_body, if i understand it correctly, then the field_body table would be locked on every read as MyISAM uses table locking, so other queries to read or write would have to wait until the table lock is released. InnoDB on the other hand only locks the row in question so other operations can happen to the table at the same time. Another feature that goes along with the ACID compliance is The commit log, InnoDB keeps a commit log of transactions, so in the event of a crash it can recover to a consistent state. MYISAM however does not so it can be hard to know what state the data should be in, when recovering. I think i read previously that Ryan chose MyISAM at the time for it's Full text search capabilities, which InnoDB only introduced in MySQL 5.6, but i think unless full text search is the key part to the internal PW system, then is it really that necessary a trade off? I would rather the reliability of InnoDB storing data than to have full text search, for that kind of functionality i would use a separate system built for specifically with this feature, such as ElasticSearch. So i was wondering, will InnoDB become the default DB engine for PW ??1 point
-
Great introduction to urlSegments. This is a textbook use case. However, some pointers for beginners who might want to copy and paste the code. You can probably skip the whole $allowedSegs array, imo. I would sanitize the segment like you did, then cut off the extension afterwards (not sure if anything can go wrong doing that string operation on unsanitized input, but it works the same). Then I’d just get a child page of that name. Most importantly, get the child page using $page->child('name=' . $sanitizedSegment), because with $pages->get() you might get an unexpected page of the same name from a different branch of the page tree. If it returns a NullPage, you can still 404. Also, I would refrain from overwriting $page, just to rule out any potential headaches that might cause1 point
-
1 point
-
I had used PHPed for many years and was happy with it though I mostly just used it as an editor. Good syntax highlighting and good find/replace. One day a couple months ago, as it was explained to me, hackers did something to their site which resulted in a few hundred customers licenses becoming invalid, locking us out of the application. It was a permanent license, only the access to updates expires. While waiting to hear back from them I became familiar with Sublime and have chosen to stick with that. This was a rare event and I Imagine they are better protected now but finding out it could be be disabled remotely really put me off.1 point
-
Looks good. Would the side by side content areas responsively stack if, in a pinch, we had to do some admin work via small screened portable device?1 point
-
What a silly mistake. This was the reason - now it works!!! Thanks Adrian1 point
-
1 point
-
Quite possibly - have you checked that the $eventpages array is containing the pages you are wanting to delete? What about if you add "include=all" to the selector?1 point
-
Thank you Andrian for the incredible support. I have contacted my provider suggesting your solution. I will update this post as soon as I have the confirm that it works. Thank you! Edit: Finally it works and seems there was a firewall problem.1 point
-
It sounds like it is an allow_url_fopen issue. Edit your php.ini to set it to "On" and the module should work fine.1 point
-
Thanks for the link to Anttis writeup. ------------------ Following is a description for what the SQLite handler was used in the past before I built WireQueue around it. One use case was for an award winning Cinemaportal where they send up to 2x 13k emails in different newsletters every week. I should embed the WireMailSMTP module there and I suggested that we should use SQLite files for it. This is running a half year in production now without any problems. At the beginning we have had a testing for 2 weeks where we slightly modified and tweeked some little parts. On that server where the website is hosted were running many many different programs and services, so, that for unknown reasons, sometimes the SQLite DB stopped working unexpected. But SQLite has a sort of transaction feature (Sqlite-Journal files), so that no recipient got lost. On every run we retrieve 500 pending recipients. The only thing what could happen there was, that, when immediately after successful sending a mail and the SQLite crashed before it could update the record in the dbfile AND in the journal file, this single recipient will be picked up again with the next batch, what results in sending him the newsletter twice. So, this (only) happened a few times per week, (3-10) on 10k mails, = 0,1 percent. And as this may be a bit specific to that explicit server, as I haven't encountered it with other use cases, it seems to be much more secure to use SQLite with its transaction / rollback functionality as MySQL with MyISAM! Don't know about the differences when using MySQL and InnoDB. But we / you can build storage handlers for every DB we / you like. So, what I have done with building WireQueue, is implementing it for easy usage and monitoring in PWs backend. The previous used fieldsdefinition of the SQLite table has changed from userid, email, sent, tries to data, state, worker, but everything else of the SQLite part is identical in WireQueue. Hope this helps a bit.1 point
-
Welcome to the forums @magnusbonnevier Thanks for the tutorial1 point
-
Here is the security issue - https://github.com/conclurer/ProcessWire-AIOM-All-In-One-Minify/issues/44 How strange, I get a 404 when clicking the link, however if I focus the URL bar and press enter it works. Here is a link to the pull request - https://github.com/conclurer/ProcessWire-AIOM-All-In-One-Minify/pull/531 point
-
@Tom...404 returned at the link you've provided1 point
-
Hello, I'm unsure if this is still being updated - supported. There has been a major security problem (Thanks Ryan) for a while. I've done a push request to attempt to fix this https://github.com/TomS-/ProcessWire-AIOM-All-In-One-Minify I'm going to go through the issues and try and fix them on this branch.1 point
-
@Ivan It looks like atom does have a way to index function definitions via ctags. This might work for you.1 point
-
@Pretobrazza: Hey! Joomla and Seblod - the same route that led me here) Actually I do not think that proper choice of an IDE matters that much for PW development. The main switch has to be made in the head. You should start reading code to cook PW right. But a proper IDE can help you to read the code faster) That is why I was asking about fast navigation to class and method definition and about the method list in the sidebar. All IDEs like NetBeans and PHPStorm scan you project and are able to help you go to significant points in code in just a couple of clicks. For example you can ctrl+click on a method call in NetBeans and you will be "teleported" to its definition. As PW is written in object oriented style with inheritance and stuff, it helps a lot. Simple text editors are not so smart, at least out of the box. I like to deal with frontend code and backend code in the same editor. IDEs are usually slower and do not have all the cool features as new breed text editors, like ST, Atom or Brackets for html/css/js/git/gulp/grunt... That is the essense of this discussion, as I understand it. How to get all the cool stuff in one product, and preferably for free. I am using NetBeans (as it is free in comparaison to PHPStorm, which is more popular) and Notepad++. I am looking into Atom as it can happen to be "something in between". ...And just yesterday I learned about this thing from kongondo. It can actually help you write code in simple text editor, as you can search for stuff there.1 point
-
Not sure if you're creating the pager by yourself, but here's how to edit the classes for pw in general: https://processwire.com/api/modules/markup-pager-nav/1 point
-
1 point
-
The best way I've found to understand it all (apart from asking questions on here) is to create a test site, create a few pages, templates and fields and then to have a look at the database structure via phpMyAdmin. You will quickly understand what a page, field etc actually is, and you will also realise how simple and efficient PW is behind the scenes.1 point
-
@BernhardB: thanks for the language explanation, I have corrected it above in my post! I haven't used MySQL tables, because my main motivation was to have a storage that not belongs to the PW-DB. I think this is useful in regard of Backup / Restore processes, if one have not mass temporary records with it. Filebased storage is portable and easy to use (TXT). SQLite is also portable but has DB support what lets you simply push, pull and update records. For example, think of sending newsletters to 5k recipients, SQLite is very convenient to handle this. Another usecase what I have had: A website collected infos over a time of two weeks and the (post) processing should be done afterwards. Here we simply have implemented a download link for the customer into the editpage, so that he could store the textfile (CSV style), locally on his computer for further processing with excel. So, I believe there will be also usecases where a MySQL table is a better storage. For all storage types that will need initial config params, I have implemented a simple Textareafield into the queue page, what can be used to take that settings. (one can use it as key = value pairs each in its own row, like in some other modules, maybe. But it is up to the developer if he like to use that simple approach or if he implements something other). The Textareafield is collapsed by default for admins, and hidden for others. (Whereas the queue pages require minimum the role "wire-queue-admin" or superuser for everything else than viewing the state or count). So, hopefully someone will make a mysql storage handler and commit it here or at github. (or another DB)1 point
-
I was thinking about splitting this into two modules. One that's responsible for the forum setup and topics and another for the comments. The comments module would be a page-based comments module. This would then give the option to use either Ryan's Comments Fieldtype, or this page-based version with the main forum module for topic replies. Edit: Since I released the source code, there's not been any feedback, so I assume my code is bad. For that reason, I'm going to commence with my above suggestion and split the module into two manageable pieces of code, starting with the comments module. This thread can now be deleted as I will no longer be releasing it as HermodBB.1 point
-
My setup: ->every event is a page ->events are listed only in a overview page ->i change the name of the event pages ot something like my-great-event-title-2016-02-04-id.ics that the page template itself works as a ics file I've this in my event.php: <?php //set correct content-type-header header('Content-type: text/calendar; charset=utf-8'); header('Content-Disposition: inline; filename='.$page->name.''); //get the data for the ical file $homepage = $pages->get('/'); $event_desc = stripslashes(strip_tags($page->event_text)); // get the startdate $dtstart_date = $page->getUnformatted("event_start_date"); $dtstart_time = $page->event_start_time; $tsstart = strtotime($dtstart_time); // get the enddate $dtend_date = $page->getUnformatted("event_end_date"); $dtend_time = $page->event_end_time; $tsend = strtotime($dtend_time); //set the repetition_type to the recur option value $event_repetition_type = $page->event_recur; //set the output for rrule in ical file $rrule = ''; switch ($event_repetition_type) { case '2': $rrule = 'RRULE:FREQ=WEEKLY;COUNT=5;'; break; case "3": $rrule = 'RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=5;;'; break; case '4': $rrule = 'RRULE:FREQ=WEEKLY;INTERVAL=3;COUNT=5;;'; break; case '5': $rrule = 'RRULE:FREQ=MONTHLY;COUNT=5;;'; break; case '6': $rrule = 'RRULE:FREQ=YEARLY;COUNT=5;'; break; default: $rrule = ''; } //build the .ics data $ical_data = 'BEGIN:VCALENDAR'; $ical_data .= "\r\n"; $ical_data .= 'VERSION:2.0'; $ical_data .= 'PRODID:-//'.$homepage->title.'//NONSGML ProcessWire//DE'; $ical_data .= "\r\n"; $ical_data .= 'CALSCALE:GREGORIAN'; $ical_data .= "\r\n"; $ical_data .= 'METHOD:PUBLISH'; $ical_data .= "\r\n"; $ical_data .= 'BEGIN:VEVENT'; $ical_data .= "\r\n"; $ical_data .= 'SUMMARY:'.$page->title; $ical_data .= "\r\n"; $ical_data .= 'UID:' . md5(uniqid(mt_rand(), true)) . '@'.$config->httpHost; $ical_data .= "\r\n"; $ical_data .= 'CLASS:PUBLIC'; $ical_data .= "\r\n"; $ical_data .= 'STATUS:CONFIRMED'; $ical_data .= "\r\n"; if ($rrule) { $ical_data .= $rrule; $ical_data .= "\r\n"; } $ical_data .= 'DTSTART:'.date('Ymd', $dtstart_date).'T'.date("His", $tsend); $ical_data .= "\r\n"; $ical_data .= 'DTEND:'.date('Ymd', $dtend_date).'T'.date("His", $tsstart); $ical_data .= "\r\n"; $ical_data .= 'DTSTAMP:'.date('Ymd').'T'.date('His'); $ical_data .= "\r\n"; $ical_data .= 'CATEGORIES:Landwirtschaft,Maschinenring'; $ical_data .= "\r\n"; $ical_data .= 'LOCATION:'.$page->location; $ical_data .= "\r\n"; $ical_data .= 'URL:'.$page->httpUrl; $ical_data .= "\r\n"; $ical_data .= 'END:VEVENT'; $ical_data .= "\r\n"; $ical_data .= 'END:VCALENDAR'; //output echo $ical_data; ...not the smartest code - could be refactored and opitmized - but it is working for an "save to outlook" link... additional i've a "save in your google calendar" link that works with the google calendar API: //output Ical Outlook link echo '<a href="'.$e->url.'"><span class="fa fa-windows" aria-hidden="true"></span> Outlook iCal Link</a><br>'; //output Google Cal link echo '<a target="_blank" href="https://www.google.com/calendar/event?action=TEMPLATE&text=' .$e->title. '&dates=' .date('Ymd', $e_start).'T'.date("His", $tsstart).'/'.date('Ymd', $e_end).'T'.date("His", $tsend). '&location=' .$e->event_location->title. '&details=' .$e_text_decode. '&trp=true"><span class="fa fa-google" aria-hidden="true"></span> Google Calendar Link</a>'; maybe not the best but useful examples... best regards mr-fan1 point
-
Hey Steve, I haven't had a chance to look into to the test branch, but that would be a cool feature. One thing that I've run into a few times is when using Field Change Notifier is that when it's watching a page field the value is parsed as the page id. Would it be possible to look into adding support for sub-subfields? Examples: {page.page_field.title} {page.page_field.id} {page.page_field.summary} or any other field associated with that page? I modified my local version of Tag Parser to always use $page->title, but there are also times that I need it to send $page->id.1 point
-
I like where you are headed with this Tom. One of the things that I find still quite cumbersome in PW is the need to return to the Page Tree after editing a page so I can find and edit the next page. Having the tree in the side menu would be a huge timesaver in my opinion, and also just help the user to visualize the site structure when they are editing a page - they can see where the page fits - context can often be very helpful in a complex site. I have actually been thinking about this today too and my thoughts are that the Setup, Modules, Access items should be along the top (like the default theme). Then the page tree could simply be in that side menu - no need for a second side menu. As far as implementing this, I don't think we need to have ajax loading of pages when clicking the edit butt on a page - it can simply reload the entire page with the page tree open to the page that is being edited. I also like the color scheme - matching the recent PW dev mockups.1 point
-
underlines them for u i did1 point
-
trackChange() is a method on every Wire derived object, which includes most of ProcessWire's objects. The question would be what you are calling trackChange() on and whether the change tracking state is on or off? Also, there are related methods, also accessible everywhere that trackChange() is: // turns change tracking ON or OFF $obj->setTrackChanges(true|false); // returns TRUE if change tracking is ON or FALSE if off $bool = $obj->trackChanges(); // returns an array of changes that have occurred $array = $obj->getChanges(); // tracks the change, only if change tracking in ON $obj->trackChange('field_name'); // clears the list of tracked changes $obj->resetTrackChanges(); // hook that is called anytime a change occurs: only useful if you want something to be notified of a change $obj->changed(); My best guess is that you may need to call $page->trackChange('field_name'); rather than the form itself. That's because the form is managing most of that on it's own, and may be clearing/resetting the trackChange call you did. Also, a page's changes are cleared after a successful save(), if that matters.1 point