Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/06/2016 in all areas

  1. Trekkerweb Supply & Demand https://markt.trekkerweb.nl/ Trekkerweb.nl brings agricultural mechanization news and supply & demand together in a single online platform for all the tractor and machine enthusiasts and others interested in the mechanization sector. The site is multi-language with English as default. None Dutch browsers will get the English version of the site, currently we are finetuning the German version which will be available somewhere in the near future. The search page in English and Dutch language - https://markt.trekkerweb.nl/search/ - https://markt.trekkerweb.nl/nl/zoeken/ Used modules Profields Table Profields Textareas MarkupLoadRSS (fetches brand related new from the main website) PageImageManipulator 2 (PIM2) (for placing watermark image) ProCache ProcessGetVideoThumbs TextformatterVideoEmbed WireMailSmtp LanguageSupport (Site is multi language: Dutch, German and Default English) Couple of custom made modules for user profiles and cross page linkage of the datamodel (Bower) components awesome-bootstrap-checkbox bootstrap-dropdowns-enhancement-sass bootstrap-sass bootstrap-select font-awesome formvalidation.io hashids jquery jquery-file-upload jquery-throttle-debounce jquery.mmenu js-cookie lifestampjs moment semantic-ui-sass verge Front-end user profiles (custom module) Account registration Customizable fields (in module settings) Per field privacy configurable (private, public, on a per user basis). Front-end login/ logout Reset password Email activation for account Request activation mail View profile Public profile Edit profile Set profile picture (cover image and avatar) Modify password Language choice Profile dashboard Front-end Ads management Create new ad Edit existing ad Manage media (images / video) Preview and approve ad Remove ad Data model Categories Subcategories Brands Input fields Options An intuitive data model drives the whole site. A couple custom made modules take care of the cross page assigning of categories to subcategories and brands. Per subcategory we are able to assign the related input fields and options which will be rendered on the 'Create new ad/ Edit ad' form page and combined with the given values rendered on the ad detail page. Database caching + Pro caching One of the challenges was to keep the whole project as low weight as possible. Since the data model with categories, subcategories, brands, inputfields and options is the backbone of the site we came up with the solution to have the names, titles, ids, and relations between them cached. Completely as json/javascript with pro cache and separated with database caching. With the Wire Fuel we made the $dm object available for accessing anywhere in PHP and globalJS.dm from within javascript. This means the whole data model is called only once per request, and while it exists in the database cache and pro-cache it is incredibly fast. Subcategory page The first image shown below represent one of the subcategories (Tractors) with assigned categories, brands, input fields and options. The image there after is a screenshot of the add ad page, where the input fields, options and brands are dynamicly rendered after being loaded via Ajax. Other features cookie based favourites cookie based last-viewed list advanced filter search related ads Thanks to the whole team (Ferdi, Bastiaan, Alex, John, Hessel) and last but not least Ryan for creating ProcessWire and all module developers out there
    14 points
  2. REMOVED Free Processwire Template
    11 points
  3. 1. If you use the admin the follwing topics are interesting: This would provide a solution if every user has it's one branch of estates...would be more complex to setup than all estates under one parent. Take a very deep look in ListerPro - you could use it as a admin page for your users so that the even won't see the pagetree and get a UI for managing their estates: https://processwire.com/talk/store/category/9-listerpro/ You could give access to a admin page with a lister that provide searching and filtering, add new and edit interface depending on the user. If this commercial module is no option you could setup a own admin page: you could create a admin page with a template file for the logic without that you have to create a process module... with ProcessDashboard you have another option for a own dashboard that you could provide for your users... 2. A Pagefield is just a simple connection - if you know database structures you could build 1:n, 1:1 and n:n connections with a Page Field the different select inputfields are depending on the usecase - but with the great PW API and selectors you could get any data on any place that is related via a Page Field In your example for the connection of the user and the estate you even don't need a Page Field since you could access the createdUser so on the $pages->find for loading all estates of a user you could use this connection.....it's just usefull for cathegories, tags, options of your single estates!
    5 points
  4. Simple Contact Form Using Google Recaptcha & Valitron validation library I just finished creating a simple Contact-Form for a client's website so i thought it would be really helpfull to share it with the community. The contact form uses: Google recaptcha for validating the user is not a robot (https://github.com/google/recaptcha) Valitron validation library for validating the form fields (https://github.com/vlucas/valitron) Twitter Bootstrap 3.0.0 for form HTML The contact-form is located inside a contact-page, so the bare minimum you need in order to setup your own is: contact.php (template file used by your contact-page) _contact-controller.php (file used as a controller for your contact-form functionality like send email, validate fields etc) 2 extra lines inside your composer.json file So, let's start: First you need to update your composer.json file adding 2 lines inside the require object: "vlucas/valitron": "^1.2", "google/recaptcha": "~1.1" Here is a sample composer.json file: { "name": "processwire/processwire", "type": "library", "description": "ProcessWire CMS/CMF", "keywords": [ "cms","cmf", "content management system" ], "homepage": "https://processwire.com", "authors": [ { "name": "Ryan Cramer", "email": "ryan@processwire.com", "homepage": "https://processwire.com", "role": "Developer" } ], "require": { "php": ">=5.3.8", "ext-gd": "*", "vlucas/valitron": "^1.2", "google/recaptcha": "~1.1" }, "autoload": { "files": [ "wire/core/ProcessWire.php" ] }, "minimum-stability": "dev" } open console and navigate to processwire root folder (where composer.json file is) on this step i assume you have already setup composer for your project, otherwise google it run the following command: composer update this will create a vendor folder (if it does not already exist) and download valitron and google recaptcha libraries. Then open your contact-page template file(usually named contact.php inside your templates directory) and add the following: * Note: The form below uses bootstrap 3.0.0 css, so if you are using something else you need to make the appropriate changes. <?php namespace ProcessWire; include('_contact-controller.php') ?> <div class="container"> <div class="row"> <div class=" col-md-4"> <h2>Contact Form</h2> <?php if($session->flashMessage):?> <div class="alert <?=!$session->sent && (!$v->validate() || !$resp->isSuccess()) ? 'alert-danger' : 'alert-success'?>" role="alert"> <?php echo $session->flashMessage;?> </div> <?php endif;?> <form id="contact-form" method="post"> <div class="form-group <?=$v->errors('name') ? 'has-error' : ''?>"> <label for="name">Name</label> <input class="form-control" name="name" id="name" type="text" value="<?=$sanitizer->text($input->post->name)?>"> </div> <div class="form-group <?=$v->errors('email') ? 'has-error' : ''?>"> <label for="email">Email</label> <input class="form-control" name="email" id="email" type="text" value="<?=$sanitizer->text($input->post->email)?>"> </div> <div class="form-group <?=$v->errors('message') ? 'has-error' : ''?>"> <label for="message">Message</label> <textarea class="form-control" name="message" id="message"><?=$sanitizer->text($input->post->message)?></textarea> </div> <div class="form-group"> <!-- Google Recaptcha code START --> <div class="g-recaptcha" data-sitekey="<?=$googleSiteKey?>"></div> <script type="text/javascript" src="https://www.google.com/recaptcha/api.js"> </script> <!-- Google Recaptcha code END --> </div> <button type="submit" class="btn btn-primary">SEND</button> </form> </div> </div> </div> <?php //here we remove the flash-message because it is already shown above the form. $session->remove('flashMessage'); //reset 'sent' variable for future submit $session->sent = false; ?> Next create a file inside you templates directory with name: _contact-controller.php: and set the required variables($googleSiteKey, $contactFormRecipient, $contactPageID) <?php namespace ProcessWire; /** * here we include Valitron & Google recaptcha libraries * make sure the path is correct in your template */ include(dirname(__FILE__) . "/../../vendor/vlucas/valitron/src/Valitron/Validator.php"); include(dirname(__FILE__) . '/../../vendor/google/recaptcha/src/ReCaptcha/ReCaptcha.php'); /** * here we add the form field values to Valitron */ $v = new \Valitron\Validator(array( 'name' => $sanitizer->text($input->post->name), 'email' => $sanitizer->email($input->post->email), 'message' => $sanitizer->text($input->post->message), ) ); /** * validation rules set for each form field * For more details on Valitron/Validator usage visit: * https://github.com/vlucas/valitron */ $v->rule('required', ['name', 'email', 'message']); $v->rule('lengthMin', 'name', 5); $v->rule('email', 'email'); /** * set Google recaptcha site-key & secret-key * create a new key from: https://www.google.com/recaptcha/admin */ $googleSiteKey = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; $googleSecretKey = 'YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY'; /** * set the email of the contact form recipient(usually the website owner) */ $contactFormRecipient = 'your@company.com'; /** * set the id of contact-page in order to redirect there when the form is sent */ $contactPageID = '1045'; //here we check whether the 'name' field exists inside post variables (which means the form is posted) if ($input->post->name) { //if fields validation passes if ($v->validate()) { $reCaptcha = new \ReCaptcha\ReCaptcha($googleSecretKey); $resp = $reCaptcha->verify($input->post->{'g-recaptcha-response'}, $_SERVER["REMOTE_ADDR"]); //if google-recaptcha validation passes if ($resp->isSuccess()) { //This is the HTML message $message = ' <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Contact Form | ' . $input->post->name . '</title> </head> <body> <p>' . $input->post->message . '</p> </body> </html>'; //here we send the form to $contactFormRecipient wireMail($contactFormRecipient, $input->post->email, "Contact Form | " . $input->post->name, $message); //here we set a flash-message to notify the user that the form was successfully sent $session->flashMessage = 'Thank you for your message! We will get in touch with you shortly.'; //save in session that the form is sent $session->sent = true; //finally redirect user to contact-page $session->redirect($pages->get($contactPageID)->url); } else { //self explain $session->flashMessage = 'Error while validating you are not a robot!'; } } } ?> Thats all! You now have a simple contact-form working with captcha and field validation! I would be more than happy to help anyone having problems on the setup.
    3 points
  5. Hi guys! I'm really happy to finally showcase this website in the forum. It's the website of a Porto based Digital Animation Studio. A bunch of talented folks, really. This is a heavily animated/scripted/ajaxed website, that makes use of CSS animations, transitions, transforms, HTML5 audio API, and so on and so on. I spent actually more time debugging than constructing it. Unfortunately, we didn't manage to kill all the bugs before the launching, so you might experience some along the way. We even had to give up on Safari (Damn buggy piece of software !!), and advice the user to use another modern browser. But we think it's still well worth it This is also the first website we developed but didn't design. The design is from the excellent The Royal Studio, from Porto. You might know some of their illustration work for the Adobe online tutorials. --- Enough talk, here is the link http://www.aimcreativestudios.com/ (No safari, please, you'll regret it) Hope you guys like it!
    3 points
  6. I know this is a little OT (ok, maybe a lot OT), but I just discovered the $sanitizer->testAll() option - maybe you guys all noticed it when it was introduced, but I missed it Anyway, I think it is very handy and a great use of the console panel Finding this I did notice that the list is not complete at the moment though (https://github.com/ryancramerdesign/ProcessWire/issues/2028) Anyway, hope someone finds this useful like I did!
    3 points
  7. See here https://processwire.com/blog/posts/multi-instance-pw3/#using-multi-instance-in-pw3
    3 points
  8. i had this problem some days ago and wrote a simple script on both websites. both online on different domains: export on old website: <?php $export = false; if($export AND $input->get->export == 'blogitems') { echo "<?xml version='1.0' ?>"; echo '<pages>'; $parent = $pages->get('/blog'); $results = $parent->children(); //$results = $pages->find('id=3198'); // ohne pic //$results = $pages->find('id=3204'); // mit pic foreach($results as $p): $p->of(false); ?> <page> <title><?= $p->title ?></title> <date><?= $p->blog_date ?: $p->created ?></date> <featured>1</featured> <pic><?= $p->main_slider_coverpic->first()->httpUrl ?: '' ?></pic> <body><?= $p->body ?></body> <images><?php foreach($p->images as $image) { echo '<image>' . $image->httpUrl . '</image>'; } ?></images> <files><?php foreach($p->files as $file) { echo '<file>' . $file->httpUrl . '</file>'; } ?></files> <gallery><?php foreach($p->gallery as $image) { echo '<image>' . $image->httpUrl . '</image>'; } ?></gallery> </page> <?php endforeach; echo '</pages>'; die(); } and then the import: <?php $import = false; if($import AND $input->get->import == 'blogitems') { $items = simplexml_load_file('https://www.your-old-website.com/?export=blogitems'); foreach($items as $page) { $p = new Page(); $p->template = 'blogitem'; $p->parent = '/news'; $p->title = $page->title; $p->name = $sanitizer->pageNameUTF8($page->title, true); while($pages->find('parent='.$p->parent.',name='.$p->name)->count() > 0) $p->name .= '-1'; $p->date = $page->date; $p->featured = $page->featured; // get body html and remove root node // $p->body = substr($page->body->asXML(), 6, -7); // ###### update: it's better to use base64_encode($page->body) in your export and then base64_decode($page->body) in your import ##### $p->save(); // add images if(strlen($page->pic)) $p->pic->add((string)$page->pic); foreach($page->images->image as $image) $p->images->add((string)$image); foreach($page->files->file as $file) $p->files->add((string)$file); foreach($page->gallery->image as $image) $p->gallery->add((string)$image); $p->save(); echo 'new page <a href="' . $p->editUrl . '" target="_blank">' . $p->path . '</a><br>'; } die(); } of course that is not bulletproof but it's really simple and you can do whatever you want (export junks by adding start=0, limit=10 or the like to your selector) you can also try adrians batch child editor. or csv importer. but for me the example above worked like a charm ps: try it with limit=1 for testing
    3 points
  9. cool, thank you that's one of the uncountable things i read in the blog and did not remember as it was not interesting enough to me at that time... @console i really love it. i use it not only for learning (try&error, checking things) processwire but also PHP in general (the usual stuff i can't remember by heart like strftime, substr and all that..)
    2 points
  10. I am switching my test install between 2.x and 3.x all the time for module development and have had no problems (I use the version switcher in Tracy). The data schema is unchanged. The only changes I can think of are one from text to mediumtext for the SessionHandlerDB module and the addition of a published field in the pages table (but this may have actually happened in 2.x - I don't recall).
    2 points
  11. With the new 3.0 api docs this could potentially be auto-generated, so I'm hoping
    2 points
  12. The bit that I can't work out at the moment is how to set the matrix item type using a friendly name. I'm sure @ryan will have built in a way to do this, but until he responds you can set the matrix type as an integer using "repeater_matrix_type". First you need to find out the integer for the type of row you want to add. You can do this by dumping a repeater item of the right type and checking the repeater_matrix_type value in Tracy. Or you can open the field settings and inspect the source for the type you want to add. For example, in the screenshot below you can see the id of the inputfield for the "body" type is "matrix3_item", therefore the repeater_matrix_type integer is 3. So find out the repeater_matrix_type value (integer) for "article_content_text" and then you would run some code like this... $articles = $pages->find("template=article"); foreach($articles as $article) { $text = $article->article_text; $article->of(false); $new_item = $article->my_matrix_field->getNew(); // replace with the name of your matrix field $new_item->repeater_matrix_type = 3; // replace with the integer of your matrix type $new_item->article_text = $text; // assuming you added the article_text field to this matrix type $new_item->save(); $article->my_matrix_field->add($new_item); $article->save(); } But first test this works for a single article page before you process all the articles.
    2 points
  13. I agree with you on the difficulty in trying to create something that will handle all scenarios. Always quicker to build something simple and custom fit. I think the difficulty lies in how to identify and deal with complex and compound data types, whether it is built by the user or introduced by module(s) the site is using. Is it straight forward to access those types using the API, for example? (I assume Yes but you never know) Also, if there are any new types introduced to PW Ecosystem, then it will have to retrospectively be able to handle it so you'll always be catching up. Probably the correct way to write something generic is to use Reflection and infer capabiltiies and attributes of your target objects, ala how PW does with its API documentation (Btw, how cool is that? Self documenting APIs! Sehr Guile!) https://processwire.com/blog/posts/processwire-3.x-api-reference/ .
    2 points
  14. Seems like you're using AOS. Great Here is a preview of truncating long titles:
    2 points
  15. @Karl_T - I think your PHP7 issues should be fixed with the latest version. Please let me know if you find anything else amiss. @mel47 - any chance of that test file that you are trying to import?
    2 points
  16. Can a user theoretically sign up for a project but not sign up for any phases or events? If not then I suggest that the user only signs up for events, and this implicitly also attaches them to phases and projects by virtue of the page hierarchy above event pages. Users are pages, so each event has a Page field that stores all the users that have signed up for that event.
    2 points
  17. Thoughts on the new manager page?
    2 points
  18. yeoman generator for processwire env: https://www.npmjs.com/package/generator-processwire
    2 points
  19. Some sites need widgets, as they have been called in some systems; a widget can be almost anything, like: tag cloud mini calendar menu quote rotator free text social sharing search contact info map This is a simple way to create widgets that can be shown in multiple "areas" of a page, as well as on specific pages. In this particular method you would need to setup each widget type you want and then determine how best to accept any necessary user input like content, pages select (like for a menu) or settings. This example uses include files for each widget type, and the name of the include file would match the name of the widget type, which is also a page field. In this example, I'm also using ListerPro to provide a widget management page. Fields The main fields used on this widget example are : title widget_location (page select - options in this case are footer and sidebar) widget_type (page select, you would configure your widget types as selectable options) pages_select (would be used for multiple pages and might apply to a menu widget) body - used for plain widgets selector (selector inputfield, used for telling the system where to show the widget) text_structured - for this i'm using a YAML field, but it could just as easily be a table; would depend on what you want to store; YAML would allow this single field to be used for varying requirements based on the widget type, but would be harder to validate and prone to user error; icon - a page select for an optional icon which is being used in the template, and would be shown as part of the widget. Files for each widget type you want to allow users to select from, you would need to create an include file with the markup for that widget, and then add that widget to the list of available widgets. here is an example for a site with several widget types: Selector & Output wherever you want to include the widgets (footer, sidebar etc.) you would run a $pages->find and then foreach through the widgets (in this case finding all footer widgets). In this case the (incredibly amazing new) selector field would be specifying what pages to show the widget on. We assume that most widgets won't have a selector specified, and will default to show the widget. if a selector is specified, we can check to see if this page fits the selector by using the $page->is($selector) syntax. <?php $widgets = $pages->find("template=widget, widget_location=footer, sort=sort"); foreach($widgets as $widget) { // check if the selector field is in use and if so, see if this page is supposed to display it: if( $widget->selector) { if( !$page->is("$widget->selector") ) continue; } $widgetType = $widget->widget_type->name; $include = file_exists("./inc/widget-{$widgetType}-foot.inc") ? "./inc/widget-{$widgetType}-foot.inc" : './inc/widget-footer.inc'; include($include); } ?> this example also has a fallback file in case the widget type is not specified, sort of a default. the widget's .inc file will be unique to your design and how you have it setup.
    1 point
  20. Hello @giannisok, I now use FormBuilder, for simple or more complex forms. If I ever need to use something other than FormBuilder for a website one day, I'll surely take a close look at your solution. Thanks. Have a nice week!
    1 point
  21. Sorry wasn't really checking through everything properly. Take a look at how I am doing it for InputfieldPassword::render https://github.com/adrianbj/EmailNewUser/blob/master/EmailNewUser.module#L50 $process = $this->wire('process'); if($process instanceof WirePageEditor) { $userpage = $process->getPage(); if($userpage->is(Page::statusUnpublished)) $event->object->notes = 'NB: Because you chose to automatically generate the password for new users, you can leave these blank. However, if you do enter a password here, it will override the generated one.'; }
    1 point
  22. Ok, I have added the checkbox: Not sure how best to implement this cleanly. If it was a simple matter of checking if there was an additional field at the end of the row that was 1 or 0, that would be ok I guess, but with the CSV field pairing functionality and it's checks, I think it is going to start to get a bit messy, but if you think it would be really worthwhile, let me know and maybe I'll revisit it.
    1 point
  23. An option when creating would be nice option. It's not always content pages bit also pages as categories etc. Maybe even some field in csv could be used to do it on a per entry basis. I would go for something like this. In the case of such a feature the more option to do such things the better.
    1 point
  24. Wow, that's cool and quite useful too. Thanks for educating us!
    1 point
  25. Yes, you are right. Very often only few pages have translation to all languages. ( Ukraine is not english speaking country and almost all blogs have only about 10% of posts translated to other languages ). It should be checked by default, IMHO.
    1 point
  26. So to clarify, there are time when you wouldn't want newly added pages automatically activated in all other languages? (Sorry not a ML user so not sure how most people work). Do you think it should be checked or unchecked by default? @mel47 - I took a look at the html tag issue - was a very easy fix (just committed) - sorry I hadn't come across this before. I was sanitizing as "text" - now I am using the "purify" sanitizer - hopefully that will work for everyone in all scenarios, but if anyone notices a problem, please let me know.
    1 point
  27. I think that it is the best option
    1 point
  28. @szabesz - It is intentional, as it was in JL1. However, I am open to bulk operations. My idea is to perhaps incorporate this into the ordering utility. The new manager page will paginate jumplinks to show a certain amount per page. As there will be times when certain jumplinks would conflict, order is important. As such, I'm thinking about putting together a utility to re-order jumplinks. Whilst there, bulk activities can also be performed. I'd like to maybe do it there so as to not clutter up the manager page - my objective is to keep things simple and neat, and not to clutter up the interface. It has been brought up before that the module remain easy to use with no feature overload, and so I'd like to keep it that way. As such, whenever something new is added, it is disabled by default. Ordering/bulk actions won't be disabled by default, but everything else that can be classified as an 'additional feature' will be. I've also decided to turn off Collections and Page Selectors by default as these features are classified as 'additional' due to the fact that they are not required for the module to operate. The hit logger is also disabled by default, along with destination validation.
    1 point
  29. 1. Answer: yes https://processwire.com/about/sites/categories/real-estate/ 2. Answer: depending in depth of what kind of content you will manage/provide... regards mr-fan
    1 point
  30. +1 For Dash docset! I use Dash daily for almost every other documentation requirement, it is very very handy. PW docset would be a very welcome addition.
    1 point
  31. Bernhard, thanks for the quick response and the code! Sehr Danke! I'll repurpose it for my situation and let you know how I went. If I have time, perhaps I could even try and make a more general purpose module that syncs between 2 instances.
    1 point
  32. Thanks Can! We might want to add: "This method does not need output formatting to be turned off first, so make sure that whatever value(s) you set are not formatted values.", which is not the case with languages but worth mentioning nonetheless: https://processwire.com/api/ref/page/set-and-save/
    1 point
  33. Current behavior can be confusing (at least I tripped over it), see: This is the proposed behavior:
    1 point
  34. I have a template file (eg. basic-page.php) where I include some other files. If the included file is on /site/templates path it's ok, but if the file is included like this: inlcude('C:\PHP\adodb5\adodb.inc.php'); then I get the following error: Exception: Unable to create directory C:/inetpub/wwwroot/pf/site/assets/cache/FileCompiler/C:/PHP/adodb5/ (in C:\inetpub\wwwroot\pf\wire\core\FileCompiler.php line 135) #0 C:\inetpub\wwwroot\pf\wire\core\FileCompiler.php(201): ProcessWire\FileCompiler->initTargetPath() #1 [internal function]: ProcessWire\FileCompiler->___compile('adodb.inc.php') #2 C:\inetpub\wwwroot\pf\wire\core\Wire.php(348): call_user_func_array(Array, Array) #3 C:\inetpub\wwwroot\pf\wire\core\WireHooks.php(548): ProcessWire\Wire->_callMethod('___compile', Array) #4 C:\inetpub\wwwroot\pf\wire\core\Wire.php(371): ProcessWire\WireHooks->runHooks(Object(ProcessWire\FileCompiler), 'compile', Array) #5 C:\inetpub\wwwroot\pf\wire\core\WireFileTools.php(732): ProcessWire\Wire->__call('compile', Array) #6 C:\inetpub\wwwroot\pf\wire\core\WireFileTools.php(732): ProcessWire\FileCompiler->compile('adodb.inc.php') #7 C:\inetpub\wwwroot\pf\site\assets\cache\FileCompiler\site\templates\kontakti.php(242): ProcessWire\WireFileTools->compile('C:/PHP/adodb in C:\inetpub\wwwroot\pf\index.php on line 64 Using latest PW 3.0.33RC1. I also put //FileCompiler=0 in the included file as per https://processwire.com/blog/posts/processwire-3.0.14-updates-file-compiler-fields-and-more/#how-to-bypass-the-file-compiler
    1 point
  35. @szabesz glad you figured it out but that does not solve the file compiler error... should I open github issue or it's unsupported to include files outside of base directory structure (on windows)?
    1 point
  36. Oh my! I figured it out... Currently I use: $config->templateCompile = false; but the block only shows up when $config->templateCompile = true; I should not be surprised, but maybe the block itself should not disappear, but a simple message could be displayed reminding us to enable the compiler in the code in the first place...
    1 point
  37. Minor column width / padding issue
    1 point
  38. I think this is the "Use Compiled File?" section on the Files tab:
    1 point
  39. Adrian, I think the upgrade to 2.8 may have sorted it. I'll keep testing tomorrow but first impressions looks good. ta
    1 point
  40. Just short from mobile... Search the forum (viaGoogle) for structure content kongondo... there is a great topic on this kind of problems. And search for usage of page fields as connector of your data. For me at the first impression you have to separate three things. Projects - can have several phases, users, events Phases - related to the project connected users and events Events - related to phases, users and projects The user template have multiple page selector for projects, phases and events of a user.... Best regards mr-fan
    1 point
  41. For the long headlines I may add a truncate option, with the entire text visible on hover (simple title). This is not nice but it's better than having the whole title invisible when it's pushed downwards. The problem is that the fixed header has fixed height, and some other fixed elements are dependent on this height, eg. notices, tabs, etc. So truncate would be the easiest/safest way of solving this I guess.
    1 point
  42. Yes, it's invalid path, that's clear. I already copied adodb5 directory to /site/templates and it's working there. The problem is that I have multiple sites on this server and I have to copy adodb5 directory (and files) to all sites - it's duplication.
    1 point
  43. Just a little update because of new API additions, so now you could just do foreach ($pag as $p) { foreach ($languages->find('name!=default') as $lang) { $p->setAndSave("status$lang", 1); } } Thanks @szabesz for mentioning I'm adding this here for completeness
    1 point
  44. @POWERFULHORSE, if you have Imagick installed on your server you can try a slightly modified version (below) of the function I introduced in this post. // ImageMagick effects function imagickal($imagePath, $format, $method, array $arguments) { $path_parts = pathinfo($imagePath); $dirname = $path_parts['dirname'] . '/'; $filename = $path_parts['filename']; $mod = $method . '-' . implode($arguments, '-'); $mod = wire('sanitizer')->filename($mod, true); $savename = "{$dirname}{$filename}_{$mod}.{$format}"; if (!file_exists($_SERVER['DOCUMENT_ROOT'] . $savename)) { $image = new Imagick($_SERVER['DOCUMENT_ROOT'] . $imagePath); call_user_func_array([$image, $method], $arguments); $image->setImageFormat($format); $image->writeImage($_SERVER['DOCUMENT_ROOT'] . $savename); } return $savename; } I tested it as follows... $orig = "/site/templates/images/transparent.png"; $after = imagickal($orig, 'png', 'negateImage', [false]); echo "<img src='$orig'>"; echo "<img src='$after'>"; ...and the results...
    1 point
  45. I have done it for one site. Google Analytics does the tracking, then pulling top 10 posts in last 7 days through API. Not maintaining the site anymore, but I remember I used Wanzes module for the API talking.
    1 point
  46. @szabesz is correct. The language option on the User is for the backend access only. @A.Schmidt your setup is correct. When the guest user access the homepage using just "/' Processwire will show the default language, in this case, English. Using "/de" will show German. This is how PW works. And there is no redirect either. If you want to redirect based on browser settings and other stuff, there is a module for that . But I don't recommend it as it a UX flaw in most cases, so you have to be careful.
    1 point
×
×
  • Create New...