![]() |
|
|||||||
| Register | Projects | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| v3.1 Modules A forum for discussions, questions, implementation and development of modules. Questions here are beyond "typical" 68classifieds support and not supported by the 68classifieds team. |
|
|
Thread Tools | Display Modes |
|
#21
|
||||
|
||||
|
Basically if I highlight the file and chmo it to 777 in filezilla it'll work but I think the bit that it needs is public write access.
Am I correct in thinking though if I give this any joe bloggs can come along and edit someone elses photo just by browsing to the site link ? |
|
#22
|
||||
|
||||
|
I was thinking you just used GD to place an image overlay if it was already sold. Are you doing this some other way?
__________________
Eric Barnes 68 Classifieds Developer Customer Area | Issue Tracker | Knowledge Base | User Manuals | My Blog |
|
#23
|
||||
|
||||
|
I have a php class (hacked from the web based on litestamp) which uses the imagecopymerge function to put my stamp over the original photo and thumbnail this is combined with a class of my own to call the functionality from the userbrowselistings template.
It works pretty well but it just doesn't seem to run if the photo or thumb file in question does not have that write access. I've attached the stamping class. The stampPicture function does the nuts and bolts of it and takes your original pic, stamp image to merge and if you want you can rename the output file - I haven't though. PHP Code:
|
|
#24
|
||||
|
||||
|
Well I though that would work without being chmod to 777. Maybe I am wrong.
![]()
__________________
Eric Barnes 68 Classifieds Developer Customer Area | Issue Tracker | Knowledge Base | User Manuals | My Blog |
|
#25
|
||||
|
||||
|
I just retried there - unfortunately not it only seems to let this merge happen if you change the file to public access.
|
|
#26
|
||||
|
||||
|
Hmmh very strange.
When ftp'd into site as admin I cannot chmod photos which I did not post, surely as admin I should be able to change the permissions on any photos I choose. You are right about the write permission the class_upload.php file sets the photos to chmod 0644 (tried just changing this to 0777 makes no diff) which should be fine to write to provided they are in a folder which is at 777 so I shouldn't get this issue, but the upload must do something to mean that only the owner of the file can change its settings there after. Additionally if I just try and chmod the photo prior to stamping it, it won't let me do it. Any ideas, anyone ? anywhere ? anyhow ? have all the code here ready to post this up for all this is pretty much the last hurdle, I hope.... Last edited by free2take : 08-14-2007 at 03:56 PM. |
|
#27
|
||||
|
||||
|
From what I have seen a lot of web servers will set the owner of file uploads to NOBODY. Which means you can't change the chmod or delete it unless through the file system.
I just took a few minutes and found an article for using an overlay and you can see the results here: http://www.68classifieds.com/v4/test...e=habitacl.jpg http://www.68classifieds.com/v4/test...e=moteurr1.jpg That may be a better system but you would have to call the image like this: <img src="test.php?image=myimage.jpg" /> Basically pass a variable for the original image that you want to overlay. Here is a link to that article if you want it: http://www.codewalkers.com/c/a/Misce...mages-with-GD/ And here is a copy of the script: PHP Code:
__________________
Eric Barnes 68 Classifieds Developer Customer Area | Issue Tracker | Knowledge Base | User Manuals | My Blog |
|
#28
|
||||
|
||||
|
Thanks for that will be a handy reference going forward. I like the sold banner you are using looks much neater than mine I think any chance of a copy ??
I managed to get my original code working, the issue surrounded the fact that you need write access on the original uploaded photos but for some reason I didn't have it. To side step this and its probably its a better solution anyhows I just copy the original photo and then work on the copy this way there are no issues doing the merge. The code also allows for gif \ png and jpg files. **remove spaces in link address You can see the results here http://www.e buy ni.com/viewlisting.php?view=492 I have allowed for several aspects in my code in relation to overall 'Mark As Sold' functionality such as if the sale falls through and the users wishes to relist, then his original photos are automatically reused without having to upload again. When marking sold, the title of the ad and expiration date are changed as well as the status. Also the user can easily control for how long the sold ad gets displayed. Lastly if an uploaded photo does not match the baner size for performing the merge it will automatically be resized to suit. If anyone is interested let me know and I can post code for this although be aware it is not a small change to make. Last edited by free2take : 08-15-2007 at 04:19 AM. |
|
#29
|
||||
|
||||
|
Here is the image I used:
http://www.68classifieds.com/v4/sold.png
__________________
Eric Barnes 68 Classifieds Developer Customer Area | Issue Tracker | Knowledge Base | User Manuals | My Blog |
|
#30
|
|||
|
|||
|
I would be interested in the code for marking items as sold.
Thanks Dhamann
__________________
donjh |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need help with Featured items display | sedonagate | v3.1 Questions & Support | 2 | 09-18-2006 12:18 PM |
| Adding Lines Between Items | art | v3.1 Questions & Support | 6 | 07-23-2006 11:09 PM |
| We are sorry no items were found. Link | CB | v3.1 Questions & Support | 2 | 06-28-2006 01:53 PM |