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. Hi, I'm trying to create a template for a module I'm working on. The page that uses this template will be used specifically as a category to hold other pages. For this reason, I don't need to add any extra fields to it, other than the title, and obviously the name. But I can't seem to figure out how to do it. I've tried the following, but it complains about needing a field. $template_category = new Template(); $template_category->name = 'template_category'; $template_category = $template_category->save(); Any help appreciated.
  2. During module development I've recognized a strange behaviour. Logfile entries in errors.txt and messages.txt are always created twice. This happened on different servers in different environments with different modules. I tested it with this small module: <?php class Debug extends WireData implements Module { public function init() { $this->message(microtime(),Notice::logOnly); // same with $this->error() } } /*log file entries: * 2014-11-07 05:52:14 admin [...]/admin/module/ 0.43575100 1415335934 * 2014-11-07 05:52:14 admin [...]/admin/module/ 0.43575100 1415335934 */ whereas only a simple entry is generated when I provoke an error an catch it to log with exception handling. <?php class Debug extends WireData implements Module { public function init() { try { foo($bar); } catch(Exception $e) { $this->error($e->getMessage(), Notice::log); } } } /*log file entry: * 2014-11-07 12:45:19 admin [...]/admin/module/ Error: Call to undefined function foo() (line 16 of [...]/site/modules/Debug.module) */ Happened this before anywhere? Any Experiences with that? Any Ideas? Couldn't find out the reason for that!
  3. What is the best way to manage larger amounts of constantly necessary static data. I.e. Countries and there depending states and the cities in those states with their postal codes which needs to also translatable into different languages. I.e. Germany, Deutschland, Allemagne, ประเทศเยอรมัน North Rhine Westphalia, Nordrhein Westfalen, ... Cologne, Koeln ,... ... Or Mr., Miss., Mrs., Or Other clearly defined lists of static data i.e for Taxes or Currencies, which would be used over and over again in several site I.e in Search forms, mail forms, user profiles, shops, realestate lists, .... All this data won't change over years. One way would be to create pages the processwire way and than search for them an make a search so that a parent shows only the subpages assigned to him. What about scalability? I.e if you have clearly defined job descriptions - about 30 TSD. Is there already a module taking care of such kind of static data which probably get much better stored as is in a table direct in the database? Imho it does not really make sense to create for each item a page. What is your opinion? How do you handle that static data in your sites? Thanks Andi
  4. Hi all! I have created this new module that improve the current search engine on PW: https://github.com/USSliberty/Processwire-site-indexer (Beta version) The main idea is to create an hidden field that store keywords (separated by space). The keywords are generated automatically from all text fields in the page, plus PDFs and DOCs files. So if you create new text fields you can forget to add they on Search Page Module. The only thing to do after install, is to change the list of fields in Search Page (see attachment). In fact you need to search only in "indexer" field. NOTE 1: At this time the module index only when you save the page. In the next week maybe i will add the complete-site re-index. NOTE 2: The files are indexed with 2 Unix packages (poppler-utils & wv). I have tried without success with pure PHP classes, but if know a class that works fine i can add it into module. ADB
  5. Since I recognized a remarkable overflow of my trash bin I made a small module which auto delete pages sustainably from the trash after a period which can be set in module settings. PW modules: http://modules.processwire.com/modules/cronjob-empty-trash/ Github: https://github.com/kixe/CronjobEmptyTrash
  6. Hi Guys, In 2.5 we can export the fields. I am wondering whether there is a way that it can handle importing the json from the modules when installing. Eg : A module is created which uses certain fields. I have exported the fields via export and keeping it at some fields.json . Does PW have the ability to find the fields.json and import the fields . This is just a question to know whether something like this have been added into core. Thank you
  7. MarkupAdaptive This module aims to be a helper for developing an adaptive site. MarkupAdaptive is a module that injects classnames representing 'media queries'. Fire events after the browser is resized and fires an event when a media query is changed. Optionally it can write a cookie with the ‘media query’ classname of the current viewport size. The main purpose of this module is about syncing media queries with javascript. Say I want to have a slider on the iPad but don't want that slider on the phone I could now destroy the slider exactly on the right time. You could respond server side with this cookie, but keep in mind that you then need a workaround for the default caching solutions. (template cache or ProCache) The module script works with injected media queries and a HTML element tested against those. This javascript process starts real early in the load process and is extremely fast. It starts even before the body tag is parsed. In Explorer 7 and 8 clientWidth is used to pinpoint the “classname of the viewport size”. To support Explorer 7 and 8 your media queries should be specified in pixels. In the wild An working example of the module is hosted on hosted on lightning.pw Instant ProcessWire Hosting from conclurer.com. Please don't forget to view the console.log(). The site doesn't use any media query in the stylesheet. Not that I recommend building adaptive sites without media queries. . How to install Install the module At least open the Module configuration, optionally save it. Insert the below code in the HEAD of your html file <script><?php echo $modules->get('MarkupAdaptive'); ?></script> Javascript methods available when using MarkupAdaptive. ( More instructions like Event support IE7 & 8 are available in the 'example template' packed in the module folder ) /** * Getting information with Javascript. * */ // How to catch the end of a resize (with jQuery) $('html').on('resized', function(e) { console.log('Browser window is resized'); }); // Respond on a media query change $('html').on('mediaquerychange', function(e) { // Get the old class name before the “mediaquery” change has occurred var oldClass = MarkupAdaptive.getOldClass(); // Get the new class belonging to the current “mediaquery” var newClass = MarkupAdaptive.getClass(); console.log('mediaquerychange, from: “' + oldClass + '” to: “' + newClass + '”'); }); // Get the current class var current = MarkupAdaptive.getClass() // Get the old class, the class before the current var old_class = MarkupAdaptive.getOldClass() // Mediaquery JSON object which originates from your Modules config var sizes_object = MarkupAdaptive.getJson() // Mediaquery JSON object which originates from your Modules config' var array_with_classnames =MarkupAdaptive.getArray(); // Is the current browser IE8 (returns true/false) MarkupAdaptive.isIE() // (bool) // Is the current browser IE8 MarkupAdaptive.isIE(8) // (bool) // Is the current browser less then or equal to IE9 (lt, lte, gt, gte) MarkupAdaptive.isIE(9, 'lte') // (bool) // get the cookie, when checked in the module configuration function getCookie(name) { var match = document.cookie.match(RegExp('(?:^|;\\s*)' + name + '=([^;]*)')); return match ? match[1] : null; } console.log('Classname cookie value: ' + getCookie('MarkupAdaptive')); Special thanks to all the people from conclurer who made it possible to host MarkupAdaptive. When you're searching a lightning fast hoster. You should consider lightning.pw. View on GitHub Download GitHub
  8. hi there i've shouted a question to setup the default path in the pagetree of the imageselect in the RTE (eqal tiny or CKE) user should only see a kinda image-root page where images and categories are pages - not the whole pagetree so i've learned it have nothing to to with CKE - so it's a Admin->Page-Insert Image with the ProcessPageEditImageSelect working here. So long ok deeper i understand that in the getImages() function the second part is build to show the pagetree for choosing a other page with images... so how can i get here only a pagetree with parent="image-root" ? is this possible without deeper OOP skills? simply hook and set the parent? hints? options? expertise? (I've a google search but didn't find any solution) regards mr-fan
  9. Hello everybody, I'd like to introduce a new module to you. It automatically adjusts pages' URLs based on naming patterns. It allows you to specify a general pattern for all pages or individual patterns per template. It is available in the ProcessWire module directory. Also you may find the code here. New: Auto Name has been updated to Version 1.1. Changes: It is now possible to set a human-readable date format for the created and updated fields Renaming can now be restricted to unpublished pages Includes a fix for a bug that accidentally renamed system pages I'm looking forward to your feedback. Thanks in advance, Marvin
  10. Today I needed to install the latest Textile on an older site for a client, and figured I would go ahead and make a PW2 module out of it at the same time. Textile is the markdown language included with Textpattern CMS and apparently also used by Basecamp and Google+ to some extent. More information about Textile and syntax here: http://en.wikipedia....kup_language%29 Textile is very similar to Markdown (already included with PW), though now that I've spent some time with the syntax, I think I might like Textile a little more. To Install Download or clone from GitHub at: https://github.com/r...ormatterTextile Place files in /site/modules/TextformatterTextile/. Go to Modules in the admin, 'Check for new modules' and click install for Textile under the Textformatter section. You'll also see 'Textile Restricted' and that is a separate version of the module that may be used with untrusted input like user-supplied input or blog comments. The regular Textile should only be used with trusted input. To use Add this to any textarea (or text) field, and that field will interpret Textile codes and output XHTML markup on the front end of your site. Note that Textformatters appear on the 'Details' tab of the field editor when editing a text or textarea field. Use the regular 'Textile' unless the field in question may contain untrusted user input, in which case you should use 'Textile Restricted'. Please note Don't use this in combination with other text formatters like Markdown. Don't use with TinyMCE (there would be no point). This module may be used with any version of ProcessWire: 2.0, 2.1 or 2.2+.
  11. I've made a module for checking a password against a banned list. The list comes from the 10,000 most common password list and when input will produce an error informing the user that their password is in the list and a more secure password should be used. The module was based on a question I asked in the development section (over here). The banned list is found in the module as banned.list so passwords can be added/removed as required. The module should be in the Modules section once it has been approved. PasswordBannedList.zip
  12. Hello everyone, After playing a week with ProcessWire I'm really loving it. As a first project I wanted to create a Profile module based on the existing FrontendUserProfile trying to make it suit my needs, and I found the need for a filter system like the one WordPress has. I couldn't find anything similar or maybe I didn't completely grasp the Hooks concept, so I've created a simple ProcessWire module to handle that: Filter https://github.com/gyopiazza/pw.filter The module is autoloaded, and once installed you can use the 2 functions provided to filter data. This feature is very useful in certain situations where you want to be able to change some values in a simple way. function my_function1($value) { return 'filtered by my_function1'; } function my_function2($value) { return 'filtered by my_function2'; } // Parameters: filter name, function name or array(class, method), priority // Higher priority means later execution, default is 10 addFilter('some_filter_name', 'my_function1', 10); addFilter('some_filter_name', 'my_function2', 10); $result = 'default value'; $result = applyFilter('some_filter_name', $result); // $result = 'filtered by my_function2' Hope you like it, cheers! Giordano
  13. A proof concept of a preloader module with the function .load() Github
  14. Hello all, I am thinking how to make a "simple" button that could be edited by user. For example in a situation where we have an editable teaser and we want to add a internal link to some other page under it. The button/link would take two parameters: 1.) Text that is displayed on a button (in different languages!) 2.) Page to which button would link to. 3.) Optional: instead of page object, one could also enter external address. System admin should also be able to add class name that would be added to rendered element. Field would then simply be used as: $page->button and it would render <a class='custom-class' href="$page->url">Text (in appropriate language)</a> I noticed it is sort of similar to this module, but with an option for user to select one of the pages (instead of writing down an ID). My first thoughts were to create Fieldtype/Inputtype module, but it seems sort of complicated (I don't know how to use neither FieldtypeTextLanguage nor FieldtypePage in module). So I wonder, how you guys are solving this problem? Thanks! Žiga PS. I am not sure I added this to the right section. If not, please feel free to move it where it's suppose to be.
  15. Hello, I am not sure if I am the first one to find this bug, but... How to reproduce: Create field FieldsetTabOpen (lets name test_tab) Create field Page (lets name test), choose Multiple pages, and type PageListSelectMultiple Add the fields to template: test_tab test test_tab_END The field "test" is not sortable. The reason is because the InputfieldPageListSelectMultiple.init is called before the tabs are rendered. My very quick workaround was to move the init method call into setTimeout, but I am not sure if this the correct choice. wire/modules/Inputfield/InputfieldPageListSelect/InputfieldPageListSelectMultiple.module:88 now looks like the line below. "setTimeout(function() { InputfieldPageListSelectMultiple.init($('#{$this->id}_items')); }, 200);" .
  16. Email Verification This module provides functions to validate email adresses and hosts. The module generates a textfile for blacklisted mailhosts (trashmail), which will be always up to date. Download https://modules.processwire.com/modules/email-verification/ API // get module $mailcheck = $modules->get('EmailVerification'); // return bool/ string - automatted update of blacklist file $mailcheck->blacklisted(email|domain) // return bool - validate a top level domain, checks against IANA list $mailcheck->validTLD(tld) // return array of punycoded TLDs - cyclic updated, data pulled from IANA $mailcheck->getTLDs(cycle=2592000) // return bool - checks syntax converts to punycode $mailcheck->validDomainName(domain); // return bool - checks punycode encoded syntax $mailcheck->validHostName(host); // return bool - checks syntax and accessibility $mailcheck->validHost(email|domain) // add a single value to blacklist $mailcheck->addToBlacklist(email|domain) USAGE $mailcheck = $modules->get('EmailCheck'); $email = 'susi@trashmail.com'; if($mailcheck->blacklisted($email)) echo 'Email Provider not allowed'; if(!$mailcheck->validHost($email)) echo 'Mailhost not available'; Example blacklist file: blacklist.txt
  17. Dear PW-ers. I would like to inform you that I’ve been in need of Tree View commenting system for a project being developed by me at the moment, thus, I’ve decided to make some additions to the commenting system developed by Ryan. Hereunder, I’d like to share the code with you for your kind information. You can also practice it in case of need. Some screenshots: Download link: FieldtypeComments.zip List of changed files: small change in main.css: Archive updated.
  18. InlineEditor 0.0.3 A simple, inline editor that allows you to edit text based content directly in pages themselves. Only use this to experiment. Please do NOT use this on live sites. 0.0.3 Updates Refactored process module Editor now shows result sent by server rather than a generic message New in 0.0.2 Editing repeaters work (actually always did from the beginning) All editor bar colours are now configurable through the admin panel All editable areas are now given a dashed border Few other fixes! Module page: http://modules.processwire.com/modules/inline-editor/ GitHub page: https://github.com/Sinmok/InlineEditor-for-ProcessWire Credits: Big thank you to apeisa for Fredi - whos Module inspired me to make this. It also provided a solid foundation on how to make my own module Ryan - For the whole CMS and the HelloWorld module which taught me how to hook on to page::render! Screenshots:
  19. Remove of field admin_theme didn't work after uninstall of last custom AdminTheme. I tried to call the uninstall() function of AdminTheme.php by adding a function in MyCustomAdminTheme.module. This function should remove the field from the templates and delete the field. But this didn't work. Whats wrong? public function ___uninstall() { parent::___uninstall(); } notice Most of the existing third party AdminThemes don't call the uninstall routine. While Playing around with the themes I uninstalled default theme in Modules to get the basic default admin theme (wire/templates-admin) Couldn't see the content under Modules Tab. Worked after updating wire/templates-admin/scripts/main.js.
  20. Hi I already asked in the thread for PageEditPerUser.module but there was no reaction at all. I have problems with giving specific users (by username, not by role) the ability to add children to specific pages, I guess there's some kind of rewriting the CustomPageRoles.module but I'm not deeply enough into php to do this. Can anybody help me? Thanks, Tommy
  21. hi there, is it somehow possible to copy/duplicate one PageTable entry from one page to another page? I have some similar entries on, which i also want to use/insert and modify on other pages, without adding all the content again and again. Thanks!
  22. Hi there I installed Processwire and like it very much. @community: Thank you! Everything works well, now I want to set up a multilingual site. Therefore I want to use the Module that comes with the installation. When I click to the «Modules» Tab a completely blank page is shown. In the Adminzone all the other Items are followed by a number – after «Modules» there is no such number: What can I do to get access to the modules? In .htaccess I had to comment the following Lines (If I let just one single line of these uncommented, I get a «500 – Internal Server Error» and Processwire doesn't work at all ): # Options -Indexes # Options +FollowSymLinks # Options +SymLinksifOwnerMatch # <IfModule mod_php5.c> # php_flag magic_quotes_gpc off # php_flag magic_quotes_sybase off # php_flag register_globals off # </IfModule> Thank you for your help.
  23. First, I am running PW 2.4.12, so I realize this might be a beta bug that is fixable by me upgrading, but I'm following examples that have been around for a while, so I figured I would ask. I am following the wiki's example for making a configurable module and it creates the fields properly, but is not storing the default values on install. In the __construct() method I have tried both variants: # variant 1 $this->foo = 'value'; # variant 2 $this->set('foo', 'value'); And then my getModuleConfigInputFields(array $data) method has: $inputfields = new InputfieldWrapper(); $field = wire('modules')->get('InputfieldText'); $field->name = 'foo'; $field->label = 'Label for foo'; if ( isset($data['foo']) ) { $field->value = $data['foo']; } $inputfields->add($field); return $inputfields; After install, the module shows the field, but its value is blank. I've confirmed the 'data' field in the modules table is blank, too. At this point, I can enter a value, click submit, and the 'data' field is updated and reflects in the form. Is there an additional method call needed in my __install() to trigger storing these default values?
  24. I'm about to build a search function for a site and noticed, that search queries/selectors with FieldCache and umlauts don't work. e.g. headline = "Steak mit Käse"; fieldcachefield includes headline field If I search for "Steak" i get the right result. If I search for "Käse" i get nothing. here's my code: if($q = $sanitizer->selectorValue($input->get->q)) { $input->whitelist('q', $q); $matches = $pages->find("fieldcachefield%=$q"); } In the db table for this fieldcache-field all the umlauts are encoded like this K\u00e4se If I use headline as selector, the right result pops up. What could i do, to use FieldCache with umlauts? Thanks!
  25. Hi! I'm about to build a website with ProcessWire and I intend to use PageTable for a lot of custom page content. The site also needs a search function and i wanted to know, if it is possible to search for something, which is mentioned on in a PageTable site and get the page containing this PageTable as result. Is this possible (I hope so!) and how do i do something like this? Thanks!
×
×
  • Create New...