Pages (4):    1 2 3 4   
Member
Member
makar   01-09-2010, 09:15
#11

Personally, I like the way I do it because I can edit text of XMP file virtually anywhere, a smartphone would be a good example. And I do not need to fire up bulky Photoshop just to add/amend tags or description.

Administrator
Administrator
acrylian   01-09-2010, 09:18
#12

Ok, each his own...;-) (Of course there are less demanding programs than PS..;-))

Member
Member
sbillard   01-09-2010, 17:35
#13

Sabyre:
You really should be using the Zenphoto DB functions. No need to connect to the database, for instance, since that is done if you load the functions.php script. Also your way is subject to several security issues:

SQL injection, Cross site request forgeries at least.

Also, tage are case insensitive.

Perhpas you could incorporate makar's approach and create the XMP sidecar? In fact, if you could create that on the browser client it could be uploaded with the image.

Or just use the object model to store the tags.

Member
Member
Sabyre   01-09-2010, 17:38
#14

And it's wonderful that you have a system that you like, unfortunately something like that would not work in my situation as I don't retain my images.

What i need is exactly what I am working on and still hoping to get some feedback on my code.

Administrator
Administrator
acrylian   01-09-2010, 17:42
#15

You just got some feedback to your code...

Member
Member
sbillard   01-09-2010, 18:11
#16

What do you mean that you do not retain the images. Then what are the tags associated with? Anyway, nothing in the comments presumes that the images are retained, only that they are there when you wish to add the tags. (That seemed to be stated in your initial post.)

Member
Member
Sabyre   02-09-2010, 17:22
#17

Oops,

I'm sorry perhaps I misunderstood. I was under the impression that the sidecar thing was for adding tags offline and that some sort of editing program would need to be used. My albums are uploaded from remote locations (e.g. http://example.com/album.zip) I never have a local copy of them.

I was looking for a way to add tags to the albums more effeciently while they are online in my gallery. The script I was working on would do this for me.

The DB connection in the script is because I wrote this without incorporating into ZP. I do plan to make a plugin out of it, but what you see right now is a crude code for functionality and demonstration.

Acrylian, I must have posted as abillard was replying. I appologize.

I know tags are case sensitive, what I was wondering was more of the php comparision...

if $newtag == $row['name']Will case be an issue here?

if $newtag = this will it match ThIs??? Do I need to strip case on both to avoid duplicate tag entries?

Meaning, is case important to a php string comparison?

The other question I had was is it possible to pass an array from a form post?

example: If my form has a text area and I comma seperate the tags in that text area when its passed to the script how can I make a loop so it will process each comma seperated tag?

I know you guys get busy, and I'm not trying to be an annoyance. Sometimes I feel like I am bothering people when I post here on the forums. Sometimes the responses seem curt.

I'm really just trying to contribute, whether it be a simple question or advice, every post on these forums has the potential to help others in the future.

I am very greatful that you guys created Zenphoto, I think it is a wonderful project. I am simply trying to contribute. I know what I am trying to do here with my script will be helpful to a lot of people that use zenphoto, I have seen the posts where people have requested this very functionality.

Again, if I have caused any problems, I am sorry.

Thank you.

Member
Member
kagutsuchi   02-09-2010, 17:58
#18

String comparison in PHP is case sensitive, so you will have to compare them in such a way. I would suggest using strcasecmp(). (There are many references to this method being faster than strtolower().)

Why would you want to pass an array? Simply pass the comma delimited string via $_POST and then explode() it. There's really no need to process it before POST, I think.

All contributions are appreciated, and this support forum is here for users like you to get help. The above posters were just trying to provide alternatives, but of course you know what works best for you and your website.

What you're working on sounds like it has quite the potential to add convenience to the tagging process. I look forward to trying it out once you've released it as a plugin.

Member
Member
Sabyre   02-09-2010, 18:14
#19

Excellent, thank you for the reply.

I didn't know of a way to pass the comma seperated tags from the form so it wouldn't try to treat everything in the text area as a tag. So it wouldn't think "tag1, tag2, tag3" was all one tag.

I will look at your suggestions. Thanks again for the advice!

Administrator
Administrator
acrylian   02-09-2010, 18:17
#20

I agree on the explode(). I also agree it has potential as other CMS do tag adding in similar ways as well (I have no time to look into this myself, even because of other zp related stuff). However, my collegue sbillard apparently does not agree on that...:-)

But that is exactly why have a plugin system now for everyone to add what he needs.

Pages (4):    1 2 3 4   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.