We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Changing the URL photo | Forum

Dave S
Dave S May 20 '13
Hallo, i don't know how to tell, but when i want like:


name.com/ow_userfiles/plugins/photo/photo_7.jpg 
to
name.com/ow_userfiles/plugins/photo/photo_10151409227198561.jpg
or
name.com/ow_userfiles/plugins/photo/382_10151409227198561.jpg


It's possible to do this?

The Forum post is edited by Dave S May 20 '13
Daisy Team
Daisy May 22 '13
Dave, could you explain in more details what you want to do and how exactly you want it to work.
Dave S
Dave S May 22 '13
I mean, I want to rename the filename from URL image. Like "/12971_10151487485808561_1222631840_n.jpg".
dave Leader
dave May 23 '13

so you are saying you want to take an image name for example  photo_7.jpg and rename it using a random number and then store it as the new name?

 

member upload image photo_7.jpg

you rename the image to  photo_(random number 18 length).jpg

you store the new name.

 

is that what you want?

Dave S
Dave S May 23 '13
No, i cannot do it everytime. There is a code that makes it automatically?
dave Leader
dave May 23 '13
Now im way confused at first you said you wanted to change it now you say it does i automatically..  lol  im lost :)
Daisy Team
Daisy May 24 '13
Dave, there are two functions: getPhotoUrl and getPhotoPath that construct the photo urls in the /ow_plugins/photo/bol/photo_dao.php file. You should make the changes in these functions to get it work the way you need.

May I ask, why you want it to work the way you've mentioned above?
Dave S
Dave S May 27 '13
Thanks Daisy, but can you please tell me how to add $hash on it? It's really good for security.
The Forum post is edited by Dave S May 27 '13
dave Leader
dave May 27 '13

dave you do know that this will use unnecessary resources especially if you have alot of images?    You could use base64_encode and then base64_decode but again it uses resources and anyone can get the value, it is only meant as a deterent not prevention.

 

Can i assume the reason you want to do this is to help prevent hotlinking to your images from external websites?  If so there are much better ways.

The Forum post is edited by dave May 27 '13
Dave S
Dave S May 27 '13
you do know that this will use unnecessary resources especially if you have alot of images?  --> True, but i like hash, because it's cool. :)
dave Leader
dave May 27 '13
lol okee dokee :) 
dave Leader
dave May 27 '13

Im sure you dont want to store the hashed value, i think that might cause script issues.  What you may have to do is create a function that does the hash for you. 

 

Then go to every plugin that handles images and every time that image is displayed - show the hash, when it is not displayed then just process image name.  

 

Either way, stored hash or not, i think you have quite a bit of work ahead of you :)

The Forum post is edited by dave May 27 '13
Dave S
Dave S May 27 '13
Uh...:(  Let's see what Daisy says.
Daisy Team
Daisy May 27 '13
Dave, sorry , but we do not provide examples or guidelines on how to perform a specific modification. The changes you are asking for are too complicated and it's impossible to give you the directions or brief information on how it could be done.
Dave S
Dave S May 27 '13
Ok, I understand. Thanks.
Shoaib
Shoaib Jun 14 '13
I read whole communication, but what support you guys did for Dave, you just asked the question and denied him.

Do you call it Support?? if you can't tell codes or proper procedure.?
dave Leader
dave Jun 14 '13

I am sorry you feel that way.  Giving proper support is a combination of fact finding and providing information.   First he was not clear on what he wanted to do so we asked questions to gather those facts.  Second we did provide information back to him in order to help him.  I call that support. 

 

If users had a better idea of what they wanted to do in the first place then it would be easire for us to provide better support.

 

Much of what some want to do requires special coding, in which either falls into two main  categories,

A. simple changes

B requires a plugin. 

 

We try to accomodate the simple changes here as best we can, this is not a coding 101 or a php 101 or a server 101 support forum.  There are other forums out there that cover those topics.  If people have no experience in coding then they will need to have someone do it for them (paid or free) outside of this forum.  

 

The only thing we can do is provide a direction to follow.  There are times that yes we bridge the gap and do go further in detail in the coding sprectrum but it is not a requirement or the focus of this forum.  That is why there are programmers out there, to do this for people that dont know how.

 

We do our best to point people in the right direction and that at times is all we can do or are required to do with regards to coding.  

 

You also have to realize that often the inexperienced person sees something neat on a website someplace else but has no clue the work involved behind the scenes in order to make that work.  Another reason there are programmers that specialize in certain areas. 

 

Hope that has helped you understand the scope of this forum better.. :)   

 

 

The Forum post is edited by dave Jun 14 '13