Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/04/2017 in all areas

  1. The most important CMS-updates in April by t3n: http://t3n.de/news/joomla-drupal-mehr-wichtigsten-819564/
    6 points
  2. usually what i do in these cases is add a page field to the template of the pagetable page, and set that field to the page that it is being edited from. I used a save hook on the main page to look at the items in the page table and for any where that page field is not set, it assigns that field to the page being edited (so setting the page field on the pagetable item to PageA). that field is also hidden using CSS.
    3 points
  3. I think this would do the job: $cloneable = $page->parent->addable($page); // boolean true/false Plus check that the user has the page-clone permission, as @arjen suggested.
    2 points
  4. Thanks @abdus, that gave me the clue to getting Tracy working in modals. Just uncheck the "Hide Debug Bar in Modals" options in the Tracy config.
    2 points
  5. This was bothering me when I was working on this question about PageTables. It appears that Tracy isn't included when page is called via a modal. Check this out // /site/modules/TracyDebugger/TracyDebugger.module public function init() { // ... // EARLY EXITS // modals if(in_array('regularModal', $this->data['hideDebugBarModals']) && $this->wire('input')->get->modal == '1') return; if(in_array('inlineModal', $this->data['hideDebugBarModals']) && $this->wire('input')->get->modal == 'inline') return; // ... } We need you @adrian, come back!
    2 points
  6. Hi Fred, here's some code that might be helpful. Also, make sure page numbers are enabled on the page's template (URLs tab in Setup > Templates > any-template). $limit = 10; $items = $pages->find("template=something, sort=name, limit=$limit"); $total = $items->getTotal(); if($total) { // there are results present $numPaginations = ceil($total / $limit); $pageNum = $input->pageNum(); if($pageNum == $numPaginations) { // you are on the last page of results } else if($pageNum == 1) { // you are on the first page of results } else if($pageNum > $numPaginations) { // beyond the last page, do a redirect or a 404 } else { // somewhere in the middle of the paginations } } else { // there were no results on any pagination } Also see the PaginatedArray type (PageArray is a PaginatedArray): http://processwire.com/api/ref/paginated-array/
    2 points
  7. Hi, here is a very useful tool that check your images in websites against responsiveness: https://github.com/ausi/respimagelint
    2 points
  8. ProcessWire is mentioned in the repository Awesome UIkit:
    2 points
  9. Fieldtype and Inputfield ImageMarker As of 02 January 2018 ProcessWire versions earlier than 3.x are not supported Version: Stable Project Page: Github Modules Directory: http://mods.pw/Bk OR http://modules.processwire.com/modules/fieldtype-image-marker/ Requires: ProcessWire 2.4 or greater ######################## About This module allows you to easily 'place markers' on an image. Each placed marker's position/coordinates (x and y) are saved in the field as well as the ID of the ProcessWire page the marker refers to. In the backend markers are placed on a specified base image. In the frontend, using each saved page ID you can then retrieve any information you want about the pages being referenced and display that on your website over the same base image you used in the backend. The module is useful for a diverse number of uses including: Product demonstration: place markers on various parts of your product to showcase its features. Using a bit of CSS and/or JavaScript you can create pop-up boxes displaying more information about that feature of the product. The information (in this case, feature), would be information you've stored in some field (e.g. a text field) in the page marker (i.e. the page being referenced by the coordinates). Office locations: place markers on a map showing global offices of a multinational company Points-of-Interest: place markers showing points of interest on a map or location or anything. The coordinates are saved as percentages. This means they will scale well with the image being marked. This module came about as a result of this request. @credits Ryan Cramer: This code borrows from his FieldtypeEvents. @credits Helder Cervantes: Module concept, HTML, CSS, JavaScript. @credits Roland Toth: CSS, Inspiration. API In the frontend, the field returns an array of ImageMarker objects. Each of these has the following properties info (integer): The page ID of the marker (i.e. the page being referenced by the marker. Using this, you can get the referenced page and have access to all its data. infoLabel (String): The title of the page (above) referenced by the marker (runtime only). x (Integer): The x-coordinate of the marker (%). y (Integer): The y-coordinate of the marker (%). You grab the properties as in any other PW field, e.g. $out = '<img src="'. $page->base_image->url . '" alt="">';// image to place markers on 'base_image' is the name of the file field foreach ($page->marker as $m) { // do something with the following properties $m->id;// e.g. $pages->get((int) $m->id); $m->x; $m->y; $m->infoLabel; } // the CSS and HTML are up to you but see InputfieldImageMarker.module for examples Frontend implementation is left to you the developer/designer
    1 point
  10. The first question to ask would probably be if it's even hosted on multiple instances.
    1 point
  11. Are the assets folders located and synced on all ec2 instances? Or hosted on a common file system all ec2 instances can access at the same time? How are the various EC2 instances mirrored? Did you need to install a script to have this work?
    1 point
  12. Hi @montapro, welcome to the PW forums. It's likely that HTML Purifier will strip javascript links regardless of the CKEditor config. So I think you'll have to set "Use HTML Purifier" to "No" in the field options if you want to insert links like that. JS links worked for me with HTML Purifier off.
    1 point
  13. Page cache under /site/assets/cache/Page might help as well, but it has to be there in the first place. Running a php script to backup the DB & force download the resulting sql file can help. Of course, this assumes that the DB is accessible using the credentials in config.php
    1 point
  14. Thanks alot ! The idea of looking at the console solved the problem , as i had javascript turned off in all of my browsers So i guess we can close this now .
    1 point
  15. Hi @adrian, just leaving this here now while I remember for when you are back. I'm not able to use Tracy inside a ProcessPageEdit hook when the page being edited is a PageTable page (i.e. in the modal window). In /site/ready.php (or /site/init.php)... $this->addHookBefore('ProcessPageEdit::execute', function($event) { bd('testing'); });
    1 point
  16. could be anything, permissions even. Can you revert to the old version? I've done some upgrades of really old site, but so far have been lucky; the worst thing sometimes is a module that is not compatible, so you may need to disable one by one the modules and see; check the logs from FTP; reset all permissions across the whole install, recursively.
    1 point
  17. I like to use the Connect Page Fields module but there is also another approach using an SQL query on the table of the Page field. An example... ...based on a suggestion from Ryan.
    1 point
  18. There's a module for exactly these kind of situations. https://modules.processwire.com/modules/connect-page-fields/
    1 point
  19. All your articles are stored in the database. You won't be able to find them in anywhere inside site directory, with or without FTP. You have to login to MySQL through cPanel or by other means to see your articles. How is it broken, are you getting any errors? Can you copy paste / post a screenshot of the error?
    1 point
  20. For a slider UI check out the new Jquery Ion Rangeslider module: http://modules.processwire.com/modules/jquery-ion-range-slider/ Or the earlier Range Slider module: https://modules.processwire.com/modules/range-slider/
    1 point
  21. Try this $fieldList = $fields->find('type%=PageTable'); foreach($fieldList as $f) { if($page->template->hasField($f)) { // page has the field } } Or simply: if($page->fields->find('type%=PageTable')->count)) { // page has a PageTable field } // check for a specific field if($myField = $page->fields->get('type%=PageTable')) { // $myField of PageTable type exists on this page. } Here I used find() method with a selector for matching type. You can be more specific, or use any other WireArray methods of course. https://processwire.com/api/ref/wire-array/
    1 point
  22. Check if you have installed the ProcessPageClone (/processwire/module/edit?name=ProcessPageClone) module. This installs a few permissions: You could check if these are stored on the role of your user. If you want to monitor changes by users on pages be sure to look at ProcessChangeLog or MarkupActivityLog.
    1 point
  23. Ok, so I've completed the first module and a detailed step by step write-up. https://abdus.co/blog/creating-a-simple-and-configurable-module-for-processwire/ It's a markup module that adds tracking code for analytics. It has hooks, hookable methods, and it's translatable and configurable. https://github.com/abdusco/pw-ga-lite Once I make sure it's ready to go, and write a good intro, I'll create a separate post for it.
    1 point
  24. Try turning off output formatting before setting values of fields, and also don't forget to save. $page->of(false); // turn of output formatting $page->a_field_of_fieldtype_page->add($anotherPageOrID); $page->save(); Or if your pagefield is set to a single value: $page->of(false); // turn of output formatting $page->a_field_of_fieldtype_page = $anotherPageOrID; $page->save();
    1 point
  25. Media Manager version 010 (released 28/04/2017) Happy to announce the latest release of Media Manager. Changelog As per this request, added option to confirm duplicate media overwrite on upload. This, obviously, only works when the setting Duplicate Media is set to overwrite existing media with the one being uploaded. If you have that option selected, you will see a new option 'Always confirm when replacing/overwriting duplicate media' in the Duplicate Media sub-section. Tick that and save if you want to use this option. On the Uploads Tab you should now see a 'Confirm Overwrite' checkbox toward the top right of that page. Unless that checkbox is ticked, you will not see 'Start' upload buttons. Made various strings used in success/error messages in JavaScript translatable This latest version is now available for download Screens 'Always Confirm Overwrites' setting 'Confirm Overwrites' checkbox unchecked 'Confirm Overwrites' checkbox checked
    1 point
  26. Hi, Similar discussion with some tips and pointers:
    1 point
  27. v0.0.2 released - a complete overhaul of the module. Custom Inputfield Dependencies now does the same thing but in a completely different way (thanks to a great idea from @adrian) The module no longer requires Hanna Code and inputfield dependencies are now set on the "Input" tab of "Edit Field". See the first post for all the details. If you are using v0.0.1 of the module then this is a breaking change and you will need to redefine your dependencies (sorry ). But the new approach taken in v0.0.2 is so much better that hopefully you'll find the change worthwhile.
    1 point
  28. Ah, great. I figured it out myself! We need to add all fields into a children array: $this->add( array( array( 'type' => 'Fieldset', 'name' => '_myfieldset', 'label' => 'Fieldset Label', 'collapsed' => Inputfield::collapsedYes, // Inputfield::collapsedNo 'children' => array( array( 'type' => 'select', 'name' => 'kit_type', 'label' => 'Select the Kit you are using', 'options' => array('uikit' => 'uikit'), 'required' => true, 'columnWidth' => 50, ), array( 'type' => 'text', 'name' => 'kit_fullpath', 'label' => 'directory site path to your kits scss sources', 'columnWidth' => 50, ) ), // close children ), // close fieldset //.. add more fields ));
    1 point
×
×
  • Create New...