Search the Community

Showing results for tags 'request'.



More search options

  • 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

Found 42 results

  1. How to set the image quality as per desired.. I tried using the above code but I get the original image size.. <!--Content with Image left--> <?php $i = 2; foreach($page->page_content as $each) { if( $i%2 == 0 ){ ?> <section class="imageblock about-1"> <div class="imageblock__content col-md-6 col-sm-4 pos-left animated fadeInLeft"> <div class="background-image-holder"> <?php $option1 = array( 'quality' => 60, 'upscaling' => true, 'cropping' => true, ); $pravin= $each->single_image->size(790,650,$option1); ?> <img alt="image" src="<?php echo $pravin->url; ?>" /> </div> </div> <div class="container container-body"> <div class="row"> <div class="col-md-5 col-md-push-7 col-sm-8 col-sm-push-4 animated fadeInUp"> <?php echo $each->body; ?> </div> </div> <!--end of row--> </div> <!--end of container--> </section> <!--Content with Image on left--> <?php } else { ?> <!--Content with Image on right--> <section class="imageblock about-1"> <div class="imageblock__content col-md-6 col-sm-4 pos-right animated fadeInRight"> <div class="background-image-holder"> <?php $pravin= $each->single_image->size(790,650,$option1); ?> <img alt="image" src="<?php echo $pravin->url; ?>" /> </div> </div> <div class="container container-body"> <div class="row"> <div class="col-md-5 col-sm-8 animated fadeInUp"> <?php echo $each->body; ?> </div> </div> <!--end of row--> </div> <!--end of container--> </section> <?php } ++$i; } ?> <!--Content with Image on right-->
  2. Im just wondering if there's a way to implement multi stage or multi step form with the Form builder module. An example would be this: http://www.jquery-steps.com/Examples#advanced-form
  3. Hi Folks, I like to develop a Backend Module with extra tabs and nested fields. Is there any Example Code for my Idea ? The Module should create new fields, a new Tab and several fields on it. AND... Last but not least the fields depend on each other by rules like "if checkbox $a then unfold area with Textfield 1+2 " If someone have a snippet for me to learn ... it would be soooo great. Thanks. Michael
  4. Hi gang, I've finished up a site for a local newspaper. Right now I'm looking at the ScheduledPages plugin whereas, of course, I can schedule pages to publish on certain dates and times. I was wondering if there is a variation of this module that allows one to schedule when pages are published in addition to posting the page link to my clients FaceBook business page wall? So, in simple terms a news article can be scheduled to publish at a given date/time and then when it fires off also post a link to that article/page to my clients FaceBook business page wall. thanks!
  5. Hi guys, i give up. Since last night, i try to get the module setting inside a module function. I do it as the many ways i have found on the forum and wiki and documentation but nothing works! I think i have a big stone in my head.... class CommentFilterAntispamguard extends CommentFilter implements Module, ConfigurableModule { public static function getModuleInfo() { return array( 'title' => __('Comment Filter: Antispam Guard', __FILE__), 'version' => 102, 'summary' => __('Uses a couple of filters to protect your comments from spam.', __FILE__), 'permanent' => false, 'singular' => false, 'autoload' => false, 'requires' => 'FieldtypeComments', ); } static public function getDefaultConfig(){ return array( 'require_email_author' => '', 'honeypot' => '', 'already_commented' => 'checked', 'gravatar_check' => '', 'bbcode_check' => 'checked', 'advanced_check' => 'checked', 'regexp_check' => '', 'spam_ip_local' => '', 'dnspl_check' => '', 'approve_comment' => '' ); public function __construct() { parent::__construct(); $this->comment->ip = $this->get_client_ip(); foreach(self::getDefaultConfig() as $key => $value) { $this->$key = $value; } } private static function _verify_comment_request($comment){ /* Kommentarwerte */ $ip = $comment->ip; $url = $comment->website; $body = $comment->text; $email = $comment->email; $author = $comment->cite; /* Optionen */ /* Bereits kommentiert? */ if ( $data['already_commented'] && ! empty($email) && self::_is_approved_email($email) ) { return; } /* Check for a Gravatar */ if ( $data['gravatar_check'] && ! empty($email) && self::_has_valid_gravatar($email) ) { return; } /* Bot erkannt if ( ! empty($_POST['ab_spam__hidden_field']) ) { return array( 'reason' => 'css' ); } */ /* Action time if ( isset $this->data['time_check'] && self::_is_shortest_time() ) { return array( 'reason' => 'time' ); } */ /* BBCode Spam */ if ( $data['bbcode_check'] && self::_is_bbcode_spam($body) ) { return array( 'reason' => 'bbcode' ); } /* Erweiterter Schutz */ if ( $data['advanced_check'] && self::_is_fake_ip($ip) ) { return array( 'reason' => 'server' ); } /* Regexp für Spam */ if ( $data['regexp_check'] && self::_is_regexp_spam( array( 'ip' => $ip, //'host' => parse_url($url, PHP_URL_HOST), 'body' => $body, 'email' => $email, 'author' => $author ) ) ) { return array( 'reason' => 'regexp' ); } /* IP im lokalen Spam */ if ( $data['spam_ip_local'] && self::_is_db_spam($ip, $url, $email) ) { return array( 'reason' => 'localdb' ); } /* DNSBL Spam */ if ( $data['dnsbl_check'] && self::_is_dnsbl_spam($ip) ) { return array( 'reason' => 'dnsbl' ); } } static public function getModuleConfigInputfields(array $data) { $inputfields = new InputfieldWrapper(); $name = "require_email_author"; if(!isset($data[$name])) $data[$name] = ''; $f = Wire::getFuel('modules')->get('InputfieldCheckbox'); $f->attr('name', $name); $f->attr('checked', $data[$name] ? 'checked' : '' ); $f->label = __('Require E-Mail'); $f->description = __('Require the E-Mail from commenters.'); $inputfields->add($f); $name = "honeypot"; if(!isset($data[$name])) $data[$name] = ''; $f = Wire::getFuel('modules')->get('InputfieldCheckbox'); $f->attr('name', $name); $f->attr('checked', $data[$name] ? 'checked' : '' ); $f->label = __('Activate Honeypot'); $f->description = __('Add a hidden Field to your Commentform to protect from Spambot.'); $inputfields->add($f); $name = "already_commented"; if(!isset($data[$name])) $data[$name] = ''; $f = Wire::getFuel('modules')->get('InputfieldCheckbox'); $f->attr('name', $name); $f->attr('checked', $data[$name] ? 'checked' : '' ); $f->label = __('Trust approved commenters'); $f->description = __('Always approve previously approved users.'); $inputfields->add($f); $name = "gravatar_check"; if(!isset($data[$name])) $data[$name] = ''; $f = Wire::getFuel('modules')->get('InputfieldCheckbox'); $f->attr('name', $name); $f->attr('checked', $data[$name] ? 'checked' : '' ); $f->label = __('Trust Gravatar'); $f->description = __('Automatically approve Comments from Authors with Gravatar. (Pleas note the Privacy hint)'); $inputfields->add($f); $name = "bbcode_check"; if(!isset($data[$name])) $data[$name] = ''; $f = Wire::getFuel('modules')->get('InputfieldCheckbox'); $f->attr('name', $name); $f->attr('checked', $data[$name] ? 'checked' : '' ); $f->label = __('BBcode as Spam.'); $f->description = __('Review the comment contents for BBCode links.'); $inputfields->add($f); $name = "advanced_check"; if(!isset($data[$name])) $data[$name] = ''; $f = Wire::getFuel('modules')->get('InputfieldCheckbox'); $f->attr('name', $name); $f->attr('checked', $data[$name] ? 'checked' : '' ); $f->label = __('Validate commenters IP'); $f->description = __('Validity check for used ip address.'); $inputfields->add($f); $name = "regexp_check"; if(!isset($data[$name])) $data[$name] = ''; $f = Wire::getFuel('modules')->get('InputfieldCheckbox'); $f->attr('name', $name); $f->attr('checked', $data[$name] ? 'checked' : '' ); $f->label = __('Use regular expressions'); $f->description = __('Predefined and custom patterns by plugin hook (not now!).'); $inputfields->add($f); $name = "spam_ip_local"; if(!isset($data[$name])) $data[$name] = ''; $f = Wire::getFuel('modules')->get('InputfieldCheckbox'); $f->attr('name', $name); $f->attr('checked', $data[$name] ? 'checked' : '' ); $f->label = __('Look in the local spam database'); $f->description = __('Already marked as spam? Yes? No?.'); $inputfields->add($f); $name = "dnspl_check"; if(!isset($data[$name])) $data[$name] = ''; $f = Wire::getFuel('modules')->get('InputfieldCheckbox'); $f->attr('name', $name); $f->attr('checked', $data[$name] ? 'checked' : '' ); $f->label = __('Use public Spam database'); $f->description = __('Use the public Spam database from https://stopforumspam.com to check for knowen Spamer IP\'s.'); $inputfields->add($f); $name = "approve_comment"; if(!isset($data[$name])) $data[$name] = ''; $f = Wire::getFuel('modules')->get('InputfieldCheckbox'); $f->attr('name', $name); $f->attr('checked', $data[$name] ? 'checked' : '' ); $f->label = __('Auto Approve'); $f->description = __('Automatically approve all comments without spam.'); $inputfields->add($f); return $inputfields; } } I found many ways to get the settings inside the module. I read all of this posts: https://processwire.com/talk/topic/2318-create-your-first-module-with-configuration-settings-and-a-overview-page/ https://processwire.com/talk/topic/648-storing-module-config-using-api/ https://processwire.com/blog/posts/new-module-configuration-options/ (i think i can't use this at the moment!) https://processwire.com/talk/topic/5480-configurable-process-module-need-walk-through/ and many more... i have try if ( $this->data['already_commented'] ); if ( $data['already_commented'] ); if ( isset($this->data['already_commented']) ); if ( isset($this->already_commented) ); if ( isset($field->already_commented) ); nothing works! While i use $this i get this Error: Error: Using $this when not in object context (line 86 of site/modules/FieldtypeComments/CommentFilterAntispamguard.module) I don't know what i can do!!! Pleas help me, i'm despairing.
  6. Hello guys, I really like ProcessWire, but there are a few features I really miss. One of them is a global media manager with the ease of use like the one in WordPress. There is an old module out there that uses images as pages. So each "image" page has an image title field and a files/image field. I use this kind of media manager on some projects and it kind of works but isn't the best option. I created my own system that also allowed folders. Same as above: A image is a page, but I allowed a "folder" page that can have "folder" or "image" children. So I simulated folders in the page tree: I then created a selectImage and selectImages field, that was a PageTable. With this fields I could select the pages I want on a page to show up. The problems that system has: no support for multi-upload and no batch-like features like moving multiple "images" to another "folder". Now to my idea and the reason I write this post: I thought about this problem and I came up with a theory how it could work (without testing it yet): I create a File or Image field with infinite allowed files/images and I activate the tags property (which is currently only for images) and in the tags I would define the structure of this image. So in real life, all files are on the same level, but I simulate a folder structure by writing the location of a file in the media folder inside the tags property. An example: monkey.jpg with following tags: "zoo__animals". This would mean, that monkey.jpg is simulated to be located in /zoo/animals/monkey.jpg. I then need do hook in the way files are displayed and try to do some magic to create a UI that transforms the flat image/file-list into some nested folder structure like you now it from WordPress. Some problems that can come up: - All files would be in one big folder in assets/files/12345/... A huge folder with lots of images might not be that good in scaling... - File fieldtype currently doesn't support tags. Only images. Well, maybe this idea is total bullsh1t, but maybe someone has got a better idea. I need brains (to eat) to brainstorm! Let me know what you guys think about this chaotic concept of mine! Steve
  7. It occurred to me that a good addition to the forums would be some way for PW users to indicate support for a module idea. Similar to the Wishlist subforum but for functionality that belongs in a module rather than in the core. I'm thinking mainly of commercial modules, although if someone wanted to take up a module request and release it freely that would be cool. So users could propose a module idea, then others would vote for it (using likes or some special voting option) so that a vote means "I'd buy that", with the expectation of pricing in the general ballpark of Ryan's pro modules and Apeisa's PadLoper. As a beginner-intermediate developer I'm really enjoying working with PW and learning as I go - the API is so intuitive that I've been able to build my own solutions to things that in another CMS I would have been reliant on someone else's module to achieve. But there are things that I know are beyond my current skills, and for those things I look to third-party modules. My clients are non-profits and small businesses so I'm never likely to have the budget to commission a custom module alone. But there might be other PW users out there with similar needs and maybe that demand would make it worthwhile for an experienced developer to take on a proposal and release it as a commercial module. Currently there isn't a way to measure the demand for modules apart from occasional forum posts like "Is there a module that...?" Any thoughts on this? Here's a module request to start off with: I would be happy to buy a full-featured event calendar module. I've searched the module directory and the forums and Lindquist's module is the most feature-rich I've seen, but it's in an alpha proof-of-concept state and some important functions aren't implemented. Features I would be looking for are: Calendar grid interface in admin, allowing for easy addition and editing of events. (Nice but non-essential) Week and day views in admin, in addition to month view, with drag editing for event date and duration (I'm dreaming of something awesome like the dhtmlxScheduler interface or Fullcalendar interface). Although drag operations would really need an undo to correct accidental edits, so this may be more trouble than it's worth. Events are edited in a modal window, to avoid losing one's place in the calendar. Recurring events, with user-friendly selection of recurrence options. The ability to individually edit or remove an event that is a child of a recurring event (i.e. make an exception for that individual event). (Nice but non-essential) A couple of out-of-the-box minimal rendering options for the frontend (read-only calendar view, list view). This is the kind of module I need frequently. I've been lucky that I haven't had a client request a full event calendar since I've been using PW, but it's only a matter of time. I'm sure there are other PW users who need this and who would, like me, be happy to pay for such a module.
  8. I have been using ProcessWire for quite some time now and so far I have not found a single thing I dislike about it. But I have yet to find a module for ProcessWire that implements SimpleSAMLphp for logging in. I have never made modules for ProcessWire so do not even know where to start, the are quite a few plugins for other CMS's which implements this like the OneLogin plugin for WordPress which I have used on quite a few sites which have a need for SAML logins. But I would like to move some of them sites to ProcessWire but the lack of a SSO module is making it difficult task to move to ProcessWire on them sites. Any help with my sort of complicated situation would be appreciated.
  9. Hi Guys - I came across something that sounds pretty basic, but haven't found a module in PW for it yet. I'd like to ask you guys if you know of something here that could solve that. Need: Ability to upload pre defined banner sizes Rotate after each load of the page if more than 1 Present a simple click-through rate based on a period from x to y (last 30 days as default) Categories with banners within (in case there are multiple sponsors) I've used OpenX before, but had problems with it needed to be updated VERY frequently due to possible exploits and it was a little bit of a hassle. I'm also looking for something much more simple and that runs inside the CMS. I just wanted to throw this out there to see if anyone ever had the need for something similar and if there's any simple solution. Tks! jw
  10. A temporary fix in response to this request ProcessCommentsManagerEnhanced This is a slightly enhanced version of the current core ProcessCommentsManager. I've tested it in the current dev version of PW and it works fine. I cannot provide any guarantees nor support the module though ....it is a working-nicely-proof-of-concept. Download GitHub Install Just like any other ProcessWire module. It requires FieldtypeComments to be installed. You do not need to install ProcessCommentsManager. Demo Screen
  11. Visual Page Selector Released 31 March 2016 https://processwireshop.pw/plugins/visual-page-selector/ ******************************************************* ORIGINAL POST ******************************************************* Introducing VPS, a commercial visual page field selector. This is a pre-sale closed-beta version. This post is WIP and will be updated now and then. ############################ Many ProcessWire users use the 'one image per page' principle to manage and reuse images across their sites. This works fine. However, for site editors who mainly work with images, especially for larger sites, it is sometimes difficult to remember the pages where particular images reside. This module helps to solve this challenge. Harnessing the awesomeness that is ProcessWire, VPS provides a rich editing experience, enabling editors to search for, view, select, add, remove and delete page-images easily, in an easy to use and friendly interface. ProcessWire Lister is the workhorse behind the lightning-fast searches. Editors will be able to search for images by their descriptions, names, partial names, page names, templates, etc. Current Features Single-image mode Full search Batch add/Remove/Delete Image/Delete Page in page fields Image Browser Selectable pages as per page field settings + Lister filters Grid and List View Draggable sorting Responsive (almost fully ..iframes!) Planned Features Multi-image mode (there are times you want to group similar images in multi-image field in one page; e.g. the back, front and side of a car photo) Configurable CSS on the fly resizing vs real image resizing (image resizing can quickly hog memory) Other as per feedback from beta testing FAQs When will this be available? Soon. How much will it cost? Reasonably priced. Announcement soon. Where will I be able to buy this from? At all fine stores that stock quality ProcessWire products Do we really need another page field/inputfield select? See links below. What type of licenses will be available? Soon to be announced. Can I beta test this? Thanks for the interest but all available slots have been taken. Video (excuse the video quality please - too many takes....) Screens Previous Discussions https://processwire.com/talk/topic/10927-wishlist-select-pages-by-thumbnail/ https://processwire.com/talk/topic/4330-get-image-from-other-pages-via-images-field/ https://processwire.com/talk/topic/417-extending-image-field/?p=6982 https://processwire.com/talk/topic/7073-profield-table-and-gallery/ https://processwire.com/talk/topic/3200-image-management-concerns-is-processwire-suitable-for-me/ https://processwire.com/talk/topic/425-file-manager/ https://processwire.com/talk/topic/10763-asset-manager-asset-selector/
  12. FieldtypeRuntimeMarkup and InputfieldRuntimeMarkup Modules Directory: http://modules.processwire.com/modules/fieldtype-runtime-markup/ GitHub: https://github.com/kongondo/FieldtypeRuntimeMarkup This module allows for custom markup to be dynamically (PHP) generated and output within a page's edit screen (in Admin). The value for the fieldtype is generated at runtime. No data is saved in the database. The accompanying InputfieldRuntimeMarkup is only used to render/display the markup in the page edit screen. The field's value is accessible from the ProcessWire API in the frontend like any other field, i.e. it has access to $page and $pages. The module was commissioned/sponsored by @Valan. Although there's certainly other ways to achieve what this module does, it offers a dynamic and flexible alternative to generating your own markup in a page's edit screen whilst also allowing access to that markup in the frontend. Thanks Valan! Warning/Consideration Although access to ProcessWire's Fields' admin pages is only available to Superusers, this Fieldtype will evaluate and run the custom PHP Code entered and saved in the field's settings (Details tab). Utmost care should therefore be taken in making sure your code does not perform any CRUD operations!! (unless of course that's intentional) The value for this fieldtype is generated at runtime and thus no data is stored in the database. This means that you cannot directly query a RuntimeMarkup field from $pages->find(). Usage and API Backend Enter your custom PHP snippet in the Details tab of your field (it is RECOMMENDED though that you use wireRenderFile() instead. See example below). Your code can be as simple or as complicated as you want as long as in the end you return a value that is not an array or an object or anything other than a string/integer. FieldtypeRuntimeMarkup has access to $page (the current page being edited/viewed) and $pages. A very simple example. return 'Hello'; Simple example. return $page->title; Simple example with markup. return '<h2>' . $page->title . '</h2>'; Another simple example with markup. $out = '<h1>hello '; $out .= $page->title; $out .= '</h1>'; return $out; A more advanced example. $p = $pages->get('/about-us/')->child('sort=random'); return '<p>' . $p->title . '</p>'; An even more complex example. $str =''; if($page->name == 'about-us') { $p = $page->children->last(); $str = "<h2><a href='{$p->url}'>{$p->title}</a></h2>"; } else { $str = "<h2><a href='{$page->url}'>{$page->title}</a></h2>"; } return $str; Rather than type your code directly in the Details tab of the field, it is highly recommended that you placed all your code in an external file and call that file using the core wireRenderFile() method. Taking this approach means you will be able to edit your code in your favourite text editor. It also means you will be able to type more text without having to scroll. Editing the file is also easier than editing the field. To use this approach, simply do: return wireRenderFile('name-of-file');// file will be in /site/templates/ If using ProcessWire 3.x, you will need to use namespace as follows: return ProcessWire\wireRenderFile('name-of-file'); How to access the value of RuntimeMarkup in the frontend (our field is called 'runtime_markup') Access the field on the current page (just like any other field) echo $page->runtime_markup; Access the field on another page echo $pages->get('/about-us/')->runtime_markup; Screenshots Backend Frontend
  13. hello world sometimes it would very helpful if there would be a «cross asset selector». my idea is to upload the images/pdfs etc. just once in a manager (similar to soma's images manager) and then to be able to select the assets via regular image field (or a new one). clients wouldn't have to upload the images more than once (and crop, resize etc.) and it would save a lot of disk space. any feedback about the idea? thanks
  14. hey guys is there a way to have an autocomplete tag input in the image field? I've already activated the «use tags» checkbox, but it's only a simple text field. my idea is smth like this: http://modules.processwire.com/modules/inputfield-chosen-select/ the client has a lot of images which he should tag on its own. attached what I have so far. thanks
  15. Hello EveryPWdy! You look awesome today =) - my questions regarding Processwire Modules in blue! - Its my first post here and I would like to tell you guys; This is one of the best things i saw since I learned my little knowledge in PHP development! but i guess ill learn no more now with the power and simplicity of ProcessWire, the most advanced and simple CMS/-UFJJSWOHD or whatever each one of us call it My name is Socrates, I'm from Jordan. I'm now trying to Build cool Web and Mobile Applications using Process Wire.. I'm considering to Buy Modules from (PW) ProcessWire Store! Today I went to the bank, Just to fund my VISA and buy some modules here, but still don't know which one... Here is BLUE Can I Buy one or two modules, and try also the others on my local host as DEMO? Any Discount or Coupon for me if I buy 2 items or more? Today I've downloaded Many Awesome FREE PHP Scripts & Modules from ProcessWire FREE store. I Also Like those Advanced CMS Modules created by Ryan and ProcessWire Team as Web and Mobile applications when Converted into a very nice Native Web View with a Wonderful Responsive Template/Theme Built with the Best Web/Mob CMS called Processwire <- Looks better than "PW" in the eye of strangers ProcessWire Modules are a MUST BUY in my opinion, Unless you are a PHP guru developer with magic touches while Building PHP Modules on Process Wire. I want to buy some modules from Process Wire Store, but I'm still confused with which one to start. Each of ProcessWire Modules/Plugins written in PHP for newbies & beginners are getting my attention, and whats getting my attention more is Each Feature on each Best of the Best Process Wire CMS. Thank you Ryan! - (Founder of one of the Best CMS / Frameworks -> (Process Wire). "PW" -> ProcessWire -> a VS. Winner SEO Tool - Where everything is done automatically when looking on each page in details, after having some automatic CMS work with Processwire admin Dashboard. Processwire converts complicate into simplicity!
  16. I have searched the forum and google but couldn't find anything related. I want to show all field descriptions in admin forms as tooltips. Has this request really not come up before? I imagine a module that hooks into the Inputfield class, adds the description as title value to the inputfield and then makes use of https://jqueryui.com/tooltip/. Am I on the right track here? EDIT: I made a module "InputfieldHookAddTitle": <?php class InputfieldHookAddTitle extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Inputfield Hook Add Title', 'version' => 100, 'summary' => 'Adds title attribute to inputfields with field description as value', 'singular' => true, 'autoload' => true, ); } public function init() { $this->addHookBefore('Inputfield::render', $this, 'addTitle'); } public function addTitle(HookEvent $event) { $inputfield = $event->object; if ($inputfield->description == "") return; $inputfield->setAttribute('title', $inputfield->description); $event->return; } } This adds title attribute with value description to inputfields. Now I need to get rid of the original <p class="description"> tag which is set in the constructor method. How would I unset this? I don't see a unset method. And how do I add the Jquery tooltip js? EDIT: I managed to add the custom JS to the admin pages, thanks to Soma's blog post. In my site/templates/admin.php I added: // add tooltip JS to admin pages $modules->get('JqueryCore'); $modules->get('JqueryUI'); $config->scripts->add($config->urls->templates . "js/admintooltips.js"); and the admintooltips.js $(function() { var tooltips = $( "[title]" ).tooltip({ position: { my: "left top", at: "right+5 top-5" } }); }); Now I only need to get rid of the original description. Any pointers would be much appreciated.
  17. So in previous version of PW (2.1) we were using the modified FieldtypeComments as shown here to enable nested/threaded comments which isn't compatible with the current (2.5.3) version of PW. Now unfortunately since we have updated our old installation to the newest stable we can't use this feature. I know after reading this article that is is coming but is there anyway you guys could recommend to grab the needed files and integrate it into 2.5.3? Thanks!
  18. Hey Guys, I was wondering if anyone came across this before or, if I'm just crazy On different pages I use a simply Body field which is a instance of TinyMCE. If I call it directly as a standalone field ( $page->body ) it outputs line breaks ( <br /> ) in the paragraph where the empty lines in the text are. But, when I use the same field inside a repeater and output it using foreach ($page->slideshow as $slide ) $slide->body, it end the paragraph at each line break in the text. I find this super weird and kinda annoying since you have to use different stylings the create the same effect. Does anyone know why this is and how you could fix it? I would prefer it would always output <BR />'s instead of paragraph ends. thanx Bram
  19. FieldtypeMatrix and InputfieldMatrix Modules Directory: http://modules.processwire.com/modules/fieldtype-matrix/ GitHub: https://github.com/kongondo/FieldtypeMatrix The module Matrix enables you to save data from a 2D-Matrix table. The rows and columns of the matrix table are made up of pages retrieved via a ProcessWire selector or via a page field selection of parent pages. The matrix values are made up of the data input in the matrix cells, i.e. the 'intersection of rows and columns'. Example Usage You have Products whose prices vary depending on colour, size, material, etc. Using the Fieldtype, you can create a table with rows made up of colours and columns made up of sizes the combination of each making up their respective values (in this case price). So rather than creating multiple text fields to do the following: Colour Size Price Red Small £10 Red Medium £20 Red Large £30 Red X-large £35 Green Small £9 Green Medium £15 Etc... You can instead have the following in one field: Small Medium Large X-Large Red £10 £20 £30 £35 Green £9 £15 Blue Etc... Yellow Purple If you set a selector in the Field's settings, to retrieve pages to build your matrix's rows and columns, it follows that all pages using the template the Fieldtype is attached to will have identical rows and columns. In some cases, this could be the intention. For instance, you might have 'Car' pages, e.g. Audi, Volvo, Ford, Citroen, Mazda, BWM, etc., each of which uses a 'Cars' template that has a single FiedltypeMatrix called 'car_attributes'. If you set a selector to build the Fieldtype's rows and columns, your users can easily compare the cars based on a combination of different values. The following matrix table best illustrates this: Type Engine Size Fuel Efficiency Carbon Emissions Warranty Road Tax Price 1994 Audi brand 1 values, etc. 2000 Audi brand 2 2006 Audi brand 3 2012 Audi brand 4 Each of your car pages would have similar matrices. This allows you to make easy but powerful queries. Such a setup allows you to compare within and across car brands. Say you wanted to find out which car(s) offered the best value for money given certain parameters such as warranty, emissions etc. You can easily make such comparisons (see code below). You can also compare within one car type, e.g. which brand of BMWs does best in what area...The possibilities are endless. In the database, Rows and column pages data are stored as their respective page->id. Matrix-values store any data (varchar(255)). If instead you wanted a template's pages to each have a matrix built of different rows and columns, you would have to name a Multiple Page Field (attached to the same template as the as your matrix field) in the matrix field's settings. When editing those pages, your matrix table's rows and columns will be built using the published children pages of the 2 pages you select in the Multiple page field.. The module allows the creation of matrix tables of any sizes (rows x columns). The rows and columns dynamically grow/shrink depending on the addition of row/column pages that match what you set in the matrix field's settings (see its 'Details Tab'). Please note that, if such pages are deleted/trashed/hidden/unpublished, their data (and presence) in the matrix are also deleted. Entering values in the matrix You have three choices: Manually entry Uploading a comma delimited (CSV) file. This can be delimited by other characters (tab, pipe, etc); not just commas Copy-pasting CSV values. (Tip: you can copy paste directly from an Excel spreadsheet. Such values will be 'tab-delimited'). In addition, if your server supports it, in the field's settings, you can enable the use of MySQL's fast LOAD DATA INFILE to read and save your submitted CSV values. Note that for large tables, you may have to increase your PHP's max_input_vars from the default 1000 otherwise PHP will timeout/return an error and your values will not be saved. I have successfully tested the module with up to ~3000+ values (10x350 table), the Fieldtype is not really optimised (nor was it intended) to handle mega large matrix tables. For such, you might want to consider other strategies. Install Install as any other module. API + Output A typical output case for this module would work like this: The matrix's rows, columns and values are subfields of your matrix's field. So, if you created a field called 'products' of the type FieldtypeMatrix, you can access as: product.row, product.column and product.value respectively foreach($page->matrix as $m) { echo " <p> Colour: $m->row<br /> Size: $m->column<br /> Price: $m->value </p> "; } Of if you want to output a matrix table in the frontend: //create array to build matrix $products = array(); foreach($page->matrix as $m) $products[$m->row][$m->column] = $m->value; $tbody ='';//matrix rows $thcols = '';//matrix table column headers $i = 0;//set counter not to output extraneous column label headers $c = true;//set odd/even rows class foreach ($products as $row => $cols) { //matrix table row headers (first column) $rowHeader = $pages->get($row)->title; $tbody .= "<tr" . (($c = !$c) ? " class='even' " : '') . "><td class='MatrixRowHeader'>" . $rowHeader . "</td>"; $count = count($cols);//help to stop output of extra/duplicate column headers foreach ($cols as $col => $value) { //matrix table column headers $columnHeader = $pages->get($col)->title; //avoid outputting extra duplicate columns if ($i < $count) $thcols .= "<th class='MatrixColumnHeader'>" . $columnHeader . "</th>"; //output matrix values $currency = $value > 0 ? '£' : ''; $tbody .= "<td>" . $currency . $value . "</td>"; $i++; } $tbody .= "</tr>"; } //final matrix table for output $tableOut = "<table class='Matrix'> <thead> <tr class=''> <th></th> $thcols </tr> </thead> <tbody> $tbody </tbody> </table>"; echo $tableOut; The module provides a default rendering capability as well, so that you can also do this (below) and get a similar result as the first example above (without the captions). echo $page->matrix; Or this foreach($page->matrix as $m) { echo $m; } Finding matrix items The fieldtype includes indexed row, column and value fields. This enables you to find matrix items by either row types (e.g. colours) or columns (e.g. sizes) or their values (e.g. price) or a combination of some/all of these. For instance: //find all pages that have a matrix value of less than 1000 $results = $pages->find("products.value<1000"); //find some results in the matrix (called products) of this page $results = $page->products->find("column=$country, value=Singapore");//or $page->products->find("column=$age, value>=25"); //$country and $age would be IDs of two of your column pages Other more complex queries are possible, e.g. find all products that are either red or purple in colour, come in x-large size and are priced less than $50. Credits @Ryan on whose Fieldtype/InptufieldEvents this is largely based @charger and @sakkoulas for their matrix ideas Screens Field Details Tab Inputfield Larger matrix table Example output
  20. Good day! There was much talk about translatng PW recently. So this idea, if realised, probably could serve many... Translation is best done in context. So you can see on what page and doing what the user sees the string to be translated. One way I can think of in-context translation is allowing a translater to translate a string while browsing admin interface. A module I want to request should add markup to all translationable strings which will somehow highlight them when it is turned on. It should also be possible to (right?)click on that string and be linked to language translator page with corresponding file opened. What do you think about it?
  21. Is it possible to keep the modal open after saving? I regularly edit/test/change some content and it is kind of annoying to reopen the modal when i'm right into editing and just want to see, how it looks in the frontend. thanks!
  22. 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
  23. 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!
  24. I'd like to put up a bounty for the development of a Markdown editor for PW. Ace has been abandoned and I'm a fan of Markdown over standard wysiwyg editors. I'd like to see something similar to what they have in Ghost (minus the double panes). I'll start the bounty at $250 for anyone who is interested in putting something together that works. This would be a public module for the directory. Any takers?
  25. Hi all I don't know how to go about making this very specific thing in PW, so I'm hoping for some good pointers and/or ideas how to go about it. On this website I'm building for a music festival, there's a page called "archive". This page should list lots and lots of media clips from the past years from the festival. A media clip can be either a video (vimeo), music (soundcloud) or a picture (upload through admin). I have all the API access to the third parties figured out, but the one thing I can't figure out is how to design the media "resource" in PW. I've read that repeaters are bad for performance if you need a lot, so that leaves a repeater solution out of the question. Another solution I thought about were a page template with all the necessary fields for all of the different media types, but I'm thinking it'll create a unnecessary and unpleasantly long list of children in the admin interface. Also, each media clip doesn't need their own url, since all of them should be viewed/embedded in a Lightbox overlay. So what do I do? Should I create a custom module to store all the clips in and have an area in the admin to manage the clips separately and then just retrieve them in the archive page, or do you have any good ideas for me? Also, if the module method is the way forward, does anyone knows a good resource for me to start with? It could be a module like the one I need, a tutorial or anything that'll get me on my way. I hope for some deep PW knowledge getting dropped in the answers, like I'm used to in here. EDIT: Also, each media clip/item should have some common fields defined: Type of content (Art, architecture, music, etc) (selected from a predefined list of genres, which also should be administrated somewhere) Year Genre (selected from a predefined list of genres, which also should be administrated somewhere) Artist Location File type (video, sound, picture) (selected from a predefined list of genres, which also should be administrated somewhere)