![]() |
Long file name keywords If I have a filename such as: ENDANGERED_PEREGRINE_FALCON_Falco_peregrinus_WITH_PARTRIDGE_PREY_EUROPE How can I get it to make the keywords without the _ attaching the words, so instead, make the entire filename split the words to: ENDANGERED PEREGRINE FALCON Falco peregrinus WITH PARTRIDGE PREY EUROPE |
well you would need to actually enter the keywords. We only use a title on showphoto if keywords are empty. |
correct, but can we not put a preg_replace or something to get rid of the underscore? There should be an admin setting for banned characters, which would remove such characters and replace them with a space. Either way, can that not be done before the keyword based on the filename is generated? |
After digging around, I found the answer in one of my previous posts concerning something else..however, the syntax express was wrong.. Find in showphoto.php: 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("/[^0-9A-Za-z]/", " ", $title); this will strip out any symbol (not a number or a letter), and convert it to a space.. Now, how do we get the filename to be added to the keywords one may enter as additional to the keyword listing? I need some sort of function to add the $title to the $keywords to equal the new $keys? |
On showphoto as posted the title is used if there are no keywords otherwise you need to enter keywords on upload. You can use something similar on image-inc.php has for keywords to be a filename? Code: Content visible to verified customers only. |
| All times are GMT -5. The time now is 02:48 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0