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. 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
  2. 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/
  3. 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.
  4. 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.
  5. 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/
  6. 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?
  7. 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); } }
  8. 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!
  9. 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
  10. 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+
  11. 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
  12. 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?
  13. 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
  14. I've been trying to use the PageAutoComplete fieldtype to connect some autors (teachers and students) to a particular work, but allowing to set unpublished (or hidden) student and teacher pages as well. For that, I've established a filter: template=teacher|student, include=all or return $pages->filter("template=teacher|student, include=all") In any other compatible fieldtype, it works just as it should, using php code or just the selector, showing me every teacher/student. But using the PageAutoComplete, it never finds the hidden or unpublished pages. Is it a bug? Or am I doing something wrong?
  15. This probably won't be useful to most people, but this is a module I put together a couple weeks ago for my own needs. I thought it might be helpful with a question that came up in another thread, so just wanted to post it here too since I figured all the modules should be listed here. ProcessWire Modules Fieldtype Fieldtype that stores reference to one or more other modules. This is similar to FieldtypeModule except that it stores multiple modules. It uses asmSelect to make the selection sortable/searchable. To install Copy to /site/modules/ and go to Admin > Modules > Check for new modules. Usage notes Note the configuration settings that appear on the details tab when creating a new field that uses this module. Lets say you created a field called my_modules that uses this Fieldtype. The value of your $page->my_modules will be a PHP array. When $page->outputFormatting is TRUE, the values of the array will be selected module objects (already instantiated/initialized). When output formatting is FALSE, the values will be module IDs (integers). Those IDs can be converted to either the module class name or an instance of the module using existing $modules API methods. Download https://github.com/ryancramerdesign/FieldtypeModules
  16. Interested module boards for the removal of rooms for tourists. How difficult it is in arranging and the cost? I am not a programmer myself I can not do such a thing. Like: http://slando.ua/nedvizhimost/arenda-komnat/ - Ukranian site.
  17. Hi, guys. I need your help with my firs very basic module (the code is below). So here go my questions: 1) I want to place this links on the left from submit button. The thing is I can't do this with PHP because jquery script modifies the page after it's loaded (for ex. the bottom submit button is copied by jquery script to the top). So I'm not sure how I should handle it. I suppose using additional jquery script wich adds my links, but I don't really know how to do this. Should I use $this->script->add? Is it right to extend ModuleJS in this case instead of WireData? Where should I hook to inject my jquery? For now the links are placed for testing purpose near the logo at the top. 2) I can't get it working on the module edit pages and I don't know why. I think maybe it's because of the find() method is overriden in Modules class. I commented this part. 3) Is it the code too ugly and this could be solved using just a one-liner? Not so much related questions: 1) Wouldn't it be better to initially generate admin pages using php and let jquery only init classes of elements, so that when a page is hooked after rendering it has more predictable structure. Is it possible at all, or maybe I'm overcomplicating things and there is an easier way to handle this problem? 2) Does anybody uses 3rd party libs to handle DOM manipulation or just DOMdocument and Xpath? Thank you in advance. I'm going to go sleep now so won't be able to discuss it in the nearest hours <?php class PageNextPrevLinks extends ModuleJS implements Module { /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * * @return array * */ public static function getModuleInfo() { return array( 'title' => 'Page Next Prev Links', 'version' => 101, 'summary' => 'This module places next and prev links in a page\'s editor if the page has siblings.', 'href' => 'http://www.processwire.com', 'singular' => true, 'autoload' => false, ); } public function init() { if($this->user->isGuest()) return; $this->addHookAfter('Page::render', $this, 'addLinks'); } public function addLinks($event) { //get current page $editpage = $event->object; //if it's not one of the edit pages then exit //if(!in_array((string) $editpage->process, array('ProcessPageEdit', 'ProcessTemplate', 'ProcessField', 'ProcessLanguage'))) return; $adminUrl = $this->config->urls->admin; $siblings = New PageArray(); if ($editpage->process == 'ProcessPageEdit') { $page = $this->pages->get($this->input->get->id); $siblings = $page->siblings("include=all"); $adminUrl .= 'page/'; } elseif ($editpage->process == 'ProcessTemplate' && isset($this->input->get->id)) { $page = $this->templates->get($this->input->get->id); $siblings = $this->templates->find(''); $adminUrl .= 'setup/template/'; } elseif ($editpage->process == 'ProcessField' && isset($this->input->get->id)) { $page = $this->fields->get($this->input->get->id); $siblings = $this->fields->find(''); $adminUrl .= 'setup/field/'; } elseif ($editpage->process == 'ProcessLanguage' && isset($this->input->get->id)) { $page = $this->languages->get($this->input->get->id); $siblings = $this->languages->find(''); $adminUrl .= 'setup/languages/'; } elseif ($editpage->process == 'ProcessUser' && isset($this->input->get->id)) { $page = $this->users->get($this->input->get->id); $siblings = $this->users->find(''); $adminUrl .= 'access/users/'; } elseif ($editpage->process == 'ProcessRole' && isset($this->input->get->id)) { $page = $this->roles->get($this->input->get->id); $siblings = $this->roles->find(''); $adminUrl .= 'access/roles/'; } elseif ($editpage->process == 'ProcessPermission' && isset($this->input->get->id)) { $page = $this->permissions->get($this->input->get->id); $siblings = $this->permissions->find(''); $adminUrl .= 'access/permissions/'; } //TODO can't get it working, throws an error /*elseif ($editpage->process == 'ProcessModule' && isset($this->input->get->name)) { $page = $this->modules->get("{$this->input->get->name}"); $siblings = $this->modules->find(''); $adminUrl .= 'module/'; }*/ $out = ""; //generate next & prev links output if (count($siblings)) { if (($prev = $siblings->getPrev($page)) && $prev) { $out .= "<a href='{$adminUrl}edit/?id={$prev->id}'>< prev</a>";//« prev</a>"; } if (($next = $siblings->getNext($page)) && $next) { //$out .= $out ? " • " : ""; $out .= $out ? " | " : ""; $out .= "<a href='{$adminUrl}edit/?id={$next->id}'>next ></a>";//'>next »</a>"; $out .= $next->id; } if ($out <> "") $out = "<div class='NextPrevLinks'>".$out."</div>"; } $event->return = str_replace('<p id="logo">ProcessWire</p>', $out.'<p id="logo">ProcessWire</p>', $event->return); return $event->return; } }
  18. This behavior has been integrated in current nightly build of PW 2.2. It can be configured via WireTabs module settings. StayOnTab (Module for Processwire2+) This new module remembers the active tab you are on and opens it after saving, or reloading page. https://github.com/somatonic/StayOnTab This is still in progress. Just wanted to share and recieve some feedback.
  19. Just recently installed the Twitter Puller module, going to really have fun with that puppy i think . When i first 'checked for new modules' - the page refreshes and then says it found TwitterPuller. Now, upon trying to search for it, i'm left to rescan the entire page to see where it was placed (or at least I did that). Suggestion: Upon 'checking for new modules' - and upon successfully finding one or more new modules, whereby it states such in the green bar at the top, can you please name-tag hyper link that new module to the location on that page. Typically speaking if someone checked for new 'non-Core' modules, they're looking to ultimately install it . That way it'll make it easier to find and thus hit that beautiful install [submit] button .
  20. Hello all! Until we wait for Ryan's full-fledged Matrix Inputfield, I present the Plaintext Matrix Textformatter Transform your textareas into matrixes: enter your records in plaintext – ProcessWire query syntax, and upon page loading, get your data back as array of objects with typed values! Download and readme: http://github.com/adamkiss/pwTextformatterPlaintextMatrix Have a nice day!
  21. As I said I've been thinking about creating a kind of short cut InputfieldType similar to ryan's idea of repeatable fields. But this one would allow to manage a page's hidden child pages of a set of allowed templates skipping the way through the page tree. It's something I think would help people editing contents to work faster and avoid mistakes. And it still would keep the data hierarchically consistent within the tree. In the case of Repeatable Fields I guess it's all based upon FieldtypeMultiple and ryan stores the IDs of the hidden pages representing the single repeatable elements in the DB like in FieldtypePage. The point is, that - in case of my Fieldtype's idea - it wouldn't make sense to store any additional information in the db, as all information would be already stored within the pages' relations within the page tree (children, IDs, sort values). But when I'm not totally wrong, the Fieldtypes expect a DB scheme to be provided for installation, saving and getting values. Which methods do I have to override to work around using an own DB scheme and just provide data from API calls? Is it possible at all?
  22. Hi, I don't really understand how to use the jquery modules. Until now I just loaded jquery and fancybox directly from my template, but this might not be the best way to go (although it gives the possibility to combine and compress all .js & .ccs files to improve loading times). What should I do to load jquerycore and fancybox using the modules? Thanks in advance! /Jasper
×
×
  • Create New...