Jump to content

obiuno

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

1 Neutral

About obiuno

  • Rank
    Newbie

Profile Information

  • Gender
    Not Telling
  • Location
    Athens - Greece

Recent Profile Visitors

2,598 profile views
  1. FIND BELLOW THE FUNCTIONING AND IMPORTANT PART OF THE CODE <?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) { // Send our sanitized query 'q' variable to the whitelist where it will be // picked up and echoed in the search box by _main.php file. Now we could just use // another variable initialized in _init.php for this, but it's a best practice // to use this whitelist since it can be read by other modules. That becomes // valuable when it comes to things like pagination. $input->whitelist('q', $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. // Limit the results to 50 pages. $selector = "title|body%=$q, limit=50"; // 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) { // yes we did $content = "<h2>Found $matches->count pages matching your search criteria:</h2>"; // we'll use our renderNav function (in _func.php) to render the navigation $content .= renderNav($matches, 0, 'summary'); } else { // we didn't find any $content = "<h2>No results found.</h2>"; } } else { // no search terms provided $content = "<h2>Please enter a search term in the search box (upper right corner)</h2>"; }
  2. Dear all the solution I have post always worked since then but perhaps because I have to deal mainly with non-latin characters (greek alphabet). In your case you should consider trying something like this $selector = "title|body*=$q, limit=50"; please inform me on any solution and I ll keep on searching the subject....but to be honest also on latin search terms I get results with my initial proposal...but yes check this above
  3. I finally solved the problem by changing the ~= with %= on the search.php Now everything works just fine
  4. Dear all I have created a website for a local newspaper and I am trying to make its search field to work using as input greek words (letters) but in vain. I tried to figure out what is going on and even to borrow any idea from the recent multilingual profile which is optional during new installations...but also on this one I tried to search english or suomi or deutsch words but neither it, was functioning.... I would much appreciated your kind assistance and support
  5. Hi Manfred62. Thank you a lot for your directions.
  6. Hello I am a new comer in processwire. I am not a dev but I am really impressed and I wish to take my chances with this fantastic cms/f with the minimal ui. I need to know if anyone could assist me and sorry if this request has been already replied in another thread but obviously I did not manage to find it.... on how I could translate the admin interface in Greek! Thank you in advance for any welcome replies and advices
  7. Dear Ryan I am a new user in processwire but after almost 2 weeks I am messing around with it, I must admit that I am really impressed. I am not a so called "developer" even though for years I develop and deploy few wordpress and mostly Drupal Sites (some big and some for personal or mid business use). Sorry for so may words .... I developed my self a mockup site for one o my clients in my MAMP and I tried to transfer it to my VPS, which runs 5.3.2-1 ubuntu 4.21, but in vain. I faced my self this hash password problem. I checked all of the threads in the forum and your suggestions about it and so I finally luckily found a solution and I present it here just For the rest of the new users to be aware! I solved it out by just first installing the forgot password module and then by changing the code in the line 222 of password.php (PHP_VERSION, '5.3.0') to (PHP_VERSION, '5.4.0') I really do not know if I did something correct but obviously this worked for me and in a no time .... after logging back in I reset my initial password created a new one and here I am.. http://www.fifart.eu/apps/pkoptics/ (sorry it is in greek and just a mockup but I really like the fact that I made it with no installing dozens of modules (drupal) and with just a few lines of code which I found into the api and from several posts of your kind Forum's "Archibishops").. Thanks again
×
×
  • Create New...