Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Bomba

Pages: 1 ... 5 6 7 8 [9] 10
121
Mods & Plugins (Requests & Discussions) / Random Images of one category
« on: February 25, 2003, 10:49:25 PM »
hello i want to create a private category where only users with permission can submit their pics and i would like to have in the index.php a line of 6 random pics from that category. i would use this random pics above the last submited images on the index.php.

is this possible? it would be great. thanks

122
Mods & Plugins (Releases & Support) / [Mod] Show user's lightbox to admin.
« on: February 25, 2003, 10:29:53 PM »
hello, this mod sounds really cool but isn't possible to make all users seing the other user lightbox? only admin can see the lightbox?

thanks

123
is it possible to had a search field in this mod? where users can write the username that they want to find

is this possible?

124
Mods & Plugins (Releases & Support) / [Mod] User upload limits
« on: February 23, 2003, 11:37:31 PM »
yes, before this i and the other members were able to upload the pics.

when will it be out the fresh 4images?

125
Mods & Plugins (Releases & Support) / [Mod] User upload limits
« on: February 23, 2003, 11:11:23 PM »
:( did all the changes again and nothing :(
it keeps saying "choose image file"

do i have to chmod any files or something?
you can see this running in http://www.web-fxdesigns.com/4images/index.php it's in portuguese.

i will really need this mod :(
thanks for all your help

126
Mods & Plugins (Releases & Support) / [Mod] User upload limits
« on: February 23, 2003, 10:04:27 PM »
maybe the problem is that i already have installed once the install_user_limit.php and now if i try to do it for the second time it shows:
Code: [Select]
DB Error: Bad SQL Query: INSERT INTO 4images_settings () VALUES ('default_upload_limit', 5)
Duplicate entry 'default_upload_limit' for key 1

DB Error: Bad SQL Query: ALTER TABLE 4images_users ADD user_limit SMALLINT(3) DEFAULT 5 NOT NULL
Duplicate column name 'user_limit'
 
 


i know that the mod instructions say that we shouldn't do it twice. so what should i do?


here are the rest of the changed codes

register php:
Code: [Select]
$current_time = time();
    $user_level = ($config['account_activation'] == 0) ? USER : USER_AWAITING;
    $user_limit= $config['default_upload_limit'];
    $sql = "INSERT INTO ".USERS_TABLE."
            (".get_user_table_field("", "user_id").get_user_table_field(", ", "user_level").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_password").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_showemail").get_user_table_field(", ", "user_allowemails").get_user_table_field(", ", "user_invisible").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_activationkey").get_user_table_field(", ", "user_lastaction").get_user_table_field(", ", "user_lastvisit").get_user_table_field(", ", "user_comments").get_user_table_field(", ", "user_homepage").get_user_table_field(", ", "user_icq").(", ").('user_limit').$additional_field_sql.")
            VALUES
            ($user_id, $user_level, '$user_name', '".md5($user_password)."', '$user_email', $user_showemail, $user_allowemails, $user_invisible, $current_time, '$activationkey', $current_time, $current_time, 0, '$user_homepage', '$user_icq', $user_limit".$additional_value_sql.")";
    $result = $site_db->query($sql);


admin/users:
Code: [Select]
 show_input_row($lang['field_icq'], "user_icq", $user_row['user_icq'], $textinput_size);
  show_input_row($lang['field_limit'], "user_limit", $user_row['user_limit']);


admin/settings:
Code: [Select]
 show_setting_row("max_media_size");
  show_setting_row("default_upload_limit");


and the rest were the lang files.
thanks

127
Mods & Plugins (Releases & Support) / [Mod] User upload limits
« on: February 23, 2003, 09:19:04 PM »
i've changed that but now when i try to upload something it says "please choose image file!"

the code of my member.php is
Code: [Select]
));
      $media = $site_template->parse_template("media/".$file_extension);
      $content .= "<table border=\"0\" align=\"center\">\n<tr>\n<td>\n".$media."\n</td>\n</tr>\n</table>\n";
    }
    else {
      $action = "uploadform";
      $sendprocess = 1;
    }
  }
  else {
    $action = "uploadform";
    $sendprocess = 1;
  }
}

//-----------------------------------------------------
// --- Check User Limits ------------------------------
//-----------------------------------------------------

$user_id = $user_info['user_id'];

$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
if ($cat_id && isset($cat_cache[$cat_id])) {
  $clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
}
$clickstream .= $lang['file_upload_error']."</span>";

$site_template->register_vars(array(
"clickstream" => $clickstream,
"lang_no_limits" => $lang['no_limits'],
"lang_no_limits_text" => $lang['no_limits_text'],
"lang_already_loaded" => $lang['already_loaded'],
"lang_show_my_images" => $lang['show_my_images'],
"url_show_user_images" => $site_sess->url(ROOT_PATH."search.php?search_user=".$user_info['user_name'])
));

function check_picture_limit($user_id) {
   global $site_db, $site_template;

$sql = "SELECT user_limit FROM ".USERS_TABLE." WHERE user_id = $user_id";
$result = $site_db->query($sql);
$row = $site_db->fetch_array($result);
$upload_limit = ($row['user_limit']);
$site_template->register_vars("upload_limit", $upload_limit);

$limit_cutoff = time() - 60 * 60 * 24;

$sql = "SELECT COUNT(*) AS num_rows_all
FROM ".IMAGES_TABLE."
WHERE image_active = 1 AND user_id=$user_id AND image_date > $limit_cutoff";
$row = $site_db->query_firstrow($sql);
$images_per_user = $row['num_rows_all'];

$site_template->register_vars("images_per_user", $images_per_user);

if($images_per_user >= $upload_limit) {
return false;
} else {
return true;
   }
}

if ($action == "uploadform") {
 if ($cat_id != 0 && (!isset($cat_cache[$cat_id]) || !check_permission("auth_upload", $cat_id))) {
  show_error_page($lang['no_permission']);
  exit;
 }

if ($cat_id != 0 && (!isset($cat_cache[$cat_id]) || !check_picture_limit($user_id))) {
$site_template->print_template($site_template->parse_template("over_limit"));
include(ROOT_PATH.'includes/page_footer.php');
exit;
}

//-----------------------------------------------------

  $txt_clickstream = "";
  if ($cat_id && isset($cat_cache[$cat_id])) {
    $txt_clickstream .= get_category_path($cat_id, 1).$config['category_separator'];
  }
  $txt_clickstream .= $lang['user_upload'];

128
Mods & Plugins (Releases & Support) / [Mod] User upload limits
« on: February 23, 2003, 08:53:00 PM »
well i put that code after
Code: [Select]
<?php  in the install_user_limits, is that correct?

129
Mods & Plugins (Releases & Support) / [Mod] User upload limits
« on: February 23, 2003, 08:34:46 PM »
so i put this code:

Code: [Select]
function check_picture_limit($user_id) {
   global $site_db, $site_template;

$sql = "SELECT user_limit FROM ".USERS_TABLE." WHERE user_id = $user_id";
$result = $site_db->query($sql);
$row = $site_db->fetch_array($result);
$upload_limit = ($row['user_limit']);
$site_template->register_vars("upload_limit", $upload_limit);

$limit_cutoff = time() - 60 * 60 * 24;

$sql = "SELECT COUNT(*) AS num_rows_all
FROM ".IMAGES_TABLE."
WHERE image_active = 1 AND user_id=$user_id AND image_date > $limit_cutoff";
$row = $site_db->query_firstrow($sql);
$images_per_user = $row['num_rows_all'];

$site_template->register_vars("images_per_user", $images_per_user);

if($images_per_user >= $upload_limit) {
return false;
} else {
return true;
   }
}


in members.php ?
after what?

130
Mods & Plugins (Releases & Support) / [Mod] User upload limits
« on: February 23, 2003, 07:29:00 PM »
awesome! :)

just one thing i have to put that code in wich file? the "install_user_limits.php" ? if so can u tell me what code should i look for to change.

sorry i'm really bad in this kind of things and im afraid of destroy everything.
thanks

131
Installation, Update & Configuration / linking problem
« on: February 23, 2003, 03:59:39 AM »
thanks alot it worked just the way i wanted :)

just one more thing, is it possible to had the image name at the bottom?
like the POTD mod does.

thanks

132
Installation, Update & Configuration / linking problem
« on: February 22, 2003, 10:44:28 PM »
anyone?

133
Installation, Update & Configuration / linking problem
« on: February 22, 2003, 07:17:47 PM »
hello i would like to know if it's possible to link directly to the thumbnail image code. i mean, i'm using the photo of the day mod but i would like to make my own choices to that and not in the automatic way (by _rating; by_votes,...) so i would like to link to the image thumbnail and when users click on it they would be linked to the image details page.

is this possible?
i think it would be great

thanks in advance

134
Mods & Plugins (Releases & Support) / [Mod] Photo Of The Day
« on: February 22, 2003, 03:47:30 PM »
i was thinking if it's possible to have a direct choice for the POTD, like a url to the thumbnail # or something.

is this possible?
i was thinking on this cause this way i would be able to feature a new pic everyday, even if i have to edit everyday some .php files... i don't mind

thanks

135
Mods & Plugins (Releases & Support) / [Mod] Photo Of The Day
« on: February 22, 2003, 05:49:31 AM »
i see. and is there a way to clean the top image stats? so i would start counting from 0 every day.

is this possible?

Pages: 1 ... 5 6 7 8 [9] 10