Jump to content

biber

Members
  • Posts

    93
  • Joined

  • Last visited

Everything posted by biber

  1. Hi @bernhard, I tried again to change the permissions, but had the same issue with 755. So I set it back to 775 and live with that. This is also recommended by the web host.
  2. Hi@bernhard, thanks for your hint. I played around a little with the permissios and found: the logs-directory needs 775, the files stay at 644. Now everything is fine.
  3. Hi @matjazp, thanx for your reply and explanation. I really did not use the FieldtypeSelect module and could delete it without any disadvantage. I started with PW ten years ago with two projects. After a learning phase and a lot of help from this forum, everything ran without problems until I decided to update this website http://malabu.de. I found some old modules and problems with the current PW version. And again I found help. So I have to say thanx to this beautyful forum and this great CMS. Günter
  4. When I try to delete the entries in a logfile by the "burn"-function (Helpers at the log-page), nothing happens. If I use the "chop"-funktion, I get the following error: Unable to open file for writing: /home/sites/site100043347/web/malabu.de/site/assets/logs/file-compiler.txt.new Rights are set to 755 to the Logs-directory and to 644 to the files inside.
  5. I de-installed the FieldtypeSelect.module and now the wave of log entries stops. But the following questions remain: What exactly does this module? Do I need it?
  6. Hi @elabx, thanx for your reply. I tried to disable module compilation and template file compilation in the /site/config-file, but that made the whole site unreachable. The file-compiler log grows and grows, and meanwhile I'm even not able to delete the about 10 000 entries. It shows again and again: Compiled file: /site/modules/FieldtypeSelect/FieldtypeSelect.module I am completely at a loss.
  7. Recently I transferred my website http://malabu.de from a local directory to my webhoster. The site is usable, but changes to a template file have not been applied. The log file fills up every second with new messages.
  8. Hi @cwsoft, thanks for your questions and your help. You are right, I should no longer worry about the database as long as the rsult fits. At the moment I am working with a local copy of the site in order not to publish half-finished results. I implemented variable sorting (by name, date or newest first) by visitor, and had some problems finding the right conditions, especially with the reverse part. The result I found looks a bit crazy, but it works. So I think, we can close this topic here.
  9. @cwsoftEven though I've been building websites for a few years, I'm still a beginner in many topics. I started with PW about 10 years ago. To add fields to the images of a gallery I installed the "image-extra-module", which is no longer maintained. The function has now arrived at the core, but the module left some oddities in the database at that time, which today cause problems with ordering and sorting. My question was how I can clean up here without having to re-enter all content.
  10. Dear @cwsoft, thanks for your answer. I'm an old-fashioned hobby programmer who likes to be the master of his data. I simply wrote my first web pages in HTML in an editor and knew exactly which tag produced which result. I love PW because it gives me freedom, but sometimes I like to look behind the curtain and understand what's happening. Of course, I won't change the database without a backup. But it's still my challenge to split data from one field and transfer it to other fields. Maybe this is a PHP task, I'm not so fit in there yet.
  11. Some years ago I set up a site http://malabu.de which consists of a number of galleries. I built it with the "image-extra" module from justb3a to add further informations to the images. Meanwhile this module seems to be obsolete and I added fields as Custom Fields in a template "field-images". Recently I took a look at the database and now I would like to understand what's going on there: The most interesting table seems to be the table "field_images" with 1844 records according to all images. Here an example: A look at one record shows a range of empty fields and the field "filedata" with a collection of contents, 2 examples: In the database I find other files like field_im1, field_im_2, field_iname_1, field_iname_2, field_kopf etc. which sound like fields I have in my field_images-template, see here: But they do not contain any records. Now my questions: 1. May I delete empty fields from the record? 2. May I delete empty files? 3. How can I transfer parts of the filedata-field which seem to be caption to the caption-field? Of cause not record for record, but for all images at once 4. Can phpMyAdmin show UTF-8 (show 'Umlaute') filedata_example.txt filedata_example_2 .txt
  12. @elabx and @Robin S Thanks for Your help. I installed the Custom Inputfield Dependencies module and used "Show only if page is matched by custom find ...", which gave me a comfortable way to select the template. Now the admin-sites are clearly arranged and wrong entries can be avoided.
  13. Some years ago I set up a site http://malabu.de which consists of a number of galleries. I built it with the "image-extra" module from justb3a to add further informations to the images. Meanwhile this module seems to be obsolete and I added fields as Custom Fields in a template "field-images". Originally I used one template "galerie.php" for all galleries, but as there are very different galleries like cooking recipes, garden images and points of view, I decide to use different templates with different legends. E.g. "ingredients" and "preparation" for the cooking-page and "places" and "stories" or "plant names" for other pages. To make it clear and simple I want to show only the relevant fields at the current admin-page, but if I add "images" to the template, all "field-images" appear. As a special goody I would like to have different placeholder for every page. Perhaps someone can help me. If this is too obscure, please ask for additional informations or screenshots. Thanks in advance, Günter
  14. Hi @cwsoft, thanks for your hints, I will try the options. Günter
  15. I like to use keys instead of the mouse, whenever possible. Is there a way to walk through a gallery (eg. call the next or previous page) by cursor keys left or right?
  16. Hi @poljpocket, sort (-iname ... ) does not work, because iname_* contain different criteria to sort the images. To have an impression of the site, here's the link: (The new sorting function is not yet implemented completely) http://www.malabu.de But ->reverse(); was the right way, it works! Thanks to you all Günter
  17. hi @ShaunaB1 and @Gideon So, Thanks for your efforts to help to my problem. Unfortunately a simple "-" does not solve my challenge. I also tried a "sort(1/iname_3)", where iname_3 contains a timestamp - no success. @Gideon SoI did a dump on $images in line 32 and it throws a long list of all parts of the image-field. Sorting itself works as desired, but not with an option "image_created descending". Greetings Günter
  18. Hi, I have built a site with some galleries, which can be ordered by different criteria, like place, name or date_created. This works fine, iname_1,2 or 3 can be chosen by user. Now I want to have the option to sort the images "latest image first". Setting "rsort" instead of "sort" in line 31 comes up with this error: Where is my mistake? Any idea? Here is my template: 1 <?php include(\ProcessWire\wire('files')->compile(\ProcessWire\wire("config")->paths-> root . 'site/templates/_head.php',array('includes'=>true,'namespace'=>true,'modules'=> true,'skipIfNamespace'=>true))); // include header markup ?> 2 3 <div id='haupt'> 4 5 <?php 6 7 // output 'headline' if available, otherwise 'title' 8 echo '<h1>' . $page->get('headline|title') . '</h1>'; 9 10 //get all segments and clean segments! 11 $seg1 = $sanitizer->pageName($input->urlSegment1); 12 $seg2 = $sanitizer->pageName($input->urlSegment2); 13 $seg3 = $sanitizer->pageName($input->urlSegment3); 14 15 //check for the second urlsegment not needed 16 if ($seg2) { 17 // unknown URL segment, send a 404 18 throw new \ProcessWire\Wire404Exception(); 19 } 20 21 //check for the third urlsegment not needed 22 if ($seg3) { 23 // unknown URL segment, send a 404 24 throw new \ProcessWire\Wire404Exception(); 25 } 26 // Sortierung übernehmen: 27 $order = $input->get->order; 28 29 // sortiere nach name_: 30 if ($order >0) { 31 $images = $page->images->sort("iname_".$order, SORT_NATURAL | SORT_FLAG_CASE); 32 $session->set($order, $order); 33 } 34 35 // ohne Sortierung: 36 else { 37 $images = $page->images; 38 } 39 40 //normal content without first url segment! 41 if (!$seg1) { 42 43 echo $page->body; 44 if (!empty ($page->name_1|$page->name_2|$page->name_3)) echo '<p>Sortierung nach '; 45 if (!empty($page->name_1)) 46 echo '<a class="tab" href="'.$page->url.'?order=1">'. $page->get('name_1'). '</a>&nbsp;'; 47 if (!empty($page->name_2)) 48 echo '<a class="tab " href="'.$page->url.'?order=2">'. $page->get('name_2'). '</a>&nbsp;'; 49 if (!empty($page->name_3)) 50 echo '<a class="tab " href="'.$page->url.'?order=3">'. $page->get('name_3'). '</a></p>'; 51 52 // output images 53 foreach($images as $image) { 54 $iname_3 = $image->created; 55 $thumbnail = $image->height(100); 56 echo '<div class="rahmen"><a href="'.$page->url . $image.'?order='.$session-> get($order).'"><img class="shadow" src="'.$thumbnail->url.'" alt="'.$image-> kopf.'" title="'.$image->kopf.'" loading="lazy"></a></div>'; 57 } 58 59 } 60 61 //special view output with an url segment... 62 if ($seg1) { 63 // get the image in the correspondent position: 64 $index = $input->$seg1; 65 $image = $page->images->index($index); 66 67 // Link zum vorigen Bild: 68 echo '<a href="'.$images->getPrev($images->$seg1).'?order='.$session->get($order). '"><img src="'.$config->urls->site.'templates/styles/links.gif" alt="voriges Bild" title="voriges Bild"></a>&nbsp;'; 69 70 // Link zur Thumbnail-Seite: 71 echo '<a href="'.$page->url.'?order='.$session->get($order).'"><img src="'.$config ->urls->site.'templates/styles/index.gif" alt="zurück zur Übersicht" title="zurück zur Übersicht"></a>&nbsp;'; 72 73 // Link zum nächsten Bild: 74 echo '<a href="'.$images->getNext($images->$seg1).'?order='.$session->get($order). '"><img src="'.$config->urls->site.'templates/styles/rechts.gif" alt="nächstes Bild" title="nächstes Bild"></a><br />'; 75 76 // Bild zeigen: 77 echo '<img class="shadow" src="'.$images->url . $seg1.'" alt="'.$images->$seg1-> get('kopf|name_1').'" title="'.$images->$seg1->get('kopf|name_1').'">'; 78 79 //echo '<img class="shadow" src="'.$images->url. $seg1.'" alt="'.$images->$seg1->kopf.'" title="'.$images->$seg1->get('name_1|kopf').'">'; 80 81 82 // Textfelder zu den Bildern anzeigen: 83 echo '<h2>'.$images->$seg1->caption.'</h2>'; 84 echo '<h2>'.$images->$seg1->get('kopf|name_1').'</h2>'; 85 //var_dump($images->$seg1->filedata['_109']); 86 //var_dump($images->$seg1->caption); 87 echo '<p>'.$images->$seg1->bildtext.'</p>'; 88 echo '<p>| '.$images->$seg1->iname_1.'&nbsp; &nbsp;| '.$images->$seg1->iname_2. '&nbsp; &nbsp; | '.date("d.m.Y",($images->$seg1->created)).' |</p>'; 89 } 90 ?> 91 </div><!-- end content --> 92 <?php include(\ProcessWire\wire('files')->compile(\ProcessWire\wire("config")->paths-> root . 'site/templates/_foot.php',array('includes'=>true,'namespace'=>true,'modules'=> true,'skipIfNamespace'=>true))); // include footer markup ?>
  19. If I set a var_dump($images->$seg1->filedata['_109']); I get the error
  20. Hi all, still have problems with that userdefined fields: to every image I have defined some fields, represented by a number in the database-field "filedata". Here one example: {"_109":{"data":"ehemalige Post","data1015":""},"_108":"schon lange gibt es hier kein Postamt mehr","_110":"S\u00f6rup Dorf","_111":"","_112":"2024-02-17 00:00:00","_114":""} _109="kopf", _108="bildtext", _110="iname_1", _ 111="iname_2" and _112="iname_3" I can access to this content by $images->$seg1->filedata['_xxx'] for all parts but not to _109(kopf), which is a TextLanguage-field and contains two parts. While I do not need the language-function anymore, I tried to convert it to a simple Text-field, but this lead to a long error-list and no success. Any idea?
  21. My url segments are the names of the images. This works as desired. You may have a look at the site: http://malabu.de It is an elder version, I'm working at a new edition with a better sorting function.
  22. Hi @ngrmm, with $seg1 I am able to access a single image of my gallery. The method is described here: https://processwire.com/docs/front-end/how-to-use-url-segments/ The crazy thing about my template is, that it works with $images->$seg1->get('kopf|name_1') but not with get('kopf') or $images->$seg1->kopf
  23. hi @ngrmm, thanks for your reply. maybe I have shortened my code-excerpt too much ? $seg1 = $sanitizer->pageName($input->urlSegment1); $images = $page->images; name_1 defines a sort criteria, not importent in this context. My problem is: At the overview with all thumbnails I can access to my user-defined imagefields (for exemple field "kopf"). But if I select one image I only get an empty string. $images->$seg1->get('kopf|name_1') shows field 'kopf' as expected. $images->$seg1->get('kopf') shows an empty string
  24. Hi, in a gallery I have defined some extra fields to my image-field. As long as I show the overview with all thumbnails I can access to my fields (for exemple field "kopf"). But if I select one image I only get an empty string. Very strange: if I get ('kopf|name_1') it shows the content of the "kopf"-field. ("name_1" is a field at the page without reference to the image) Here an excerpt from my template:
  25. Hi @elabx, thanks for your reply. Maybe, I did not yet understand the technique of "new image fields", and so it was not very helpful to mess around with the database. I will try to purge the relics of the old system from my templates and be happy. Thanks for your help, @elabx, also to @ngrmm, who's hint showed the key page.
×
×
  • Create New...