View Single Post
Old March 11th, 2008, 09:00 AM   #9 (permalink)
skidpics
Ultimate Member
 
Join Date: Jun 2007
Location: Texas
Posts: 1,362
Send a message via Yahoo to skidpics
by the looks of it, the keywords in the db are actually NOT the title of the images, rather, it is using the title of the image IF there are no keywords.. correct?

Find:

if ( empty($keywords) )



Add above:
// preg_replace below strip out any punctuation and spaces from title, replacing such characters with spaces for better keywords
$title = preg_replace("/[^a-zA-Z0-9s.]/", " ", $title);


this will replace the 'forbidden' characters in the title and keywords (if title used) to spaces for better keyword searching.
skidpics is offline   Reply With Quote