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

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] Terms and Conditions for images v1.2.1
« 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 terms are set for the image only
and here terms are set for category (members only)



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

NOTE:
This mod require [MOD] Dropdown options for custom database fields 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 installer.



Step 11
If u haven't install [MOD] Dropdown options for custom database fields, 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)
  - Fixed a bug in Step 2

1.2 (30-03-05) (more info here)
  - Added terms to the category page

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

1.0 (25-08-04)
  - First release
« Last Edit: September 23, 2009, 04:26:30 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 JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [MOD] Terms and Conditions for images v1.1
« Reply #1 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....
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [MOD] Terms and Conditions for images v1.1
« Reply #2 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???
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Terms and Conditions for images v1.1
« Reply #3 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.
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 JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [MOD] Terms and Conditions for images v1.1
« Reply #4 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.
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Terms and Conditions for images v1.2
« Reply #5 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}
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 JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [MOD] Terms and Conditions for images v1.2
« Reply #6 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......????????
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline police22

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • The Dartez Page
Re: [MOD] Terms and Conditions for images v1.2
« Reply #7 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 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/
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..

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Terms and Conditions for images v1.2
« Reply #8 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.
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 V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Terms and Conditions for images v1.2
« Reply #9 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
No, its not that...I just recreated lost fix:
http://www.4homepages.de/forum/index.php?topic=7493.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 police22

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • The Dartez Page
Re: [MOD] Terms and Conditions for images v1.2
« Reply #10 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
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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Terms and Conditions for images v1.2
« Reply #11 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:?:
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 police22

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • The Dartez Page
Re: [MOD] Terms and Conditions for images v1.2
« Reply #12 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.

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #13 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

Offline police22

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • The Dartez Page
Re: [MOD] Terms and Conditions for images v1.2.1
« Reply #14 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
« Last Edit: April 27, 2005, 01:32:29 AM by V@no »

 

Post your comments here