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 - thunderstrike

Pages: 1 [2] 3 4 5 6 ... 190
16
Mods & Plugins (Requests & Discussions) / Re: Upload help
« on: February 28, 2008, 11:48:19 PM »

17
// Step 1

In includes/functions.php file,

add in top ?>:

Code: [Select]
if (!function_exists('get_total_registered_users')) {
   function get_total_registered_users() {
      global $site_db;
   
      $sql = "

      SELECT COUNT(user_id) AS total_users
      FROM " . USERS_TABLE . "
      WHERE " . get_user_table_field("", "user_level") . " >= '" . USER . "'

      ";

      $row = $site_db->query_firstrow($sql);
      $total_users = (isset($row['total_users'])) ? $row['total_users'] : 0;

      if (sizeof($total_users) > 0) {
         return $total_users;
      }   
   }
}

// Step 2

In includes/sessions.php file,

find:

Code: [Select]
"last_24_hour_connect" => preg_replace("/" . $site_template->start . "value" . $site_template->end . "/siU", get_all_last_registered_users(), $lang['show_last_registered_users_content'])

add after:

Code: [Select]
"total_registered_users_gallery" => (function_exists('get_total_registered_users')) ? preg_replace("/" . $site_template->start . "value" . $site_template->end . "/siU", get_total_registered_users(), $lang['total_registered_users_gallery']) : "";

// Step 3

In lang/french/main.php file,

add in top ?>:

Code: [Select]
$lang['total_registered_users_gallery'] = "Nombre de membres inscrits: <b>{value}</b>";

// Step 4

In whos_online_content.html file, use: {total_registered_users_gallery}

18
Mods & Plugins (Requests & Discussions) / Re: Multiple image deletions
« on: February 28, 2008, 11:30:53 PM »
Quote
The multiple deletions would need a whole new process and at least one additional page and who knows what alse.

No new process is need ... you need add form in $new_images and $thumbnails and add input form array name in thumbnail_bit.html file ...
After delete success (and use clearlightbox) - page_header.php file is return msg text for delete in self page ...

19
Quote
"Sorry, you've already rated for this image once recently."

If add this MOD: http://www.4homepages.de/forum/index.php?topic=6123.0 - is possible for add unique vote for each image ID for each user ID. ;)

20
Quote
I was counting each step I took and didn't pay attention to what you wrote.

Is no problem but please read all instruction I post ...

Quote
It also helps control spammers. Most spammers will register just to get contact info.  This way they can not get info

Oh ... is just for email ? ... I create MOD in past for this:

- http://www.4homepages.de/forum/index.php?topic=18185.0
- http://www.4homepages.de/forum/index.php?topic=18193.0

topic no. 2 I think is request for you. ;)

21
One step more is need for this.

In member.php file,

find mailform action.

find:

Code: [Select]
if ($user_row = get_user_info($user_id)) {

add after:

Code: [Select]
if (function_exists('get_upload_user_info') && !get_upload_user_info($user_info['user_id']) && $user_info['user_id'] != $user_id) {
   show_error_page(preg_replace("/" . $site_template->start . "user_name" . $site_template->end . "/siU", format_text(trim($user_info['user_name']), 2), $lang['member_profile_no_uploads_find']));
}

22
Quote
In step 3 I put wrapped the {if loggedin_user_image_uploaded} ... {endif loggedin_user_image_uploaded} around the email  in the member_profile.html

Step 3 ? What step 3 ? I post step 1 and 2 ...

Quote
I didn't want to put it in the upload form.

Ok so no need for edit template for this. Only step 1 is need for this request.

In member.php file,

in showprofile action - find:

Code: [Select]
if ($user_row = get_user_info($user_id)) {

add after:

Code: [Select]
if (function_exists('get_upload_user_info') && !get_upload_user_info($user_info['user_id']) && $user_info['user_id'] != $user_id) {
   show_error_page(preg_replace("/" . $site_template->start . "user_name" . $site_template->end . "/siU", format_text(trim($user_info['user_name']), 2), $lang['member_profile_no_uploads_find']));
}

In lang/english/main.php file,

add in top ?>:

Code: [Select]
$lang['member_profile_no_uploads_find'] = "Sorry <b>{user_name}</b>. No upload is find from you in gallery. Upload first for see profile.";

23
I try new solution with step 1. Try again.

24
Debugger is no reproduce this ...

1 - What PHP, mySQL version use ?
2 - What is say in line 1767 to 1770 ?

25
Quote
you mean to add before the closing "?>" (this is where I added it).

If add before ?> - is good.

Quote
In step 2 when I searched for "user_loggedin" I found it in 3 places in page_header.php file - should I put the code before all three or just the first one?

If so ... I edit step 2 ...

26
In includes/functions.php file,

look for this function:

Code: [Select]
function get_category_dropdown

27
I fix step 1.

28
Hum ... I no get why but I like this ...

Ok quick way is this:

// Step 1

In includes/functions.php file,

add in top ?>:

Code: [Select]
if (!function_exists('get_upload_user_info')) {
   function get_upload_user_info($user_id) {
      global $site_db;
   
      $user_id = preg_replace("/[^0-9]+/i", "", $user_id);

      $sql = "

      SELECT COUNT(i.image_id) AS total_uploads
      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_active = 1 AND i.cat_id = c.cat_id AND " . get_user_table_field("u.", "user_id") . " = " . $user_id;

      $row = $site_db->query_firstrow($sql);
      $total_uploads = (isset($row['total_uploads'])) ? $row['total_uploads'] : 0;

      if (sizeof($total_uploads) > 0) {
         return $user_id;
      }
   }
}

// Step 2

In includes/page_header.php file,

find:

Code: [Select]
"user_loggedin" => ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) ? 0 : 1,

add line before:

Code: [Select]
"loggedin_user_image_uploaded" => (function_exists('get_upload_user_info') && get_upload_user_info($user_info['user_id'])) ? true : false,

In template (member_upload.html - e.g) try this:

Code: [Select]
{if loggedin_user_image_uploaded} ... {endif loggedin_user_image_uploaded}

replace ... for condition in template. ;)

29
Redirect logout or redirect login to admin/index.php file after add user to level 9 ?

30
Discussion & Troubleshooting / Re: How uninstall the mod
« on: February 28, 2008, 03:15:34 AM »
Is why - this MOD is good for publisher: http://www.4homepages.de/forum/index.php?topic=18308.0

Is easy for install and uninstall MOD after. ;)

Pages: 1 [2] 3 4 5 6 ... 190