Jump to content

Christophe

Members
  • Posts

    649
  • Joined

  • Last visited

Everything posted by Christophe

  1. Where are the ProcessWire case studies? https://snipcart.com/case-studies
  2. I often (have to) customize the Style drop-down list in CKEditor. The styles applied can add classes to elements, like p for example. So these classes already exist if you are using a framework and/or you can add your own css rules, and you can add colors, align to the right, justify, etc. You can see some summarized information here:
  3. https://preciousplastic.com/
  4. I've just noticed that the top logo and menu disappear completely when clicking on a top menu link or sub-link with the third/central mouse button, as I often open several pages in other tabs that way. They don't reappear like it is the case when clicking with the left mouse button. This happens with Chromium. I've tried with Firefox, this doesn't happen. With Opera, it's the same as with Chromium. [ On Linux Mint ] Edit: I'll remove this edit later. 2 little details: "Simple,high performing home technology systems" -> a space is missing after the comma + no dot (difference) "Saving time and money with smarter technology." -> dot (difference)
  5. Christophe

    Cache

    @Klenkes, Could it be because of Opera Turbo mode?
  6. On my list to try one day: http://lostgrid.org/ PostCSS and Lost video tutorials: https://goo.gl/7Nxkhw
  7. You can also try https://filezilla-project.org/ or http://www.freefilesync.org/, for example.
  8. @SiNNuT, if we stay in the non-proprietary category, you might be interested by http://sk1project.net/.
  9. Here is the code for Autres Artistes: <?php include('./_head.php'); // include header markup ?> <!-- main content --> <div id='content'> <div id="directory_listing" class="row"> <div class="grid-fourth margin-top"> <?php include('./_left_menu.php'); ?> </div> <div class="grid-three-fourths row"> <?php echo "<h1>" . $title . "&nbsp;<span>" . $skill_title . "</span></h1>"; $children = $page->children("limit=12{$filter}"); $pagination = $children->renderPager(); if($children->count) { foreach($children as $child) { $thumb = $child->joindre_au_maximum_4_photos->first()->size(200,200); echo "<div><a href='$child->url'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a><p><strong><em>$child->votre_pseudo</em></strong><br />$child->pays</p></div>"; } } else { echo __("Pas de ") . $skill_title . __(" pour le moment."); } echo $pagination; ?> </div> </div> </div> <?php include('./_foot.php'); // include footer markup ?> Some variables are in _init.php now: // Gender variables $woman = __("femme"); $man = __("homme"); $gender = ""; $filter = ""; if($input->urlSegment1 == $woman) { $gender = $woman; } if($input->urlSegment1 == $man) { $gender = $man; } // Skill variable $choix_autre_artiste = $pages->get(1069); $filter2 = ""; foreach($choix_autre_artiste->children('include=hidden') as $skill) { if($input->urlSegment1 == $skill->name) { $skill_title = $skill->title; $filter2 = ", qui_2=$skill->name"; } } I've updated the left menu code in the post where it was displayed. Thanks a lot again @fbg13 for your help and for introducing me to url segments. I knew they existed but it's the first time I'm using them.
  10. <?php include('./_head.php'); // include header markup ?> <!-- main content --> <div id='content'> <?php if($input->urlSegment1 == $woman) { $filter = ", civilite=mademoiselle|madame"; } if($input->urlSegment1 == $man) { $filter = ", civilite=monsieur"; } ?> <div id="directory_listing" class="row"> <div class="grid-fourth margin-top"> <?php include('./_left_menu.php'); ?> </div> <div class="grid-three-fourths row"> <?php echo "<h1>" . $title . "&nbsp;<span>" . $gender . "</span></h1>"; $children = $page->children("limit=12{$filter}"); $pagination = $children->renderPager(); foreach($children as $child) { $thumb = $child->joindre_au_maximum_4_photos->first()->size(200,200); echo "<div><a href='$child->url'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a><p><strong><em>$child->votre_pseudo</em></strong><br />$child->pays</p></div>"; } echo $pagination; ?> </div> </div> </div> <?php include('./_foot.php'); // include footer markup ?>
  11. @fbg13, I think I've found the source of the problem. I made a big mistake. I've learned my lesson. Logically, civilite should only have one value. At one moment I had allowed the field to contain several pages (I think I wasn't sure it was only for the API and not also for the admin). (I had had a similar problem at one moment with another radio button (page) field on the persons pages where, when changing the color of the eyes, the new color would be added instead of the old choice being replaced. I had converted this field from a checkboxes (page) one to a radio buttons (page) one.) I've had this confirmation by changing the value for some "key" pages, with several pages allowed and with only one allowed for the field, and seeing the differences in 3 different versions of the sql file made with DB Backup. Easy with Sublime Text (but I'm currently using Linux Mint's default text editor to write code, I like the back and forward buttons...). And I had cloned a lot of pages to quickly have several pages for the tests. So, I made one or two silly mistakes... I hope I can resolve this quickly by saving again all the pages. I'll come back to confirm. Edit: apparently, once it is stored, it stays there. So pages that already have more than one value keep the other values. I guess I'll just have to remove the pages having this issue. I don't want to mess with/edit the sql file. Edit2: after saving again, both men (that were cloned women initially) had the value of Mademoiselle, and the women that were displayed in the Men page (that were cloned women that had had at least once the value of Monsieur saved) had the value of Monsieur. I've changed all this, saved and now everything is working. I still have the other filtering system to figure out, but now I have more chance of being able to make it work. And this one was a little more "mandatory" than the other one. Thanks again (a lot)! I've learned a lot!
  12. @fbg13, Tracy Debugger is installed in case (even if right now I don't really know how to use it to help me resolve this issue). Civilité (civilite) has 3 radio button options. So normally only one is "checked". I don't understand why it doesn't work...
  13. Hello ryan, I hope you are doing well! Fell free to move this post to a more suitable topic. Using version 2.8.35, I am in the Modules page to install and try Tracy Debugger for the first time. I've just noticed that the link modules.processwire.com sends to http://moduels.processwire.com/ Surely a translation problem. When I go to the Upgrades (module) page I now see: ProcessWireUpgradeCheck: Error loading GitHub branches - https://api.github.com/repos/processwire/processwire/branches - HTTP error(s): 403 Forbidden: 2: fopen(https://api.github.com/repos/processwire/processwire/branches): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden , Forbidden - Check that HTTP requests are not blocked by your server. I don't remember having this warning message displayed a few days ago with version 2.8.35. Please remove/suppress this post.
  14. @fbg13, I see , civilite=mademoiselle|madame added to the content (above the fourth/top left image). I've tried with civilite!=monsieur, it doesn't change anything. So close to and so far away from the solution :). NB: perhaps It's a good opportunity to try @adrian's Tracy Debugger module.
  15. @fbg13, Thank you again for your help. I've put your code. There are no error messages and something is output but Femmes doesn't seem to filter anything, it outputs the same thing as its "parent" Mannequins-Modèles. It keeps the two images with mustaches (corresponding to the 2 only pages where Monsieur is chosen for Civilité). And Hommes outputs the 2 men but also 5 mademoiselles (I've checked and saved again these pages). (There are at least 15 mademoiselles in Mannequins-Modèles.) Edit: I hadn't noticed the post above...
  16. @fbg13, I've woke up late. I went to bed too late/"early". I was just going to post this: <?php $filter = ""; if($input->urlSegment1 == "femmes") { $filter = ", civilite=mademoiselle|madame"; } if($input->urlSegment1 == "hommes") { $filter = ", civilite=monsieur"; } $results = $pages->find("template=directory_listing_mm{$filter}, limit=12"); $pagination = $results->renderPager(); foreach($results as $child) { if($child->joindre_au_maximum_4_photos->count) { $thumb = $child->joindre_au_maximum_4_photos->first()->size(200,200); echo "<div><a href='$child->url'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a><p><strong><em>$child->votre_pseudo</em></strong><br />$child->pays</p></div>"; } } echo $pagination; ?> I'm having an empty page (nothing output) in Mannequins-Modèles, Femmes, or Hommes. And (in Mannequins-Modèles) if I change some things in order to resolve this issue I have error messages like: Notice: Trying to get property of non-object in if removing or changing something to if($child->joindre_au_maximum_4_photos->count). If I remove ->count I have an empty results/content area (no error message) or Fatal error: Call to a member function first() on null if I add ->first() (with or without ->count()). I'm going to take a close look at what you've just posted.
  17. @fbg13 I guess I have to rest. I suppose that what I do with $results will be echoed intead of the code already in place when there are url segments added in the url(?). It's what I wasn't sure about. Edit: I'll see "tomorrow". I'm starting to think what I've just written is wrong. Have a great evening/night!
  18. @fbg13, Thank you. I'll try to make this work this morning when I wake up (as it's past midnight). I still wonder what to do with $results... I'll try to implement what you've posted and post back some code.
  19. @fbg13, But if I need the results to be the results of mademoiselle + the results of madame? And if I want femmes and hommes (instead of monsieur) to appear in the url? I'm sorry... I can't think properly. I think I'm going to take a break. Edit: and where do I echo/how do I integrate $results as there is already some code to output all the Mannequins-Modèles? NB: I think I'll try to give the project to somebody else when the client later wants to use an advanced search form...
  20. @fbg13, Sorry, perhaps it's because it's late and I have forgotten to eat (It's not serious I know), but the page femmes (name) doesn't exist, only the pages with the names mademoiselle, madame, and monsieur. And the page hommes (name) either. (If it was the case, it would be femme and homme for them to be "similar".) We perhaps have to use variables, but how... Their parent page being available at /fr/outils/choix-civilite/ or with the id 1085 (perhaps better for a multilingual website). So I'm a bit lost. NB: I'm going to eat a little...
  21. @fbg13, I'm not sure how to apply all this. I'm not experienced enough. civilite with the following radio buttons is a page field: Mademoiselle, Madame, Monsieur(Title)/monsieur(name). One difficulty being that "Femmes" (Mademoiselle + Madame) and "Hommes" (Monsieur) don't really exist. I'm not sure that this is correct (perhaps it needs to be different, I'm not sure using & is correct or | instead...): echo "<ul><li><a href='$search->url?civilite=mademoiselle&amp;civilite=madame'>" . __("Femmes") . "</a></li>"; qui_2 with the 15 (skill) checkboxes is also a page field. Perhaps I can use URL segments only for Mannequins-Modèles. If I find how to make it work. (Later I'll have to adapt some things as the website will certainly have another language activated.) I'm starting to think it's too big for me in so little time. It's the first time I'm stuck like this. I'm starting to think that I'll pay someone to resolve all this even if I "loose" money. Or I'll ask more to the client. NB: I guess (I don't know why I didn't use it...) ! a mister/sir could be used somewhere... (?), at least here, if the rest of the line is correct/useful: echo "<ul><li><a href='$search->url?civilite!=monsieur'>" . __("Femmes") . "</a></li>"; Edit: I don't know what I"m thinking... I don't need this if I use URL segments. But I'm not sure how to modify my code in directory_listing_mm to make it work, how/if I need to change: <?php $children = $page->children("limit=12"); $pagination = $children->renderPager(); foreach($children as $child) { $thumb = $child->joindre_au_maximum_4_photos->first()->size(200,200); echo "<div><a href='$child->url'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a><p><strong><em>$child->votre_pseudo</em></strong><br />$child->pays</p></div>"; } echo $pagination; ?> I'm not thinking in good conditions, I'm putting pressure on myself...
  22. Just now it's like this: <?php include('./_head.php'); // include header markup ?> <!-- main content --> <div id='content'> <h1 class='text-center'><?php echo $title; ?></h1> <div id="directory_listing" class="row"> <div class="grid-fourth"> <?php include('./_left_menu.php'); ?> </div> <div class="grid-three-fourths"> <?php // look for a GET variable named 'q' and sanitize it $q = $sanitizer->text($input->get->q); // did $q have anything in it? if($q) { // Sanitize for placement within a selector string. This is important for any // values that you plan to bundle in a selector string like we are doing here. $q = $sanitizer->selectorValue($q); // Search the title and body fields for our query text. $selector = "title|body~=$q"; // If user has access to admin pages, lets exclude them from the search results. // Note that 2 is the ID of the admin page, so this excludes all results that have // that page as one of the parents/ancestors. This isn't necessary if the user // doesn't have access to view admin pages. So it's not technically necessary to // have this here, but we thought it might be a good way to introduce has_parent. if($user->isLoggedin()) $selector .= ", has_parent!=2"; // Find pages that match the selector $matches = $pages->find($selector); // did we find any matches? ... if($matches->count) { // we found matches echo "<h2>" . __("Nous avons trouvé") . $matches->count . __("page(s) correspondant à votre requête:") . "</h2>"; // output navigation for them (see TIP below) echo "<ul class='nav'>"; foreach($matches as $match) { echo "<li><a href='$match->url'>$match->title</a>"; echo "<div class='summary'>$match->summary</div></li>"; } echo "</ul>"; } else { // we didn't find any echo "<h2>" . __("Désolé, aucun résultat n'a été trouvé.") . "</h2>"; } } else { // no search terms provided echo "<h2>" . __("Please enter a search term in the search box (upper right corner)") . "</h2>"; } ?> <?php $children = $page->children("limit=12"); $pagination = $children->renderPager(); foreach($children as $child) { $thumb = $child->joindre_au_maximum_4_photos->first()->size(200,200); echo "<div><a href='$child->url'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a><p><strong><em>$child->votre_pseudo</em></strong><br />$child->pays</p></div>"; } echo $pagination; ?> </div> </div> </div> <?php include('./_foot.php'); // include footer markup ?> I'll update the code here when/if I make progress.
  23. Hello @fbg13, I hope you are doing well! /fr/annuaire-des-books/mannequins-modeles/ and /fr/annuaire-des-books/autres-artistes/ have their own template files (even if the code is the same, at least for the moment). I'm trying to create the search.php file starting from the skycrapers demo profile search.php file, removing, adding, and changing things, but as it's my first time I don't really know what I'm doing. I can only imagine/guess some things for the moment. I'm turning a bit around. I think I understand most of the file but I don't really know how to convert it for my use case. And I guess that for the "Autres artistes" filtered children pages It can be more "automated", and that for the "Mannequins Modèles" filtered children pages it is a bit different as there is Miss & Mrs (Women/Femmes) or Mr (Men/Hommes). (At the end I'll also need to include the corresponding sub-link texts as h2 tags in the results pages.)
  24. This is the code for the 2 non-filtered "listing" pages: <?php $children = $page->children("limit=12"); $pagination = $children->renderPager(); foreach($children as $child) { if($child->joindre_au_maximum_4_photos->count) { $thumb = $child->joindre_au_maximum_4_photos->first()->size(200,200); echo "<div><a href='$child->url'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a><p><strong><em>$child->votre_pseudo</em></strong><br />$child->pays</p></div>"; } } echo $pagination; ?> (The image field is mandatory but I left the if condition. I'm going to remove it in search.php.)
  25. I'm including _head.php, _foot.php, and also _left_menu.php now. I also use an _init.php file. Here is the code that I have for the moment in the _left_menu.php file: <?php $mannequins_modeles = $pages->get(1050); $autres_artistes = $pages->get(1051); echo "<ul id='left_menu'><li><a href='" . $mannequins_modeles->url . "'>$mannequins_modeles->title</a>"; echo "<ul><li><a href='" . $mannequins_modeles->url . $woman ."/'>" . $woman . "</a></li>"; echo "<li><a href='" . $mannequins_modeles->url . $man . "/'>" . $man . "</a></li></ul></li>"; echo "<li><a href='" . $autres_artistes->url . "'>$autres_artistes->title</a><ul>"; foreach($choix_autre_artiste->children('include=hidden') as $skill) { echo "<li><a href='" . $autres_artistes->url . $skill->name . "/'>$skill->title</a></li>"; } echo "</ul></li></ul>"; ?> I'm not sure it is correct. For example if civilite= put twice is ok. I'm going to start working on the search.php file. I don't know exactly for the moment how I'm going to code all this and if I'm in the right direction. I'm going to study the skycrapers demo profile search.php file to see if it can help me. I'm not sure if _left_menu.php and search.php will be sufficient. And if I need to separate with if else the parts for models and for other artists, and inside insert other if else conditions. I just want to have the search page echo something different depending on the link or sub-link and the "query" in its URL. It's my first time trying to do something like that, a sort of basic search form. Later I'll certainly have to create more complex/advanced ones. I just need to figure out if this basic "search form" is "simple" to create or more complex. One of the 2 websites I created with kraken css. I'll redirect the directory to the women models after if possible. (Website started a few days last year, and improved a bit during a few days now. I have a nice "conditional" form that now saves data as ProcessWire pages (Form Builder)...). Edit2: I wouldn't mind a bit of help...
×
×
  • Create New...