4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on March 29, 2005, 08:31:17 PM

Title: [MOD] Terms and Conditions for images v1.2.1
Post by: V@no on March 29, 2005, 08:31:17 PM
--------- [ Introduction ] ------------
This mod will show "Terms and Conditions" message instead of image on the image details page untill the visitor accept them.

- Administrator can set terms per category and per individual image. Per image settings have higher priority then per category, meaning if both category and image set terms, only image terms will be used, and accepting image terms will not affect category terms.
- Administrator can set who must accept terms: only guests or everyone
- Cookies are supported

U can see it in action:
here (http://gallery.vano.org/11259) terms are set for the image only
and here (http://gallery.vano.org/11954) terms are set for category (members only)



--------- [ Installation ] ------------

NOTE:
This mod require [MOD] Dropdown options for custom database fields (http://www.4homepages.de/forum/index.php?topic=7112.0) mod to be installed.


Changed files:

global.php
details.php
categories.php
includes/functions.php
includes/constants.php  
includes/db_field_definitions.php
lang/<yourlanguage>/main.php
admin/categories.php
templates/<yourtemplate>/details.html  
templates/<yourtemplate>/categories.html  


New template:

templates/<yourtemplate>/terms.html  



Step 1
Open global.php
For 4images v1.7
Find:
Code: [Select]
$sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images
replace with:
Code: [Select]
$sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images, c.terms, c.terms_msg(there only added , c.terms, c.terms_msg at the end of that line)

For 4images v1.7.1
Find:
Code: [Select]
 $sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcommentReplace with:
Code: [Select]
 $sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, terms, terms_msg(there only added , terms, terms_msg at the end of that line)



Step 2
Open details.php
Find:
Code: [Select]
show_image($image_row, $mode, 0, 1);
Insert above:
Code: [Select]
//-----------------------------------------------------
//--- Image Terms -------------------------------------
//-----------------------------------------------------
if ($action == "terms") {
  terms_add($cat_id, (($image_row['terms']) ? $image_id : ""));
}
$terms = 0;
if (!terms_check($cat_id, (($image_row['terms']) ? $image_row : "")) && $action != "terms")
{
  if ($image_row['terms'])
  {
    $terms_agreement = ($lang['terms_agreement'][$image_row['terms_msg']]) ? $lang['terms_agreement'][$image_row['terms_msg']] : $lang['terms_agreement'][0];
  }
  else
  {
    $terms_agreement = ($lang['terms_agreement'][$cat_cache[$cat_id]['terms_msg']]) ? $lang['terms_agreement'][$cat_cache[$cat_id]['terms_msg']] : $lang['terms_agreement'][0];
  }
  $site_template->register_vars(array(
    "url_home" => $site_sess->url(ROOT_PATH."index.php"),
    "lang_terms" => $lang['terms'],
    "mode" => $mode,
    "lang_terms_agreement" => $terms_agreement,
    "lang_agree" => $lang['agree'],
    "lang_agree_not" => $lang['agree_not']
  ));
  $terms = $site_template->parse_template("terms");
}
$site_template->register_vars(array(
    "show_terms" => $terms,
    "no_terms" => ($terms) ? 0 : 1
));
//--- End Image Terms -------------------------------------




Step 3
Open includes/functions.php
At the end, above closing ?> insert:
Code: [Select]
//-----------------------------------------------------
//--- Image Terms -------------------------------------
//-----------------------------------------------------
function terms_check($id, $image = array())
{
  global $HTTP_COOKIE_VARS, $site_sess, $user_info, $cat_cache;
  if ($user_info['user_level'] == ADMIN || (!empty($image) && (($image['terms'] == 1 && $user_info['user_level'] > GUEST) || ($image['terms'] == 2 && $user_info['user_level'] > USER))) || (empty($image) && empty($cat_cache[$id]['terms']) || ($cat_cache[$id]['terms'] && (($cat_cache[$id]['terms'] == 1 && $user_info['user_level'] > GUEST) || ($cat_cache[$id]['terms'] == 2 && $user_info['user_level'] > USER)))))
  {
    return true;
  }
  $name = "terms";
  if (!empty($image))
  {
    $id = $image['image_id'];
    $name .= "img";
  }
  if (TERMS_COOKIES)
  {
    $cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
    $cookie_name .= $name.$user_info['user_id'];
    $split_list = isset($HTTP_COOKIE_VARS[$cookie_name]) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name])) : array();
    $terms = in_array($id, $split_list);
  }
  if (!isset($site_sess->session_info[$name]))
  {
    $site_sess->session_info[$name] = $site_sess->get_session_var($name);
  }
  $split_list = array();
  if (!empty($site_sess->session_info[$name]))
  {
    $split_list = explode(" ", $site_sess->session_info[$name]);
  }
  return ((TERMS_COOKIES && $terms) || in_array($id, $split_list));
}
    
function terms_add($id, $image = "")
{
  global $HTTP_COOKIE_VARS, $site_sess, $user_info, $cat_cache;
  $name = "terms";
  if ($image)
  {
    $id = $image;
    $name .= "img";
  }
  if (TERMS_COOKIES)
  {
    $cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
    $cookie_name .= $name.$user_info['user_id'];
    $split_list = isset($HTTP_COOKIE_VARS[$cookie_name]) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name])) : array();
    if (!in_array($id, $split_list)) {
      $cookie_termsid[] = $id;
      setcookie($cookie_name, serialize($cookie_termsid), time() + TERMS_COOKIES_EXPIRE, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
    }
  }
  if (!isset($site_sess->session_info[$name]))
  {
    $site_sess->session_info[$name] = $site_sess->get_session_var($name);
  }
  $split_list = array();
  if (!empty($site_sess->session_info[$name]))
  {
    $split_list = explode(" ", $site_sess->session_info[$name]);
  }
  if (!in_array($id, $split_list))
  {
    $site_sess->session_info[$name] .= " ".$id;
    $site_sess->session_info[$name] = trim($site_sess->session_info[$name]);
    $site_sess->set_session_var($name, $site_sess->session_info[$name]);
  }
}
//--- End Image Terms -------------------------------------




Step 4
Open includes/constants.php
At the end, above closing ?> insert:
Code: [Select]
// Terms and conditions
define('TERMS_COOKIES', 0); //use cookies? if not only session will be used (every time browser is closed a new session will be started)
define('TERMS_COOKIES_EXPIRE', 60*60*24*1); //60 seconds * 60 minutes * 24 hours * 1 day (read the comments )




Step 5
Open includes/db_field_definitions.php
At the end, above ?> insert:
Code: [Select]
$additional_image_fields['terms'] = array($lang['terms'], "dropdown", 0, $lang['terms_array'], 1);
$additional_image_fields['terms_msg'] = array($lang['terms_msg'], "dropdown", 0, $lang['terms_agreement'], 1);




Step 6
Open lang/<yourlanguage>/main.php
At the end, above closing ?> insert:
Code: [Select]
//-----------------------------------------------------
//--- Image Terms -------------------------------------
//-----------------------------------------------------
$lang['terms'] = "Terms and Conditions";
$lang['terms_msg'] = "Terms and Conditions message";
$lang['terms_agreement'] = array(
      "Terms and conditions blah blah<b>testa</b><br>asdfasdf",
      "Another terms and conditions blah blah blah"
);
$lang['terms_array'] = array("Disable", "Guests", "Everyone");




Step 7
Open admin/categories.php
Find:
Code: [Select]
function show_access_select($title = "", $type, $status) {
Insert above:
Code: [Select]
function show_terms_select($title = "", $type, $status, $array) {
  global $HTTP_POST_VARS;
  if (isset($HTTP_POST_VARS[$type])) {
    $status = $HTTP_POST_VARS[$type];
  }
  echo "<tr class=\"".get_row_bg()."\" valign=\"top\">\n<td><p class=\"rowtitle\">".$title."</p></td>\n";
  echo "<td>\n<select name=\"".$type."\">\n";
  foreach ($array as $key => $val) {
    echo "<option value=\"".$key."\"";
    if ($status == $key) {
      echo " selected=\"selected\"";
    }
    echo ">".$val."</option>\n";
  }
  echo "</select>\n</td>\n</tr>\n";
}



Step 7.1
Find two times:
Code: [Select]
 $auth_postcomment = $HTTP_POST_VARS['auth_postcomment'];
Insert below each:
Code: [Select]
 $terms = $HTTP_POST_VARS['terms'];
  $terms_msg = $HTTP_POST_VARS['terms_msg'];



Step 7.2
Find:
Code: [Select]
           (cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment)
Replace it with:
Code: [Select]
           (cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, terms, terms_msg)
(please note, that there only added , terms, terms_msg at the end of the line. If u have different line, just add those two words manualy)


Step 7.3
Two line below, find:
Code: [Select]
           ('$cat_name', '$cat_description', $cat_parent_id, $cat_order, $auth_viewcat, $auth_viewimage, $auth_download, $auth_upload, $auth_directupload, $auth_vote, $auth_sendpostcard, $auth_readcomment, $auth_postcomment)";
Replace it with:
Code: [Select]
           ('$cat_name', '$cat_description', $cat_parent_id, $cat_order, $auth_viewcat, $auth_viewimage, $auth_download, $auth_upload, $auth_directupload, $auth_vote, $auth_sendpostcard, $auth_readcomment, $auth_postcomment, '$terms', '$terms_msg')";
(same deal here, only , $terms, $terms_msg was added to the end of the line)


Step 7.4
Find:
Code: [Select]
 show_form_footer($lang['add'], $lang['reset'], 2);
Insert above:
Code: [Select]
 show_table_separator($lang['terms'], 2);
  show_terms_select($lang['terms'], 'terms', $row['terms'], $lang['terms_array']);
  show_terms_select($lang['terms_msg'], 'terms_msg', $row['terms_msg'], $lang['terms_agreement']);



Step 7.5
Find:
Code: [Select]
           SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment
Replace it with:
Code: [Select]
           SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, terms = '$terms', terms_msg = '$terms_msg'
(And again , terms = '$terms', terms_msg = '$terms_msg' was added to the end of the line)


Step 7.6
Find:
Code: [Select]
 $sql = "SELECT cat_name, cat_description, cat_parent_id, cat_hits, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment
Replace it with:
Code: [Select]
 $sql = "SELECT cat_name, cat_description, cat_parent_id, cat_hits, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, terms, terms_msg
(, terms, terms_msg was added to the end of the line)


Step 7. 7
Find:
Code: [Select]
 show_form_footer($lang['save_changes'], $lang['reset'], 2, $lang['back']);
Insert above:

(4images v1.7 - 1.7.1)
Code: [Select]
 show_table_separator($lang['terms'], 2);
  show_terms_select($lang['terms'], 'terms', $result['terms'], $lang['terms_array']);
  show_terms_select($lang['terms_msg'], 'terms_msg', $result['terms_msg'], $lang['terms_agreement']);

(4images v1.7.2+)
Code: [Select]
 show_table_separator($lang['terms'], 2);
  show_terms_select($lang['terms'], 'terms', $cat_row['terms'], $lang['terms_array']);
  show_terms_select($lang['terms_msg'], 'terms_msg', $cat_row['terms_msg'], $lang['terms_agreement']);



Step 7.8
Find:
Code: [Select]
 $sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment
Replace it with:
Code: [Select]
 $sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, terms, terms_msg
(, terms, terms_msg was added to the end of the line)



Step 8
Open templates/<yourtemplate>/details.html
Find {image} tag.
Replace it with:
Code: [Select]
                 {if show_terms}<b>{show_terms}<br /></b>{endif show_terms}
                      {if no_terms}
                      {image}
                      {endif no_terms}

Let me explain what it does. The {show_terms} tag will show the "Terms and Condition" message, u should add it in between {if show_terms} and {endif show_terms} tags, if u want u can add between those tags whatever u want to display along with the terms.
Put whatever u dont want to show when terms are present, between {if no_terms} and {endif no_terms} tags, make sure that {show_terms} tag is outside of no_terms tags.



Step 9
Create a new template: templates/<yourtemplate>/terms.html With this code:
Code: [Select]
<table border="0" cellpadding="0" cellspacing="0"  width="400" class="bordercolor" align="center">
  <tr>
    <td>
      <table width="100%" border="0" cellpadding="3" cellspacing="1">
        <tr>
          <td valign="top" class="head1">{lang_terms}</td>
        </tr>
        <tr>
          <td class="row2">{lang_terms_agreement}</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table border="0" cellspacing="1" cellpadding="1" width="400" align="center">
   <tr>
      <form method="post" action="{self}">
         <td align="right" width="50%">
            <input type="hidden" name="action" value="terms" />
{if mode}
            <input type="hidden" name="mode" value="{mode}" />
{endif mode}
            <input type="submit" value="{lang_agree}" class="button" />
         </td>
      </form>
      <form method="post" action="{url_home}">
         <td align="left" width="50%">
            <input type="submit" value="{lang_agree_not}" class="button" />
         </td>
      </form>
   </tr>
</table>




Step 10
In your favorite MySQL manager (phpmyadmin or such) execute this query:
Code: [Select]
ALTER TABLE `4images_images` ADD `terms` TINYINT( 1 ) NOT NULL, ADD `terms_msg` SMALLINT( 6 ) NOT NULL;

ALTER TABLE `4images_images_temp` ADD `terms` TINYINT( 1 ) NOT NULL, ADD `terms_msg` SMALLINT( 6 ) NOT NULL;

ALTER TABLE `4images_categories` ADD `terms` TINYINT( 1 ) NOT NULL, ADD `terms_msg` SMALLINT( 6 ) NOT NULL;

In few words:
in phpmyadmin select your database (if its not selected already), click on "SQL" icon on top and paste the query above to the text box, click "Go" button.

The alternative is to download this (http://gallery.vano.org/file61dl) installer.



Step 11
If u haven't install [MOD] Dropdown options for custom database fields (http://www.4homepages.de/forum/index.php?topic=7112.0), then do so, its required.



Step 12 (added 30-03-2005)
Open categories.php
Find:
Code: [Select]
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------

Insert above:
Code: [Select]
//-----------------------------------------------------
//--- Image Terms -------------------------------------
//-----------------------------------------------------
if ($action == "terms") {
  terms_add($cat_id);
}
$terms = 0;
if (!terms_check($cat_id) && $action != "terms")
{
  $terms_agreement = ($lang['terms_agreement'][$cat_cache[$cat_id]['terms_msg']]) ? $lang['terms_agreement'][$cat_cache[$cat_id]['terms_msg']] : $lang['terms_agreement'][0];
  $site_template->register_vars(array(
    "url_home" => $site_sess->url(ROOT_PATH."index.php"),
    "mode" => $mode,
    "lang_terms" => $lang['terms'],
    "lang_terms_agreement" => $terms_agreement,
    "lang_agree" => $lang['agree'],
    "lang_agree_not" => $lang['agree_not']
  ));
  $terms = $site_template->parse_template("terms");
}
$site_template->register_vars(array(
    "show_terms" => $terms,
    "no_terms" => ($terms) ? 0 : 1
));
//--- End Image Terms -------------------------------------



Step 13
Open templates/<yourtemplate>/categories.html
Find {thumbnails} tag
Replace it with:
Code: [Select]
{if show_terms}
            {show_terms}
{endif show_terms}
{if no_terms}
            {thumbnails}
{endif no_terms}
Adjust it to your layout ;)



Now in ACP (Admin Control Panel) under "Edit images" and "Edit categories" u should see new options.



------- [ Version history ] ----------

1.2.1 (18-04-05) (more info here (http://www.4homepages.de/forum/index.php?topic=7113.msg33578#msg33578))
  - Fixed a bug in Step 2

1.2 (30-03-05) (more info here (http://www.4homepages.de/forum/index.php?topic=7113.msg31383#msg31383))
  - Added terms to the category page

1.1 (26-08-04)
  - Fixed "decline" button. (details.php)

1.0 (25-08-04)
  - First release
Title: Re: [MOD] Terms and Conditions for images v1.1
Post by: JensF on March 30, 2005, 06:31:41 PM
Hi,

in Step 4 i found an error....

Quote
(read the comments )

this must delete.......it brings a blank Page....
Title: Re: [MOD] Terms and Conditions for images v1.1
Post by: JensF on March 30, 2005, 06:57:58 PM
Another Question.

I have made a SubCat named "Dead Animals" and i have for EveryOne the Terms & Conditions.

But it doesn´t work at the Categorie :(

See here.... http://www.terraristik-galerie.de/categories.php?cat_id=94

When i do it for a Picture only, it goes. But i want have it for the Categorie...

And now what must i do hide the Thumbs from this Pics or see another Thumb???
Title: Re: [MOD] Terms and Conditions for images v1.1
Post by: V@no on March 30, 2005, 07:24:20 PM
Hi,

in Step 4 i found an error....

Quote
(read the comments )
thanks, it was supposed to be at the same line...I've fixed it.





Another Question.

I have made a SubCat named "Dead Animals" and i have for EveryOne the Terms & Conditions.

But it doesnґt work at the Categorie :(

See here.... http://www.terraristik-galerie.de/categories.php?cat_id=94

When i do it for a Picture only, it goes. But i want have it for the Categorie...

And now what must i do hide the Thumbs from this Pics or see another Thumb???
works just fine for me...
the terms and conditions only showed at the image details page and not at the category page.
Title: Re: [MOD] Terms and Conditions for images v1.1
Post by: JensF on March 30, 2005, 08:15:52 PM
hhmmm,

but i want this way....

A User click on the Categorie and must accept the Terms and then they can see the Thumbs to click.
Title: Re: [MOD] Terms and Conditions for images v1.2
Post by: V@no on March 30, 2005, 08:43:11 PM
I like the idea!

Added two more steps 12 and 13
Also, fixed a minor bug that would not redirect to the proper page if lightbox/search mode was applyed:
in Step 2 added:
Code: [Select]
    "mode" => $mode,and in Step 9 replaced {self_mode} with {self} and added:
Code: [Select]
{if mode}
            <input type="hidden" name="mode" value="{mode}" />
{endif mode}
Title: Re: [MOD] Terms and Conditions for images v1.2
Post by: JensF on March 31, 2005, 06:59:59 AM
Hi,

thanks for this. It works great but one change and one Question i have :)

The change:

In Step 12 find

Code: [Select]
"lang_agree" => $lang['terms_yes'],
and replace with

Code: [Select]
"lang_agree" => $lang['agree'],
With the first one you can´t see the "ACCEPT" Text.

The Question:

What must i do to hide the thumbs from the Terms categorie in New Pic, Random etc......????????
Title: Re: [MOD] Terms and Conditions for images v1.2
Post by: police22 on April 18, 2005, 11:46:54 AM
V@no,

Hey I installed this mod. looked over it for hours and hours and found no mistakes i did install the [MOD] Dropdown options for custom database fields (http://www.4homepages.de/forum/index.php?topic=7112.0) as stated in the post, But didnt get on what to do at the end of it.. not sure if it was relavent to the T and C mod. but everything is installed and admin area is working but when you go to the cat or img for the first time you see the terms but you also see the {if show_terms} etc. etc.... i created a temp u/p as test/test and the folder is Insurance Photos under funny pictures dir ... http://dartezpix.servepics.com/  (http://dartezpix.servepics.com/)
also anyone know whats with the Stats. Its the More than stats or whatever.. i installed it along time ago but just havent worried about till now..  on the home page its missing the total pics and cats and if you click on a cat the stats dissappear...

thanks..
Title: Re: [MOD] Terms and Conditions for images v1.2
Post by: V@no on April 18, 2005, 02:36:27 PM
if you are using 4images v1.7.1, then there is a bug that priventconditional tags to be inside other conditional tags....the fix was lost after the hack, I think.
Title: Re: [MOD] Terms and Conditions for images v1.2
Post by: V@no on April 19, 2005, 12:30:27 AM
police22, sorry about your reply...I hit "modify" button instead of "quote" and messed it up...had to delete it afterwards...
My appology :oops:

Quote from: police22
Well V@no. i found a fix for the conditional tags, oO(I Think). well from chris http://www.4homepages.de/forum/index.php?topic=6806.0 (http://www.4homepages.de/forum/index.php?topic=6806.0)
No, its not that...I just recreated lost fix:
http://www.4homepages.de/forum/index.php?topic=7493.0
Title: Re: [MOD] Terms and Conditions for images v1.2
Post by: police22 on April 19, 2005, 12:34:54 AM
police22, sorry about your reply...I hit "modify" button instead of "quote" and messed it up...had to delete it afterwards...
My appology :oops:
ALL Man... YOUR FIRED!!!  :lol: i spent hours perfecting that reply.. hahaha.. ok..

Quote from: police22
Well V@no. i found a fix for the conditional tags, oO(I Think). well from chris http://www.4homepages.de/forum/index.php?topic=6806.0 (http://www.4homepages.de/forum/index.php?topic=6806.0)
No, its not that...I just recreated lost fix:
http://www.4homepages.de/forum/index.php?topic=7493.0

ok.. gonna try it now and will let you know... oh were you able to read all the reply.. ?????
let ya know..



UPDATE:
Ok V@no... i tried it on several computers on my network after i changed it on the server. it seems to work for the categories, BUT!!!! the terms show up on the template details.html when trying to view a image after setting the image with terms EVERYONE. After you click on Agree no picture shows up..
This is right Correct???

Quote
{if show_terms}{show_terms}{endif show_terms}
{if no_terms}
{image}
{endif no_terms}

Did i miss something? i am using the BIG mod but deleted the {if big whatever} and just had the above tags and still same. thought they may be conflicting... could it be conflicting with another mod or is it an easy fix. i did go over all the edited files and didnt spot any errors.. but of course im not perfect.  :o
Let me know.
and thanks for you help.
Dartez
Title: Re: [MOD] Terms and Conditions for images v1.2
Post by: V@no on April 19, 2005, 02:18:32 AM
hmmm...what if u change in details.php:
Code: [Select]
    "no_terms" => !$termsto this:
Code: [Select]
    "no_terms" => (!$terms)or this:
Code: [Select]
    "no_terms" => ($terms) ? 0 : 1:?:
Title: Re: [MOD] Terms and Conditions for images v1.2
Post by: police22 on April 19, 2005, 03:08:10 AM
hmmm...what if u change in details.php:
Code: [Select]
    "no_terms" => !$termsto this:
Code: [Select]
    "no_terms" => (!$terms)or this:
Code: [Select]
    "no_terms" => ($terms) ? 0 : 1:?:

SWEET.. V@NO... YOU DA MAN
Code: [Select]
    "no_terms" => ($terms) ? 0 : 1:?:
This one worked...
Hey. Hope all is going good with your website/SERVER... oh didnt you have more mods than that on your site?.. do you remember the NONONO.gif mod.. thought it was on there.. oh well cant find doc to it was wanting to make the BIG.html where the org cant be downloaded.. and add annotation to the org.. but ill do some searching unless you know exactly where to look?... V@no.. i know you hear this alot but your the best.. very edumacated  :lol: :lol: ... Thanks.
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: ascanio on April 26, 2005, 06:27:12 PM
hhmmm,

but i want this way....

A User click on the Categorie and must accept the Terms and then they can see the Thumbs to click.

I also like this idea :) i have installed the mod and it is working but i still see the thumbnails in the categorie and the terms on the top. I have follow all the steps ...
and another 2 questions when i go to edit images I see Terms and Conditions message: 0 Terms and Conditions:0 how that works if I put a 1 is enable? and another 1 y for a different message?
and the second question is : I have a a 6 lines paragraph terms and condition and when I go to edit categories the page get bigger because the paragraph :S
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: police22 on April 26, 2005, 06:52:29 PM
I also like this idea :) i have installed the mod and it is working but i still see the thumbnails in the categorie and the terms on the top. I have follow all the steps ...
This question has been asked before but V@no accidently deleted.  :lol:
But the answer i got was that this fix unless you already installed?. if so I had that problem but thought this fixed it:
police22, sorry about your reply...I hit "modify" button instead of "quote" and messed it up...had to delete it afterwards...
My appology :oops:

No, its not that...I just recreated lost fix:
http://www.4homepages.de/forum/index.php?topic=7493.0

and another 2 questions when i go to edit images I see Terms and Conditions message: 0 Terms and Conditions:0 how that works if I put a 1 is enable? and another 1 y for a different message?
There should be a drop down menu that you pick and choose. Who views the terms, which terms you want to use. You may add more to your liking.
You edit this:Step 6
Open lang/<yourlanguage>/main.php
At the end, above closing ?> insert:
Code:
//-----------------------------------------------------
//--- Image Terms -------------------------------------
//-----------------------------------------------------
$lang['terms'] = "Terms and Conditions";
$lang['terms_msg'] = "Terms and Conditions message";
$lang['terms_agreement'] = array(
      "Terms and conditions blah blah<b>testa</b><br>asdfasdf",
      "Another terms and conditions blah blah blah"

);
$lang['terms_array'] = array("Disable", "Guests", "Everyone");

and the second question is : I have a a 6 lines paragraph terms and condition and when I go to edit categories the page get bigger because the paragraph :S
it does that on mine too.. its because of the terms line that cant be broke down in the code.. i just try to deal with it.. but that is all i can say.

Hope any of this helps..   :wink:  :D
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: ascanio on April 26, 2005, 07:32:14 PM
thanks for the help but I don't see the drop down menu in edit images but in edit categories I see it. :S
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: ascanio on April 26, 2005, 07:39:01 PM
thanks for this ...
Quote
No, its not that...I just recreated lost fix:
http://www.4homepages.de/forum/index.php?topic=7493.0
now It works as I wanted :)
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: police22 on April 26, 2005, 10:32:13 PM
thanks for this ...
Quote
No, its not that...I just recreated lost fix:
http://www.4homepages.de/forum/index.php?topic=7493.0
now It works as I wanted :)

All right.. glad I could help...

V@no helps me alot.. just wanted to give back   :D :D
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: ascanio on April 27, 2005, 01:01:13 AM
Hi V@no why I don't see a drop down menu in the edit images?what i see is this:

I have installed the drop down menu MOD

(http://members.cox.net/jaime/terms.jpg)
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: police22 on April 27, 2005, 01:19:10 AM
Hi V@no why I don't see a drop down menu in the edit images?what i see is this:

I have installed the drop down menu MOD

(http://members.cox.net/jaime/terms.jpg)

Sounds to me that a step was missed or over looked, maybe?
Just a suggestion, double check the steps.. Not for sure. Sorry
but this is what it should show..
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: ascanio on April 27, 2005, 01:20:45 AM
ok, thanks, any idea what step could be?
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: V@no on April 27, 2005, 01:30:16 AM
didnt install properly [MOD] Dropdown options for custom database fields (http://www.4homepages.de/forum/index.php?topic=7112.0)
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: ascanio on April 27, 2005, 01:32:26 AM
but in the edit categories i do see the drop down menu :S
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: ascanio on April 27, 2005, 01:41:59 AM

Ok I had missed step 4 in the Drop down options ...  :oops: :oops: :oops: :oops:
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: police22 on April 27, 2005, 01:54:09 AM

Ok I had missed step 4 in the Drop down options ...  :oops: :oops: :oops: :oops:

Good deal... Glad you figured it out  :)
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Josef Florian on May 16, 2005, 10:39:50 PM
Ich bekomme folgende DB-Fehlermeldung:

DB Error: Bad SQL Query: SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, terms, terms_msg //Terms Ende FROM fotos1_4images_categories ORDER BY cat_order, cat_name ASC
You have an error in your SQL syntax near '/Terms Ende FROM fotos1_4images_categories ORDER BY cat_orde' at line 2


Was stimmt hier nicht?

Ich denke ich habe alles genau Step für Step durchgemacht!
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: V@no on May 17, 2005, 01:21:50 AM
next time before u start modifying the original code of the mod - test it and make sure it works, then u can change it or add comments (as u seems to done that)

Remove all the comments u've added yourself. You seems to add one in the wrong place, inside the database query - U CAN NOT DO THAT!
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Josef Florian on May 17, 2005, 07:30:23 AM
OK Thanks!

Das heißt also ich darf keine Kommentare vor oder nach SQL-Queries erstellen?

Danke!
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Josef Florian on May 17, 2005, 11:30:22 AM
Hallo! Der DB-Fehler kommt nun nicht mehr!

Aber ich habe das Problem das bei manchen Kategorien keine Terms & Cond.. angezeigt werden. Es stehen lediglich die IF TERMS Einträge auf der Homepage.

Im Anhang habe ich einen Ausschnitt des Screenshots!
Beim ersten Anhang (terms.gif) habe ich keine die Terms deaktiviert.
Beim 2. Anhang (terms2.gif) habe ich die Terms für Jeden aktiviert. Es wird auch angezeigt, nur die Thumbnails auch!


Was mache ich da falsch?

Die DB-Field Erweiterung habe ich bereits installiert.
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Warrior on June 03, 2005, 05:44:33 AM
I am getting this error for the Terms on the categories (more specifically, a subcat)

This is showing up whether I have it turned on or not. It's showing up in ALL the subcats.

I have checked and double checked all of the mods for this *and* the drop down portion that is required.

SEE ATTACHMENT

Also, a question- I noticed when the image is done, the terms show instead of the image, which is good, BUT the download button is still there.
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: V@no on June 03, 2005, 06:01:58 AM
bugs fixes
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Warrior on June 03, 2005, 06:03:04 AM
Solved the category problem with this-

http://www.4homepages.de/forum/index.php?topic=7493.0

V@no, yer a god :D

Anyways... would still like to know about that download button... seems like a good way for people to be bypassing the terms.
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Warrior on June 03, 2005, 06:04:25 AM
You like to post right when I am posting, don't you? :D

Yeah, I found that thread earlier in the thread and decided to check it out. It worked. You're still a god ;)
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Deven316 on June 03, 2005, 09:13:09 PM
was there another mod like this made by someone else before?
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: V@no on June 04, 2005, 12:01:52 AM
was there another mod like this made by someone else before?
not that I recall.
I have "not published (http://gallery.vano.org/file54)" version of this mod, that I made looong time ago, but its very rough and not very practical.
why do u ask?
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Deven316 on June 04, 2005, 11:33:06 PM
was there another mod like this made by someone else before?
not that I recall.
I have "not published (http://gallery.vano.org/file54)" version of this mod, that I made looong time ago, but its very rough and not very practical.
why do u ask?

I installed a mod just like this one except with less features back in November... it possibly was your "not published" mod
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: police22 on January 10, 2006, 10:03:46 PM
Vano... First is everything ok with your site.. been down today...

ok.. this mod was working fine untill .. (really dont know) but now the image detal page is not showing the full scale image.. the cat is working with the thumbs.. but when you click on a thumb and show the image its not there.. i did not change anything other than those javascript changes you had me do before.. but other than that.. nothing has been modified in a long time..
I did try to reinstall, go through all the steps and check the files.. found some missing in admin.. but wouldnt affect the image for everyone.. so .. dont know.. any help?, Thanks

[EDIT] I put the image tag {image} anywhere else in the page and its not working.. Any ideas..

[EDIT] I was wrong.. i did change something.. I did that Security Fix at the top of the site in the news box.. did that change something?..
also when i got to my site i view the source and the only thing its showing for the image is the nonono.gif hack..
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: V@no on January 11, 2006, 12:24:16 AM
The error has nothing to do with this mod, and that proble was already there first time I visited your site...
It seems that {width_height} tag is not registered or its just empty. I'd look in last changes you did in includes/functions.php
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: police22 on January 11, 2006, 12:42:44 AM
The error has nothing to do with this mod, and that proble was already there first time I visited your site...
It seems that {width_height} tag is not registered or its just empty. I'd look in last changes you did in includes/functions.php

Welcome back... What happened to your site?..
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: BartAfterDark on March 12, 2006, 04:51:08 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
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: V@no on March 12, 2006, 09:38:53 PM
Double check Step 1, 7.6 and 7.8
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: BartAfterDark on March 13, 2006, 05:41:26 PM
Just did. But still the same problem :/
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Sync on May 10, 2006, 04:34:13 AM
I tried to follow the tutorial one and occurred these errors in the Home and admin:


DB Error: Bad SQL Query: SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images, c.terms, c.terms_msg FROM galeria_categories ORDER BY cat_order, cat_name ASC
Unknown table 'c' in field list

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/webempir/public_html/galeria/includes/db_mysql.php:188) in /home/webempir/public_html/galeria/includes/sessions.php on line 86

What I must make to solve this problem?  You it would not have a ready module to install?  :oops:
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: V@no on May 10, 2006, 05:37:50 AM
Messed up Step 1. found string for v1.7.1 but replaced with the string for v1.7
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Sync on May 10, 2006, 06:16:53 AM
Thanks  :D!!

I decided the previous problem…  But now it appeared this error when I go to edit the images that already were in the gallery:
Terms and Conditions: Fatal error: Call to undefined function: get_dropdown_options() in /home/webempir/public_html/galeria/admin/admin_functions.php on line 701

Code: [Select]
698-   function show_user_dropdown_row($name, $val, $value = 0){
699-    echo "<tr class=\"".get_row_bg()."\" valign='top'>\n<td><p class=\"rowtitle\">".$val[0]."</p></td>\n";
700-    echo "<td><p>\n";
701-    echo get_dropdown_options($name, $val[3], $value, $val[4], $val[5], $val[7], 1, "", "select", $val[6]);
702-    echo "</p></td>\n</tr>\n";
703-    }
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Lukazs 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?
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: BartAfterDark 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
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: batu544 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 ?


Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: V@no 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
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: batu544 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 ??

Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Sunny C. 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?
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: batu544 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 ???
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: V@no 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."\" />";
}
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: batu544 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 ..

Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: V@no 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
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Deskcom 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.
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: batu544 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:   

Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Deskcom 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.
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Deskcom 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
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Falldog 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?
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: batu544 on August 14, 2008, 10:27:05 AM
Ancient Bump!

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

 Yes, this works with 1.7.4 . My gallery is in 1.7.4

v@no,
          Is there any php function to scramble the photos instead of blur it ?  or Do we need some more step to scramble it. ?


Thanks,
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Falldog on August 19, 2008, 03:47:47 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?

Has anyone found a fix for this? Same issue on my end in 1.7.4. Everything else works good for me.
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Falldog on September 04, 2008, 09:18:23 PM
How hard would it be to modify this mod to dictate which advertisements show up on a page? For example if it's set to disable I'd like to pull from one pool for my ad blocks while if it's anything else I'd like to get them from another pool.
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: batu544 on September 06, 2008, 09:41:51 AM
One alternate way is there.. ...

          you need to change your  details.html and categories.html.

put the entire content of these templates inside {if no_terms} and {endif no_terms} with one type of adds.

For T&C enabled imaes .. put the entire content inside {if show_terms}  and {endif show_terms} with other type of adds.



hope this helps...
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: edonai on August 30, 2009, 01:25:31 AM
Hello V@no, please help.

I'm use 1..7.7:

The mod works fine if I select "guest", but does not work for members if i select "everyone".

What should I do?
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: impss on September 23, 2009, 03:58:47 PM
Im not sure it this is the same in all version of 4images...

But in 4images 1.7.7, In order for the terms changes to show on the category edit page, i had to make this change.


For your step 7.7
In admin/categories.php
Code: [Select]
 show_table_separator($lang['terms'], 2);
  show_terms_select($lang['terms'], 'terms', $result['terms'], $lang['terms_array']);
  show_terms_select($lang['terms_msg'], 'terms_msg', $result['terms_msg'], $lang['terms_agreement']);

Replace with:

Code: [Select]
 show_table_separator($lang['terms'], 2);
  show_terms_select($lang['terms'], 'terms', $cat_row['terms'], $lang['terms_array']);
  show_terms_select($lang['terms_msg'], 'terms_msg', $cat_row['terms_msg'], $lang['terms_agreement']);

Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: V@no on September 23, 2009, 04:27:58 PM
Thank you. It was changed since v1.7.2
I've updated the installation instructions, also I think fixed step 7.4
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: impss on September 23, 2009, 05:29:20 PM
Thank you. It was changed since v1.7.2
I've updated the installation instructions, also I think fixed step 7.4

That is correct, i forgot i changed that one as well.

Btw, Thanks for this mod. I used this mod combined with a modified version of your thumb.php file to Gaussian/Grey thumbnails and print "Accept Terms To View" on top for images that have the terms set.
You can see an example here, if you want => http://www.cusstom.net/categories.php?cat_id=24&page=2
Title: Re: [MOD] Terms and Conditions for images v1.2.1
Post by: Nosferatu on June 02, 2011, 12:21:16 PM
work this mod with newest version 1.7.10 ???