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 am writing News module for PW (https://github.com/orkhan/PWNewsPlugin). Any ideas about module?
  2. 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; }
  3. 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.
  4. 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).
  5. 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
  6. 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
  7. 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(); ...... }
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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!
  13. 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
  14. 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/
  15. 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.
  16. Hello, Today is my first day with processwire. I have already an index.php with its CSS created. The client needs a simple CMS which will let her upload pictures/videos in one section and music in another. So I just need to implement the CMS for those sections, no text or anything else. The web has a horizontal layout, so technically its only one page but with the width very wide. Each page is a div with a special link applied to it. I already installed proceswire, placed all the files inside template folder, activated template and with help of head.inc could link the css/jquery and images with a determined url succesfully. At this moment I'm trying to apply the option of uploading pictures from the CMS. This part I have no html/css created as I wanted to see how I had to do this depending of the CMS. I tried to install the thumbnail module with success but from there I have no idea what to do... The module is not visible and I dont know how to hook it to my html structure. I would really appreciate some help. P.D. After I will do the video and audio. For now I need to know how to apply exactly a module to my display, how it works. Lets use thumbnail as an example. P.D.D. I've already read some documentation in the web but I still dont get it.
  17. Who can tell me how to make a module for printing online. The task is simple. We need to do all three points for photo printing. Everything should be no user registration on the site. 1. The client downloads the pictures to the site through the standart uploading tool and select the size (9x12 10x15 and so on), and the paper: matte or glossy. 2. Displayed price to the selected photo. 3. Customer enters their contact information as a form of feedback. 4. Сome to my mail photos and shipping address ready photos. If such a module will cost money, the interest cost of the work. If it is written in the wrong topic, I apologize. There is an example of such a site, but it is in Russian. But I think everything is clear. http://fotozakaz.kz/
  18. Good evening again, the problem I face today is a bit tougher than the last one. This is my situation: I have multiple pages which represent photo-albums (/photos/summer, /photos/vacation-2012, ...) - Now I want to create a page "My favorite photos". So inside my photo-albums I'd like to mark single uploaded photos (standard image-field) as a "favorite photo" with a checkbox - The marked photos shall appear inside my "My favorite photos" page. When editing the "My favorite photos" page I'd like to see all selected "favorite" photos and be able to sort them (just like in standard the image-field) - When deleting a "favorite" photo from "My favorite photo" page, the checkbox of the original photo (in it's original album) shall be unchecked. So -as a PW beginner- I'm afraid I have to create an own module for this functionality (or at least fork the existing image-field and modify it)... Any tips or "best practices" for my idea? I took a look at the PW structure and it appears I'll have to copy the images from my various albums to the "favorite photo" page - Also I will have to populate the image-field via API... Any ideas or suggestions?
  19. Hello there! Appreciation First of all I would like to say Thank You for making such a fantastic back-end. In my ten years of web development it's the first one to actually make sense to me. When I used to develop in Flash I was searching every where for a back-end that would just let me output my data as xml without the hassle of learning a new "language" or syntax, or messing with settings directly in the back-end itself. For my current portfolio and some other sites I ended up using Drupal with some plugins for managing the data and then just dug in to the database directly, pulling out whatever i needed. It wasn't easy, but it was easier than learning how to make an actual plugin that did the same. With process wire I realize now I could have saved weeks of development, had I known of it's existence. It was so easy to get into that I basically just sad down a few hours one day to get familiar with the UI and I have only had use for the cheat sheet ever since. This stuff is build in a very logical way and without unneeded complexity. I can see a lot of thought / experience has gone into this, and I really appreciate you letting us use it! Question I have some ideas for new modules that I would like to build. They would add some extra functionality to the core functions of Processwire. One is to implement getID3() (http://getid3.sourceforge.net/) to get the extra data in mp3s like $fileMp3->composer for example. The other one is to add extra image functionality on both the front- and back-end using imagemagick. I'm updating my portfolio to an html5 version and it's going to have a worn down/outdoor look, and therefore I'd like to add some Instagram type of effects to certain images (http://net.tutsplus....lters-with-php/). On the back-end I would like to add options for adding image effects when the image has been uploaded. I would like to keep the original while the modified Image is used by the front-end. Ideally it would be a drop down with some predefined effects while having the option to add more than one effect. Next would be to extend the Image with more options, just in the same way resize works. For example $fileImage->resize(150,150)->kelvin(75, "#4499ff") I'll post what I came up with so far. It's inspired mainly by the tutsplus article and it contains obvious errors, but it's more to give you an idea of what I want to achieve. I looked for an Image class to add a hook to - in the same way that resize works, but I couldn't really find out how it was put together. I also don't quite understand why this module shows up under an "Image" section as I didn't define it anywhere (see attached image). I'm not asking for finished code here, but looking for guidance as http://processwire.com/api/modules/ and the hello_world.module don't tell me what I want to know. Or maybe I'm looking in the wrong place? Anyway, here's the code so far. Any tips would be greatly appreciated! ( And sorry for the wall of text ) <?php class ImageInstagram extends WireData implements Module { public $_image = NULL; public $_output = NULL; public $_prefix = 'IMG'; private $_width = NULL; private $_height = NULL; private $_tmp = NULL; public static function getModuleInfo() { return array( // The module'ss title, typically a little more descriptive than the class name 'title' => 'Image Instagram Effects', // version: major, minor, revision, i.e. 100 = 1.0.0 'version' => 003, // summary is brief description of what this module is 'summary' => 'Add InstaGram effects to images', // Optional URL to more information about the module 'href' => 'http://www.processwire.com', // singular=true: indicates that only one instance of the module is allowed. // This is usually what you want for modules that attach hooks. 'singular' => true, // autoload=true: indicates the module should be started with ProcessWire. // This is necessary for any modules that attach runtime hooks, otherwise those // hooks won't get attached unless some other code calls the module on it's own. // Note that autoload modules are almost always also 'singular' (seen above). 'autoload' => true, ); } public function init() { $this->addHook('Images::kelvin', $this, 'kelvin'); } public function kelvin($event) { $this->tempfile(); $this->execute("convert( $this->_tmp -auto-gamma -modulate 120,50,100 ) ( -size {$this->_width}x{$this->_height} -fill 'rgba(255,153,0,0.5)' -draw 'rectangle 0,0 {$this->_width},{$this->_height}' ) -compose multiply $this->_tmp"); $this->frame($this->_tmp, __FUNCTION__); $this->output(); } public function tempfile() { # copy original file and assign temporary name $this->_tmp = $this->_prefix . rand(); copy($this->_image, $this->_tmp); } public function frame($input, $frame) { $this->execute("convert $input ( '$frame' -resize {$this->_width}x{$this->_height}! -unsharp 1.5×1.0+1.5+0.02 ) -flatten $input"); } public function execute($command) { # remove newlines and convert single quotes to double to prevent errors $command = str_replace(array("\n", "'"), array('', '"'), $command); $command = escapeshellcmd($command); # execute convert program exec($command); } public function output() { # rename working temporary file to output filename rename($this->_tmp, $this->_output); } }
  20. HI there, I added my first module (thanks to Soma) but have noticed something. I made a change (added a new method and deleted a method) to the module and PW just threw an error in both the browser and Admin panel. There is obviously something you have to do around changes but I can't seem to find anything about this. I also had to uninstall and reinstall my module and the ID assigned by PW now seems to have skipped a few values. Is this a problem? Do I need to clean this up in someway? Thanks!
  21. Today I finally had time to add my modules to the directory. And while I did it I found a module I never published in his foru only in the webchat and on github: AutoUpgrade. (Click here to see it in the modules section) ------------------------ AutoUpdate This module will notify you if a newer version of ProcessWire is available and give's you a link which will redirect you to a "upgrade" page where you just have to press the "Upgrade" button to upgrade your system. WARNING: It's in alpha mode. So you can use it to try it but you shouldn't use it in a bigger project or similar. INSTALLATION This module's files should be placed in /site/modules/AutoUpgrade/. It's really important that it is in a separate folder! -------------------- I would love to get some feedback on this and if it's working for you or if it breaks. / Nico
  22. Hi! I just finished the first release of my first PW module: Piwik Top Keywords: https://github.com/f...ik-Top-Keywords This module can be used to create a tag cloud based on the keywords that visitors use to find your site (referrer keywords). These keywords are fetched from your Piwik installation. For those that don't know Piwik, it's an open source alternative for Google Analytics, more info on http://piwik.org. The keywords are, as a query, linked to ProcessWire's search page.* The module can be configured from the admin area, but it's also possible to configure it in your template. In order to reduce the load on your Piwik installation and avoid delays when rendering your pages, it makes sense to use it on cache enabled templates only. I am sure that the code can be improved, since it is my first module and because of the fact that I am not an experienced PHP developer. If you have any suggestions, please let me know. To Install: 1. Download the file attached (PiwikTopKeywords.module) to this post and place in /site/modules/. Go to Modules in the admin, 'Check for new modules' and click install for Piwik Top Keywords under the Piwik section. 2. Add the following to your CSS style sheet: #PiwikTagcloud {list-style-type:none; margin:0px; padding:0px; text-align: center;} #PiwikTagcloud li {display:inline !important; margin-right:15px; line-height:1.5em;} #PiwikTagcloud li a {display:inline; text-decoration: none;} #PiwikTagcloud a:hover {text-decoration: underline;} #PiwikTagcloud .smallest {font-size: 100%;} #PiwikTagcloud .small {font-size: 125%;} #PiwikTagcloud .medium {font-size:150%;} #PiwikTagcloud .large {font-size:170%;} #PiwikTagcloud .largest {font-size:200%;} To use: Add the following to your template: $PiwikTopKeywords = $modules->get("PiwikTopKeywords"); $PiwikTopKeywords->DisplayTopKeywords(); I also attached a screenshot of the output and a screenshot of the admin area: I'm not sure how many of you use Piwik and how many will use this module, but if it's helpful to anyone I am more than happy! //Jasper * Edit: I just realised that is your site doesn't have a search page, you might want to link the keywords to a Google site-search. Simply use the following Search URL in the config: http://www.google.com/#q=site:yoursite.com+
  23. https://github.com/adamkiss/HelperRender Finally, after a while, I built something! It is my way of working with templates, and pushing all the echoing into 'views', rather than having it scattered all over the template files. This is its third incarnation, built less the 'somehow tie it into PW' way, and more the 'it makes sense' way, its selfcontained, installs as a module, and gives you a bunch of 'Render::*' methods you can use both in your templates and in your views. I am particulloary interested whether the documentation makes any sense, because... well, I wrote it after working on this reincarnation for two days straight
  24. I'm using the repeater module to build a list of information (name, address, phone, etc.) about a group of people. Is it possible to replace the repeaters number counter with, say, the first and second value of the text fields within the item?
  25. Hi all, Using code provided by Ryan here, I've created a module that coverts a PageArray into JSON format. It's been super useful to me, and I'm hoping it will be for others as well PagesToJSON.module
×
×
  • Create New...