Author Topic: [MOD] Aricaur Integration  (Read 20346 times)

0 Members and 1 Guest are viewing this topic.

Offline Aricaur

  • Pre-Newbie
  • Posts: 3
    • View Profile
[MOD] Aricaur Integration
« on: December 27, 2005, 06:07:15 PM »
##############################################################
## MOD Title: Aricaur Integration - Image Branded Merchandise
## MOD Author: Dean Higginbotham -- dhigginbotham@aricaur.com -- www.aricaur.com
## MOD Description: This mod is to help admins with Aricaur integration. Aricaur is a service similar to CafePress or Shutterfly, except that the website owner gets a cut of the sale. I know CafePress helps you earn money too, but this was specifically developed for webmasters like you -- with a large volume of images and little time to waste posting your images to two locations.
## MOD Version: 1.7.0
##
## Installation Level: (Intermediate)
## Installation Time: 1 hour
## Files To Edit: /includes/constants.php, /admin/settings.php, /lang/english/admin.php, /admin/images.php, /admin/admin_functions.php, /includes/functions.php, /templates/default/details.html, /details.php
## Included Files: /AricaurText.php , /templates/default/images/Aricaur_mini.gif, /templates/default/images/Aricaur.gif
##############################################################
## Author Notes:
## Please email me with any bugs.
##############################################################
## MOD History:
##
##   2004-09-03 - Version 1.7.0
##      - initial creation
##
##############################################################
## Before Adding This MOD To Your Gallery, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ ACTION ]------------------------------------------
#
add to the settings table:
Code: [Select]
insert into {table prefix}settings (setting_name,setting_value) values ('ARICAUR_WEBMASTER_ID','')
insert into {table prefix}settings (setting_name,setting_value) values ('ARICAUR_WEBMASTER_PASSCODE','')

#
#-----[ ACTION ]------------------------------------------
#
add this column to the images table:
Code: [Select]
ALTER TABLE {table prefix}images ADD aricaur CHAR(3) NULL
UPDATE {table prefix}images set aricaur=''

#
#-----[ ACTION ]------------------------------------------
#
/includes/constants.php
FIND:
Code: [Select]
define('SCRIPT_VERSION',
ADD BENEATH:
Code: [Select]
define('ARICAUR_ID', '2906'); // ARICAUR.COM


#
#-----[ ACTION ]------------------------------------------
#
/admin/settings.php
FIND:
Code: [Select]
show_setting_row("gz_compress_level");
ADD BENEATH:
Code: [Select]
show_setting_row("ARICAUR_WEBMASTER_ID"); // ARICAUR.COM
show_setting_row("ARICAUR_WEBMASTER_PASSCODE"); // ARICAUR.COM


#
#-----[ ACTION ]------------------------------------------
#
/lang/english/admin.php (if possible, translate and add to the other language files)
FIND:
Code: [Select]
$lang['options'] = "Options";
ADD BENEATH:
Code: [Select]
$lang['enablearicaur'] = "Aricaur"; // ARICAUR.COM
$lang['aricaur_update'] = "Update Aricaur"; // ARICAUR.COM
$lang['aricaur_manage'] = " Manage your Aricaur account "; // ARICAUR.COM
$lang['aricaur_signup'] = " Sign up with Aricaur.com and earn money with your images. "; // ARICAUR.COM

FIND:
Code: [Select]
$setting['gz_compress_level'] = "GZip level of compression<br /><span class=\"smalltext\">0-9, 0=none, 9=max</span>";
ADD BENEATH:
Code: [Select]
$setting['ARICAUR_WEBMASTER_ID'] = "If you have an Aricaur.com account, please enter your Webmaster ID#."; // ARICAUR.COM
$setting['ARICAUR_WEBMASTER_PASSCODE'] = "If you have an Aricaur.com account, please enter your passcode."; // ARICAUR.COM



#
#-----[ ACTION ]------------------------------------------
#
/admin/images.php
FIND:
Code: [Select]
if ($action == "findimages") {
REPLACE WITH:
Code: [Select]
if ( ($action == "findimages") || ($action == "updatearicaur") ) { // ARICAUR.COM

// ARICAUR.COM
If ($action == "updatearicaur")
{
// add the Aricaur flag to the images that have been checked.
// if an image has been unchecked, remove the Aricaur flag from the db
$aImage_ID_Aricaur = array();
if (isset($HTTP_POST_VARS['image_id_aricaur'])) {
$aImage_ID_Aricaur = $HTTP_POST_VARS['image_id_aricaur'];
}
else {
$aImage_ID_Aricaur[] = 0;
}

foreach ($aImage_ID_Aricaur as $val) {
$sOriginalAricaur = $HTTP_POST_VARS['originalaricaur_'.$val];
if (isset($HTTP_POST_VARS['aricaur_'.$val])) {
$sAricaur = "1";
}Else{
$sAricaur = "0";
}
If ( $sOriginalAricaur != $sAricaur )
{
// they are different, so the admin changed something
If ( $sAricaur == "1" )
{
// set it in the database
$result = $site_db->query("UPDATE " . IMAGES_TABLE . " SET Aricaur = '1' WHERE Image_ID = " . $val);
}Else{
// clear it in the database
$result = $site_db->query("UPDATE " . IMAGES_TABLE . " SET Aricaur = '' WHERE Image_ID = " . $val);
}
}
}
}
// END ARICAUR.COM

FIND:
Code: [Select]
  if ($orderby == "") {
    $orderby = "i.image_name";
  }
ADD BENEATH:
Code: [Select]
$orderby.= ", i.image_media_file"; // ARICAUR.COM

FIND:
Code: [Select]
echo "<td class=\"tableseparator\"><input name=\"allbox\" type=\"checkbox\" onClick=\"CheckAll();\" /></td>\n";
REPLACE WITH:
Code: [Select]
echo "<td class=\"tableseparator\"><input name=\"alldelbox\" type=\"checkbox\" onClick=\"CheckAllDelete();\" /></td>\n"; // ARICAUR.COM

FIND:
Code: [Select]
echo "<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n<td class=\"tableseparator\">".$lang['field_username']."</td>\n<td class=\"tableseparator\">".$lang['field_date']."</td>\n<td class=\"tableseparator\">".$lang['options']."</td>\n</tr>\n";
REPLACE WITH:
Code: [Select]
    // ARICAUR.COM
    If ( $config['ARICAUR_WEBMASTER_ID'] != "" )
    {
    echo "<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n<td class=\"tableseparator\">".$lang['field_username']."</td>\n<td class=\"tableseparator\">".$lang['field_date']."</td>\n<td class=\"tableseparator\">".$lang['options']."</td>\n<td class=\"tableseparator\"><a href=\"http://www.aricaur.com/\" target=\"_blank\"><img src=\"".get_gallery_image("Aricaur_mini.gif")."\" alt=\"" . $lang['aricaur_manage'] . "\" width=21 height=24 border=0 align=absmiddle></a>&nbsp;&nbsp;".$lang['enablearicaur']."<input name=\"allaricaurbox\" type=\"checkbox\" onClick=\"CheckAllAricaur();\" /></td>\n</tr>\n";
    }Else{
    echo "<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n<td class=\"tableseparator\">".$lang['field_username']."</td>\n<td class=\"tableseparator\">".$lang['field_date']."</td>\n<td class=\"tableseparator\">".$lang['options']."</td>\n<td class=\"tableseparator\"><a href=\"http://www.aricaur.com/default.asp?Referral_ID=" . ARICAUR_ID . "\" target=\"_blank\"><img src=\"".get_gallery_image("Aricaur_mini.gif")."\" alt=\"" . $lang['aricaur_signup'] . "\" width=21 height=24 border=0 align=absmiddle></a></td>\n</tr>\n";
}
// END ARICAUR.COM

FIND:
Code: [Select]
    $sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_date".get_user_table_field(", u.", "user_name")."
            FROM ".IMAGES_TABLE." i
            LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
            WHERE $condition
            ORDER BY $orderby $direction
            LIMIT $limitstart, $limitnumber";
REPLACE WITH:
Code: [Select]
    $sql = "SELECT i.aricaur, i.image_id, i.cat_id, i.user_id, i.image_name, i.image_media_file, i.image_date".get_user_table_field(", u.", "user_name")."
            FROM ".IMAGES_TABLE." i
            LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
            WHERE $condition
            ORDER BY $orderby $direction
            LIMIT $limitstart, $limitnumber";

FIND:
Code: [Select]
      show_text_link($lang['edit'],"images.php?action=editimage&image_id=".$image_row['image_id']);
      show_text_link($lang['delete'],"images.php?action=removeimage&image_id=".$image_row['image_id']);
      echo "</p></td>\n";
ADD BENEATH:
Code: [Select]
// ARICAUR.COM
If ( $config['ARICAUR_WEBMASTER_ID'] != "" )
{
  echo "<td align=center><input type='hidden' name='image_id_aricaur[]' value='".$image_row['image_id']."'>";
  If ( $image_row['aricaur'] != "" )
  {
  echo "<input type='hidden' name='originalaricaur_".$image_row['image_id']."' value='1'><input type=\"checkbox\" name=\"aricaur_".$image_row['image_id']."\" value=\"1\" checked />";
  }Else{
  echo "<input type='hidden' name='originalaricaur_".$image_row['image_id']."' value='0'><input type=\"checkbox\" name=\"aricaur_".$image_row['image_id']."\" value=\"1\" />";
  }
  echo "</td>";
    }Else{
      echo "<td>&nbsp;</td>";
    }
    // END ARICAUR.COM

FIND:
Code: [Select]
echo "<tr class=\"tablefooter\">\n<td colspan=\"6\" align=\"left\">\n&nbsp;";
REPLACE WITH:
Code: [Select]
    // ARICAUR.COM
    If ( $config['ARICAUR_WEBMASTER_ID'] != "" )
    {
    echo "<tr class=\"tablefooter\">\n<td colspan=\"3\" align=\"left\">\n&nbsp;";
    echo "<input type=\"submit\" value=\"  ".$lang['delete']."   \" class=\"button\">\n";
    echo "<td colspan=\"4\" align=\"right\">\n&nbsp;";
    show_hidden_input("image_id", $image_id);
    show_hidden_input("image_name", $image_name, 1);
    show_hidden_input("image_description", $image_description, 1);
    show_hidden_input("image_keywords", $image_keywords, 1);
    show_hidden_input("cat_id", $cat_id);
    show_hidden_input("image_media_file", $image_media_file, 1);
    show_hidden_input("image_thumb_file", $image_thumb_file, 1);
    show_hidden_input("dateafter", $dateafter);
    show_hidden_input("datebefore", $datebefore);
    show_hidden_input("downloadsupper", $downloadsupper);
    show_hidden_input("downloadslower", $downloadslower);
    show_hidden_input("ratingupper", $ratingupper);
    show_hidden_input("ratinglower", $ratinglower);
    show_hidden_input("votesupper", $votesupper);
    show_hidden_input("voteslower", $voteslower);
    show_hidden_input("hitsupper", $hitsupper);
    show_hidden_input("hitslower", $hitslower);

    show_hidden_input("orderby", $orderby, 1);
    show_hidden_input("direction", $direction, 1);
    If ( $limitstart == "0" )
    $limitstart = "";
    show_hidden_input("limitstart", $limitstart);
    show_hidden_input("limitnumber", $limitnumber);
    echo "<input type=\"button\" value=\"  ".$lang['aricaur_update']."   \" class=\"button\" onClick=\"document.form.action.value='updatearicaur'; document.form.submit(); \">\n";
}Else{
    echo "<tr class=\"tablefooter\">\n<td colspan=\"7\" align=\"left\">\n&nbsp;";
    echo "<input type=\"submit\" value=\"  ".$lang['delete']."   \" class=\"button\">\n";
}
    // END ARICAUR.COM

#
#-----[ ACTION ]------------------------------------------
#
/admin/admin_functions.php
FIND:
Code: [Select]
function CheckAll() {
ADD TWO NEW FUNCTIONS AFTER THE CheckAll() FUNCTION:
Code: [Select]
// ARICAUR.COM
    function CheckAllDelete() {
      for (var i=0;i<document.form.elements.length;i++) {
        var e = document.form.elements[i];
        if ((e.name != 'alldelbox') && (e.type=='checkbox') && ( e.name.substring(0,6) == "delete" )) {
          e.checked = document.form.alldelbox.checked;
        }
      }
    }
    function CheckAllAricaur() {
      for (var i=0;i<document.form.elements.length;i++) {
        var e = document.form.elements[i];
        if ((e.name != 'allaricaurbox') && (e.type=='checkbox') && ( e.name.substring(0,7) == "aricaur" )) {
          e.checked = document.form.allaricaurbox.checked;
        }
      }
    }
// END ARICAUR.COM



#
#-----[ ACTION ]------------------------------------------
#
/includes/functions.php
FIND:
Code: [Select]
  if (!check_permission("auth_sendpostcard", $image_row['cat_id'])) {
    $postcard_button = "<img src=\"".get_gallery_image("postcard_off.gif")."\" border=\"0\" alt=\"\" />";
  }
  else {
    $postcard_button = "<a href=\"".$site_sess->url(ROOT_PATH."postcards.php?".URL_IMAGE_ID."=".$image_row['image_id'].((!empty($mode)) ? "&amp;mode=".$mode : ""))."\"><img src=\"".get_gallery_image("postcard.gif")."\" border=\"0\" alt=\"\" /></a>";
  }
ADD BENEATH:
Code: [Select]
  // ARICAUR.COM
  If ( $config['ARICAUR_WEBMASTER_ID'] != "" )
  If ( trim($image_row['aricaur']) != "" )
  $aricaur_button = "<a href='http://www.aricaur.com/catalog/index.php?iA=3&VI=" . $config['ARICAUR_WEBMASTER_ID'] . "&iImageUnq=" . $image_row['image_id'] . "&iOID=" . $image_row['user_id'] . "' target='_blank'><img src=\"".get_gallery_image("Aricaur.gif")."\" border=\"0\" alt=\"\" /></a>";
  // END ARICAUR.COM

FIND:
Code: [Select]
"download_button" => $download_button,
ADD BENEATH:
Code: [Select]
"aricaur_button" => $aricaur_button, // ARICAUR.COM

#
#-----[ ACTION ]------------------------------------------
#
/templates/default/details.html (add the new {aricaur_button} script directive to any templates you may use)
FIND:
Code: [Select]
<br />{lightbox_button}&nbsp;&nbsp;{postcard_button}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{download_button}&nbsp;&nbsp;{download_zip_button}
ADD BENEATH:
Code: [Select]
<br />{aricaur_button} <!--ARICAUR.COM-->


#
#-----[ ACTION ]------------------------------------------
#
/details.php
FIND:
Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email")."
        FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_id = $image_id AND c.cat_id = i.cat_id";
REPLACE WITH:
Code: [Select]
$sql = "SELECT i.aricaur, i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email")."
        FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_id = $image_id AND c.cat_id = i.cat_id";

#
#-----[ ACTION ]------------------------------------------
#
Add the files:
\AricaurText.php
\templates\default\images\Aricaur_mini.gif
\templates\default\images\Aricaur.gif

#
#-----[ ACTION ]------------------------------------------
#
\AricaurText.php
FIND:
Code: [Select]
$image_root = "/4images/";
REPLACE WITH:
Code: [Select]
$image_root = "/4images/"; //(replace the "/4images/" with the path to your gallery installation or a / if it is at the root)

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#

#
#-----[ ACTION ]------------------------------------------
#
Go to http://www.aricaur.com/Accounts/NewAccounts/Default.asp?referral_id=2906 to signup

#
#-----[ ACTION ]------------------------------------------
#
Once signed up, go to http://www.aricaur.com/Accounts/Manage/PHPJK.asp to find your Webmaster ID# and Passcode
   - While on this page, enter the URL to your AricaurText.php file (and click the "Test URL" button to make sure it's working)
   
#
#-----[ ACTION ]------------------------------------------
#
Enter the Webmaster ID# and Passcode into your 4images configuration (these two fields should now be in the General settings section of the settings screen).

#
#-----[ ACTION ]------------------------------------------
#
Now, when you edit an images, it will have a checkbox to add or remove the Aricaur link on the image display page.

# EoM
« Last Edit: December 29, 2005, 12:58:21 AM by V@no »

Offline Dondi

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: Availability of Aricaur Plug-in
« Reply #1 on: December 28, 2005, 02:06:01 AM »
Thanks Thomas.  I'm installing now -- will post results shortly.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: Availability of Aricaur Plug-in
« Reply #2 on: December 28, 2005, 03:36:32 AM »
@Aricaur :

I must say, you really coded it under the 4images way.  8)

Althought, I have one comment to make :

Quote

// ARICAUR.COM
    If ( $config['ARICAUR_WEBMASTER_ID'] != "" )
    {
    echo "<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n<td class=\"tableseparator\">".$lang['field_username']."</td>\n<td class=\"tableseparator\">".$lang['field_date']."</td>\n<td class=\"tableseparator\">".$lang['options']."</td>\n<td class=\"tableseparator\"><a href=\"http://www.aricaur.com/\" target=\"_blank\"><img src=\"/templates/default/images/Aricaur_mini.gif\" alt=\"" . $lang['aricaur_manage'] . "\" width=21 height=24 border=0 align=absmiddle></a>&nbsp;&nbsp;".$lang['enablearicaur']."<input name=\"allaricaurbox\" type=\"checkbox\" onClick=\"CheckAllAricaur();\" /></td>\n</tr>\n";
    }Else{
    echo "<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n<td class=\"tableseparator\">".$lang['field_username']."</td>\n<td class=\"tableseparator\">".$lang['field_date']."</td>\n<td class=\"tableseparator\">".$lang['options']."</td>\n<td class=\"tableseparator\"><a href=\"http://www.aricaur.com/default.asp?Referral_ID=" . ARICAUR_ID . "\" target=\"_blank\"><img src=\"/templates/default/images/Aricaur_mini.gif\" alt=\"" . $lang['aricaur_signup'] . "\" width=21 height=24 border=0 align=absmiddle></a></td>\n</tr>\n";
}
// END ARICAUR.COM


should rather be replaced by :

Quote

// ARICAUR.COM
    If ( $config['ARICAUR_WEBMASTER_ID'] != "" )
    {
    echo "<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n<td class=\"tableseparator\">".$lang['field_username']."</td>\n<td class=\"tableseparator\">".$lang['field_date']."</td>\n<td class=\"tableseparator\">".$lang['options']."</td>\n<td class=\"tableseparator\"><a href=\"http://www.aricaur.com/\" target=\"_blank\"><img src=\"".get_gallery_image("Aricaur_mini.gif")."\" alt=\"".$lang['aricaur_manage']."\" width=21 height=24 border=0 align=absmiddle></a>&nbsp;&nbsp;".$lang['enablearicaur']."<input name=\"allaricaurbox\" type=\"checkbox\" onClick=\"CheckAllAricaur();\" /></td>\n</tr>\n";
    }Else{
    echo "<td class=\"tableseparator\">".$lang['field_image_name']."</td>\n<td class=\"tableseparator\">".$lang['field_category']."</td>\n<td class=\"tableseparator\">".$lang['field_username']."</td>\n<td class=\"tableseparator\">".$lang['field_date']."</td>\n<td class=\"tableseparator\">".$lang['options']."</td>\n<td class=\"tableseparator\"><a href=\"http://www.aricaur.com/default.asp?Referral_ID=" . ARICAUR_ID . "\" target=\"_blank\"><img src=\"".get_gallery_image("Aricaur_mini.gif")."\" alt=\"" . $lang['aricaur_signup'] . "\" width=21 height=24 border=0 align=absmiddle></a></td>\n</tr>\n";
}
// END ARICAUR.COM


Otherwise, the images will simply load under the default's template folder (as indicated from your original codings). ;)

As for the rest, I can't really find a scratch.  :idea:

Offline Aricaur

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: Availability of Aricaur Plug-in
« Reply #3 on: December 28, 2005, 06:52:28 PM »
Glad it meets specs!!  :D

oops!

Thanks for showing me the aricaur_mini.gif issue. I updated the mod instructions above.

Offline Dondi

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: Availability of Aricaur Plug-in
« Reply #4 on: December 29, 2005, 12:44:07 AM »
I'm installing now -- will post results shortly.


:D Mission Accomplished! :D

Test site is up and working with Ariacur.  I'm still working through the process and learning both 4image and Ariacur but I am pleased that the combination provides the basic functionality I was looking for.

Now I need to learn how to skin 4images to get the look and feel I am looking for, and to integrate Ariacur in the best way possible.

4images is really neat software with a great support community.  Ariacure is a well executed complementary service, and Dean Higginbotham is knowledgeable and responsive.  I am so glad that I found you all.

Dondi.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD] Aricaur Integration
« Reply #5 on: December 29, 2005, 01:27:49 AM »
@Aricaur:

No problem, glad I could help. However, I do have one more question for you. ;)

Quote

If ( $config['ARICAUR_WEBMASTER_ID'] != "" )
    {


The things is ... what would happend if it is empty ? ;)

Meaning, there aren't any otherwise statement in case the configurable option has not been configured (or simply modified).

Offline Aricaur

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD] Aricaur Integration
« Reply #6 on: December 29, 2005, 01:49:11 AM »
Heh, which one?  :)

There are four places that have that if/then statement.

Each has an Else, except the last. And if the ARICAUR_WEBMASTER_ID is blank, it simply doesn't display the "Buy Now" button with the image in the gallery.


...unless I missed something...

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD] Aricaur Integration
« Reply #7 on: December 29, 2005, 03:04:42 AM »
Heh, which one?  :)

There are four places that have that if/then statement.

Each has an Else, except the last. And if the ARICAUR_WEBMASTER_ID is blank, it simply doesn't display the "Buy Now" button with the image in the gallery.


...unless I missed something...

I knew you were going to say that, which is why the most appropriate target to modify would be

this one :

Code: [Select]

// ARICAUR.COM
  If ( $config['ARICAUR_WEBMASTER_ID'] != "" )
  If ( trim($image_row['aricaur']) != "" )
  $aricaur_button = "<a href='http://www.aricaur.com/catalog/index.php?iA=3&VI=" . $config['ARICAUR_WEBMASTER_ID'] . "&iImageUnq=" . $image_row['image_id'] . "&iOID=" . $image_row['user_id'] . "' target='_blank'><img src=\"".get_gallery_image("Aricaur.gif")."\" border=\"0\" alt=\"\" /></a>";
  // END ARICAUR.COM


In this case, you specified :

Quote

If ( $config['ARICAUR_WEBMASTER_ID'] != "" )
If ( trim($image_row['aricaur']) != "" )



Both cases signifies a non-empty statement from both ifs. Meaning, since it is from includes/functions.php file, don't you think it's a little limited as a routine ? 8)

What happends if the ARICAUR_WEBMASTER_ID's configuration is in fact empty and the $image_row['aricaur']'s field is also empty ? :D

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD] Aricaur Integration
« Reply #8 on: December 29, 2005, 04:58:21 PM »
where we can see a demo ???