Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - kai

Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 48
92
News & Announcements / Re: New "Sites in Action"
« on: February 09, 2011, 06:44:27 PM »
Don't forget to check the 4images "sites in action" section.

Enjoy these great 4images sites: http://www.4homepages.de/resources/
Top sites here: http://www.4homepages.de/resources/Ratings/

93
Bug Fixes & Patches / Re: [1.7.9] Fix for search
« on: January 06, 2011, 12:12:33 AM »
@comicart: the pictures on your site don't have any keywords. that's why ;)

94
Bug Fixes & Patches / [1.7.9] Fix for search
« on: January 05, 2011, 11:25:59 AM »
In 4images 1.7.9 the search with more than one keyword, the use of operators (AND OR NOT) and two-word-keywords like "red car" is not working properly.
To fix this please apply this patch to the 3 files:

/includes/functions.php
/search.php
/includes/search_utils.php

The patched files are attached to this post (see below).
The fix will also be included in the next release of 4images.

Tip: If you want to search for a two-word-keyword like "red car", then you have to enter the ".



1.) search in /includes/functions.php:


foreach ($split_keywords as $key => $val) {
	
$keywords .= (($keywords != "" ) ? ", " "")."<a href=\"".$site_sess->url(ROOT_PATH."search.php?search_keywords=".urlencode($val))."\">".format_text($val2)."</a>";

and replace with:

    
foreach ($split_keywords as $key => $val) {
      
$url_val $val;
      if (
strpos($url_val' ') !== false) {
        
$url_val '"' $url_val '"';
      }
      
$keywords .= (($keywords != "" ) ? ", " "")."<a href=\"".$site_sess->url(ROOT_PATH."search.php?search_keywords=".urlencode($url_val))."\">".format_text($val2)."</a>";



2.) search in /search.php:


$split_words 
prepare_searchwords($search_keywordstrue);

and replace with:

$split_words 
prepare_searchwords_for_search($search_keywords);



3.) in /includes/search_utils.php:

search for

function prepare_searchwords($val$for_search false)

insert above:

function prepare_searchwords_for_search($val)
{
	
$val strip_tags(trim(stripslashes($val)));
	
$val convert_special($val);
	
$val strtolower($val);
	
$val str_replace(array('+''-'), array(' and '' not '), $val);
	
$val preg_replace('/\s+/'' '$val);

	
$tokens = array();
	
for (
$nextToken strtok($val' '); $nextToken !== false$nextToken strtok(' ')) {
	
	
if (
$nextToken[0] == '"') {
	
	
	
$nextToken $nextToken[strlen($nextToken)-1] == '"' substr($nextToken1, -1) : substr($nextToken1) . ' ' strtok('"');
	
	
}
	
	
$tokens[] = $nextToken;
	
}
	
return 
$tokens;
}


search for
"#[\n\t\r^\$\(\)<>\"\|@\?%~\+\.\[\]{}:\/=!§\\\\]+#s"

and replace with
"#[\n\t\r^\$\(\)<>\"\|,@\?%~\+\.\[\]{}:\/=!§\\\\]+#s"


3.1) search:

function prepare_searchwords($val$for_search false)
{

insert below:

  
// Backwards compatibility
  
if ($for_search) {
      return 
prepare_searchwords_for_search($val);
  }


3.2) search:

    
if ($for_search) {
      
$search_array = array(
        
"/\s+\+/",
        
"/\s+\-/"
      
);

      
$replace_array = array(
        
" and ",
        
" not "
      
);

      
$val preg_replace($search_array$replace_array$val);
    } else {
      
$val str_replace("*"""$val);
    }

and replace with:

    $val 
str_replace("*"""$val);


3.3) search:

      array_walk
($split_words'trim_value');

and replace with:

      $split_words 
array_map('trim'$split_words);
      
$split_words array_map('strip_tags'$split_words);
      
$split_words array_map('convert_special'$split_words);
      
$split_words array_map('strtolower'$split_words);


3.4) search:

    
if ($for_search && ($word == "and" || $word == "und" || $word == "or" || $word == "oder" || $word == "not")) {
      
$clean_words[] = $word;

and replace with:

    
if ($word == "and" || $word == "und" || $word == "or" || $word == "oder" || $word == "not") {


3.5) search and remove:

  
}

  if (
$for_search) {
    
// Add whole string for image_keyword search
    
$clean_words[] = implode(' '$clean_words);


96
Falls Du als Admin das ganze testest: Admins brauchen keine Captcha code eingeben

97
A minor security vulnerability has  been found which leads to path disclosure.

To  fix this:

In includes/paging.php

find

$this->page $page;
$this->perpage $perpage;
$this->num_rows_all $num_rows_all;

if (!isset(
$this->page) || !intval($this->page)) {
  
$this->page 1;
}
if (!
$this->num_rows_all) {


and replace with

$this->page intval($page);
$this->perpage intval($perpage);
$this->num_rows_all intval($num_rows_all);

if (
$this->page <= 0) {
  
$this->page 1;
}
if (
$this->perpage <= 0) {
  
$this->perpage 1;
}
if (
$this->num_rows_all <= 0) {

98
Chit Chat / Re: [TUT] Add own Language Text / Füge eigene Texte hinzu
« on: December 05, 2010, 09:10:37 PM »
@ Sumale.nin:

Warum postest du die Anleitung nicht direkt hier im Forum?


Quote
[TUT] Eigene Sorachvariablen v0.1

;)

99
If you upload an image which has the same words in title, description and keywords you can get a "DB Error: Bad SQL Query: INSERT INTO 4images_wordmatch (image_id, ..." message.

To fix this:

in includes/search_utils.php

FIND:
array_walk($split_words'trim_value');

and REPLACE WITH:
$split_words array_map('trim'$split_words);
$split_words array_map('strip_tags'$split_words);
$split_words array_map('convert_special'$split_words);
$split_words array_map('strtolower'$split_words);


100
@x23piracy: Vorschlag: Nimm dir doch mal eine Mod vor, dass Dir besonders am Herzen liegt und installiere es, teste es, prüfe und und schaue ob es mit der aktuellen Version von 4images 1.7.9 funktioniert. Gerne kannst du auch eine Bewertung des Mods schreiben.
Wenn der Prozess praktikabel ist kann man das auch bei anderen Mods machen.

101
Discussion & Troubleshooting / Re: Probleme mit Version 1.7.9
« on: December 02, 2010, 12:51:03 PM »

1. Fehlermeldung beim Bild-Upload via Website
Quote
DB Error: Bad SQL Query: INSERT INTO 4images_wordmatch (image_id, word_id, name_match, desc_match, keys_match) SELECT DISTINCT 5, word_id, 0, 0, 1 FROM 4images_wordlist WHERE word_text = 'Kilimanjaro' Duplicate entry '5-17' for key 'image_word_id'

in includes/search_utils.php

FIND:
array_walk($split_words'trim_value');

and REPLACE WITH:
$split_words array_map('trim'$split_words);
$split_words array_map('strip_tags'$split_words);
$split_words array_map('convert_special'$split_words);
$split_words array_map('strtolower'$split_words);


102
Chit Chat / Re: furchtbares Durcheinander
« on: December 02, 2010, 08:37:05 AM »
Unterm Strich halte ich fest es ist keine Änderung erwünscht, sonst wäre wohl mein und Bennys
betteln besser angekommen, ich möchte jetzt nicht zickig erscheinen aber Haken wir das hier
dich einfach ab. gähhnn!

Mach einfach einen pragmatischen und funktionierenden Vorschlag. Wir freuen uns über jede Mitarbeit!

103
Chit Chat / Re: furchtbares Durcheinander
« on: December 01, 2010, 09:17:01 AM »
@ x23piracy: In erster Line sind es die User die ihre Mods hier einstellen, die ihre eigenen Themen übersichtlich halten sollen.
Wenn Moderatoren das übernehmen und dazwischenfunken, finden das die Thread-Ersteller auch nicht gut.

Gerne könnt ihr die bestehenden Mods alle testen und euren Kommentar, Anmerkung und Verbesserungvorschlag in den Thread des Mods schreiben. Natürlich könnt ihr zusätzlich auch direkt den Auto des Mods per PN anschreiben.

104
Discussion & Troubleshooting / Re: Probleme mit Version 1.7.9
« on: November 25, 2010, 07:41:15 PM »
@Kai

... ich kann die Fehlermeldung beim Upload auf jeder neuen 1.7.9-Installation wieder "nachproduzieren" ...  :roll:

Hi, wir haben nochmal getestet und können es nicht nachvollziehen.

Hier
http://test.vienna-pictures.com/categories.php?cat_id=9
habe ich 3 x das gleiche Bild mit den gleichen Keywords hochgeladen. Nie kam der DB Error: Bad SQL Query: INSERT INTO 4images_wordmatch Fehler.

Kannst Du nochmal genau beschreiben wie du es machst? Oder ein kleines Video drehen? ;)

105
Feedback & Suggestions / Re: 4images 1.7.9 - Feedback
« on: November 24, 2010, 07:21:15 PM »
admin/checkimages.php
find and delete:
$image_thumb_file ""

3 mal in der Datei taucht es auf, alle 3 löschen??

3 times in this file, delete all ???


the first one, in line 345

Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 48