Browse Source

fix count paragraph search

pull/1/head
Jesús 1 year ago
parent
commit
16703c9cea
Signed by: Jesús <heckyel@hyperbola.info> GPG Key ID: F6EE7BC59A315766
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      content/pages/buscar.php.md

+ 2
- 2
content/pages/buscar.php.md View File

@@ -32,7 +32,7 @@ $STOP_WORDS = ['a', 'un', 'una', 'unas', 'unos', 'uno', 'sobre', 'todo',
'trabajas', 'trabaja', 'trabajamos', 'trabajais', 'trabajan', 'podria',
'podrias', 'podriamos', 'podrian', 'podriais', 'yo', 'aquel'];

$DESCRIPTION_LENGTH = 20;
$DESCRIPTION_LENGTH = 25;
$HALF_DESCRIPTION_LENGTH = floor($DESCRIPTION_LENGTH / 2);

$web_content = json_decode(file_get_contents('tipuesearch_content.json'), true);
@@ -158,7 +158,7 @@ if (isset($_GET['q'])) {
break;
} else {
echo '<div class="tipue_search_content_text">';
for ($i = 0; $i < $description_words_count - floor($description_words_count/2); $i++) {
for ($i = 0; $i < $DESCRIPTION_LENGTH; $i++) {
echo $description_words[$i] . ' ';
}
if ($description_words_count > $DESCRIPTION_LENGTH) {

Loading…
Cancel
Save