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.


Topics - Sun Zaza

Pages: 1 [2] 3 4 5 6 7
16
Discussion & Troubleshooting / Sort plugins list in the ACP
« on: January 16, 2011, 06:57:29 PM »
Hi,

How can I sort the plugins list I added to my gallery (In the ACP)?

Thanks in advance,
Cruxy

17
Hi,

When the Adminstrator comment an image, I want that HIS commetrow get another color. I have seen that in a lot of blogs.

How can we do that?

Thanks in advance,
Cruxy

18
Hi,

How can I make that only the owner of the image and the Adminatrator can comment this image?


Thank you in advance,
Cruxy

19
Mods & Plugins (Requests & Discussions) / Not showing some categories
« on: December 12, 2010, 10:13:43 PM »
Hi,

For some reasons I don't want to show some categories on the homepage (index.php/home.html). (It has nothing to do with user/category permissions)

I will explain:
I added an additional category field: cat_not_show

In functions.php I need help to tweak the function "get_categories" to make it not showing the category with cat_not_show = 1:

function get_categories($cat_id 0) {
  global 
$site_template$site_db$site_sess$config$lang;
  global 
$cat_cache$cat_parent_cache$new_image_cache$subcat_ids;

  
$cattable_width ceil((intval($config['cat_table_width'])) / $config['cat_cells']);
  if ((
substr($config['cat_table_width'],-1)) == "%") {
    
$cattable_width .= "%";
  }

  if (!isset(
$cat_parent_cache[$cat_id])) {
    return 
"";
  }

  
$visible_cat_cache = array();
  foreach (
$cat_parent_cache[$cat_id] as $key => $val) {
    if (
check_permission("auth_viewcat"$val)) {
      
$visible_cat_cache[$key] = $val;
    }
  }

  if (empty(
$visible_cat_cache)) {
    return 
"";
  }

  
$total sizeof($visible_cat_cache);
  
$table_columns = (intval($config['cat_cells'])) ? intval($config['cat_cells']) : 2;
  if (
$total <= $table_columns) {
    
$table_rows 1;
  }
  else {
    
$table_rows $total $table_columns;
    if (
$total >= $table_columns && !is_integer($table_rows)) {
      
$table_rows intval($table_rows) + 1;
    }
  }

  
$categories "\n<table width=\"".$config['cat_table_width']."\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n<tr>\n<td valign=\"top\" width=\"".$cattable_width."\" class=\"catbgcolor\">\n";
  
$categories .= "<table border=\"0\" cellpadding=\"".$config['cat_table_cellpadding']."\" cellspacing=\"".$config['cat_table_cellspacing']."\">\n";
  
$count 0;
  
$count2 0;
  foreach (
$visible_cat_cache as $key => $category_id) {
    
$categories .= "<tr>\n<td valign=\"top\">\n";

    
$is_new = (isset($new_image_cache[$category_id]) && $new_image_cache[$category_id] > 0) ? 0;
    
$num_images = (isset($cat_cache[$category_id]['num_images'])) ? $cat_cache[$category_id]['num_images'] : 0;

    
$subcat_ids = array();
    
get_subcat_ids($category_id$category_id$cat_parent_cache);

    if (isset(
$subcat_ids[$category_id])) {
      foreach (
$subcat_ids[$category_id] as $val) {
        if (isset(
$new_image_cache[$val]) && $new_image_cache[$val] > 0) {
          
$is_new 1;
        }
        if (isset(
$cat_cache[$val]['num_images'])) {
          
$num_images += $cat_cache[$val]['num_images'];
        }
      }
    }

    if (
defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == || defined("SHOW_RANDOM_CAT_IMAGE") && SHOW_RANDOM_CAT_IMAGE == 0) {
      
$random_cat_image_file "";
    }
    else {
      
$random_cat_image_file get_random_image($category_id01);
    }

    
$site_template->register_vars(array(
      
"cat_id" => $category_id,
      
"cat_name" => format_text($cat_cache[$category_id]['cat_name'], 2),
      
"cat_description" => format_text($cat_cache[$category_id]['cat_description'], 1),
      
"cat_hits" => $cat_cache[$category_id]['cat_hits'],
      
"cat_is_new" => $is_new,
      
"lang_new" => $lang['new'],
      
"sub_cats" => get_subcategories($category_id),
      
"cat_url" => $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$category_id),
      
"random_cat_image_file" => $random_cat_image_file,
      
"num_images" => $num_images
    
));
    
$categories .= $site_template->parse_template("category_bit");
    
$count++;
    
$count2++;
    
$categories .= "</td>\n</tr>\n";

    if (
$count == $table_rows && $count2 sizeof($visible_cat_cache)) {
      
$categories .= "</table></td>\n";
      
$categories .= "<td valign=\"top\" width=\"".$cattable_width."\" class=\"catbgcolor\">\n";
      
$categories .= "<table border=\"0\" cellpadding=\"".$config['cat_table_cellpadding']."\" cellspacing=\"".$config['cat_table_cellspacing']."\">\n";

      
$total $total $count2;
      
$table_columns $table_columns 1;
      
/*if ($total <= $table_columns && $table_columns > 1) {
        $table_rows = 1;
      }
      else {
        $table_rows = $total / $table_columns;
        if ($total >= $table_columns && !is_integer($table_rows)) {
          $table_rows = intval($table_rows) + 1;
        }
      }*/
      
$count 0;
    }
  }

  
$categories .= "</table>\n</td>\n</tr>\n</table>\n";
  return 
$categories;
}


Any help will be aprrecaited,

Thanks in advance,
Cruxy

20
Hi,

How can I add {image_name} to the image description?

Thank you in advance,
Cruxy

21
Hi guys,

On my gallery I have an additional field with a birthdate of the user (user_birthdate = "0000-00-00".

How can I send to the user automatically a mail on his birthday. Something like:

When user_birthdate = today_date then send mail

Mayby this is an idea for the version v2.0 of the MOD Birthday v1.0 (http://www.4homepages.de/forum/index.php?topic=11558.0)

Thanks in advance.

22
Hi guys,

I am trying to add myself some users and I do not understand some stuff over there:

1- When you add an user, why he does not receive a mail to activate his account. Do I have to send it manually to hem? I hope not!

2- When you add an user, why do I have to choose for him a password manually? It should be done automatically, the same way when he register hemself.

Till now I have only those two questions.

Any explanation please?

Thanks in advance,
Cruxy

23
Hello,

If you want to add an additional field to your database as a RADIO, you use this code in db_field_definitions.php file:

$additional_image_fields['image_country'] = array($lang['image_country'], "radio"0);
So you have to choose YES or NOT.

but what about to choose between 2 values? For example: HOLLAND or GERMANY.

I am thinking about something like:

$additional_image_fields['image_country'] = array($lang['image_country'], "radio", array("Holland""Germany"), 0);


I tried to write a new function in admin/admin_function.php, but without success. Can you?

24
Hey guys,

This time I have a very difficult request:

Thanks to v@no we can use a dropdown box as an additional field, but what about showing a date input like choosing the image date in ADD IMAGE.

I believe there is a way to call  the function "show_date_input_row" from db_fields_definitions (You can find this function in admin_functions).

Am I asking something impossible?

I will hear it from you guys.

PS: Please let's take 4images to a higher level :wink:
Cruxy




UPDATE:

I believe I will do it myself. Almost done, but I think I need some help.

25
Hello,

I spent more than 4 hours looking in my 4images gallery for the code who redirect the users to the homepage when you use an image_id which does not exist.

For example:

/details.php?image_id=9000000000

First I thought this code do this action:

if (!$image_id) {
    
redirect($url);
}


but when I deleted it, I still be redirected to the homepage.


Any Idea?






26
Hello,

Can someone explain to me where can I use the new additional tags like categories, details,index, because I didn't get it yet.

Quote
Added more conditional tags (categories, details,index, member, postcards, register, search, top) for using {if index}...{if index} for homepage, {if details}...{endif details} for details.php page, etc

Do you have an example for me please? I want to see how useful the new tags are.

Thanks in advance,
Cruxy

27
Hey guys,

I have a problem:

I added a new field to my images table via admin/images.php. (Not an additional field)

show_date_input_row($lang['field_image_date2'].$lang['date_format'], "image_date2"$images['image_date2'], $textinput_size);

Till now everything is doing fine, but the problem is when it is empty (0), het shows this date: 1969-12-31 18:00:00 instead of nothing (Empty).

PS: Only by editing an image. During adding an new image, he shows an empty field.

Does anyone knows how to solve this issue?

Any help will be appreciated.

Cruxy

28
Mods & Plugins (Requests & Discussions) / Table seperator issue
« on: January 17, 2010, 12:51:27 PM »
Hello,

A few month ago V@no helped me to organize my ACP when you add a lot of additional fields to your gallery.
I added a table separator between different sections. I do it like this:

Open admin_functions.php
Find:
function show_additional_fields($type "image"$image_row = array(), $table IMAGES_TEMP_TABLE$i 0) {
  global 
$site_db$lang;

  
$field_type_array "additional_".$type."_fields";
  global ${
$field_type_array};

  if (!empty(${
$field_type_array})) {
    
$table_fields $site_db->get_table_fields($table);
    foreach (${
$field_type_array} as $key => $val) {
      if (!isset(
$table_fields[$key])) {
        continue;
      }


Add after:
if (in_array($key, array("user_extra_info")))
      {
        
show_table_separator("user extra info");
      }


It workt perfect till today. I encounter a problem:

What will happend if you have 2 additional fields for images and users with the same name? For example:

$additional_user_fields['user_extra_info'] = array($lang['user_extra_info'], "text", 0);
and
$additional_image_fields['user_extra_info'] = array($lang['user_extra_info'], "text", 0);


I believe you wil get the table seperator in images and users, but what about you don't want it in images? Only in users ACP.


How can we solve that?

Can we use something like:

if (in_array($keyuser_row("user_extra_info")))
      {
        
show_table_separator("user extra info");
      }





29
Hello V@no,

As you know and everybody also do, you made the best and the most difficult mod ever coded for 4images. I am talking about:
[MOD] Batch Copy/Move/Edit Images v4.14.1 (2008-12-30)
http://www.4homepages.de/forum/index.php?topic=6759.0

I am using it everyday more than google :wink:

I am thinking about a light version for the users table. Especially the Quick edit option. It will be very usefull for the Admin when you have a lot of additional field and you want to edit them.

For example:
You add 5 new users to your gallery and you want to edit there birthdate, address, hobby....
This mod will help you to do that in few minutes.



Do you feel like coding it V@no?

Many thanks in advance,
Cruxy

30
Programming / category name and then the images in a list
« on: January 16, 2010, 09:52:21 PM »
Hello,

On my gallery I have 2 categrories:
category 1 (id=1)
category 2 (id=2)

In each category I have 5 images.

Now I want to have a list with all images on my gallery like this:

category 1
1 image_name
2 image_name
3 image_name
4 image_name
5 image_name
category 2
6 image_name
7 image_name
8 image_name
9 image_name
10 image_name


That means the name of category and then the images of this category and then the other category and then the images of the last category.

The basic code is:

$video_list .= "<tr><td valign=\"top\" class=\"sortable\">".$i++."- <a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$image_row['image_id'])."\">".$image_row['image_name']."</a></td>  
   
</td></tr>
   "
;                   
}      

  
$video_list .= "</table>\n";
  
$site_template->register_vars("video_list"$video_list); 
unset(
$video_list);


Thanks in advance,
Cruxy

Pages: 1 [2] 3 4 5 6 7