Jump to content

DV-JF

Members
  • Posts

    281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by DV-JF

  1. Copy / Clone single pagetable-pages to another page Hi is it possible to clone / copy a pagetable-page to another "parent"-page with the same pagetable field via the backend? Many Greets, Jens.
  2. I figured out a new problem: I'm using repeaters in the layout template in order to give the editor the possibility to define some "same looking" boxes. Inside the repeaters there is amongst other things an image field. When I'm trying to resize it via the API like foreach($page->rep_imgTitleBody as $item) { $img = $item->sing_img->size(600,400)->url; $out = "<img src=\"{$img}\" alt=\"{$item->title}\">"; }; though it works on the frontend but in processwire backend I'm getting an error: Any ideas?
  3. That's really amazing !!! I'm using PW for such a long time but this is the first time I've heard about this feature... Really Cool, thx for the hint, even after years !
  4. @MadeMyDay Thank you... Much easier than I thougt
  5. Hi, I'm storing all my layouts under the "Repeater" page. Is it possible to get the parent page, I mean the page which is containing the specific pagetableextended via API? E.g.: When I'm trying to call $page->parent->name in lay_columns.php (one of files to render the output) it returns "repeater" wich is obviously because the repeater page is the parent. But I want to get the "original" parentpage where the pagetableextended field is stored. I'hope you understand me. Many greets!
  6. I deleted an older version manually and than tried to install the newer version via backend.
  7. Hello Horst, when I'm trying to install the new version I get an error: ( ! ) Notice: Undefined index: sharpening in D:\wamp\www\zaub\site\modules\CroppableImage3\FieldtypeCroppableImage3\FieldtypeCroppableImage3ConfAdaptor.php on line 96 Call Stack # Time Memory Function Location 1 0.0040 374752 {main}( ) ...\index.php:0 2 0.5650 13487256 ProcessWire\Wire->execute( ) ...\index.php:55 3 0.5650 13487528 ProcessWire\Wire->__call( ) ...\index.php:55 4 0.5650 13487528 ProcessWire\WireHooks->runHooks( ) ...\Wire.php:442 5 0.5650 13487904 ProcessWire\Wire->_callMethod( ) ...\WireHooks.php:698 6 0.5650 13487904 ProcessWire\ProcessPageView->___execute( ) ...\Wire.php:383 7 0.6430 14965016 ProcessWire\Wire->render( ) ...\ProcessPageView.module:205 8 0.6430 14965064 ProcessWire\Wire->__call( ) ...\ProcessPageView.module:205 9 0.6430 14965064 ProcessWire\WireHooks->runHooks( ) ...\Wire.php:442 10 0.6440 14966448 ProcessWire\Wire->renderPage( ) ...\WireHooks.php:782 11 0.6440 14966720 ProcessWire\Wire->__call( ) ...\WireHooks.php:782 12 0.6440 14966720 ProcessWire\WireHooks->runHooks( ) ...\Wire.php:442 13 0.6440 14967096 ProcessWire\Wire->_callMethod( ) ...\WireHooks.php:698 14 0.6440 14967096 ProcessWire\PageRender->___renderPage( ) ...\Wire.php:383 15 0.6480 14970688 ProcessWire\Wire->render( ) ...\PageRender.module:514 16 0.6480 14970736 ProcessWire\Wire->__call( ) ...\PageRender.module:514 17 0.6480 14970736 ProcessWire\WireHooks->runHooks( ) ...\Wire.php:442 18 0.6480 14971576 ProcessWire\Wire->_callMethod( ) ...\WireHooks.php:698 19 0.6480 14971576 ProcessWire\TemplateFile->___render( ) ...\Wire.php:380 20 0.6480 14990608 require( 'D:\wamp\www\zaub\site\templates\admin.php' ) ...\TemplateFile.php:268 21 0.6490 14991328 require( 'D:\wamp\www\zaub\wire\modules\AdminTheme\AdminThemeDefault\controller.php' ) ...\admin.php:13 22 0.6490 15028512 require( 'D:\wamp\www\zaub\wire\core\admin.php' ) ...\controller.php:13 23 0.6590 15076312 ProcessWire\Wire->execute( ) ...\admin.php:113 24 0.6590 15076360 ProcessWire\Wire->__call( ) ...\admin.php:113 25 0.6590 15076360 ProcessWire\WireHooks->runHooks( ) ...\Wire.php:442 26 0.6590 15076736 ProcessWire\Wire->_callMethod( ) ...\WireHooks.php:698 27 0.6590 15076736 ProcessWire\ProcessController->___execute( ) ...\Wire.php:380 28 0.6770 15619400 ProcessWire\Wire->executeEdit( ) ...\ProcessController.php:244 29 0.6770 15619448 ProcessWire\Wire->__call( ) ...\ProcessController.php:244 30 0.6770 15619448 ProcessWire\WireHooks->runHooks( ) ...\Wire.php:442 31 0.6770 15619824 ProcessWire\Wire->_callMethod( ) ...\WireHooks.php:698 32 0.6770 15619824 ProcessWire\ProcessModule->___executeEdit( ) ...\Wire.php:380 33 0.6810 15622488 ProcessWire\ProcessModule->renderEdit( ) ...\ProcessModule.module:1136 34 0.7190 15742248 ProcessWire\Wire->getModuleConfigInputfields( ) ...\ProcessModule.module:1213 35 0.7190 15742520 ProcessWire\Wire->__call( ) ...\ProcessModule.module:1213 36 0.7190 15742520 ProcessWire\WireHooks->runHooks( ) ...\Wire.php:442 37 0.7190 15742912 ProcessWire\Wire->_callMethod( ) ...\WireHooks.php:698 38 0.7190 15742912 ProcessWire\Modules->___getModuleConfigInputfields( ) ...\Wire.php:383 39 0.7260 15747744 call_user_func:{D:\wamp\www\zaub\wire\core\Modules.php:3582} ( ) ...\Modules.php:3582 40 0.7260 15747744 ProcessWire\FieldtypeCroppableImage3::getModuleConfigInputfields( ) ...\Modules.php:3582 41 0.7320 15807072 ProcessWire\FieldtypeCroppableImage3ConfAdaptor->getConfig( ) ...\FieldtypeCroppableImage3.module:478 Can you help me? I've tried to search for it, but found nothing. ProcessWire 3.0.62 © 2017 Many greets!
  8. Hi, I'm wondering if it's possible to change the date of the comment in backend without using the API. A customer of mine wants to adopt some comments from Facebook manually and therefore he needs to change the date? Many greets DV-JF alias Jens.
  9. Hello, I'm trying to get FormTemplateProcessor work with the fieldtype "Select Options". The problem is that FormTemplateProcessor takes the name of the field and sends this information via email. $value = htmlentities($this->contact->get($field->name)); No problem for all other fields, but when it comes to the "Select Options Field" only the ID's were send via mail. Is there a way to send the title instead of the ID? I've got no ideas - some hints are welcome Many greets, Jens alias DV-JF.
  10. Same problem for me. I've manually updated an old site from 2.3 to 2.7.1 and get this error: Any ideas?
  11. Hey horst, thank you for this hint! Exactly, what I've searched for!
  12. Hi, I'm using this function to resize my pictures for responsive images <?php function respImg($img,$description="",$class="") { $mini = 200; $small = 400; $medium = 640; $large = 960; $xlarge = 1280; $xxlarge = 2400; $out = "<img src='{$img->width($mini)->url}' data-sizes='auto' data-srcset=' {$img->width($mini)->url} {$mini}w, {$img->width($small)->url} {$small}w, {$img->width($medium)->url} {$medium}w, {$img->width($large)->url} {$large}w, {$img->width($xlarge)->url} {$xlarge}w' {$img->width($xxlarge)->url} {$xxlarge}w' alt='{$description}' class = '{$class} lazyload' /> "; return $out; };?> When I try to commit a cropped image I get following error: Is it possible to crop the via module cropped images again in order to deliver responsive images? What would you do? Many greets, Jens.
  13. Hi, I'm using this module to display some different sections on the homepage of a webseite like in this example: https://processwire.com/talk/topic/7459-module-pagetableextended/#entry71793 My home template file looks like this: $page = $pages->get(1021); // This is a Site for storing all sections of the homepage foreach($page->children as $child) { require($child->template .'.php'); }; $mainContent = $out; Here's an example of one of my child-templates: <?php /* section-slider.php - Template File for a Slider*/ // Check if Back- or Frontend if(isset($options['pageTableExtended'])){ $useMain = false; $out = ""; $addJS = ""; } // Check if is in frontend else { $page = $child; }; // Starting output $images = $page->images; $mini = 320; $small = 640; $medium = 900; $large = 1200; $xlarge = 1680; $out .= " <section id='{$page->name}' class='slides'>"; foreach($images as $img) { $out .= "<img src='{$img->width($mini)->url}' srcset='{$img->width($mini)} {$mini}w, {$img->width($small)} {$small}w, {$img->width($medium)->url} {$medium}w, {$img->width($large)->url} {$large}w, {$img->width($xlarge)->url} {$xlarge}w' alt='{$img->description}'>"; }; $out .= " </section>"; // Load JS and CSS Files $inlineJS .= " <script> $(function() { $('.slides').slidesjs({ width: 1200, height: 900, navigation: { effect: 'fade' }, pagination: { effect: 'fade' }, effect: { fade: { speed: 3000 } }, play: { active:true, auto: true, swap: false, effect: 'fade', pauseOnHover: false, interval: 5000 } }); }); </script>"; array_push($cssFiles,"css/slides.css"); array_push($jsFiles,"js/jquery.slides.min.js"); // Check if backend if(isset($options['pageTableExtended'])){ echo($out); } Two questions: 1. I'm wondering if it's possible to redirect the children of the site to the parent-site or to the homepage, when a user tries to visit the childpage directly, so that it's not possible to visit the child-page directly. 2. How are the child-pages sorted? When I try to sort them via drag&drop here: this don't effect the frontpage. I've to sort the child-pages to get the correct sortorder here: Where can I change it, so that the childpages are sorted correctly? Many greets, DV-JF alias Jens.
  14. Hi Nicolas, I really like this site. While browsing I've found two things to mention: Here the text is really hard to read: When switching to "medium-screen-size" there seems to be an error: Before you may ask: I'm using this really great tool to inspect the mobile breakpoints: http://lab.maltewassermann.com/viewport-resizer/ Many greets, Jens alias DV-JF
  15. Hello everybody, I would like to show you one of my last projects: http://www.effectiveminds.de Would be great if you could give me some feedback ! Here some technical details: Main modules used:FieldtypeCropImage FieldtypeMapMarker ProcessRedirects Front-End-Scripts:Stellar.js jQuery Easing Magnific Popup jQuery Waypoints
  16. Thx again Adrian. btw: is it possible to edit the title by myself?
  17. You are my heros !!! Thank you so much!!! Is this somewhere documented?
  18. I've done this before. EDIT: Sorry, didn't know that this will have no effect if trying to target the field form a module I've change this line: $slides = $this->pages->find("section_img!=''"); to $slides = $this->pages->find("section_img.count>0"); but still get this error: Session: Method Pageimages::getThumb does not exist or is not callable in this context. @Horst and Soma: This code I've posted first was working when it was a template file. Now I'm trying to migrate it to a module in order not to be loaded everytime a page is visited. This is how I init the funktion: public function init() { $this->pages->addHookAfter('save', $this, 'createcss'); } Any ideas?
  19. Hi, I'm trying to build my first module: It should create a css file for responsive background images. In order to do this I'm searching for a specific field (section_img) and try to write all thumbs - build with Apeisa Thumbnails Module - to an array. After this I'm looping through this array and return the css structure. I first tried out this code on a normal page-template and everything works fine. Now when I try to execute the code I get an error: Session: Method Pageimages::getThumb does not exist or is not callable in this context Here's an excerpt of the code: public function createcss($event) { $slides = $this->pages->find("section_img!=''"); $name = array(); $smp = array(); $sml = array(); $lmp = array(); $lml = array(); $tap = array(); $def = array(); foreach($slides as $s) { $bgImg = $s->section_img; array_push($name,$s->name); array_push($smp,$bgImg->getThumb('small-mobile-portrait')); array_push($sml,$bgImg->getThumb('small-mobile-landscape')); array_push($lmp,$bgImg->getThumb('large-mobile-portrait')); array_push($lml,$bgImg->getThumb('large-mobile-landscape')); array_push($tap,$bgImg->getThumb('tablet-portrait')); array_push($def,$bgImg->url); }; // Small Mobile - Portrait $out = "@media only screen and (max-width: 320px) {.slide.imgContainer{min-height:20rem;}"; for($i = 0; $i <= 5; $i++) { $out.=".section_".$name[$i]."{background-image:url('".$smp[$i]."');}"; } $out.= "}"; // Small Mobile - Landscape $out.= " @media only screen and (min-width: 320.1px) and (max-width: 480px) {.slide.imgContainer{min-height:30rem;}"; for($i = 0; $i <= 5; $i++) { $out.=".section_".$name[$i]."{background-image:url('".$sml[$i]."');}"; }; $out.= "}"; // Large Mobile - Portrait $out.= " @media only screen and (min-width: 320.1px) and (max-width: 480px) and (orientation: portrait) {.slide.imgContainer{min-height:30rem;}"; for($i = 0; $i <= 5; $i++) { $out.=".section_".$name[$i]."{background-image:url('".$lmp[$i]."');}"; }; $out.= "}"; // Large Mobile - Landscape $out.= " @media only screen and (min-width: 480.1px) and (max-width: 960px) and (orientation: landscape) {.slide.imgContainer{min-height:30rem;}"; for($i = 0; $i <= 5; $i++) { $out.=".section_".$name[$i]."{background-image:url('".$lml[$i]."');}"; }; $out.= "}"; // Tablets - Portrait $out.= " @media only screen and (min-width: 480.1px) and (orientation: portrait) {.slide.imgContainer{min-height:50rem;}"; for($i = 0; $i <= 5; $i++) { $out.=".section_".$name[$i]."{background-image:url('".$tap[$i]."');}"; }; $out.= "}"; // Default Desktop $out.= " @media only screen and (min-width: 960.1px) {"; for($i = 0; $i <= 5; $i++) { $out.=".section_".$name[$i]."{background-image:url('".$def[$i]."');}"; }; $out.= "}"; $css = fopen("/css/resbg.css", 'w'); fwrite($css, $out); fclose($css); } Any ideas how I con use the ->getThumb() method working? Many greets, Jens.
  20. Hi adrian, hi Soma, adrian, you where right: I have set a field decency in this template wrong: Used =* instead of *= Thanks for the hint...
  21. Hi, when I try saving a specific page I get an error: Unknown Selector operator: '=*' -- was your selector value properly escaped? When I put on debug mode: TemplateFile: Unknown Selector operator: '=*' -- was your selector value properly escaped?<pre>#0 D:\wamp\www\example\wire\core\Selectors.php(193): Selectors->create('body', '=*', 'linklist') #1 D:\wamp\www\example\wire\core\Selectors.php(62): Selectors->extractString('body=*'linklist...') #2 D:\wamp\www\example\wire\modules\Inputfield\InputfieldForm.module(105): Selectors->__construct('body=*'linklist...') #3 D:\wamp\www\example\wire\modules\Inputfield\InputfieldForm.module(66): InputfieldForm->processInputShowIf(Object(WireInputData), Array) #4 [internal function]: InputfieldForm->___processInput(Object(WireInputData)) #5 D:\wamp\www\example\wire\core\Wire.php(359): call_user_func_array(Array, Array) #6 D:\wamp\www\example\wire\core\Wire.php(317): Wire->runHooks('processInput', Array) #7 D:\wamp\www\example\wire\modules\Process\ProcessPageEdit\ProcessPageEdit.module(696): Wire->__call('processInput', Array) #8 D:\wamp\www\example\wire\modules\Process\ProcessPageEdit\ProcessPageEdit.module(696): InputfieldForm->processInput(Object(WireInputData)) #9 [internal function]: ProcessPageEdit->___processInput(Object(InputfieldForm)) #10 D:\wamp\www\example\wire\core\Wire.php(359): call_user_func_array(Array, Array) #11 D:\wamp\www\example\wire\core\Wire.php(317): Wire->runHooks('processInput', Array) #12 D:\wamp\www\example\wire\modules\Process\ProcessPageEdit\ProcessPageEdit.module(159): Wire->__call('processInput', Array) #13 D:\wamp\www\example\wire\modules\Process\ProcessPageEdit\ProcessPageEdit.module(159): ProcessPageEdit->processInput(Object(InputfieldForm)) #14 D:\wamp\www\example\wire\modules\Process\ProcessPageEdit\ProcessPageEdit.module(109): ProcessPageEdit->processSave() #15 [internal function]: ProcessPageEdit->___execute() #16 D:\wamp\www\example\wire\core\Wire.php(359): call_user_func_array(Array, Array) #17 D:\wamp\www\example\wire\core\Wire.php(317): Wire->runHooks('execute', Array) #18 D:\wamp\www\example\wire\core\ProcessController.php(196): Wire->__call('execute', Array) #19 D:\wamp\www\example\wire\core\ProcessController.php(196): ProcessPageEdit->execute() #20 [internal function]: ProcessController->___execute() #21 D:\wamp\www\example\wire\core\Wire.php(359): call_user_func_array(Array, Array) #22 D:\wamp\www\example\wire\core\Wire.php(317): Wire->runHooks('execute', Array) #23 D:\wamp\www\example\wire\core\admin.php(64): Wire->__call('execute', Array) #24 D:\wamp\www\example\wire\core\admin.php(64): ProcessController->execute() #25 D:\wamp\www\example\wire\modules\AdminTheme\AdminThemeDefault\controller.php(13): require('D:\wamp\www\mar...') #26 D:\wamp\www\example\site\templates\admin.php(15): require('D:\wamp\www\mar...') #27 D:\wamp\www\example\wire\core\TemplateFile.php(140): require('D:\wamp\www\mar...') #28 [internal function]: TemplateFile->___render() #29 D:\wamp\www\example\wire\core\Wire.php(359): call_user_func_array(Array, Array) #30 D:\wamp\www\example\wire\core\Wire.php(317): Wire->runHooks('render', Array) #31 D:\wamp\www\example\wire\modules\PageRender.module(337): Wire->__call('render', Array) #32 D:\wamp\www\example\wire\modules\PageRender.module(337): TemplateFile->render() #33 [internal function]: PageRender->___renderPage(Object(HookEvent)) #34 D:\wamp\www\example\wire\core\Wire.php(359): call_user_func_array(Array, Array) #35 D:\wamp\www\example\wire\core\Wire.php(317): Wire->runHooks('renderPage', Array) #36 D:\wamp\www\example\wire\core\Wire.php(381): Wire->__call('renderPage', Array) #37 D:\wamp\www\example\wire\core\Wire.php(381): PageRender->renderPage(Object(HookEvent)) #38 D:\wamp\www\example\wire\core\Wire.php(317): Wire->runHooks('render', Array) #39 D:\wamp\www\example\wire\modules\Process\ProcessPageView.module(152): Wire->__call('render', Array) #40 D:\wamp\www\example\wire\modules\Process\ProcessPageView.module(152): Page->render() #41 [internal function]: ProcessPageView->___execute() #42 D:\wamp\www\example\wire\core\Wire.php(359): call_user_func_array(Array, Array) #43 D:\wamp\www\example\wire\core\Wire.php(317): Wire->runHooks('execute', Array) #44 D:\wamp\www\example\index.php(194): Wire->__call('execute', Array) #45 D:\wamp\www\example\index.php(194): ProcessPageView->execute() #46 {main}</pre> I don't know where I have to search for this error... Any hints? Many greets, Jens alias DV-JF.
  22. Hi netcarver, while writing my answer I tried out your last hint: The provider did some strange mapping via htaccess in the main folder: ## SITECON-CODE: SUBPATH (C167) ## RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.|)example.com$ [NC] RewriteCond %{REQUEST_URI} !(^/example.com/|^/sitecontrol|^/_md/|^/icons/) RewriteRule ^(.*)$ /example.com/$1 [L] ## SITECON-CODE: END (C167) ## That caused the error. I decided to move the Webseite to the main folder on the server and now everything works fine Many thankx !!!
  23. Hi all, I've been using PW now for quite a long time, but now I'm stuck with a strange URL rewrite problem and I don't know if it's a problem with my server setup or a PW specific problem: URL for the site: http://www.example.com/ FTP folder: www/example.com/ URL is maped to this folder In the htaccess I've set RewriteBase / Everything works fine, except, that the folder name is repeated in every URL after the domain (even the admin URL) when I click on a link, e.g.: http://www.example.com/example.com/team/The strange thing is that when I try to open the URL "as it should" be http://www.example.com/team/is also works I've tried different this like renaming setting RewriteBase /example.com but this doesn't change the behaviour.For testing I set up a subdomain http://neu.example.com/ and here everything is fine I don't know where to search any more, perhaps some of you guys may have an idea? Greets Jens alias DV-JF
  24. Thank you all... This was the point I was searching for. I also want to mention, that it is necessary to give the subpage / article page a template with the rights for the editor to edit it. Many greets, Jens.
×
×
  • Create New...