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. I've been testing a form in Form Builder and am having an issue when I add more than 1 formbuilderfile input to the same form. The 1st works as expected, but the rest don't save the file to the entries database. You're just left with a reference to its name but a file size of 0kb. If you set the 1st formbuilderfile input to accept 2 files it works fine. The issue only occurs when adding multiple formbuilderfile input's. The issue isn't with the input itself, as moving the order in which they appear means the first in the form will work as expected and the 2nd and later will always fail. P.S I've just started working with Form Builder and haven't access to the support forum yet. By all means move this post if needed, just please let me read it....
  2. Hi, I create a little module that extends Process and creates a page in backend under setup. I need to store and retrieve a few (config)data for it, but don't want to make it a ConfigurableModule because than I have redundant places where I can setup config-data , I guess. How can I store / retrieve some data into the place where modules store it by default, but without implementing ConfigurableModule?
  3. Hi there, I'm currently writing a module that needs a Process action to generate some previewable HTML+CSS Code. In my code I'm doing something that boild itself down to this, to generate the preview: public function executePreview() { $p = new Page(); $p->template = $this->get('template'); // configurable module variable return $p->render(); } Would be fine if this wouldn't render inside the default admin template (that I need for other actions of the same controller). This inserts a lot of CSS and JS that I can't use here. The Preview action will be embedded into another action as an iFrame and I already tried calling it with ?modal=1 which get's rid of header, footer and sidebar, but still loads the CSS and JS. What I'd like to do know is to programmatically change the template of this view, but I wasn't quite successful. I inserted this in the above code to make it render another inside my module folder, but it still renders inside the default admin template: $this->page->template->set('filename', $this->config->paths->MyModule . 'my-blank-template.php'); While this would be pretty hackish, it also doesn't work... but I really hope that someone of you has a better answer to this problem? With kind regards, Marc Edit: While stepping through the code I wondered, where exactly the $page->render() function is?
  4. Fancy Admin Mode Just had a little funwith fancybox iframes, and created a little module that opens all admin links (topnav links, edit, view, new, copy actions) except "Pages" screen and "Site", "Search" in a FancyBox, so you'll never leave the page tree. It even works with inherit editing child pages. Download: https://github.com/s.../FancyAdminMode Little screencast to se it in action:
  5. Hi folks. I've been lurking here for a while, trying to figure how things work before I overhaul my site. Anyway, I've no doubt I'll be asking for help at some point(s), so I didn't want to arrive empty handed. MarkupLorenIpsum Module for Processwire This module hooks after Page Render, and replaces any [lorem] tags found with random lorem ipsum text. How to use [lorem<length><format>] <length> (optional) number - sets the length of the output. Default is 5. <format> (optional) char - sets the format of the output, as follows: - 't' - formatted text. Each paragraph begins with a tab char. 'p' - plain text. No tabs or line feeds. 'h' - html. Each paragraph is formatted with <p>...</p>, except the first and last (see below). 'H' - html. Each paragraph is formatted with <p>...</p>. The default format is 'h' unless the length is <= the default, in which case the format is 'p' - useful for headings etc. The [lorem] tag is replaced with the generated text. Note that paragraph length is 100 (this is set in the construtor). Samples: - 'h': lorem ipsum lectus dapibus ... sapien malesuada.</p><p> auctor sapien, arcu inceptos ... consequat metus litora. 'H': <p>lorem ipsum lectus dapibus ... sapien malesuada.</p><p> auctor sapien, arcu inceptos ... consequat metus litora.</p> 't': \tlorem ipsum lectus dapibus ... sapien malesuada.\n\n\t auctor sapien, arcu inceptos ... consequat metus litora. 'p': lorem ipsum lectus dapibus donec sapien malesuada auctor sapien, arcu inceptos aenean consequat metus litora. Examples :- [lorem] - renders 5 words, plain format [loremh] - renders 5 words, html format [lorem20] - renders 20 words, html format [lorem20H] - renders 20 words, html format, wrapped in <p>...</p> [loren20p] - renders 20 words, plain format [loren20t] - renders 20 words, text format The reason for the two html options is that the textarea editor inserts <p> tags itself, so you would get <p><p>lorem...dapibus</p></p>. By default the extra tags are stripped, but this can be overidden if desired. It's built using example2 from the HelloWorld module as a wrapper for Mathew Tinsley's LoremIpsumGenerator class. markuploremipsum.zip
  6. Maybe I missed that somehow - but how do I update a module? I‘m using the "Version Control for Text Fields" module, for example, in version 0.9.1. But here the module is listed with version 1.0.6. My first step was to use my modules list in the admin backend, but right there I can only install other modules. My search in this forum wasn‘t successful... Soooo... someone help me please. Thanks! (Damned noobie-question, I know.)
  7. Description A ProcessWire module to add some classes to your body tag. That will give you a better control of your CSS. Basic Usage Add this code into the class of your body tag: <?php echo $modules->get("BodyClass")->bodyclass() ?> So your body tag should look like this: <body class="<?php echo $modules->get("BodyClass")->bodyclass() ?>"> Custom usage <?php echo $modules->get("BodyClass")->bodyclass(array('page_id' => false, 'template_name_prefix' => 'templatename-')) ?> Default options array( 'page_id' => true, // bool (default true) return the page id 'page_id_prefix' => 'page-id-', // string (default 'page-id-') prefix for page_id 'parent_page_id' => true, // bool (default true) return the page id of of parents 'parent_page_id_prefix' => 'parent-page-id-', // string (default 'parent-page-id-') prefix for parent_page_id 'template_name' => true, // bool (default true) return the template name 'template_name_prefix' => 'template-', // string (default 'template-') prefix for template_name 'browser_info' => true // bool (default true) return some browser informations (os, browser, browserversion) ); Project Page on GitHub www.yesjoar.com
  8. Hi I would have a need to use the category field of the RSS feed items defined in the RSS 2.0 specification (http://www.rssboard.org/rss-specification#hrelementsOfLtitemgt). How difficult would it be to have all the item elements defined in the RSS Feed Generator module of PW? Regars, Lauri
  9. Hi Guys!, When i'm developing some Modules usually i use the Admin interface for try/adjusting the configuration of all the objects ( Templates, Field, Pages ). So at the end i need to use the ProcessWire API for create each of those objects... and it is difficult (for me) to translate all on code, because some Fields/Templates can have a particular configuration and sometimes i really don't remember all the names of the parameters It will be useful (maybe) to have a button to export all in PHP code to copy/paste in the Module. USSliberty
  10. Hi there, I've just installed apeisa's ProcessRedirects module and I have a few questions around it. I've inserted a bunch of URLs that are similar to the following: http://www.iconicboudoir.co.uk/?contact-iconic-boudoir/, http://www.iconicboudoir.co.uk/contact/ http://www.iconicboudoir.co.uk/#/contact-iconic-boudoir/, http://www.iconicboudoir.co.uk/contact/ in the above case, the "Redirects from" takes the following form: /http://www.iconicboudoir.co.uk/?contact-iconic-boudoir/ /http://www.iconicboudoir.co.uk/#/contact-iconic-boudoir/ IOW, the slash is added in front of the URL. I'm assuming therefore that we don't need the domain to be specified, just the path. However, if I specify the path(s) of: /?contact-iconic-boudoir/ /#/contact-iconic-boudoir/ The module complains: redirect_from: Error found - please check that it is a valid URL The original URLs are from a dynamic Ajax based site. The form /#/ is how the system itself defines its URLs but Google sees them as /? hence why they are specified twice, depending on what has been linked to. Any ideas around this or am I better off using .htaccess or seeing if I can modify the plugin? Many thanks!
  11. I am writing News module for PW (https://github.com/orkhan/PWNewsPlugin). Any ideas about module?
  12. Hi, I've installed ACE Text Editor today and it's awesome to directly write markdown in a really good looking way. But what I found to be tricky is to insert images there. It would be nice to get some kind of image import like in TinyMCE there, but I think this could be a little time consuming. So I got myself a little workaround. I've added a little input below the description to the ImageField module to show me the url, so I can easily copy it into my body. This would be a nice optional feature to have, so people could activate it if needed. protected function ___renderItem($pagefile, $id, $n) { $thumb = $pagefile; if($this->adminThumbs && $thumb->height > $this->adminThumbHeight) { // create a variation for display with this inputfield $thumb = $thumb->height($this->adminThumbHeight); } $out = [...] // own Code "\n\t\t\t<input disabled style='width: 99%' type='text' name='url_$id' value='{$pagefile->url}' />" . // End own Code "\n\t\t</p>"; return $out; }
  13. Hey, I want to implement a lightbox to my front-end pictures. Now I'm asking me, what would be the best practice to do this: Can I use the module "jQuery Fancybox Plugin" or do I have to use an extra *.js file? Greets Jens alias DV-JF.
  14. Edit 2013-01-09: This module is deprecated - see the next gen version here: http://processwire.com/talk/topic/2515-module-aftersaveactions/ - - - After following the discussion on multiple save buttons and default action after page save I decided to give it a try. The result (or an early version of it to beat Soma ) is a module called PageEditRedirects. The module, inspired by this post in particular (and another module by adamkiss), adds four options to choose from when saving a page: stay in editor (default) go to the page list add a new sibling page view the edited page The options are always collapsed and the chosen option is saved into a cookie so that each user's preference will be remembered. Probably should add a checkbox "Remember this setting" (unchecked by default) so that a one-time use of another option doesn't get sticky. Module can be downloaded from https://github.com/n...geEditRedirects and wont be available from the modules directory just yet (because of the required PW 2.3). So, consider the module just an alpha version or a proof of concept as it hasn't been tested nearly at all (need to check it doesn't break Antti's Adminbar for example). Edits: * Added link to an early post on the subject. * Added a little more explanation on what the module does and doesn't do. * Removed the note on needed core changes (Ryan did those already).
  15. The Modules page can get a little unruly, and though Soma's ModulesSectionCollapse helps to mitigate this I felt the need for more.... So I put together "Modules Quick Filter". Which has two main components. A "search as you type" field that filters by module name and a "refine by category" select box, which narrows the display of Modules by category. (The functionality is accomplished with javascript, as is the layout itself, if there are some hooks I could've used to do this, someone let me know ) UPDATE 1.1 - Added Multilingual Support and some minor bug fixes/improvmtents UPDATE 1.2 - Added configuration setting to choose whether or not field is collapsed by default. DOWNLOAD
  16. Hello everyone, I'm new to ProcessWire, and (this may sound cliché but) it's awesome... I've only used it for 3 days and already modified some of the admin UI for ease of use and configured a toolbar. Today I was creating a module but I'm not really PHP-saavy, so when I got this error, I was pretty much stuck: Fatal error: Cannot instantiate abstract class Inputfield in C:\xampp\htdocs\processwire\wire\core\Fieldtype.php on line 79 This module uses the integer inputfield and the page inputfield, I noticed that on Fieldtype.php, line 78 says: "// TODO make this abstract" so I'm wondering if that could have something to do with the fact that it's not working or if there's something wrong with my code. Thanks in advance. //Nicole
  17. Hi. This code is not working. How can I render pagination in Modules? public function ___execute() { ...... $news_list = $this->pages->find('template=news-page,limit=1,sort=-created'); ...... $out .= $news_list->renderPager(); ...... }
  18. Hello everyone, I'm currently working on a simple module (view this thread for more details) and ran into some problems with the validation of input data. I did some research, but I wasn't able to find answers to these questions: 1. If you develop your own Inputfield/Fieldtype module, where do you do validation? I've seen other modules do it in Fieldtype::sanitizeValue() (apigen), but this seems rather strange to me. Also, as far as I got it, they didn't throw any errors back to the user but just quietly changed everything, that doesn't make sense without the user knowing it. This leads to the next questions: 2. What is the correct way to get visual validation error reports to the user? 3. How to prevent a page from saving with validation errors? With this fairly basic stuff (where I wasn't really able to find something meaningful about) out of the way, what I really want to know is this: 4. How do you add validation with error reporting to an existing Fieldtype module? I want to add my custom validation with error reporting to the standard FieldtypeTextarea module (only when some conditions are meet in the corresponding Inputfield for sure), but I have no clue what would be the way to go there and wasn't able to find any module that does it like this. Please shed some light on these question, would be very much appreciated! Marc
  19. Hello, maybe it's too late or I had too little coffee or something else is sitting on my brain but I can't figure this out. I want to build a hook that determines if the User Agent is a phone and set a session variable accordingly: $this->addHookBefore('Page::render', $this, 'checkMobile'); function checkMobile(HookEvent $event) { $page = $event->object; $session = wire('session'); $domain = preg_replace("/^(m\.)/",'',$_SERVER['HTTP_HOST']); # this is to force one version or the other: if(wire('input')->get->v == 'desktop') { $session->isMobile = 'no'; } if(wire('input')->get->v == 'mobile') { $session->isMobile = 'yes'; } # /force # here comes mobile detection via Mobile_Detect if(!$session->isMobile) { require(wire('config')->paths->root.'/Mobile_Detect.php'); $detect = new Mobile_Detect(); $session->isMobile = $detect->isMobile()?'yes':'no'; } # /mobile detection # now for the redirects. This is cosmetics but I would like it to work: if ($session->isMobile == "yes" && !preg_match("/\bm./", wire('config')->httpHost)) { wire("session")->redirect("//m.".$domain.$page->url); } if ($session->isMobile == "no" && preg_match("/\bm./", wire('config')->httpHost)) { $session->redirect("//".$domain.$page->url); } } The idea is, that if someone visits bmxrider.de on a mobile, he gets redirected to m.bmxrider.de and $session->isMobile is set to yes so I can change the templates later on. I also like to be able to force each version by setting $input->get->v Whenever I use the query string to "force" a state, my site ends up in endless redirects. I checked the logs and it looks like $session->isMobile toggles between yes and no and I have no idea, why this happens. Can someone help me out? Thanks, thomas Update: The eternal redirect happens, when the domain doesn't match the query string. Like m.bmxrider/?v=desktop or bmxrider/?v=mobile
  20. Hi all! I have just created a proof-of-concept Module here: https://github.com/U...ocesswire-views. The main idea was started by me in this topic: http://processwire.c...age/#entry21257 The aim of this module is to extend the number of files associated of a specific Template. For example: if the template name is "page", the file associated is "page.php". With Views we can have others visualization of the same Template named in this way: view_name1-page.php view_name2-page.php | | | view_nameN-page.php Also you can test your view (useful when developing...) in this way: example: http://example.com/great-page/?view=fullscreen where "fullscreen" is the name of the view. IMPORTANT: Since i'm still learning how to make modules, the module works with a TextField called "view" (where is stored the name of the view), and you must create it manually. Maybe in the next few days i will make the automatic creation of the field and some other functionalities. Any Feedback is appreciated! USSliberty
  21. Hi All, I am interested in integrating IDX(Internet Data Exchange) for the Real Estate Multiple Listing Service into PW for realtor websites. Wordpress has such premium($$$) templates available but (having been a realtor years ago and more recently a realtors administrative assistant) I would like to offer such a set of templates built on a better framework-PW(!) which the realtors can easily upload, update, etc...self-manage. I just finished a website using processwire based off the included template to learn PW better and I love it! My desire is to offer sets of templates for real estate agent clients requiring websites with the IDX. My limited knowledge of code restrict my ability to do this on my own. So I want to know if anyone has an idea if; 1- Could this be best achieved by a module? 2- How much is entailed for such a project? Any/all suggestions from the PW community will be most helpful... Cheers, Grant
  22. Hey everyone, I would like to start off saying that I am sorry for posting this but I couldn't find something about this and I really need to know this ASAP. So I want to create a module where the admin can enter an API key in the module settings, how do i create that input field and more important, how and where do i save the information he admin has entered? Much appreciated and thanks in advance!
  23. Hello, I was wondering if it was possible to hook before PageImages url is given, so I can provide a default image if an image is missing? I have about a hundred cases where I need to check for count($page->image), so I thought maybe a module could do this? Thanks! thomas
  24. Form Save Reminder Module To prevent losing unsaved changes when editing a Page: This module checks for changes while editing a page, and throws a confirm dialog when leaving the page without saving. More Infos and download this module: http://modules.proce...-save-reminder/
  25. I noticed since last update of ProcessWire to version 2.2.9 (2.2.8-2 on GitHub) a bug is occuring with the repeater field. When editing a page a javascript error is shown when the repeater field "Add Item" is clicked. Error: TypeError: labelHTML is null Source File: http://local.site.com/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.js?v=100 Line: 93 I have set the "Ready-to-Edit New Repeater Items" to 0, when setting this number to anything above 0 it works fine.
×
×
  • Create New...