Author Topic: [MOD] Terms and Conditions for images v1.2.1  (Read 89189 times)

0 Members and 1 Guest are viewing this topic.

Offline Lukazs

  • Newbie
  • *
  • Posts: 46
    • View Profile
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #45 on: June 19, 2006, 09:31:24 PM »
I'm trying to re-install the scripts on 1.7.2. But I got a minor problem.
Under category edit in the admin panel, it keeps saing Disable even when it's not. (look at screenshot)

I don't think I missed any parts of the how to. But I hope V@no or someone else has the answer

-  lars

Same problem for me. Some one help?

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #46 on: June 20, 2006, 12:22:19 AM »
I'm trying to re-install the scripts on 1.7.2. But I got a minor problem.
Under category edit in the admin panel, it keeps saing Disable even when it's not. (look at screenshot)

I don't think I missed any parts of the how to. But I hope V@no or someone else has the answer

-  lars

Same problem for me. Some one help?

I cant really remember if I fixed it. Haven't tried this in 1.7.2 after my friends site got hacked

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #47 on: July 31, 2008, 06:12:40 AM »
Hi,
    I have applied this MOD and its working fine also. But Is it possible to blur the thumbnails for the images which are set under terms ??

I mean to say if one image is restricted by terms then the thmbnail of that image will blured.


Please if anyone can help me on this ?



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: [MOD] Terms and Conditions for images v1.2.1
« Reply #48 on: July 31, 2008, 06:29:10 AM »
Sorry, can't help you at the moment with more then this link:
http://www.4homepages.de/forum/index.php?topic=11165.0
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 batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #49 on: July 31, 2008, 07:30:14 AM »
Sorry, can't help you at the moment with more then this link:
http://www.4homepages.de/forum/index.php?topic=11165.0

  Vano,
           Thanks for your quick reply ..   :)  .. But I have already gone thru this link and I just want to integrate these two.

Because the blur effect is only for thumbnails which the user don't have access, but this Terms and Condition MOD is for those thumbnails/images to which user have access ..

Is it Possible ??

« Last Edit: July 31, 2008, 10:34:50 AM by batu544 »

Offline qBass17

  • Addicted member
  • ******
  • Posts: 1.800
  • I ♥ 4I
    • View Profile
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #50 on: August 01, 2008, 03:11:51 PM »
Klasse teil!
Gefällt mir sehr gut.
Nice Work Vano!

Ist es auch möglich das die Terms and Conditions für jedes Bild automatisch angeschaltet sind?

[Ggogle Translate]
Is it possible that the Terms and Conditions for each image automatically applied?

[linguatec]
Is also possibly it this the term and Conditions you switch on for every picture automatically?

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #51 on: August 04, 2008, 09:34:12 AM »
Vano !!!!

              Finally I am able to apply blur effect to the images those are in T&C.  Here is what I did. please look into this and let me know if there is anything I have change. ( I have really no idea on PHP  :D ) .

I found this
Code: [Select]
      $file_src = get_file_path($thumb_file_name, "thumb", $cat_id, 0, 1);
      $image_info = @getimagesize($file_src);
      $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";

after this I inserted
Code: [Select]
      global $site_db;
      $sql = "SELECT terms
                FROM ".IMAGES_TABLE."
                WHERE image_id = $image_id";
      $result=$site_db->query($sql);
      $row = $site_db->fetch_array($result);
      $terms1 = $row['terms'];

    if ($terms1['terms'] == 2) {

  $file_src = "thumb.php?file=".urlencode(str_replace(THUMB_DIR."/", "", $file_src))."&folder=blur";
  $thumb = "<img src=\"".$file_src."\" ".(($show_link) ? "" : "onClick=\"alert('".$lang['members_only']."'); \"")."border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
//    $thumb = "<img src=\"./data/thumbnails/test.jpg\" />";

    }
    else {
    $thumb = "<img src=\"".$file_src."\" ".(($show_link) ? "" : "onClick=\"alert('".$lang['members_only']."'); \"")."border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
    }

I just moved
Code: [Select]
    $thumb = "<img src=\"".$file_src."\" ".(($show_link) ? "" : "onClick=\"alert('".$lang['members_only']."'); \"")."border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";

into this else condition.

then I took your thumb.php file from your blur effect post.

and now its done ..  :)   If any image is set for Term and Condition, then the thumbnail is now blured.

One problem !!! IF the thumbnail is in details page's next or previous image, then its displaying normal thumnail ..  :(   .

Where I have to make the changes for this ???

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: [MOD] Terms and Conditions for images v1.2.1
« Reply #52 on: August 04, 2008, 02:28:10 PM »
not tested, but try this:
in functions.php find:
Code: [Select]
function show_image(insert below:
Code: [Select]
global $image_row_temp;
$image_row_temp = $image_row;

Then replace your changes you showed above with this:
Code: [Select]
global $image_row_temp;
if (!terms_check($cat_id, (($image_row_temp['terms']) ? $image_row_temp : "")))
{
$file_src = "thumb.php?file=".urlencode(str_replace(THUMB_DIR."/", "", $file_src))."&folder=blur";
$thumb = "<img src=\"".$file_src."\" ".(($show_link) ? "" : "onClick=\"alert('".$lang['members_only']."'); \"")."border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
}
else
{
$thumb = "<img src=\"".$file_src."\" ".(($show_link) ? "" : "onClick=\"alert('".$lang['members_only']."'); \"")."border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
}
« Last Edit: August 04, 2008, 11:41:40 PM by V@no »
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 batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #53 on: August 04, 2008, 05:31:22 PM »
Vano,
          you are gr8. !!  :)  . Your code is working fine( one ')' missing in the first line. )  But still the same issue.. In the details page and in random thumbnails, it is displaying actual thumbnail .. not the blured one ..


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: [MOD] Terms and Conditions for images v1.2.1
« Reply #54 on: August 04, 2008, 11:52:13 PM »
Well, there are many little changes you'll need to do, so I'll just give you a hint what to look for, where and what to add.

in details.php search for
Code: [Select]
    $sql = "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file(you should find at least 3 instances of this line)
at the end of that line add , terms
now it should look like this:
Code: [Select]
    $sql = "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file, terms
This should fix your prev/next thumbnails.

For the random image you'll need search in functions.php for:
Code: [Select]
function get_random_image_cache() {In that function you'll find 3 $sql queries, do the same (add , terms at the end of the line) to first and third query. Don't touch
Code: [Select]
$sql = "SELECT COUNT(*) as total_images
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 Deskcom

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #55 on: August 05, 2008, 09:30:54 PM »
Is there a way to make the option to add T&C to am image when it gets first uploaded. Like when I create a image for the first time it will have the option to T&C to it at the bottom like in the edit screen.

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #56 on: August 06, 2008, 05:20:44 AM »
Well.. Vano !! I did the changes but no result  :(    so I changed the thumbnail to text link in the detail page.  :)

Kodiwolfe,
                   Yes, I think its possible but need few changes and analysis where to change  :lol:   


Offline Deskcom

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #57 on: August 06, 2008, 09:54:14 PM »
What im working on is using this script to help me make a age and censorship script. I found a post on addition image fields. Im trying to adapt it to work with this script.
I will post my findings in here if I can get it to work and post the age script in the mod and release thread. I will give V@no credit for the initial script. Thank you V@no your great.

Offline Deskcom

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #58 on: August 07, 2008, 11:55:40 PM »
I the second step to blur the image in random image, if you use 1.7.6 you will have to

Change this
Code: [Select]
, terms
To this
Code: [Select]
, i.terms

Offline Falldog

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #59 on: August 13, 2008, 11:13:24 PM »
Ancient Bump!

Does anyone know if this works with 1.7.4? Has there been any newer versions/similar mods out there?