-
Posts
1,424 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Juergen
-
Hello @ all, I use the new frontend editing of PW3 in some cases. Now I need to reload the page after changes were made in the modal dialog, because some text appear on the page depending on the changes (a lot of if-conditions that show or hide text depending on that changes). After saving the modal only the field which was edited changes. After I press the reload manually I can see all other changes on the page. Is there a way to reload the page automatically after the save button in the modal is pressed? Best regards Jürgen
-
I found the solution: My search term variable is $q. This is what causes the problems because I didnt include it $q. Instead I used $optionvalue as mentioned above So the syntax is manufacturer.title=$q Now I got the correct results thanks all
-
Unfortunately I got all pages of the site in the results. It doesnt matter what kind of syntax I use So this doesnt seem to work.
-
Hello @ all, I want to know if it is possible to make a site search also for select option fieldtype? In my case I use this fieldtype to choose the manufacturer of a product. The field itself is called "manufacturer". I have tried to include the field in my site search as "manufacturer", "manufactuer.title", manufactuer->title" but no luck. My goal is to include all products in the results if someone enters the manufacturer name in the search field. Any hints? Best regards
-
Hello @ all, I have discovered a problem with the new frontend editing in PW3. I use a field which is only visible under certain conditions (inputfield dependency). This makes it not working on frontend. I use the following code: <div edit="1001.myfield"> ... </div> "myfield" is only visible if another field has a specific value (dependency). In the backend "myfield" is visible because the other field has the correct value, but on the frontend the modal is empty. It seems that it doesnt check against the value of the other field. Possible but not elegant workaround would be to surround it with a fieldset and set the dependency to the fieldset. Has someone a better solution? Best regards
-
Pagination and filter pages with pages->find doesnt work properly
Juergen replied to Juergen's topic in General Support
Thanks adrian, I will try this. -
Hello @ all, I have created a product page where customers can filter products depending on various attributes. I dont want to show all product matches on one page so I use a pagination to split it. So far so good - everything works as expected. The problem starts when I press the pagination button to see the next page (fe page 2). Then all products will be shown instead of the selected ones. As you can see: The pagination shows all pages Here are some code examples: // Get all products matching the filter criteria $p = $pages->find("template=products$productkindselect$offerkindselect, limit=$itemnumber"); $resultcounter = count($p); if ($resultcounter > 0) { //loop through each item foreach ($p as $child) { //Output the children fe $child->title; } } The code for the pagination $results = $p; echo $results->renderPager(array( 'currentItemClass' => "active", 'nextItemLabel' => "<span class='fa fa-angle-double-right'></span>", 'previousItemLabel' => "<span class='fa fa-angle-double-left'></span>", 'listMarkup' => "<nav><ul class='pagination'>{out}</ul></nav>", 'itemMarkup' => "<li class='{class}'>{out}</li>", 'linkMarkup' => "<a href='{url}'><span>{out}</span></a>" )); $pagination = $results->renderPager(); Has anyone tried to use a pagination with a filter an has a working solution? best regards
-
Problems using the new field rendering option in PW3
Juergen replied to Juergen's topic in General Support
Hello szabesz, thanks for your reply. Yes there is a singleimage.php inside the products folder (without any writing mistakes). Thats the reason why I cannot find an explanation why it doesnt work. You write in your case it works well, so the problem is somewhere on my side. -
Problems using the new field rendering option in PW3
Juergen replied to Juergen's topic in General Support
Sorry but this makes no difference -
Hello @ all, I want to create a new render instance of an image field like described in this post https://processwire.com/blog/posts/processwire-3.0.7-expands-field-rendering-page-path-history-and-more/#specifying-custom-views I created the fields folder as described. Everything works fine if the render file is dirctly under the field folder, but if I want to use a custom rendering file it doesnt grab it. I have created a subfolder inside the fields folder which was named "products". In it I have a custom image file for a product image. The image field name is "singleimage" and the file inside the products folder is "singleimage.php". I have tried to render the image output in this way: echo $page->render('singleimage', '/products/singleimage'); Unfortunately it doesnt grab the file "singleimage" inside the "products" folder. It always uses the fallback. What can be the reason? Is the syntax wrong? I use the latest dev version of PW Best regards
-
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
Juergen replied to David Karich's topic in Modules/Plugins
After updating to 3.2.3 I get the an error 500 and cannot login to backend. Debugging shows the following error message: Cannot redeclare class AIOM (line 1021 of /home/.sites/......../web/site/modules/AllInOneMinify/AllInOneMinify.module) This is the code on line 1021: class AIOM extends AllInOneMinify {} Edit: Solved! I had 2 instances of AIOM with different file names so the class was 2 times declared. Now it works!! -
Strange behavior: Pagetable field and German Umlauts
Juergen replied to Juergen's topic in General Support
Thats not the problem, my configuration is correct: $config->timezone = 'Europe/Vienna', also on the ini. I guess that if the pagetable gets the data from an json file (I havent looked at it yet) and the file is not UTF-8 and there are special characters in it, it will output an empty string. I had this problem also on a json file on the frontend. After outputting it in UTF-8 all content was displayed properly on the frontend. -
Strange behavior: Pagetable field and German Umlauts
Juergen replied to Juergen's topic in General Support
It has definitely to do with the strftime format. If I use the standard format (fe. d-F-Y) it works. Question: On the frontend template I have included setlocale to output the correct strftime-format. Will be setlocale automatically included in the admin template or do I have to include it manually? I use the Reno theme. Best regards -
Strange behavior: Pagetable field and German Umlauts
Juergen replied to Juergen's topic in General Support
@BitPoet, yes, the "%e" could not be the cause because I can output the date on frontend without any problems. It only seems that the pagetable field could not output a date in this format. -
Strange behavior: Pagetable field and German Umlauts
Juergen replied to Juergen's topic in General Support
Hello Horst, There are no external php files involved and I am sure that PW core files are in UTF-8. DB tables should also be in UTF-8. The date is stored in the db in this format: 2016-03-01 14:00:00 The possible cause could be my output formatting: I use PHP strftime to format my date/time output. Maybe this causes the behaviour but it should not be a problem. Best regards -
Hello @ all, today I have discovered a strange behavior of outputting German Umlauts in a pagetable field. In my case I want to output the start date with the Geman month name (in this scenarion "März" which means March in English). März includes a special German character called "Umlaut" which will not be outputted. Take a look at the screenshots: 1) German As you can see all dates which include the month "März" (=March) will not be displayed in the pagetable field. März includes the special character "ä" and therefore it will not be outputted 2) English The same in English - all dates will be displayed properly. Has someone discovered the same behavior. It seems that the charset is not UTF-8. Best regards Jürgen
-
How to output failed login attempts on frontend
Juergen replied to Juergen's topic in API & Templates
Now I got it working ! I check again the username in this case, therefore I grab the username at the beginning of this code. $usernamevalue = $sanitizer->username($input->post->user);//grab the username after submit $database = $this->wire('database'); $name = $usernamevalue; $query = $database->prepare("SELECT attempts FROM session_login_throttle WHERE name=:name"); $query->bindValue(":name", $name); $query->execute(); $numRows = $query->rowCount(); if ($numRows) list($attempts) = $query->fetch(PDO::FETCH_NUM); echo $attempts;//this outputs the login attempts Hope this helps others with the same problem. -
Hello @ all, on my frontend form I use a login throttle with "try" and "catch" and it works well. What I want is to add a counter of the failed login attempts displayed for the user, so the user can always see how many login attempts were done. Example: Login attempt 1, 2, 3 and so on. How can I count the number of attempts and output it on the frontend (nothing to store in the database). Has anyone done something similar in the past and can help me? Best regards
-
Thanks Ryan, this works and solved may problem
-
Hello @ all, I have upgraded all my templates to use the namespace attribut introduced in PW 3. Therefore I have added "namespace Processwire" at the top of each template. In the backend I have disabled the loading of the compiler for each template. I works well, but I have problems loading modules in the templates. In my case I use AIOM to combine multiple files into one, but the syntax from the AIOM docs doesnt work anymore. The URL to the merged file cannot be created. I thougt that disabling compiler only for templates doesnt affect modules. Has anyone an idea to get it working again? Best regards Jürgen
-
I often use jsdelivr as free javascript CDN. They also offer the files for this slider on their CDN at https://www.jsdelivr.com/projects/flickity Only for those who are interested in. Advantage: you can combine multiple js files from this CDN into one - so only one request will be made Best regards
-
Also strange error on saving article in PW 3 (in this case PW 3.0.8): Parse Error: syntax error, unexpected '.' (line 39 of /home/.sites/......./site/modules/Pages2Pdf/mpdf/mpdf.php) Best regards Jürgen
-
ProcessSlider - Image sliders for ProcessWire
Juergen replied to mauricius's topic in Modules/Plugins
Edit to my last post: Slider works, but if the Images are inside in a repeater field it doesnt fetch the images. I dont know if this is a usual behavior or not. If the Image field ist standing alone it will work in PW 3.0.7. Best regards -
I have been learning PHP on my own, so I never vistit a PHP course or something like that. It was only "learning by doing". The only thing I have done was buying a book about PHP. I use it sometimes, but most of the time searching the web is enough. It always depends on what you try to achieve (outputting only content in frontend or creating complex modules with a lot of logic behind). For me the best way was to learn from examples. As Jonathan pointed out you dont need much PHP knowledge to output content on frontend.
-
ProcessSlider - Image sliders for ProcessWire
Juergen replied to mauricius's topic in Modules/Plugins
I use the latest PW (3.0.7) and unfortunately the slider doesnt fetch any images. I have tried it with 2 pages which have images, but no luck. Best regards