Author Topic: license mod for download images...  (Read 10022 times)

0 Members and 1 Guest are viewing this topic.

Offline hulker

  • Pre-Newbie
  • Posts: 6
    • View Profile
license mod for download images...
« on: January 23, 2006, 11:21:08 PM »
...hi everybody,
at first i have to say: great. 4images is great. thanks all developers and supporters
for helping the users out.

ok, now my problem i try to solve. i tried to use the search function for days and
days now. maybe iīm too stupid:-) the only mod i found is v@nos mod for showing
an agreement page, before seeing the detail picture.

my problem is: i want to integrate the following function into 4images:
registered user is logged in and wants to upload an image. he receives the regular
upload form with the following extension:

a pulldown where he can choose, what kind of license he wants to add to
the image he wants to upload. possibilities:

1. image can be used absolutely free
2. image can be used for personal use
3. image can be used with asking for permission via mail (user has to write an email to the author/uploader)

if a "normal user" is now browsing through the 4images site and is looking to a detail page of an image, a
license button will be shown. if you click on the "view license" button a popup opens with
the information what license the image has (that is what the uploader has chosen during upload
of his picture)

can anyone help me out of this desaster?:-)

thanks for any help in advance
hulker




Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: license mod for download images...
« Reply #1 on: January 24, 2006, 12:13:28 AM »
You might hear other inputs on this but, according to me, it would require extensive codings in order to accomplish these kinds of modifications since permissions would also require changing from the ACP's end.  :|

Offline hulker

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: license mod for download images...
« Reply #2 on: January 24, 2006, 08:19:53 AM »
thank you for your fast reply. iīm sorry to hear thar, because
in my opinion it is definetly a very important point, how
to connect an uploaded image with a license typ. it is
not for selling pictures. it is just to make sure, that every
user can give a license to his uploaded image.

i thought about this:
---------------------------------------------------------------------------------
1. insert a new field into databse called "limg_license"
2. add the new function into the right *.php file (member.php i guess:-))
2. then in the "upload_form.html" integrate the pulldown
    with the different license possibilities.
3. write the chosen license into the database.
--------------------------------------------------------------------------------
and now it seems to be hard to integrate it in the acp.
i never changed anythin in the admin folder. can
anyone give me some support here, how to integrate
the chosen license into the acp?

i think it would really be a great mod for a large number of
4images users, according to the fact, that at the moment
no user can define anything while uploading.

thanks in advance
hulker

p.s. does anyone know if 4images will receive a next release,
or did the development stop forever?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: license mod for download images...
« Reply #3 on: January 24, 2006, 08:36:08 AM »
1. is correct
2. the correct file would be includes/db_field_definitions.php. Just add there something like:
Code: [Select]
$additional_image_fields['image_license'] = array("Image license", "text", 0);(asuming the field name is image_license
3. correct too. make sure the name of the dropdown is image_license
4. it will automaticaly save the selected value of the dropdown on upload.
5. in details.html template you can use {lang_image_license} and {image_license} tags.

That is the simpliest way to do so, more to it would be if you want make it multi-language compatible.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline hulker

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: license mod for download images...
« Reply #4 on: January 24, 2006, 12:06:00 PM »
@ v@no:
thanks for your response. hopefully i will get it to work:-)
but, what is still missing with this concept is the complete
admin area, where the images will be validated.

and your tip about using the chosen license (free, free for personal use, etc...)
directly on the button is smart, but not what iīm looking for:-) i just want to
add a standard button (a graphic with "view license") under the image in the
details view. if you click on that button a popup window opens, where the user
can read what kind of image license was added by the author to his image.

do you see a chance to help me out of my misery, because iīm really not a
*.php freak. still a designer:-)

1. i just checked how to add with additional fields in ddb_field_definitions.php
2. i just added the right field into the database
3. i donīt know what function i have to add for the dropdown in member.php:-(
4. i donīt know how to get the popup working so the right image license will be shown.

maybe the solution for step 4 could be:
adding a new *.html in the "templates/mytemplate"  folder called "license_image.html".
in that *.html, which is the popup just check what is written in the database field "image_license" and
then show the right text, which is configured in "lang/english/main.php"
or do i think too complicated. if no, i donīt know how i could get this running, because as i said before,
iīm really not very good with *.php and databases:-(

thanks for your efforts
hulker

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: license mod for download images...
« Reply #5 on: January 24, 2006, 03:45:50 PM »
Quote

That is the simpliest way to do so, more to it would be if you want make it multi-language compatible.


Ah ! yes, that's right. I forgot I have implemented the multilang MOD (which requires a little more time with additional user fields). ;)

Quote

3. i donīt know what function i have to add for the dropdown in member.php:-(
4. i donīt know how to get the popup working so the right image license will be shown.


3. A little tip: Use the search on the forum for : Dropdown Fields. You will find a useful MOD, made by V@no, with detailed instructions on how to proceed with dropdowns. ;)

4. This one I don't get though . . .

Quote

adding a new *.html in the "templates/mytemplate"  folder called "license_image.html".
in that *.html, which is the popup just check what is written in the database field "image_license" and
then show the right text, which is configured in "lang/english/main.php"
or do i think too complicated. if no, i donīt know how i could get this running, because as i said before,
iīm really not very good with *.php and databases:-(


Actually, I don't know for others, but this would be my recommendation. However, in order to accomplish these single tasks, license_image.html would need to be parsed from member.php file. As for the rest of your info in your paragraph above, these are more than simple to follow I believe. ;)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: license mod for download images...
« Reply #6 on: January 24, 2006, 03:50:36 PM »
3. A little tip: Use the search on the forum for : Dropdown Fields. You will find a useful MOD, made by V@no, with detailed instructions on how to proceed with dropdowns. ;)
I wish it would, unfortunetly that mod is for user custom fields only, not images custom fields..:(
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: license mod for download images...
« Reply #7 on: January 24, 2006, 03:54:14 PM »
Quote

I wish it would, unfortunetly that mod is for user custom fields only, not images custom fields.


Oh ! ... I see. In that case, this might have been asked in the past, but how about expanding the general function, from includes/functions.php file, so that $additional_image_fields could also be used ? ;)

Offline hulker

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: license mod for download images...
« Reply #8 on: January 24, 2006, 08:11:43 PM »
ok, sorry v@no, that means that i canīt use your pulldown for the license
definition i want to integrate, right?

how about developing that license agreement mod together? or just
give it a try to develop it?

as i said before, iīm not really an expert with php but i still know the
html part of it.

or anyone else interested in this?

letīs come together
floyd


Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: license mod for download images...
« Reply #9 on: January 24, 2006, 08:21:47 PM »
Quote

ok, sorry v@no, that means that i canīt use your pulldown for the license
definition i want to integrate, right?


For now, not if you wish to customize the image fields from additional readings by using his customized MOD.

Quote

how about developing that license agreement mod together? or just
give it a try to develop it?


I do remember seeing a MOD regarding the license agreement MOD. Perhaps this could be expanded a little more (if more is needed of course).

Offline hulker

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: license mod for download images...
« Reply #10 on: January 24, 2006, 09:15:26 PM »
@oracle: i would appreciate any tip that helps me realizing this mod.
as i said before, the only mod i know is v@nos by showing an agreement before
the original image can be seen.

Terms and Conditions for images v1.2.1
http://www.4homepages.de/forum/index.php?topic=7113.0

what mod do you remember?

thanks
floyd

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: license mod for download images...
« Reply #11 on: January 25, 2006, 12:31:25 AM »
Yes, that's the one. The Terms & Agreement MOD could be expanded rather than starting a new MOD subject since this one is pretty much similar to what you're looking for. ;)

Offline hulker

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: license mod for download images...
« Reply #12 on: January 27, 2006, 08:26:13 AM »
@the oracle and all:

yes, v@nos mod is similar to what i nedd, thatīs right. but still there is missing the complete option
in the user image upload form to choose the, let me call it "image restriction" option.

i donīt know how to implement it there, because if a user is choosing an "image restriction", that means
that the administrator should see his restrictions in the backend.

and if the user wants to edit his picture he should have the possibility to change the restrictions, too.
is there anybody out there who knows what i mean?:-)

sorry, but i really do need some help to expand v@nos mod in that way, that it is used in the user upload
form also.

can anybody help me out?

thanks for all your efforts here
hulker