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 - Sun Zaza

Pages: 1 2 [3] 4 5 6 7 ... 34
31
Hi V@no,

How can I change the width and height of the Youtube thumb?

32
Mods & Plugins (Requests & Discussions) / Re: Not showing some categories
« on: December 13, 2010, 12:09:25 AM »
I got this error:

WarningInvalid argument supplied for foreach() in /hsphere/local/home/***/*****/includes/functions.php on line 1479 

Do you know why?

33
Thank you V@no.

It was my mistake to not explain my request very good.

I need it only for some categories. So I was thinking about adding a new radio additional cat fields: cat_comments_private.
It is already done, but I stoped there.

What do you think? Or maybe you have a better idea?

34
Mods & Plugins (Requests & Discussions) / Re: Not showing some categories
« on: December 12, 2010, 11:36:10 PM »
Thanks V@no for your reaction.

It works fine with categories, but not with subcategories.

How can we implement that?

Thanks in advance,
Cruxy

35
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

36
Hi,

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


Thank you in advance,
Cruxy

37
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

38
Thanks Rembrand. Almost there.

Actually I want to use also other tags in the description. For example {image_city} as an additional field or something else.

So my question is: How can we use the tags {............} in the description textarea to show the value in the details page?

I give another example:

In the ACP I add this lines in the textarea of image description:

Quote
This image has {image_hits} views. but........

Maybe I am using a wrong tags {.....}. I don't know.

V@no said in 2006 that I was impossible in current version.
http://www.4homepages.de/forum/index.php?topic=13079.0

We are now almost in 2011. So maybe....

39
Ok no problem. I will try to explain it again.

In the ACP i add this description to the image:

Quote
I took this foto "(I want hier the name of the image)" in Italy on 01-01-2010.

So instead of "(I want hier the name of the image)" I used {image_name}, but it didn't not work.

How can we do that please?

PS: Please don't tell me that you don't understand me, otherwise I will think that you are making jokes :wink:

40
You are right x23piracy. My mistake.

Is that possible to do that?

gr,
Cruxy

41
Thanks Rembrandt for your reply.

I believe you did not understand me.

I mean using {image_name} in image descripition through ACP.

For example: The picture {image_name} was taking.....

And when I use {image_description} in details I get:
the picture was taking....

Thank you again in advance,
Cruxy

42
Hi,

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

Thank you in advance,
Cruxy

43
Thanks V@no for this awesome mod. I have a question: Is it possible to have the same width and height of the created thumbs on the media gallery?

Thanks in advance,
Cruxy

44
Thanks V@no for your reaction.

It is correct, otherwise I won't get: dutch[english]english when I choose the dutch language. Am I right?

I installed the mod again and it is now working. Very strange.

Thank you for your support.


45
Hello,

I have some problems with this mod.

My default language is dutch.

So I am using the folowing title in the image_name:

[dutch]dutch[english]english

When I use the english language i get the folowing image_name: english

but when I use the dutch language, I get the folowing image_name: dutch[english]english


I have tried everything, but without results.

Any help will be apreciated.

Thanks in advance,
Cruxy

Pages: 1 2 [3] 4 5 6 7 ... 34
Post your comments here