Jump to content

Search the Community

Showing results for tags 'Module'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Hola amigos I'm quite excited about this one and really wanted to finish it myself or at least come with "bigger" problems^^ But now I need some advice as I'm stuck on some basics. The module is derived from FieldtypeEvents by Ryan. What it does It's a customizable two column table for key value pairs. Right now customization is about changing columns headings and column width. Customizing sorting of the rows is planned, and the input is already there but not yet working. Drag and drop sorting is planned for the future two. Translatable column headings are almost there, but I got the same issue like with the MarkupCookieConsent, so only default language is saving..and many more features are planned (and hopefuly will be included in the future) except those it's already working quiet nice. So when editing a page you can add/remove columns (ah they got sorted alphabetical at the moment). What it doesn't (And that's for me the most important part right now!) The API side is lacking remove of single and all rows capabillities, which I personally need right now because I build a small front end page edit screen to let users edit some data. I got the whole key/value input running adding rows on the fly like in the backend, but I'm not able to delete anything at all.. ^^ What I tried After digging and digging I realised that FieldtypeEvents is really basic and KeyValueArray.php (former EventArray.php) is missing some methods. At least I thought because some other modules are implementing there own remove() methods, even if I thought it should inherit all methods because it extends WireArray, I decided to copy some code without luck, trying to understand and alter as needed (seems really easy to understand) but still no luck at all. While writing this I thought it might be interesting to review the thread from Ryan about his FieldtypeEvents and found that someone just managed to remove an event by using remove($event) without changing Ryans code. So digging again trying some things, stumbling over public function removeQuietly($key) and finally this one deleted the row! So for now I just copied removeQuietly method into KeyValueArray.php and renamed it to remove($key) and it's working. But I would love to know why all this? Why didn't remove just work from WireArray.php? And why the copied methods still didn't worked? I tend to write and write and write haha.. Use cases What is all this useful for? Consider a contact template, you could use this field to store all contact information like so Some minutes ago I had some more examples but it's gettin late.. Ah Know that you can (like with FieldtypeEvents) not only foreach the whole table, but get them row by row: $row = $page->keyValues->get("Responsible"); $label = $row->key; $value = $row->value;Just noticed that the contact example would be even better with another sorting than alphabetical to just iterate the whole tableBut you could already get them line by line as needed ;-) Kay that's it for now.
  2. Hello guys, I really like ProcessWire, but there are a few features I really miss. One of them is a global media manager with the ease of use like the one in WordPress. There is an old module out there that uses images as pages. So each "image" page has an image title field and a files/image field. I use this kind of media manager on some projects and it kind of works but isn't the best option. I created my own system that also allowed folders. Same as above: A image is a page, but I allowed a "folder" page that can have "folder" or "image" children. So I simulated folders in the page tree: I then created a selectImage and selectImages field, that was a PageTable. With this fields I could select the pages I want on a page to show up. The problems that system has: no support for multi-upload and no batch-like features like moving multiple "images" to another "folder". Now to my idea and the reason I write this post: I thought about this problem and I came up with a theory how it could work (without testing it yet): I create a File or Image field with infinite allowed files/images and I activate the tags property (which is currently only for images) and in the tags I would define the structure of this image. So in real life, all files are on the same level, but I simulate a folder structure by writing the location of a file in the media folder inside the tags property. An example: monkey.jpg with following tags: "zoo__animals". This would mean, that monkey.jpg is simulated to be located in /zoo/animals/monkey.jpg. I then need do hook in the way files are displayed and try to do some magic to create a UI that transforms the flat image/file-list into some nested folder structure like you now it from WordPress. Some problems that can come up: - All files would be in one big folder in assets/files/12345/... A huge folder with lots of images might not be that good in scaling... - File fieldtype currently doesn't support tags. Only images. Well, maybe this idea is total bullsh1t, but maybe someone has got a better idea. I need brains (to eat) to brainstorm! Let me know what you guys think about this chaotic concept of mine! Steve
  3. Hello guys, I want to write my first module and I read a lot about fieldtypes and inputfields. I really don't get the difference between the two. I hope someone can explain it to me! Maybe it is easier to tell what I want to do and you could tell me what roles fieldtypes and inputfields have with this module I want to create. I want to create a field that consists of multiple fields (text, textarea). It should be a field that wraps some other fields, so I don't have to install 10 different fields every time. How would I achieve this in regards of fieldtypes and inputfields (and data storage)? Thanks!
  4. Hello, thanks for the help the other day. I continued to configure/code my page like I want it. Now i was going to add comments. I installed the Comments Manager Module under "processwire/module/edit?name=ProcessCommentsManager". It got installed and I can see the menuoption under "setup", called: Comments. Problem: It does not matter what link I press. Everyone shows the following error. Even uninstalling shows this error. Page: /processwire/setup/comments/ Error: Fatal error: Class 'Comment' not found in /var/www/testsite/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.module on line 80 I am using Processwire 2.7.2. Is anyone here who can help me sorting this problem out? Best regards EDIT: I just realized that this might be the wrong section of the forum. If so, please move this thread. Thanks!
  5. I've created a field in the contact page (id:1032) so I can write different success messages according to the language. I'm trying this for the success message in the Form Template Processor module, but without any success: 90. // message output upon successful completion of the form 91. $this->set('successMessage', '<h2>' echo $pages->get(1032)->message_sent '</h2>'); it gives me this error: Parse Error: syntax error, unexpected 'echo' (T_ECHO) (line 91 of /home/islak/public_html/site/modules/FormTemplateProcessor/FormTemplateProcessor.module) What am I doing wrong? Thanks guys...
  6. Hey All. I am currently writing a very small module to accomplish the following: - I have a Page "Service Types" with multiple childs "Service Type". Whenever a new "Service Type" is added, a Field (in my case FieldtypeRangeSlider) should be generated, eg "servicetype_communication_rangeslider" and added to an existing template ('case') at a specific position. I have little experience with modules but managed to get it done till the successfull creation of the range-field. But now I am struggeling with adding it to the template. First, I havend managed to get a list of templates in the module..just a workaround via pages and selector template=case. I think this would work, but only of there are pages with this tempalte. If not, this solution fails and in general, I don't know how to get the templates in a module. Second, I have no clue how to add a field at a specific position to an existing template (to an existing Fieldset in my case). Here is my code so far: class AddServiceTypesByPage extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Add ServiceTypes By Page (Didhavn)', 'version' => 1.0, 'summary' => 'Add the ServiceTypes by getting Pages with Template "service-type"', 'singular' => true, 'autoload' => true ); } public function init() { $this->pages->addHookAfter('added', $this, "hookAdded"); } public function ready() { // PW API is ready, Controllers go here } public function hookAdded(HookEvent $event) { $page = $event->object; if (!$page->template) { $page = $event->arguments[0]; } if($page->template == 'service-type') { $f = new Field(); $f->type = $this->modules->get("FieldtypeRangeSlider"); $f->name = 'servicetype_' . $page->name; $f->label = 'Service-Type ' . $page->get('title')->getDefaultValue(); $f->set('suffix','%'); $f->set('tags','servicetype'); $f->set('icon','fa-sliders'); $f->save(); /* * now add the field to existing template with name 'case' */ } } } I am thankfull for any help or suggestion! Thanks a lot!
  7. Hi there, i just installed the ProcessPreview Module and it works on templates with classic field types like Textarea/Text etc. But if a template uses a repeater - the modul seems to be unable to get the contents. I tried to modify the modul - but im still learning php - so my guess i have to make changes here line 38-39 and maybe add repeater support here line 35 ... Thanks for reading/helping Simon
  8. Hi Guys, I am going to add capability to a USA version of a site to redirect or display a message to users visiting the website from UK or Ireland notifying them of an international website at .co.uk Any suggestions, module recommendations, plugins etc. ? Figured I would ask before I started working on this solution. Thanks!
  9. Description This module adds icons based on the file type uploaded. It also lets you change the columns, etc. You can watch the video for more details or download and install. To make it work (do not know why) you have to change any configuration setting and save. Version Alpha version (0.0.1). Updated: 0.0.2 - Added Json name shorter, icons and columns. Updated 0.0.3 - Config in columns Updated 0.0.4 - Video and Audio extensions added. Updated 0.0.5 - Fixed select files and drag to upload div position. Updated 0.0.6 - Execution of the module only in the administration. What a fail! Github
  10. Hi all! Are there any storefront modules available for use? Something that lists items for sale with images and prices, and perhaps also a way to order items and pay for them. Thanks! Julio
  11. Hi everybody, I'd like to share with you another new module. It helps you to manage user ratings for pages in a very simple way. You can add a user rating to a certain page with a line of code: $page->ratings->add(4) If the user is logged in, the module remembers which page the user has rated for. For non-logged-in visitors, the module stores the pages, the user has rated, in the session. You can get a page's rating and its total amount of votes in a similar way: $page->ratings->average; // => 3.2 $page->ratings->count; // => 5 For more information about this module, please check out its GitHub repository. You can check out a working version of the module here: http://curium-cte.lightningpw.com Edit: The module is now available in the ProcessWire modules directory. Update: Ratings has been updated to version 1.1, including a new, simpler API accessor. As always - please comment for bugs or feature wishes. Thanks in advance, Marvin
  12. AvbMarkupHtml - HTML tag manager for ProcessWire This module allow you to use less HTML elements inside your PHP code ! Added hook for page. For make quick markup calls : $page->html(); Github : https://github.com/trk/AvbMarkupHtml Example usage and all methods : // All Configs $config = array( 'quote' => '"', 'indent_with' => ' ', 'tags_without_indentation' => 'link,img,meta', 'WirePage' => null, 'tag' => null, 'tagSelfClosed' => null, 'tagNoClose' => null, 'tagCustom' => null, 'tagStart' => '', 'tagEnd' => '', 'prepend' => '', 'prepends' => '', 'attributes' => array(), 'dataAttributes' => array(), 'label' => '', 'note' => '', 'text' => '', 'texts' => array(), 'hasTexts' => false, 'field' => '', 'field_value' => '', 'fields' => array(), 'hasFields' => false, 'child' => '', 'children' => '', 'append' => '', 'appends' => '' ); // All Methods $page->html(array('key', 'value')) // $config ->tag('string', $args=array())) // tag name, $args=content,tag-options => "/>" self closed, "->" no close, "=>" special tag ->setQuote('double or single quote') // default is : " ->addClass('string') // Element class name ->id('string') // Element id ->attr('key', 'value') // output : key='value' ->attributes(array('key', 'value')) // attributes ->data('key', 'value') // output : data-key='value' ->dataAttributes(array('key', 'value')) // data-attributes, this will add auto data- prefix to your attribute ->prepend('string') // a string value ->prepends(array('values')) // array for values ->text('string') // text for inner tag ->field('field_name', 'page_object') // Field name and page object ->texts(array()) // enter text array | array('Text 1', 'Text 2') ->fields(array(), 'page_object') // enter field names as array, a page | array('title', 'body') ->note('field_name', 'page') // enter a field name, a page ->label('field_name', 'page') // enter a field name, a page ->append('string') // a string value ->appends(array('values')) // array for values ->r(true|false) // Alis with ->render(); function ->render(true|false) // This will return result ->o(true|false) // Alias with ->output(); function ->output(true|false); // This will print result | default pretty print value is : false // #Example 1 : Working With ProcessWire $ul = html::ul()->addClass('list'); foreach($page->children as $p) { $ul->child( html::li() ->addClass('list-item') ->data('id', $p->id) ->child( html::a($p->title) ->addClass('list-item-link') ->attr('href', $p->url) ->data('id', $p->id)->r() )->r() ); } $ul->o(true); /* output : <ul class='list'> <li class='list-item' data-id='1057'> <a class='list-item-link' href='/en/villas/' data-id='1057'> Villas </a> </li> <li class='list-item' data-id='1001'> <a class='list-item-link' href='/en/location/' data-id='1001'> Location </a> </li> <li class='list-item' data-id='1090'> <a class='list-item-link' href='/en/guestbook/' data-id='1090'> Guestbook </a> </li> <li class='list-item' data-id='1055'> <a class='list-item-link' href='/en/contact/' data-id='1055'> Contact </a> </li> <li class='list-item' data-id='1005'> <a class='list-item-link' href='/en/site-map/' data-id='1005'> Site Map </a> </li> </ul> */ // #Example 2 html::div() ->addClass('container') ->addClass('container-center') ->attr('style', 'border: 1px solid #000;') ->data('id', $page->id) ->data('title', $page->title) ->child( html::h1($page->title) ->addClass('h1-title') ->r() ) ->child( html::div($page->body) ->addClass('container-inner') ->r() ) ->o($config->debug); /* Output <div class="container container-center" style="border: 1px solid #000;" data-id="Page id field data will come here" data-title="Page title field data will come here"> <h1 class="h1-title"> Page title field data will come here </h1> <div class="container-inner"> Page body field data will come here </div> </div> */ // #Example 3 : html::div("Hey !") ->addClass('container') ->addClass('container-center') ->id('centered-container') ->output(true); /* Output <div id='centered-container' class='container container-center'> Hey ! </div> */ // #Example 4 html::ul()->addClass('list')->children(array( html::li('Li element value 1')->addClass('list-item')->render(), html::li('Li element value 2')->addClass('list-item')->render(), html::li('Li element value 3')->addClass('list-item')->render(), html::li('Li element value 4')->addClass('list-item')->render(), html::li('Li element value 5')->addClass('list-item')->render() ))->output(true); /* Output <ul class='list'> <li class='list-item'> Li element value 1 </li> <li class='list-item'> Li element value 2 </li> <li class='list-item'> Li element value 3 </li> <li class='list-item'> Li element value 4 </li> <li class='list-item'> Li element value 5 </li> </ul> */ // #Example 5 $title = $page->html('title')->tag('h1')->addClass('h1-class')->render(); echo $title; // #Example 6 : This will directly print $page->html($page->title)->tag('h1')->addClass('h1-class')->output(); html::h1($page->title)->o(); // #Example 7 : Self Closed Tag $modules->AvbMarkupHtml->html()->tag('hr', array(null, '/>'))->output(); html::hr()->o(); // #Example 8 $page->html($page->title)->tag('h1')->addClass('my-h1-class')->output(); html::h1($page->title)->addClass('my-h1-class')->o(); // #Example 9 $page->html('title', $pages->get('/contact/'))->tag('h1')->addClass('my-h1-class')->output(); html::h1()->addClass('my-h1-class')->field('title', $pages->get('/contact/'))->o(); // #Example 10 $modules->AvbMarkupHtml->html()->tag('div')->addClass('container')->children(array( $page->html('title')->tag('h1')->addClass('my-title')->render(), $page->html('body')->tag('div')->addClass('my-body')->render() ))->output(); // #Example 11 | Multiple child, prepend, append $html = $page->html()->tag('div')->addClass('uk-container')->addClass('uk-container-center'); $html->prepend( $page->html()->tag('div')->text('Prepend #1 !')->render() ); $html->prepend( $page->html()->tag('div')->text('Prepend #2 !')->render() ); $html->child( $page->html()->tag('div')->text('Hey !')->render() ); $html->child( $page->html()->tag('div')->text('Foo !')->render() ); $html->child( $page->html()->tag('div')->text('Bar !')->render() ); $html->append( $page->html()->tag('div')->text('Append #1 !')->render() ); $html->append( $page->html()->tag('div')->text('Append #2 !')->render() ); $html->output(); // #Example 12 | Create A HTML page //-> Create Html Tag $html = $page->html()->tag('html')->attr('lang', 'en')->attr('dir', 'ltr'); //-> Create Head Tag $head = $page->html()->tag('head'); //-> Add TITLE inside HEAD tag $head->child( $page->html()->tag('title')->text('My Website')->render() ); //-> Put HEAD inside HTML Tag $html->child($head->render()); //-> Create BODY Tag $body = $page->html()->tag('body')->addClass($page->template); //-> Create DIV Tag $container = $page->html()->tag('div')->addClass('container'); $container->children(array( $page->html()->tag('h1')->addClass('h1-title')->text('H1 Title')->render(), $page->html()->tag('div')->addClass('body-content')->text('Body Content')->render() )); //-> Put DIV.container inside BODY Tag $body->child($container->render()); //-> Put BODY inside HTML Tag $html->child($body->render()); $html->output(true); // Pretty HTML output /* Output <html lang='en' dir='ltr'> <head> <title> My Website </title> </head> <body class='homepage'> <div class='container'> <h1 class='h1-title'> H1 Title </h1> <div class='body-content'> Body Content </div> </div> </body> </html> */ // #Example 13 Static Call Example $article = html::tag('article')->addClass('uk-article')->children(array( html::field('title')->tag('h1')->addClass('uk-article-title')->render(), html::tag('hr', array(null, '/>'))->addClass('uk-article-divider')->render(), html::field('body')->render() )); $article->output(true); /* Output <article class='uk-article'> <h1 class='uk-article-title'>Page Title</h1> <hr class='uk-article-divider' /> Body Content </article> */
  13. I was looking for a more comfortable solution to add pages from a PageField Select. I ended up in this small module. Which is quite simple, but very useful. I created a PageField and another field of Type AddPage (requires FieldtypePageTable) with same settings for template and parent. Now I can easily add the page in the Modal. If you need it, take it as a Christmas Present from my side. (no christmas smiley available ... ) Dear Ryan, dear community, I wish you all the best for christmas and the upcoming year. <?php /** * Excellent side dish to Fieldtype Page. Doesn't store any data. Provides comfortable page creation. * * made by kixe (Christoph Thelen) 22.12.15 * Licensed under GNU/GPL v3 * * ProcessWire 2.x * Copyright (C) 2015 by Ryan Cramer * Licensed under GNU/GPL v2, see LICENSE.TXT * * http://processwire.com * * */ class FieldtypeAddPage extends FieldtypePageTable implements Module { public static function getModuleInfo() { return array( 'title' => 'Fieldtype Add Page', 'version' => 100, 'summary' => 'Excellent side dish to Fieldtype Page. Doesn\'t store any data. Provides comfortable page creation.', 'author' => 'kixe', 'requires' => 'FieldtypePageTable' ); } public function init() { // prevent data storage $this->addHookAfter('FieldtypePageTable::sleepValue', function($event) { $event->return = array(); }); // unneeded configuration fields can be removed $this->addHookAfter('FieldtypePageTable::getConfigInputfields', function($event) { $inputfields = $event->return; $page_behavior = $inputfields->children()->get(2); $removes = array('sortfields','trashOnDelete','unpubOnTrash','unpubOnUnpub',$page_behavior); foreach ($removes as $remove) $inputfields->remove($remove); $event->return = $inputfields; }); } } Screencast
  14. Chrome Php Logger Module to log useful details directly in your Chrome JS console. You can inspect most as objects and see infos or values. To enable logging with this module you have to enable debug modue in config.php. If debug is set to false in config.php, it will not output any log. Important: It is not recommended to enable it on live stage, as it reveal infos you might not want everybody to see, although it's not obvious as it requires the ChromePhp Extension installed and enabled. - render time - memory consumption - cpu usage - current user infos - current user roles - current user permissions - current page with all its fields and their value and field settings - page cache/loaded on request count - fuel - modules loaded - Server vars etc. - Cookies - Requests - mySQL query log When installed you can also use ChromePhp static methods to output your own data in all your templates or modules: ChromePhp::log($page->somefield); Note: This module requires the ChromePhp Extension installed to see the log in the Javascript console. More infos can be found on http://chromephp.com Download: Modules Directory: http://modules.processwire.com/modules/chrome-php-logger/ Github: https://github.com/s...ChromePhpLogger
  15. Given a Google Calendar XML feed URL, this module will pull it, cache it, and let you foreach() it or render it. Download at: https://github.com/r.../MarkupLoadGCal USAGE The MarkupLoadRSS module is used from your template files. To use it, you get a copy of the module, tell it what URL to load from (with the load method), and then execute a find() query with a selector string. It works basically the same as a $pages->find("selector string"). <?php $cal = $modules->get("MarkupLoadGCal"); $cal->load('http://calendar XML feed'); $items = $cal->find('from=2011-12-1, to=2011-12-31'); foreach($items as $item) echo "<p>{$item->title}</p>"; To get a Google calendar URL, you would go into your (or another) calendar on Google and click to the calendar's settings. At the bottom of the screen, you will see a section called "Calendar Address" with XML, ICAL, and HTML. Copy the XML address, and use that with this module. If you just want one to test with, use the one from my examples below: http://www.google.co...com/public/full Note: you must use the 'full' not 'basic' calendar from Google Calendar. You can identify if you've got the right one because it will end with 'full' rather than 'basic', as in the URL above. Selector Properties The selector properties you may provide to find() are: from: Starting date in any common date/time format (or unix timestamp). to: Ending date in any common date/time format (or unix timestamp). keywords: Keyword(s) to search for in the Google calendar events. limit: Max number of items to load (default = 100). sort: May be 'date', '-date', 'modified' or '-modified'. html: Set to '0' if you don't want the event description in HTML. The find() method will return the found items. You can then foreach() these items to generate your output. A render() method is also included with the items which provides some default output, if you want it. Calendar Item (Event) Properties Each calendar item has the following properties: title: The title of the event description: Detailed description of the event (in HTML, unless disabled) location: Where the event will take place author: Author of this item from: Timestamp of when the event begins to: Timestamp of when the event ends dateFrom: Formatted date string of when the event begins dateTo: Formatted date string of when the event ends See the module file for additional configuration options. EXAMPLES Example #1: Simplest example <?php // get the calendar module $cal = $modules->get("MarkupLoadGCal"); // set the feed URL: may be any google calendar XML feed URL $cal->load('http://www.google.com/calendar/feeds/3icgo6ucgvsf6bi5orld9moqqc%40group.calendar.google.com/public/full'); // find all items for December, 2011 $items = $cal->find('from=2011-12-1, to=2011-12-31'); // render items using built-in rendering echo $items->render(); Example #2: Rendering your own items <?php $cal = $modules->get("MarkupLoadGCal"); $cal->load('http://www.google.com/calendar/feeds/3icgo6ucgvsf6bi5orld9moqqc%40group.calendar.google.com/public/full'); $items = $cal->find('from=2011-12-1, to=2011-12-31'); foreach($items as $item) { echo " <h2>{$item->title}</h2> <p> <b>Date From:</b> {$item->dateFrom} (Timestamp: {$item->from}) <br /> <b>Date To:</b> {$item->dateTo} (Timestamp: {$item->to}) <br /> <b>Location:</b> {$item->location} <br /> <b>Author:</b> {$item->author} </p> {$item->description} "; } Example #3: Finding Keywords <?php $cal = $modules->get("MarkupLoadGCal"); $cal->load('http://www.google.com/calendar/feeds/3icgo6ucgvsf6bi5orld9moqqc%40group.calendar.google.com/public/full'); $items = $cal->find("from=Aug 1 2011, to=Dec 1 2011, keywords=Eddie Owen"); echo $items->render(); ADDITIONAL INFO Options See the module's class file (MarkupLoadGCal) for a description of all options in the comments of the $options and $markup arrays at the top of the class file. Handling Errors If an error occurred when loading the feed, the $cal will have an 'error' property populated with a message of what error occurred: <?php $items = $cal->find("..."); if(empty($items) && $cal->error) { // an error occurred echo "Error! " . $cal->error; } $items will be blank if an error occurs, but it will always be of the same type, so it's up to you whether you want to detect errors. If you don't, then your calendar output will just indicate that nothing was found. Cache By default your calendar queries are cached for an hour. You can change the cache time by setting the $cal->cache property to the number of seconds you want it to cache. --- Edit: Added note that you must use the 'full' google calendar feed rather than the 'basic' one.
  16. ukyo

    AvbImage

    AvbImage - Image Manipulator Module for ProcessWire This module using Intervention Image PHP image handling and manipulation library. Update Status Module and InterventionImage Library update - 10-12-2015 More performance imporements - 18-11-2015 Module Update and Performance Improvements - 17-11-2015 First Commit - 28-10-2015 RequirementsProcessWire >= 2.5.11 PHP >=5.4 Fileinfo Extension Supported Image LibrariesGD Library (>=2.0) Imagick PHP extension (>=6.5.7) For usage and methods please look githup repo : README.md > For issues and fix and corrections please use Githup Repo
  17. AdminSaveActions (Was: After Save Actions - guess why the rename?) Admin Save Actions adds the possibility to choose where the browser gets redirected after saving a page, template or field. Admin save actions are displayed just before the save button in a collapsed container. Chosen action can be saved in a cookie for current user by checking "Remember this setting". By leaving this option unchecked upon save, the chosen action will not become the default. Why? Some of you wanted something like this to exists in ProcessWire - and so did I. I've read discussions here, here, here and here carefully trying to cover at least most of the options discussed. I know this implementation wont satisfy all the needs, but I'm looking into adding some things afterwards to cover even more of them. I called the first version of this module PageEditRedirects but decided to to change the name in to a more descriptive one. So that module got deprecated as of now (and does not exists at GitHub anymore). This new version also does not require PW 2.3 but works just fine on PW 2.2 as well. Special thanks A module by Adam Kiss (ListAfterSave) implemented some of these actions a long time ago. Thanks to Adam for letting me use the ideas introduced by his module. There are actually some things there my module isn't going to cover even in future versions. Links AdminSaveActions can be found from the modules section. AdminSaveAction is downloadable from GitHub. (Edit: added link to the modules section. Edit 2: Implemented config option + version bump. Edit 3: Removed feature list - see GitHub.)
  18. Hello, I am using FormBuilder and I want to create a multi-language form (1 form for N languages, not 1 separate form for each language!). Everything is translatable except the Select fieldtype. I like to also translate the options in a select field. I found a workaround, but I can not use it (UX reasons for client): Create Pages with Options and use Page fields with select instead of true/raw select fieldtype. Well, this is a workaround, but not a solution. How can I translate my options in select fieldtype? Thank you!
  19. I have a simple module that creates a page when another page is saved with a checkbox field checked. My code below works well but I have one issue, it runs when the page is trashed as well as saved (creating an erroneous second duplication of the page). <? public function init() { $this->pages->addHookAfter('save', $this, 'dupeStandalone'); } public function dupeStandalone($event) { $page = $event->arguments[0]; if($page->template->name == "article_language" && $page->article_standalone == 1) { $a = new Page(); $a->template = 'article_standalone'; $a->parent = wire('pages')->get('/article/'); $a->name = $page->name; $a->title = "{$page->title} (standalone placeholder post for {$page->parent->parent->title}-only article)"; $a->save(); } } Could anyone help as to why it runs the function on trash as well as save?
  20. Helllllo! I am working on a simple module / pet project for a module that inserts custom classes into specific templates for forms that are generated via the api. I use bootstrap a bunch and am always messing with the defaults in processwire, now it should be a simple manner to tweak my settings in the admin area. As this seems to be something that I keep needing I thought that others might as well. Right now the functionality is pretty simple: Select the templates that you want to override the default styling on. Set your new defaults .... Proffit. What I would like is maybe some suggestions for options or functionality that I should try for. I have never really deep dived into modules so this is a bit new to me, but as I am looking for a new development job I would push myself for something cool. https://github.com/MuchDevelopment/FormStyler/tree/master
  21. Hi everybody, I'd like to share a new module with you. Its purpose is to let users sign in with their Active Directory accounts using LDAP. It works similar to the module jimyost released in 2012, but adds some new features to it. You can define specific roles that are applied to new LDAP users Passwords are automatically updated by LDAP Local users still work like a charm You can translate it in the language you want to deploy your ProcessWire site New: Connect to a LDAP server via SSL New: Debug Mode New: Your configuration will be validated on save In my opinion, LDAP authentication is a must-have for ProcessWire being successful in the enterprise. What do you think? Is there a feature you miss? You can find the repository here: https://github.com/conclurer/LdapSignIn You can find the module in the ProcessWire module directory. Thanks in advance! Marvin Edit: Updated to Version 0.5.1 Beta including some minor fixes
  22. Hi everyone, I got a serious problem with the LanguageSupport module. I already found a forum thread regarding the topic, but it doesn't work in my case. https://processwire.com/talk/topic/7207-can%C2%B4t-install-languagesupport/ My problem is, that "ProcessLanguage" can get installed but "LanguageSupport" doesn't. I can uninstall ProcessLanguage via the Module configuration, but that doesn't change anything. I always get this Error: I've found a "Languages" Page under Admin/Setup and deleted it with this code https://processwire.com/talk/topic/7207-can´t-install-languagesupport/?p=69520 I also deleted the LanguageSupport module via FTP from the server and uploaded the newest version of it. The error still occurs. I'm still a beginner and don't know how to deal with it. Please help me! I'm using the Blue-VR Site Profile made by Gayan Virajith, if that information helps. Thanks a lot in advance, Leo
  23. Hello, I am having an autoloaded module that should execute before another autoloaded module. Currently, my module is loaded after the other one -.- How can I achieve this? If that's not possible: How can I say that my autoloaded module should boot as first one in PW boot process? Thanks for your answers!
  24. Adds twig support for language translator list. To get your `.twig` files listed as well, you need to wrap the phrases like this: {{ __('text to translate', 'filepath/filename relative to site/templates/') }} {{ __('another text to translate', 'home') }} {{ __('one more text to translate', 'partials/header') }} first line - general usage second line - example for a text in site/templates/home.twig third line - example tor a text in site/templates/partials/header.twig
  25. Hey guys, Love PW except the forms which are grinding my hopes and dreams away. I'm rendering a form with this call $images = $modules->get("InputfieldFile"); $images->label = " "; $images->description = "Upload photo/s (max 2mb)"; $images->attr("name+id", 'myimages'); $images->attr("class", 'images-class'); $images->destinationPath = $this->config->paths->root . 'tmp_uploads/'; $images->extensions = "jpg jpeg gif png"; $images->maxFilesize = 2; // 2mb $images->maxFiles = 2; $form->append($images); Now I expect it to render a form that can take two uploads AND can remove one of the uploads. It doesn't seem to work like this. Firstly I needed to modify the output so I created an afterHook to modify this, just removing all the spans basically not important. Further along I decided to create a hook which replaced the ___renderUpload function so that I can play around with the output and how it positions itself. This threw errors at me for calling methods such as $attrs = $this->getAttributes(); $this->getAttributesString($attrs) So I gave up on that as well. Now I realised that a possible reason (hopefully, really really hopefully) I can't remove images is because the method __renderList isn't being executed because $this->value is failing at if(!$value) return ''; inside __renderList Now I just need to ask how can I enable the removal of images and change the output to my own markup. I have thought about moving it to /site/modules and play around with it there but it still won't solve the problem of removing images. Thanks in advance,
×
×
  • Create New...