Jump to content

chuckymendoza

Members
  • Content Count

    27
  • Joined

  • Last visited

Community Reputation

9 Neutral

About chuckymendoza

  • Rank
    Jr. Member

Profile Information

  • Gender
    Female

Recent Profile Visitors

1,434 profile views
  1. I believe it has something to do with the server. My local copy of the site (3.0.98) translated the © into a c, too. There isn’t any explaining error message, just „invalid image“ (see German screenshot). When I remove the © from the filename it’s uploaded without any error. I also tried other filenames containing Umlauts like ä or special symbols like @ – this works. A symbol like the „Registered Mark“ ® produces the same error like the ©. It’s not a big thing, my client can rename the files, but it would be nice to know why this happens only to this kind of letters. Strange.
  2. A client of me got an error in PW 3.0.98 while uploading images that contain a © in the filename. Any clues how I could filter this in the backend of PW to avoid this? Thanks, Thomas
  3. This looks fabulous! Saw in your screen the example for selling digital fonts. This looks great. A question: will it be possible to give a variant (let’s say: Font Italic) an option to sell it with different license types? Mostly you have something like: Licence 1 = 1-5 User, Price X License 2 = 6-20 User, Price Y And when do you think is Padloper 2 ready to take off? 🙂
  4. This solves my problem! Added max_input_vars = 10000 to the php.ini THANK YOU VERY MUCH, you made my day! Have a nice day, Thomas
  5. Hello together, I have a problem with the image field and in my case it seems that there is a limit of how much images can be in such field. The following case: I have around 20 pages. Each has a usual image field, where I can upload an unlimited number of images (array). Most of the pages got 50-200 images but one page got 411 images (I know, it’s much ) Now, when I change the order of one image (let’s say I drag & Drop the first image after the third) or delete one image by clicking on the trashcan, everything runs fine. BUT when I click SAVE the image won’t be deleted or moved to it’s new place. You can change anything else on the page - I have a text field there - and save it, no problem. Interestingly I can add (upload) new images but I’m not able to delete or move them. - The file size of the images are between 200kb and 1.7MB, RGB, JPGs. - When I duplicate the page and try to delete/move I got the same problem. - I also created a whole new page and got the same problem - Also tried a different server (virtual and online): same problem - ProcessWire 3.0.62 So, is there a limited to the images field? Any clues except limiting the image files to max. +-200 images? Thanks so much in advance and have a great weekend. Thomas
  6. So easy and it works! Thanks a lot, adrian! This makes my day.
  7. Hello together, this might be a newbie questions, but I got some problems with a PageArray and don’t know how to go on. My goal is give out the parent.name of a page that was found earlier and was put into a PageArray. My found pages: $matches = $pages->find($selector); Some of the pages that are present in $matches need to be put into a new array $the_page_array. I do this via a this foreach loop, but I do not foreach($matches as $match) { if ($match==condition_blah_blah) { $the_page_array[]=$match; // if condition true, then add pages to new array } } From here, I can print out some stuff, e.g. my parent.name of the $single_page: foreach($the_page_array as $single_page) { echo „<a target='_blank' href='$single_page->url'>$single_page->title</a> "; echo $single_page>parent->name; } So far so good. But from here I want to find some pages in the PageArray that have a given parent.name: $filtered_matches = $the_page_array->find(„parent.name=blahblahblah"); But this gives out an error: Error: Call to a member function find() on array In fact, I can use any PageArray function like $filtered_matches = $plz_page->getTotal(); and I get the same error. I believe this has something to do that $the_page_array is an PageArray (or not)? Any help or hint would be wonderful. Thanks in advance Thomas
  8. Hello together, I have the following search routine to find pages containing one or more ZIP codes. postleitzahlen.plz is the selector and is a repeater.value The following code works fine and finds all pages that contain the (German) ZIP codes in my test string $p_test $p_test="40489|40822|40878|40880|40882|40883"; $selector = "template=print, title|job_body|job_body_2|job_body_3%=" . implode("|", $suche_1) . "; $selector .= ", id=[postleitzahlen.plz=".$p_test."]"; $matches = $pages->find($selector); My problem is, I do not have 6 numbers in $p_test, I have a lot more. In the worst case scenario I could have around 1500 ! If I have more then 80 numbers in my $p_test I got an error message: Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? Is there a limit in having too much selectors? Thanks, Thomas
  9. Guys, this is wonderful and so simple. I love PW! !title%=nyc works like a charm! In my case I needed to exclude not only from the title but also from some more fields, my thoughts, that this would work were wrong: !title|job_body%=word_to_exclude Instead someone must use: !title%=word_to_exclude, !job_body%=word_to_exclude It is possible to unify this, or is it the way PW works?
  10. Hello together, currently I’m working on some kind of enhanced search for pages->find in the FRONTEND and I like to ask if someone has a possible solution or hint on how to build it. My problem is, I like to add search strings with a "+" or "-" in front of word and tell PW what to search and what not based on the input of the user. Example: Let say I have the following page tree Airports — NYC, USA — Miami, USA — Tokyio, Japan — Berlin, Germany Let’s say that all pages have more then one body text field but in one of them is a text that contains the words "Airport" and "Air-condition". User enter the following text into an input field: Airport air +USA -nyc My preferences are: 1) find all Airports (or cities) with the word Airport or air in the title OR in the body text of the pages, also find part of the words like fair or air-condition 2) Filter the results of 1) and find only pages with the word USA inside 3) Filter the results of 2) and show only (exclude) the results with a word like nyc As the result only Miami, USA will be displayed, because it got USA and NOT nyc and in the body text are the words Airport and air-condition. For 1) I used the code (see below) from @Mats suggestion https://processwire.com/talk/topic/10883-search-with-and-string/ It searches part of words in the title and body with OR. But what I’m looking for is, how can I search for pages that have the search term AND the term with a "+" before. It finds me Airport but it should only find Airport if +USA is inside title of body text. And of course, how it is possible to exclude a word, for example with a "-" before the search term. In spoken language it would be: Find anything with Airport or air. Show only results containing the word USA and exclude anything from the results with the word nyc. In general, is it possible to exclude something from the search in pages->find and what could be a good start to code such a search function? Thanks so much in advance! Thomas if($q) { $input->whitelist('q', $q); $qs = explode(" ", $q); foreach($qs as $key => $q){ $qs[$key] = $sanitizer->selectorValue($q); } $selector = "template=print, title|body|body_2|body_3%=" . implode("|", $qs) . ", limit=50"; $matches = $pages->find($selector); }
  11. Hi, thanks for the answer.
  12. Hello together, I had a deeper look into the forum but didn’t found anything, so I like to ask the following simple question. Is there a module or a simple technique to export all users from the backend into a file? Afterwards, it should be possible to import the users again. I have a ProcessWire installation on a dev server and I don’t like the idea to add all users again by hand on the live server Thanks so much for your ideas. -Thomas
  13. Hmm, forgive me, but that is above my head.
  14. I do not like to cross-post here from https://processwire.com/talk/topic/8605-user-editsaddsmove-only-his-own-page/ because it deals with another problem but as part of finding a solution to my problem by using the module of @adrian I discovered a problem when a user enters a name of a page he don’t have access to in the search field of the backend. Example: user 1 enters "Blau" in the search field. user "Max Muster" also have a page named "Blau". So, in the search results both pages are visible and can be edited by user 1. The search results looks like this: @guenter55 : maybe I’m missing something or I have a different configuration but how do you deal with that kind of (security) problem? Thomas
  15. Hi, finally I had some time to test @renobird modified version of PageEditPerUser and also @adrian HideOtherUserPages modules for my problem. I like to describe my process here for others that deal with the same problem. First “solution”: Modules used: PageEditPerUser 0.0.3 HiddenAdminPages 1.0.0. All users got the same two roles (thanks @renobird for the tip) Roles: editor (edit, add, (but not) delete) editor_sub (edit, add, delete) Because of the installed HiddenAdminPages I can restrict pages for each user. Disadvantage: The more pages/user the site has, the more work it is to restrict pages for a new user. Second “solution”: Modules used: PageEditPerUser 0.0.3 HideOtherUserPages 0.0.1 (Same roles as first solution) As long as the page the user needs to edit got the same name (Page = user-1 , User = user-1) he or she can just edit his own pages, regardless where they are located Pro: Unlike the first solution, you do not need to add pages to a restriction list. This works better if you deal with a lot of pages. Disadvantage: A Parent page needs to named after the user. For me this solution is okay. Third “solution”: As I mentioned in one of my earlier posts, a solution without any modules would be to have a template for each user and a role for editing just this template. No modules used Pro: Well, it works. ;-) Disadvantage: When you deal with, let say, 50 users, you also need 50 roles and 50 templates. A little bit confusing in the template/roles area. I guess you probably also have 50 files in the site folder on the server? You have to optimize/prepare your templates before you add them to processwire to be aware of future changes inside the template files. Big problem: So far all three solutions would work somehow, and I would prefer solution 2 for my problem but I discovered a new “problem” with solution 1+2. I had a test what happens when user 1 enters the name of user 2 in the search field of the backend. Processwire finds the Parent page and shows an “edit” in the search results. The same happens when user 1 enters a name of a child page that is only visible to user 2. Example user 1 enters "Blau" in the search field. user "Max Muster" also have a page named "Blau". So, in the search results both pages are visible and can edited by user 1. As a result when user 1 knows how the pages of user 2( or any other user) are called, it’s easy to find them and edit them. I got tears in my eyes. ;-) As solution 1+2 works for me somehow both are not usable from the view of security. Maybe I did something wrong here, not sure. The easiest way would be to restrict the search in the backend to just the pages the user can edit (as part of the modules of solution 1 or 2). Any thoughts on that? Thomas
×
×
  • Create New...