 | |  | | | General Discussion General use discussion forum for PhotoPost products. |
March 9th, 2008, 06:29 PM
|
#1 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
| Characters forbidden in filenames function?
What can be done to replace characters such as $/\\:*?"'<>|` &-
to spaces when the file gets uploaded? A file called Bean_Millennium_Park_Chicago_Illinois uploaded would turn to "Bean Millennium Park Chicago Illinois" and would work well for keywords also..
Perhaps adding an admin function called:
Characters forbidden in filenames: and a default set of characters can be entered here?
|
| |
March 9th, 2008, 06:36 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,654
|
actually spaces are converted to _ so the file links work in all browsers as some browsers have problems with spaces in filenames and alot of irregular characters are prevented and replaced
|
| |
March 9th, 2008, 10:15 PM
|
#3 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
|
How about the display file name, not the actual link name then?
So that the display name of Bean_Millennium_Park_Chicago_Illinois will not have the underscore and the keyword will not be a complete term of Bean_Millennium_Park_Chicago_Illinois?
perhaps this is a keyword issue instead - how about the keyword script to remove the characters for better keywording instead of a long term based on the filename alone. Bean Millennium Park Chicago Illinois searches way better than Bean_Millennium_Park_Chicago_Illinois
|
| |
March 9th, 2008, 10:31 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,654
|
well users can enter keywords for a photo when they upload. Your free to modify your code to suit your needs.
|
| |
March 10th, 2008, 06:19 AM
|
#5 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
|
which file containts the keyword function?
|
| |
March 10th, 2008, 07:48 AM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,654
|
What do you mean by keyword function there is n keyword function
You enter keywords on upload in uploadphoto.
|
| |
March 10th, 2008, 01:21 PM
|
#7 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
|
Sorry, I should have been clearer. Which file takes the filename and converts it to a keyword if no keywords are entered?
|
| |
March 10th, 2008, 01:41 PM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,654
|
showphoto.php
|
| |
March 11th, 2008, 09:00 AM
|
#9 (permalink)
| | Ultimate Member
Join Date: Jun 2007
Posts: 1,340
|
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.
|
| |
March 11th, 2008, 09:23 AM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,654
|
yes we use the title there are no keywords and we dont check anything to do with a title as anyone can type what they want as the title |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 03:51 AM. | |