4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on March 20, 2005, 09:14:38 PM

Title: [MOD] Category Image v1.0.2
Post by: V@no on March 20, 2005, 09:14:38 PM
This mod will let admin set an image to be showed as a category image instead of folder icon in the categories list.


--------- [ Changed Files ] --------
global.php
admin/categories.php
admin/images.php
(optional)
includes/functions.php
templates/<your template>/category_bit.html



---------- [ New files ] -----------
catimage_install.php


---------- [ Installation ] -----------

Before you do each step, scroll down and make sure that there is no exclusive for you 4images version changes. If there no version specifyed, then it means its for any 4images version.
If you see "For 4images v1.7" then it means only for v1.7, scroll down and look for the changes needed for your version. In some cases there are two separate changes for v1.7 and v1.7.1 for instance, but your version is v1.7.3, then you should do the changes for the closest to your version (in this example it would be v1.7.1)

Step 1
Open global.php  
For 4images v1.7
Find:
Code: [Select]
  $sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images
At the end of that line (!) add:
Quote
, c.cat_image

after u've changed it, the line should looks something like this:
Quote
$sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images, c.cat_image


For 4images v1.7.1
Find:
Code: [Select]
  $sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment

At the end of that line (!) add:
Quote
, cat_image

after u changed it, the line should looks something like this:
Quote
$sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image




Step 2
Open admin/categories.php
Find two (2) times:
Code: [Select]
  $auth_postcomment = $HTTP_POST_VARS['auth_postcomment'];
Insert below each line:
Code: [Select]
//Category Image
  $cat_image = (isset($HTTP_POST_VARS['cat_image']) && intval($HTTP_POST_VARS['cat_image'])) ? intval($HTTP_POST_VARS['cat_image']) : 0;
//End Category Image



Step 2.1
Find:
Code: [Select]
    $sql = "INSERT INTO ".CATEGORIES_TABLE."
            (cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment)
            VALUES
            ('$cat_name', '$cat_description', $cat_parent_id, $cat_order, $auth_viewcat, $auth_viewimage, $auth_download, $auth_upload, $auth_directupload, $auth_vote, $auth_sendpostcard, $auth_readcomment, $auth_postcomment)";

Replace with:
Code: [Select]
    $sql = "INSERT INTO ".CATEGORIES_TABLE."
            (cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image)
            VALUES
            ('$cat_name', '$cat_description', $cat_parent_id, $cat_order, $auth_viewcat, $auth_viewimage, $auth_download, $auth_upload, $auth_directupload, $auth_vote, $auth_sendpostcard, $auth_readcomment, $auth_postcomment, $cat_image)";



Step 2.2
4images v1.7-1.7.2
Find:
Code: [Select]
            SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment

Replace with:
Code: [Select]
            SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, cat_image = $cat_image

4images v1.7.3
Find:
Code: [Select]
            SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_order = $cat_order, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment
Replace with:
Code: [Select]
            SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_order = $cat_order, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, cat_image = $cat_image


Step 2.3
Find:
Code: [Select]
  $sql = "SELECT cat_name, cat_description, cat_parent_id, cat_hits, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment
Replace with:
Code: [Select]
  $sql = "SELECT cat_name, cat_description, cat_parent_id, cat_hits, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image

4images v1.7.3
Find:
Code: [Select]
  $sql = "SELECT cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment
Replace with:
Code: [Select]
  $sql = "SELECT cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image


Step 2.4
Find:
Code: [Select]
  show_form_footer($lang['save_changes'], $lang['reset'], 2, $lang['back']);
Insert above:
Code: [Select]
// Category image 
  $cat_image = "";
  if ($result['cat_image'])
  {
    $sql = "SELECT image_id, image_media_file, image_thumb_file, image_name, cat_id
            FROM ".IMAGES_TABLE."
            WHERE image_id = ".$result['cat_image'];
    if ($image_row = $site_db->query_firstrow($sql))
    {
      if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
      {
        $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
      }
      else
      {
        $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
      }
      $file_info = @getimagesize($cat_image);
      $dim = 50;
      $width = $file_info[0];
      $height = $file_info[1];
      if ($width && $height) {
        if ($width > $dim || $height > $dim) {
          @$ratio = $width / $height;
          if ($ratio > 1) {
            $new_width = $dim;
            $new_height = round(($dim/$width) * $height);
          }else {
            $new_width = round(($dim/$height) * $width);
            $new_height = $dim;
          }
        }else{
          $new_width = $width;
          $new_height = $height;
        }
      }else{
        $new_width = $dim;
        $new_height = $dim;
      }
      $cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a>&nbsp;<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>";
    }
   
  }
  $value = $result['cat_image'];
  if (isset($HTTP_POST_VARS['cat_image'])/* && $value == ""*/) {
    $value = stripslashes($HTTP_POST_VARS['cat_image']);
  }
  echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">Category image</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$value."\">&nbsp;$cat_image</p></td>\n</tr>\n";
//End Category image


Step 2.5
Find (in 4images v1.7.2 and above there are two instances of this line, find and replace both!):
Code: [Select]
  $sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment Replace with:
Code: [Select]
  $sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image


Step 2.6 (added 2006-03-13)
This step only needed for 4images v1.7.2 (or maybe newer)! (thanks to roger13 (http://www.4homepages.de/forum/index.php?topic=6922.msg64509#msg64509) for this find)
Find:
Code: [Select]
  $cat_image = "";Insert below:
Code: [Select]
  $result = $cat_row;


Step 3
Open includes/functions.php
Find:
Code: [Select]
    if (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0 || defined("SHOW_RANDOM_CAT_IMAGE") && SHOW_RANDOM_CAT_IMAGE == 0) {
Insert above:
Code: [Select]
    $cat_image = "";
    if ($cat_cache[$category_id]['cat_image'])
    {
      $sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
              FROM ".IMAGES_TABLE."
              WHERE image_id = ".$cat_cache[$category_id]['cat_image'];
      if ($image_row = $site_db->query_firstrow($sql))
      {
        if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
        {
          $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
        }
        else
        {
          $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
        }
      }
    }
    $site_template->register_vars("cat_image", $cat_image);




Step 4
Open templates/<your template>/category_bit.html
Insert where u want the image to be displayed:
Code: [Select]
{if cat_image}<img src="{cat_image}">{endif cat_image}

Note that it will not display anything if no category image was set.



Step 5
Download database update script (#post_a)
Unpack it and upload the catimage_install.php file into your 4images root dir. Then start the updater by typing in your browser: http://<your site address>/<path to 4images>/catimage_install.php



Step 6 (optional)
For a better experience I'd suggest u install this (http://www.4homepages.de/forum/index.php?topic=6759.0) mod as well (v3.5 or newer).



------- [ How to use it ] -------

First method:

Go to ACP (Admin Control Panel) -> Edit categories -> edit a cegory.
There u should see a new field where u can manualy enter image ID which u want to use as "Category Image". If any image previously was selected, its ID and thumb with image name should be present there.

Second method:

Do Step 6
Then got to ACP -> Edit images -> find an image -> edit.
In the single image edit screen (not the group image edit!) at the bottom, u sould see a new option "Category Image (yes/no)" simply select "yes" to set that image as "Category Image".
Also if any image was previousle set as "Category Image" u should see its thumbnail and image name.


------- [ Extra ] ---------
If u wish to show something else if no "Category Image" was set, then u'll need this (http://www.4homepages.de/forum/index.php?topic=6036.0) (for 4images v1.7) or this (http://www.4homepages.de/forum/index.php?topic=7493.0) (for 4images v1.7.1) mod. Then in category_bit.html template u can use {ifno cat_image} and {endifno cat_image} in Step 4


Edit :
- 17.12.2007 : editing of the formating of this post by mawenzi
Title: Re: [MOD] Category Image v1.0.2
Post by: ascanio on April 04, 2005, 09:59:58 PM
Hi V@no I have install this mod and it works great!! but I have a question ... when I select and image to be the category image it show its thumbnail and the thumbnail of my gallery are 140 x 140 and that is too big for a category image is there any way to show a smaller one? I could upload a small pic a put that one but i don't wanr that the user see that one
Title: Re: [MOD] Category Image v1.0.2
Post by: ascanio on April 04, 2005, 10:03:47 PM
I'm stupid I just realized how to do it :):)
Code: [Select]
{if cat_image}<img src="{cat_image}" width="33" height="33">{endif cat_image}
Title: Re: [MOD] Category Image v1.0.2
Post by: Vincent on April 10, 2005, 10:15:42 PM
and how to do to have random categorie image?

vincent
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on April 10, 2005, 10:20:23 PM
u dont need this mod, just uncomment
Code: [Select]
      <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}  --> in category_bit.html template.
Title: Re: [MOD] Category Image v1.0.2
Post by: Vincent on April 11, 2005, 02:17:24 PM
 :lol: @V@no

 :lol:  thanks V@no it works -   :? but what could i do if there is no picture in a category only in the subcategorie?

sincerly
vincent
Title: Re: [MOD] Category Image v1.0.2
Post by: vpoint88 on April 12, 2005, 11:30:23 AM
V@no Thank You :D

I fund this mod for a longtime.
Now I can made it.
you see this is doing ....http://vpcdavid.idv.tw

Thank you again. :P
Title: Re: [MOD] Category Image v1.0.2
Post by: Vincent on April 12, 2005, 12:27:45 PM
Hello

asking again
Quote
but what could i do if there is no picture in a category only in the subcategorie?

Vincent
Title: Re: [MOD] Category Image v1.0.2
Post by: karimun on April 14, 2005, 07:25:06 PM
Hi V@no - right now your mod displays the thumbnail of the selected image. Is it possible to change it to have the image itself displayed?
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on April 15, 2005, 12:00:07 AM
display where? :?
@Vincent, your question is not belong to this mod, please start a new topic or something.
Title: Re: [MOD] Category Image v1.0.2
Post by: max.cady on May 09, 2005, 08:29:49 PM
Hi, this is an interesting mod. What i am not quite sure about is ... how can I add an image as category image but don't want it to show up as regular image in the categories?

If I understand it right the category image has to be an image in the specific category.

And I have the same question as karimun .. if I define an image as category image not the image itself appears as category image but its thumbnail and I would have to adjust the thumbnail size to the category image size. Is this the right way to go or have I overlooked something?
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on May 10, 2005, 01:05:18 AM
Hi, this is an interesting mod. What i am not quite sure about is ... how can I add an image as category image but don't want it to show up as regular image in the categories?
you are looking for another mod then ;)
http://www.4homepages.de/forum/index.php?topic=3589.0
Title: Re: [MOD] Category Image v1.0.2
Post by: max.cady on May 10, 2005, 06:28:43 AM
Hi V@no, thanks so much ... this is exactly what I was looking for.
What a great source this forum is. You guys are the best ...  :mrgreen:
Title: Re: [MOD] Category Image v1.0.2
Post by: ganeshcp on May 12, 2005, 12:36:23 PM
u dont need this mod, just uncomment
Code: [Select]
      <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}  --> in category_bit.html template.

hey i tried do that but nothing happens!  the variable is not parsed i guess coz of the if statement. which means its empty.....
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on May 12, 2005, 02:27:02 PM
hey i tried do that but nothing happens! the variable is not parsed i guess coz of the if statement. which means its empty.....

random_cat_image must be enabled in includes/constants.php
Title: Re: [MOD] Category Image v1.0.2
Post by: waleed on May 18, 2005, 11:17:29 PM
hi.. i want to remove the MOD and i can do that but ..
how can i remove the changes from the phpmyadmin
thanks
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on May 19, 2005, 12:08:08 AM
all you need to remove is cat_image field from 4images_categories table.
Title: Re: [MOD] Category Image v1.0.2
Post by: martrix on July 17, 2005, 12:36:04 PM
just a little tweak of this great mod:

if you'd like to show the category image smaller, than the thumbnail,
replace the code from step 3 by this:

(includes/functions.php)

Code: [Select]
//cat image
$cat_image = "";
    if ($cat_cache[$category_id]['cat_image'])
    {
      $sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
              FROM ".IMAGES_TABLE."
              WHERE image_id = ".$cat_cache[$category_id]['cat_image'];
      if ($image_row = $site_db->query_firstrow($sql))
      {
        if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
        {
          $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
        }
        else
        {
         $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);

$file_info = @getimagesize($cat_image);
$dim = 40;
$width = $file_info[0];
$height = $file_info[1];
if ($width && $height) {
         if ($width > $dim || $height > $dim) {
          @$ratio = $width / $height;
          if ($ratio > 1) {
           $new_width = $dim;
           $new_height = round(($dim/$width) * $height);
          }else {
           $new_width = round(($dim/$height) * $width);
           $new_height = $dim;
          }
         }else{
          $new_width = $width;
          $new_height = $height;
         }
        }else{
         $new_width = $dim;
         $new_height = $dim;
        }
  $cat_image = "<img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\">";
        }
      }
    }
    $site_template->register_vars("cat_image", $cat_image);

//end cat image

and step 4 by:

Code: [Select]
{if cat_image}{cat_image}{endif cat_image}
Title: Re: [MOD] Category Image v1.0.2
Post by: TomYork on August 02, 2005, 07:23:21 AM
Can I see an example of this mod online?  :oops: :roll:
Title: Re: [MOD] Category Image v1.0.2
Post by: martrix on August 02, 2005, 12:15:44 PM
Si.

Just look at V@no's page ;)
Title: Re: [MOD] Category Image v1.0.2
Post by: Egly on October 16, 2005, 12:09:42 AM
Great MOD and it nearly works  :lol:

It just shows me the adress of the thumb, but not the thumb itself...?

It looks like this:

Code: [Select]
<img src="./data/thumbnails/34/bitte_recht_freundlich.jpg" >Tiere (44) neu

In ACP the Thumb is shown correctly.

Thx for Help!
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on October 16, 2005, 12:46:55 AM
where I can see it in action?
Title: Re: [MOD] Category Image v1.0.2
Post by: Egly on October 16, 2005, 04:02:04 PM
here:

http://www.amberger-fotogalerie.de

at the first category.

Thx
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on October 16, 2005, 09:48:10 PM
category_bit.html
Quote
     <a href="{cat_url}" class="maincat"> {if cat_image}

 
&lt;img src="{cat_image}" &gt;{endif cat_image}{cat_name}</a>
Title: Re: [MOD] Category Image v1.0.2
Post by: Acidgod on December 12, 2005, 07:27:13 PM
Have a littel Modification for this Mod...

Take this Code in Step 3
Quote
      $cat_image = "";
      if ($cat_cache[$category_id]['cat_image'])
      {
         $sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
              FROM ".IMAGES_TABLE."
              WHERE image_id = ".$cat_cache[$category_id]['cat_image'];
         if ($image_row = $site_db->query_firstrow($sql))
         {
            if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
            {
               $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
            }
            else
            {
               $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
            }
         }
      }else {
         $cat_image = TEMPLATE_PATH."/images/folder.png";
      }
      $site_template->register_vars("cat_image", $cat_image);
And then it shows the Placeholder (red Code) when there is no Category Image...
Title: Re: [MOD] Category Image v1.0.2
Post by: yolvy on December 20, 2005, 06:09:41 PM
Hy V@no I just install this mode and everything work great, but when I go to CP and I try to change the category name or any field show me this message:

DB Error: Bad SQL Query: UPDATE 4images_categories SET cat_name = 'December 05', cat_description = '', cat_parent_id = 0, cat_hits = 0, auth_viewcat = 0, auth_viewimage = 2, auth_download = 2, auth_upload = 2, auth_directupload = 9, auth_vote = 0, auth_sendpostcard = 2, auth_readcomment = 0, auth_postcomment = 2, cat_image = WHERE cat_id = 3
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE cat_id = 3' at line 3
Error editing category


Please help me how fix this ....
Title: Re: [MOD] Category Image v1.0.2
Post by: Acidgod on December 20, 2005, 07:15:45 PM
reinstall the Mod, i think you have make a mistake... (o:
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on December 21, 2005, 12:19:53 AM
Quote
Step 2
Open admin/categories.php
Find two (2) times:
I'm pretty much sure that's the problem.
Title: Re: [MOD] Category Image v1.0.2
Post by: LucasXavier on December 24, 2005, 11:38:42 PM
I can't create new categories! You have a fix to this bug?
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on December 24, 2005, 11:51:22 PM
I can't create new categories! You have a fix to this bug?
Restore backups and try again
Title: Re: [MOD] Category Image v1.0.2
Post by: godboko on January 27, 2006, 07:17:28 AM
Is there an update for 1.7.1

Some of the lines don't match whats in my files, so I was hoping there was an update to this.
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on January 27, 2006, 02:30:21 PM
Please be specific, what lines?
Title: Re: [MOD] Category Image v1.0.2
Post by: godboko on January 27, 2006, 07:43:38 PM
Please be specific, what lines?

I am so sorry, I didnt see the section for 1.7.1 on the first post for the global file, I feel stupid.

Title: Re: [MOD] Category Image v1.0.2
Post by: godboko on January 27, 2006, 10:07:51 PM
Please be specific, what lines?

I am so sorry, I didnt see the section for 1.7.1 on the first post for the global file, I feel stupid.



Mod works great makes my site look 100 times better :) Thanks a million :)
Title: Re: [MOD] Category Image v1.0.2
Post by: glitzer on February 07, 2006, 08:21:03 PM
Help!

I install this mod but i dont see a thumbnail :(

http://www.niddlfanclub.com/picture/index.php

What V@no write before doesnt works to...
Code: [Select]
     <a href="{cat_url}" class="maincat"> {if cat_image}

 
&lt;img src="{cat_image}" &gt;{endif cat_image}{cat_name}</a>

Can anybody help me please.
thanks a lot
Title: Re: [MOD] Category Image v1.0.2
Post by: TheOracle on February 07, 2006, 08:24:11 PM
Quote

 <a href="{cat_url}" class="maincat"> {if cat_image}


&lt;img src="{cat_image}" &gt;{endif cat_image}{cat_name}</a>


replace the above

with this one :

Code: [Select]

{if cat_image}<a href="{cat_url}" class="maincat"><img src="{cat_url}">{cat_name}</a>{endif cat_name}


;)
Title: Re: [MOD] Category Image v1.0.2
Post by: glitzer on February 07, 2006, 08:28:31 PM
No :(

nothing works..

my category_bit.html:now

Code: [Select]
{if cat_image}<a href="{cat_url}" class="maincat"><img src="{cat_url}">{cat_name}</a>{endif cat_name}


{cat_name} ({num_images}) {if cat_is_new}{lang_new}{endif cat_is_new}

{if cat_description}{cat_description}
{endif cat_description} {if sub_cats}{sub_cats}{endif sub_cats}

not a nice site now: www.niddlfanclub.com/picture  :(

In my ACP i can see the thumbnail picture normally
(http://www.niddlfanclub.com/acp.jpg)

Title: Re: [MOD] Category Image v1.0.2
Post by: TheOracle on February 07, 2006, 08:33:42 PM
Quote

{if cat_image}<a href="{cat_url}" class="maincat"><img src="{cat_url}">{cat_name}</a>{endif cat_name}


{cat_name} ({num_images}) {if cat_is_new}{lang_new}{endif cat_is_new}

{if cat_description}{cat_description}
{endif cat_description} {if sub_cats}{sub_cats}{endif sub_cats}


This is NOT what you posted on your earlier post. This is different then.

Change the new block to simply read :

Code: [Select]

{if cat_image}<a href="{cat_url}" class="maincat"><img src="{cat_url}">{cat_name}</a>{endif cat_name} ({num_images})
{if cat_is_new}{lang_new}{endif cat_is_new}
{if cat_description}{cat_description}{endif cat_description}
{if sub_cats}{sub_cats}{endif sub_cats}

Title: Re: [MOD] Category Image v1.0.2
Post by: glitzer on February 07, 2006, 08:36:50 PM
This was i postet before..was the tipp was v@no gave another user before..not mine..but the other has the same problem how me..
Thanx for the new code..i will try it again :)
Title: Re: [MOD] Category Image v1.0.2
Post by: glitzer on February 07, 2006, 08:42:09 PM
@oracle..i know. i´m not a easy user ;=)

The Code doesnt work too

---
Now i have take the first code..its in the first script:
{if cat_image}<img src="{cat_image}">{endif cat_image}

{cat_name} ({num_images}) {if cat_is_new}{lang_new}{endif cat_is_new}

{if cat_description}{cat_description}
{endif cat_description} {if sub_cats}{sub_cats}{endif sub_cats}
---
it shows only the link, not the thumbnail
--
This Code:
Code: [Select]
{if cat_image}<a href="{cat_url}" class="maincat"><img src="{cat_url}">{cat_name}</a>{endif cat_name}


{cat_name} ({num_images}) {if cat_is_new}{lang_new}{endif cat_is_new}

{if cat_description}{cat_description}
{endif cat_description} {if sub_cats}{sub_cats}{endif sub_cats}
--
Makes the problems you have seen before..

Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on February 08, 2006, 12:15:35 AM
Most probably made a misstake in Step 1 or Step 3 (make sure you added it ABOVE not BELOW)
Title: Re: [MOD] Category Image v1.0.2
Post by: glitzer on February 27, 2006, 11:06:21 AM
Ich habe gestern einen Fehler festegestell.

Ich habe zuletzt diesen Mod eingebaut.

Nun wollte ich gestern eine neue Kategorie anlegen..kommen lauter fehlermeldung im Admin..
es werden keine Ordner mehr automatisch erstellt..erst wie ich manuell die Ordner der Thumbnail und der Images angelegt hab..ging es wieder.

Wo liegt der Fehler bitte?

danke + liebe grüße
Alexx
Title: Re: [MOD] Category Image v1.0.2
Post by: Visual-Dreams on March 06, 2006, 11:37:33 PM
Wenn ich in der admin/categories.php die Änderungen durchführe, kann ich nicht mehr die Kategorien bearbeiten (Im Admin Bereich). Keinerlei Änderungen werden dann übernommen (kein Text und keine Einstellung). Tausche ich wieder gegen die Originaldatei geht alles.

Ich benutze Version 1.7.2

Es liegt an Step 2.2
Code: [Select]
            SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, cat_image = $cat_image
Sobald ich , cat_image = $cat_image ransetze, geht nichts mehr außer das ich im Feld für das Kategorie Image was eintragen kann. Das wird dann auch übernommen, aber im Formularfeld nicht angzeigt. Alle anderen Felder sind ohne Funktion. Nimm ich cat_image = $cat_image weg, geht alles andere, aber das Kategorie Image dafür nicht.  :roll:
Title: Re: [MOD] Category Image v1.0.2
Post by: wallpapers on March 07, 2006, 07:35:49 PM
Also a great mod.  :D
Install was easy.  8)
Thanks for the mod.  :lol:
Title: Re: [MOD] Category Image v1.0.2
Post by: glitzer on March 11, 2006, 09:42:12 AM
kann mir bitte jemand helfen?
can somebody help me please!
I have installed this mod..it works great, but i have one problem.

When i create a new category.it shows the category, but the orders were not created automaticlly...
i have to create the orders in thumbnails and media manually.then it works only...

when i create in my admin panel a new category i get the following error above:
Code: [Select]
Warning: mkdir(./../data/media/95): Permission denied in /www/htdocs/v154903/picture/admin/categories.php on line 78

Warning: mkdir(./../data/media/95): Permission denied in /www/htdocs/v154903/picture/admin/categories.php on line 81

Warning: mkdir(./../data/thumbnails/95): Permission denied in /www/htdocs/v154903/picture/admin/categories.php on line 78

Warning: mkdir(./../data/thumbnails/95): Permission denied in /www/htdocs/v154903/picture/admin/categories.php on line 81
Kategorie erfolgreich hinzugefügt


Please help me, to find the error!

Thanks a lot!
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on March 11, 2006, 09:57:21 AM
1) Your problem has absolutely nothing to do with this mod.
2) Please read docs/installation.txt instructions and read our FAQ
Title: Re: [MOD] Category Image v1.0.2
Post by: glitzer on March 11, 2006, 10:54:32 AM
Thanks i find the little problem.
Title: Re: [MOD] Category Image v1.0.2
Post by: Visual-Dreams on March 11, 2006, 06:05:47 PM
@V@no

can you help me?

Wenn ich in der admin/categories.php die Änderungen durchführe, kann ich nicht mehr die Kategorien bearbeiten (Im Admin Bereich). Keinerlei Änderungen werden dann übernommen (kein Text und keine Einstellung). Tausche ich wieder gegen die Originaldatei geht alles.

Ich benutze Version 1.7.2

Es liegt an Step 2.2
Code: [Select]
            SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, cat_image = $cat_image
Sobald ich , cat_image = $cat_image ransetze, geht nichts mehr außer das ich im Feld für das Kategorie Image was eintragen kann. Das wird dann auch übernommen, aber im Formularfeld nicht angzeigt. Alle anderen Felder sind ohne Funktion. Nimm ich cat_image = $cat_image weg, geht alles andere, aber das Kategorie Image dafür nicht.  :roll:
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on March 11, 2006, 06:14:00 PM
@V@no

can you help me?
How can I, if I don't understand a single word you wrote...I don't speak german...
Title: Re: [MOD] Category Image v1.0.2
Post by: Visual-Dreams on March 11, 2006, 07:44:22 PM
Sorry
When I make changes in
admin/categories.php, i can not chance anything (categories) in the admincenter.

I use Version 1.7.2

Here is the problem  Step 2.2
Code:
            SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, cat_image = $cat_image

When i add , cat_image = $cat_image only the Category- Image field is ok. When I delete it, the other fields are ok. (Admiin-Center)

Sorry for my bad english.
Title: Re: [MOD] Category Image v1.0.2
Post by: Patrick81 on March 13, 2006, 07:32:32 PM
Hi,

I've tryed  to install this mod now 4 times with the latest release of 4images (1.7.2) in the admin menue / edit categories / it doesn't show me a thumbnail from the image id I add (for example ID 13, it shows me after save a blanc field and I see no thumb image - it only shows the category image in my album, but not in admin pannel / edit category / categoryname.

Any Ideas?

Thanks for your feedback.
Pat
Title: Re: [MOD] Category Image v1.0.2
Post by: obmob01 on March 14, 2006, 03:00:45 AM
:( not working in 1.7.2
Title: Re: [MOD] Category Image v1.0.2
Post by: roger13 on March 14, 2006, 03:27:30 AM
Hi,

I've tryed to install this mod now 4 times with the latest release of 4images (1.7.2) in the admin menue / edit categories / it doesn't show me a thumbnail from the image id I add (for example ID 13, it shows me after save a blanc field and I see no thumb image - it only shows the category image in my album, but not in admin pannel / edit category / categoryname.

Any Ideas?

Thanks for your feedback.
Pat


In admin\categories.php replace this code


Code: [Select]
// Category image 
  $cat_image = "";
  if ($result['cat_image'])
  {
    $sql = "SELECT image_id, image_media_file, image_thumb_file, image_name, cat_id
            FROM ".IMAGES_TABLE."
            WHERE image_id = ".$result['cat_image'];
    if ($image_row = $site_db->query_firstrow($sql))
    {
      if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
      {
        $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
      }
      else
      {
        $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
      }
      $file_info = @getimagesize($cat_image);
      $dim = 50;
      $width = $file_info[0];
      $height = $file_info[1];
      if ($width && $height) {
        if ($width > $dim || $height > $dim) {
          @$ratio = $width / $height;
          if ($ratio > 1) {
            $new_width = $dim;
            $new_height = round(($dim/$width) * $height);
          }else {
            $new_width = round(($dim/$height) * $width);
            $new_height = $dim;
          }
        }else{
          $new_width = $width;
          $new_height = $height;
        }
      }else{
        $new_width = $dim;
        $new_height = $dim;
      }
      $cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a>&nbsp;<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>";
    }
   
  }
  $value = $result['cat_image'];
  if (isset($HTTP_POST_VARS['cat_image'])/* && $value == ""*/) {
    $value = stripslashes($HTTP_POST_VARS['cat_image']);
  }
  echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">Category image</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$value."\">&nbsp;$cat_image</p></td>\n</tr>\n";
//End Category image


with this one:
Code: [Select]
// Category image
  $cat_image = "";
  if ($cat_row['cat_image'])
  {
    $sql = "SELECT image_id, image_media_file, image_thumb_file, image_name, cat_id
            FROM ".IMAGES_TABLE."
            WHERE image_id = ".$cat_row['cat_image'];
    if ($image_row = $site_db->query_firstrow($sql))
    {
      if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
      {
        $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
      }
      else
      {
        $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
      }
      $file_info = @getimagesize($cat_image);
      $dim = 50;
      $width = $file_info[0];
      $height = $file_info[1];
      if ($width && $height) {
        if ($width > $dim || $height > $dim) {
          @$ratio = $width / $height;
          if ($ratio > 1) {
            $new_width = $dim;
            $new_height = round(($dim/$width) * $height);
          }else {
            $new_width = round(($dim/$height) * $width);
            $new_height = $dim;
          }
        }else{
          $new_width = $width;
          $new_height = $height;
        }
      }else{
        $new_width = $dim;
        $new_height = $dim;
      }
      $cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a>&nbsp;<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>";
    }

  }
  $value = $cat_row['cat_image'];
  if (isset($HTTP_POST_VARS['cat_image'])/* && $value == ""*/) {
    $value = stripslashes($HTTP_POST_VARS['cat_image']);
  }
  echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">Category image</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$value."\">&nbsp;$cat_image</p></td>\n</tr>\n";
//End Category image

..the variable $image_row has changed to $cat_row

:( not working in 1.7.2

Sure, it do very well!  :wink:
Title: Re: [MOD] Category Image v1.0.2
Post by: roger13 on March 14, 2006, 03:37:32 AM
ups sorry... I meant the variable $result has canged to $cat_row...

Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on March 14, 2006, 03:47:53 AM
ups sorry... I meant the variable $result has canged to $cat_row...


oh, thanks, the easiest fix would be add below
Code: [Select]
  $cat_image = ""; this line:
Code: [Select]
$result = $cat_row;;)
Title: Re: [MOD] Category Image v1.0.2
Post by: roger13 on March 14, 2006, 04:05:34 AM
Quote
oh, thanks, the easiest fix would be add below...

Yes, of course.. it's as simple as that... i'ts looks more smart AND modular! Thank you  :)
Title: Re: [MOD] Category Image v1.0.2
Post by: obmob01 on March 16, 2006, 01:19:06 AM
 8O so confused now... i guess i'll have to read everything.
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on March 16, 2006, 01:23:16 AM
8O so confused now... i guess i'll have to read everything.
I guess, since you provided absolutly no usefull information about what is wrong and what is going on...
Title: Re: [MOD] Category Image v1.0.2
Post by: Visual-Dreams on March 16, 2006, 09:08:46 AM
Thanx, the changes from roger13 works.  :D
Title: Re: [MOD] Category Image v1.0.2
Post by: roger13 on March 17, 2006, 10:38:17 AM
Thanx, the changes from roger13 works. :D

you're welcome. But you can use V@no's little change, because I forgot also to change in my code ($result to $cat_row) in this line:

Code: [Select]
$cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a>&nbsp;<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>";
it should be like this:

Code: [Select]
$cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$cat_row['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a>&nbsp;<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$cat_row['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>";
..so then you will get also the correct thumb link, if you click on it... but anyway, I think V@nos change is more easy..


Title: Re: [MOD] Category Image v1.0.2
Post by: roger13 on March 17, 2006, 10:47:09 AM
 
:!: And is very important, that both kind of changes only works in Version: 1.7.2 :!:


Title: Re: [MOD] Category Image v1.0.2
Post by: sau4scr on March 20, 2006, 04:54:28 AM
V@no -

I get this when I try to add a new category. I believe it is because there is no field for a category image number when you add a new category. It still creates the category and all though.

Notice: Undefined index: 0 in /home/weston3/public_html/photographybyweston/gallery/admin/categories.php on line 500

Warning: Cannot modify header information - headers already sent by (output started at /home/weston3/public_html/photographybyweston/gallery/admin/categories.php:500) in /home/weston3/public_html/photographybyweston/gallery/includes/functions.php on line 47
Title: Re: [MOD] Category Image v1.0.2
Post by: sau4scr on March 20, 2006, 05:25:45 AM
Actually I kind of figured it out sort of. So what it is is there is no where in you're mod where you put a new row in the add categories field unless I am completely skipin something. I restored and redid the whole mod three times and got the same error. I eventually found the part where it is addcat form and i added a row right under the category name. Problem is on the left, it gives you no field name description which is kind of frustrating. Otherwise it works. If you could tell me how to give it a description name on the left I would appreciate it.

Thanks!
Title: Re: [MOD] Category Image v1.0.2
Post by: sau4scr on March 20, 2006, 05:44:15 AM
Again, nevermind I found it. Ok so you need to go into the categories.php file:

Find this:
  show_form_header("categories.php", "savecat", "cat_form");
  show_table_header($lang['nav_categories_add'], 2);
  show_input_row($lang['field_category_name'], "cat_name", "", $textinput_size);

Add Below this:
/*cat image row*/
  show_input_row($lang['field_cat_image'], "cat_image", "", $textinput_size);


Now go into your template package and open admin.php...
Find:
$lang['field_image_name'] = "Image name";
$lang['field_category_name'] = "Category name";

Add Below:
$lang['field_cat_image'] = "Image ID Number";
Where the "Image ID Number" is the row description for that field.

Save and upload, no more error.
Title: Re: [MOD] Category Image v1.0.2
Post by: wallpapers on March 23, 2006, 09:49:53 PM
this mod works perfect in 1.7.2  :D
thanks for this mod  :lol:
Title: Re: [MOD] Category Image v1.0.2
Post by: xix17_ryan on April 25, 2006, 08:46:02 PM
Hi, I use this mod.

but my problem is that I use the Category Images on the 1st Level and have subcategories, once I go into the 1st Level category, it list the Logo. but i dont wan to show the logo images as a thumbnail.

can anyone help me please
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on April 26, 2006, 12:08:36 AM
I dont understand neither is what you are using (asuming you are not using this mod), nor what is the problem...
This mod will show a thumbnail as a category icon only on the categories YOU selected.
Title: Re: [MOD] Category Image v1.0.2
Post by: andrey_fix on April 26, 2006, 03:46:16 PM
Íàäåþñü åñòü êîìó ïðî÷èòàòü è îòâåòèòü?

Óñòàíîâèë ìîä Category Image v1.0.1, ñäåëàë âñå êàê íàïèñàíî.
Åñëè â Àäìèí ïàíåëè óñòàíàâëèâàåì êàðòèíêó äëÿ  êàòåãîðèè, îíà ïîêàçûâàåòñÿ íà ïåðâîé ñòðàíèöå, åñëè óáèðàåì è äåëàåì, ÷òîáû ïîêàçûâàëèñü âûáîðî÷íî, òî íà ïåðâîé ñòðàíèöå íå ïîêàçûâàåò êàðòèíêè, çàõîäèøü â ïîäðàçäåë, òàì ïîêàçûâàåò ;(

 ÷åì ìîæåò áûòü ïðîáëåìà??
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on April 26, 2006, 11:41:18 PM
Если в Админ панели устанавливаем картинку для  категории, она показывается на первой странице, если убираем и делаем, чтобы показывались выборочно, то на первой странице не показывает картинки, заходишь в подраздел, там показывает ;(

В чем может быть проблема??
Предполагаю проблема в category_bit.html темплете, точнее проблема с тагами в той темплете.
Title: Re: [MOD] Category Image v1.0.2
Post by: andrey_fix on April 29, 2006, 03:06:46 PM
 Ïðîñìîòðåë ñîäåðæèìîå âûâîäà ïåðâîé ñòðàíèöû, è òàêîå âïå÷àòëåíèå ÷òî íå íàõîäèò ïóòü ê èçîáðàæåíèÿì, à òîëüêî ê äèðåêòîðèè, âîò ÷òî âíóòðè ñòðàíèöû ãäå äîëæíà áûòü êàðòèíêà:

<a href="./categories.php?cat_id=5&amp;sessionid=839f0c48e738da9e3ffc97405c294cff"><img src="" width="40" border="1" heigh="30" /></a>



à âîò ñîäåðæèìîå category_bit.html
-----------------------
<table border="0" cellspacing="0" cellpadding="0">
  <tr>    <td valign="top">
         <!-- <img src="{template_url}/images/folder.gif" width="20" height="13" alt="">!-->



        {if cat_image}<img src="{cat_image}" width="40" height="30" border="1" hspace="3" align="left">{endif cat_image}



      {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1" width="40" heigh="30"></a>&nbsp;&nbsp;{endif random_cat_image_file}



    </td>
    <td>
          <a href="{cat_url}" class="maincat">{cat_name}</a>&nbsp;({num_images})
      {if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}
        </td>
  </tr>
</table>
{if cat_description}
<span class="smalltext">{cat_description}</span><br />{endif cat_description}
 {if sub_cats}{sub_cats}{endif sub_cats}
----------------------------------------
Title: Re: [MOD] Category Image v1.0.2
Post by: whoopiedoo2 on April 30, 2006, 04:42:17 AM
on my index page, im getting this error:
Quote
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/likewoah/public_html/whoopiedoo/includes/functions.php:5) in /home/likewoah/public_html/whoopiedoo/includes/sessions.php on line 86

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/likewoah/public_html/whoopiedoo/includes/functions.php:5) in /home/likewoah/public_html/whoopiedoo/includes/sessions.php on line 86

Warning: Cannot modify header information - headers already sent by (output started at /home/likewoah/public_html/whoopiedoo/includes/functions.php:5) in /home/likewoah/public_html/whoopiedoo/includes/sessions.php on line 94

Warning: Cannot modify header information - headers already sent by (output started at /home/likewoah/public_html/whoopiedoo/includes/functions.php:5) in /home/likewoah/public_html/whoopiedoo/includes/sessions.php on line 94

Warning: Cannot modify header information - headers already sent by (output started at /home/likewoah/public_html/whoopiedoo/includes/functions.php:5) in /home/likewoah/public_html/whoopiedoo/includes/sessions.php on line 94

 

also, that update forv1.7.2, i couldnt find  $cat_image = "";
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on April 30, 2006, 04:57:03 AM
what is on line 5 in your include/functions.php?

You cant find it? that line is from step 2.4! if you cant find it, then I'd suggest you follow more carefully the instructions ;)
Title: Re: [MOD] Category Image v1.0.2
Post by: whoopiedoo2 on April 30, 2006, 05:13:25 AM
on line 5: *

and i looked through the file adn i couldnt find it, i did a search adn i think i found, but is it the same $cat_image = "";  that i had to add to the file?



and thnx for replying
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on April 30, 2006, 06:09:56 AM
make sure you upload .php files in ASCII (text) and not BINARY mode!
Title: Re: [MOD] Category Image v1.0.2
Post by: whoopiedoo2 on April 30, 2006, 06:35:08 AM
that may be why
Title: Re: [MOD] Category Image v1.0.2
Post by: sharangan on April 30, 2006, 06:38:39 PM
hey guys is it possable to view the cat image in the category beside the name of the catagory
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on April 30, 2006, 07:18:57 PM
edit category_bit.html template
Title: Re: [MOD] Category Image v1.0.2
Post by: sharangan on May 06, 2006, 08:11:29 PM
no i was woundering if u can show it in catagory.html templet i tryed it just shows me this {if cat_image}<img src="{cat_image}">{endif cat_image} no pictures
thanks
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on May 06, 2006, 09:20:47 PM
Then try insert in categories.php  below
Code: [Select]
$random_cat_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" : get_random_image($cat_id);
This block:
Code: [Select]
$cat_image = "";
if ($cat_cache[$cat_id]['cat_image'])
{
  $sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
          FROM ".IMAGES_TABLE."
          WHERE image_id = ".$cat_cache[$cat_id]['cat_image'];
  if ($image_row = $site_db->query_firstrow($sql))
  {
    if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
    {
      $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
    }
    else
    {
      $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
    }
  }
}
$site_template->register_vars("cat_image", $cat_image);
Title: Re: [MOD] Category Image v1.0.2
Post by: sharangan on May 07, 2006, 07:04:28 PM
hey thanks alot man ur the gratest
i can see the image but it still sows {if cat_image} "i can see the image" {endif cat_image}

Title: Re: [MOD] Category Image v1.0.2
Post by: whoopiedoo2 on May 07, 2006, 07:51:02 PM
anyone wanan do this for me? lol
im afriad i will mess up again
Title: Re: [MOD] Category Image v1.0.2
Post by: fanttomas on May 12, 2006, 03:12:31 PM
Hallo Leute


Ich habe gerade versucht Vorschaubilder für die Kategorien nach der Anleitung V@no zu erstellen, global.php &co bearbeiten wie in der Anleitung cat_image.php installiert (Aktualisierung der Datenbank erfolgreich). Nur sobald ich im ACP Kategorien bearbeiten auswähle bekomme ich folgender Fehlermedlung: DB Error: Bad SQL Query: SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image WHERE cat_parent_id = 0 ORDER BY cat_order, cat_name ASC
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE cat_parent_id = 0 ORDER BY cat_order, cat_name aus der ich nicht schlau werde.
Wenn jemand mir helfen könnte wäre ich sehr dankbar.

Gruss
Title: Re: [MOD] Category Image v1.0.2
Post by: mawenzi on May 12, 2006, 03:15:04 PM
@ fanttomas

http://www.4homepages.de/forum/index.php?topic=12957.msg69551#msg69551
Title: Re: [MOD] Category Image v1.0.2
Post by: fanttomas on May 13, 2006, 07:40:04 AM
@ fanttomas

http://www.4homepages.de/forum/index.php?topic=12957.msg69551#msg69551

Danke, schon ein gelöstes Problem; hab immer noch Erklärung keine Lösung für das Problem mit dem Mod Category image gefunden und hoffe weiterhein auf Hilfe.

gruss
Title: Re: [MOD] Category Image v1.0.2
Post by: Alex_Ok on May 13, 2006, 02:34:29 PM
Подскажите пожалста как установить картинку по умолчанию чтоб была не 0 а любая другая на усмотрение админа
Title: Re: [MOD] Category Image v1.0.2
Post by: fanttomas on May 15, 2006, 08:42:54 PM
Hi,

I get this error when i try to execute catimage_install.php;

1. Error: Duplicate column name 'cat_image'

ALTER TABLE `4images_categories` ADD `cat_image` MEDIUMINT( 8 ) NOT NULL


Can somebody help me, please?

Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on May 16, 2006, 12:37:43 AM
just ignore it, everything is fine. continue to the next step if you wish.
Title: Re: [MOD] Category Image v1.0.2
Post by: fanttomas on May 16, 2006, 11:34:51 AM
just ignore it, everything is fine. continue to the next step if you wish.

Hi V@neo, i fear make something wrong while replacing with the Mod. I am using the release 1.7.2 of 4images. I can't set the Steps 2.2 & 2.3,not found the code to replace in the admin/categories.php file.
I also couldn't find this part "  $cat_image = "";" in the same file, have you some idea please?

thx

Title: Re: [MOD] Category Image v1.0.2
Post by: morrisonjim on May 17, 2006, 03:03:32 AM
i did everything you say but nothing :(

i dont see the thumbnails
really i dont see nothing beside the caqtegories names
helpme please



just ignore it, everything is fine. continue to the next step if you wish.

Hi V@neo, i fear make something wrong while replacing with the Mod. I am using the release 1.7.2 of 4images. I can't set the Steps 2.2 & 2.3,not found the code to replace in the admin/categories.php file.
I also couldn't find this part "  $cat_image = "";" in the same file, have you some idea please?

thx


Title: Re: [MOD] Category Image v1.0.2
Post by: Lunique on May 27, 2006, 04:02:16 PM
I've updated to 1.7.2 and everything works fine with this mod except the ifno_catimage does not work.
I've alredy fixed the "ifnot" problem with this: http://www.4homepages.de/forum/index.php?topic=12251.0 but still no pictures are shown there. My code is:
Code: [Select]
{ifno cat_image}
{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="0" height="100"  alt="" ></a>{endif random_cat_image_file}{endifno cat_image}

Also I'm wondering why theres written that I can change optional something in "admin/images.php" but not written what I could change there ;)

Hugs Luna
Title: Re: [MOD] Category Image v1.0.2
Post by: Lunique on May 27, 2006, 05:34:30 PM
I fixed the Problem I had to change something in includes/constants
define('SHOW_RANDOM_IMAGE', 1);
define('SHOW_RANDOM_CAT_IMAGE', 0);

to
define('SHOW_RANDOM_IMAGE', 1);
define('SHOW_RANDOM_CAT_IMAGE', 1);

Somehow this happend while updating to 1.7.2
Title: Re: [MOD] Category Image v1.0.2
Post by: janick on June 01, 2006, 09:32:47 AM
hi.. if i do this, I can´t  Add new categories?

if i do it so came this error mgs.

Quote
Notice: Undefined variable: cat_image in /usr/home/web/web97959/mysite.com/4images/admin/categories.php on line 522

DB Error: Bad SQL Query: INSERT INTO 4images_categories (cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image) VALUES ('iiiiiiiiiii', '', 0, 220, 0, 0, 2, 2, 9, 0, 0, 0, 2, )
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 4

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/web/web97959/mysite.com/4images/admin/categories.php:522) in /usr/home/web/web97959/mysite.com/4images/includes/functions.php on line 47

but if I change (old file) /admin/categories.php  so can i make new categories...
if i change (new file) /admin/categories.php so can I cange Category Image..

any body can help me???

thanks, Janick...
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on June 01, 2006, 02:37:29 PM
made a misstake in step 2, 2.1 or 2.2
Title: Re: [MOD] Category Image v1.0.2
Post by: ahbut on June 22, 2006, 05:17:28 PM
sorry, came across a litle problem..

Everything works fine, i can choose and pick the cat image on 'edit catergories' page, but I can't see it on the individual 'edit image' page, theres no 'Category image'shown on that page.
 or do I need to have the 'batch move, edit, delete' mod to get it??
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on June 23, 2006, 12:55:17 AM
do I need to have the 'batch move, edit, delete' mod to get it??
Correct.
Step 6 ;)
Title: Re: [MOD] Category Image v1.0.2
Post by: RamEEz on August 07, 2006, 06:43:19 PM
I tried everything from A - Z but i still cant see the Category Image when editing the category.
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on August 07, 2006, 08:24:02 PM
and image id 389 exists and has thumbnail?
Title: Re: [MOD] Category Image v1.0.2
Post by: RamEEz on August 07, 2006, 08:28:57 PM
yes and it is working as the category image.
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on August 07, 2006, 08:44:42 PM
This is wierd...and if you replace in admin/categories.php
Code: [Select]
  $cat_image = "";
with:
Code: [Select]
  $cat_image = "blah";
will you see word "blah" next to the cat image field?
Title: Re: [MOD] Category Image v1.0.2
Post by: RamEEz on August 07, 2006, 09:38:22 PM
i have fixed it thanks
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on August 07, 2006, 10:56:19 PM
In case somebody esle experience this problem, would please tell what was wrong?
Title: Re: [MOD] Category Image v1.0.2
Post by: RamEEz on August 08, 2006, 02:35:03 AM
Code: [Select]
, cat_imagethis was missing in includes/functions.php
Title: Re: [MOD] Category Image v1.0.2
Post by: sajwal on August 11, 2006, 05:07:41 AM
Hi,
I am using 1.7.3 , i installed this mod with the batch edit mod as V@no adviced,
the mod is working great but not fully...the first method shown by V@no as below does not work

First method:

Go to ACP (Admin Control Panel) -> Edit categories -> edit a cegory.
There u should see a new field where u can manualy enter image ID which u want to use as "Category Image". If any image previously was selected, its ID and thumb with image name should be present there.


It shows me a blank box in Category ID every time , even when i put a img no. it does not show after i save and refresh

Where as I can use the second method (Thanks to V@no for advicing to install the other mod too) ... where i can edit a single image and assign it to be the default categroy image.

I hope this was successful explanation ... :P
Title: Re: [MOD] Category Image v1.0.2
Post by: sajwal on August 11, 2006, 05:24:51 AM
One more error caught just now,

If i add a sub cat to any cat ... it is added no doubt but shows me this error

Notice: Undefined index: cat_image in C:\wamp\www\impgal\4images1.7.3\4images\admin\categories.php on line 499

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\impgal\4images1.7.3\4images\admin\categories.php:499) in C:\wamp\www\impgal\4images1.7.3\4images\includes\functions.php on line 114
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on August 11, 2006, 05:47:37 AM
You made a misstake in Step 1.
Title: Re: [MOD] Category Image v1.0.2
Post by: sajwal on August 12, 2006, 10:11:15 PM
No, V@no,
               I checked my global.php , the change of adding ,cat_image is perfectly done..I think its something else hindering.


Pls. Help
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on August 12, 2006, 10:42:58 PM
maybe its done in a wrong place?
Title: Re: [MOD] Category Image v1.0.2
Post by: sajwal on August 13, 2006, 12:17:18 AM
maybe its done in a wrong place?
V@no thanks for taking time in correcting this : but the problem still persist

Notice: Undefined index: cat_image in C:\wamp\www\impgal\4images1.7.3\4images\admin\categories.php on line 499

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\impgal\4images1.7.3\4images\admin\categories.php:499) in C:\wamp\www\impgal\4images1.7.3\4images\includes\functions.php on line 114

 
whenever i try to add a sub category the above error is shown i think its a little bug :  :wink:

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

and secondly i cannot see any digit in category image box ...

i am attaching my global.php
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on August 13, 2006, 02:07:07 AM
please show what is on line 499 (include 10 lines above and below it)
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on August 13, 2006, 02:09:41 AM
Ok, I "think" I fixed it...redo step 2
Title: Re: [MOD] Category Image v1.0.2
Post by: sajwal on August 13, 2006, 03:25:24 AM
You are a Genius again V@no! :P
No words!!!

Working perfect (with ver 1.7.3)... both the errors are gone!  :P

Thank you very much
Title: Re: [MOD] Category Image v1.0.2
Post by: slipxnot on August 14, 2006, 02:13:07 PM
Then try insert in categories.php  below
Code: [Select]
$random_cat_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" : get_random_image($cat_id);
This block:
Code: [Select]
$cat_image = "";
if ($cat_cache[$cat_id]['cat_image'])
{
  $sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
          FROM ".IMAGES_TABLE."
          WHERE image_id = ".$cat_cache[$cat_id]['cat_image'];
  if ($image_row = $site_db->query_firstrow($sql))
  {
    if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
    {
      $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
    }
    else
    {
      $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
    }
  }
}
$site_template->register_vars("cat_image", $cat_image);

i cant get this to work i removed {if cat_image} {endif cat_image} and keept <img src="{cat_image}"> but i get the link of the image to my index page
Title: Re: [MOD] Category Image v1.0.2
Post by: ralphlei on August 22, 2006, 10:20:36 AM
Err...maybe I am too stupid to install it... :(

I have installed the mod and it works perfect. However for the 2nd method
Quote
Second method:

Do Step 6
Then got to ACP -> Edit images -> find an image -> edit.
In the single image edit screen (not the group image edit!) at the bottom, u sould see a new option "Category Image (yes/no)" simply select "yes" to set that image as "Category Image".
Also if any image was previousle set as "Category Image" u should see its thumbnail and image name.

I couldn't find the new option "Category Image (yes/no)"...I have checked many times but I still couldn't find where I missed...

Please help me...Thanks!
Title: Re: [MOD] Category Image v1.0.2
Post by: konstal102na on September 22, 2006, 05:48:28 PM
Hi i have problem with my galeery. I chcange all lines, and when I go to edit categories i see something like this:

http://pc.vsv.pl/error.jpg

Error is line 571.

Line 571:
http://pc.vsv.pl/categories.jpg

HELP!!!!
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on September 22, 2006, 10:32:15 PM
strange, I dont see anything wrong on that line...what if you restore backups and try again and make sure you upload .php files in ASCII mode not BINARY
Title: Re: [MOD] Category Image v1.0.2
Post by: neuroticvixen on September 23, 2006, 02:45:12 AM
V@no ... I'd like to give this mod a shot but I was wondering if you could attach the file:

http://gallery.vano.org/file60dl

I searched the thread and didn't see it attached anywhere and your site is down.
Thanks!
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on September 23, 2006, 02:53:41 AM
done
Title: Re: [MOD] Category Image v1.0.2
Post by: neuroticvixen on September 23, 2006, 03:33:56 AM
Thanks V@no. I have run into a problem though. I have version 1.7.3 and when I try to find the code in step 2.2 I can't find it. Any ideas?
Title: Re: [MOD] Category Image v1.0.2
Post by: Loop on September 27, 2006, 03:06:39 PM
@ Vano: I looking forward to try the Category Image MOD but i need the file which is down on http://gallery.vano.org/file60dl

EDIT:

so I have open my eyes completely and found the file  :wink:
Title: Re: [MOD] Category Image v1.0.2
Post by: whitesun on October 03, 2006, 02:48:41 AM
Huuummmm.... and where you find it?? 8O I cant see it :(!! If is possible to email me the database update, is gonna be really appreciate!!

Thanks
WhiteSun
p.s.: Sorry for my rrreally bad english :P
Title: Re: [MOD] Category Image v1.0.2
Post by: blondl on October 03, 2006, 07:57:29 PM
Hey V@no,

step 2.2 in the find-string "cat_order = $cat_order," is missing for V1.7.3.
same in the replace-string, too.

Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on October 03, 2006, 08:17:24 PM
step 2.2? there is nothing about cat_order in step 2.2 :?
Title: Re: [MOD] Category Image v1.0.2
Post by: blondl on October 03, 2006, 08:22:44 PM
step 2.2? there is nothing about cat_order in step 2.2 :?

This is what I said  :wink:

In the source of V1.7.3 is cat_order included, not in the mod


Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on October 03, 2006, 09:26:37 PM
Got it. thanks.
I've update that step for v1.7.3
;)
Title: Re: [MOD] Category Image v1.0.2
Post by: blondl on October 04, 2006, 06:44:41 AM
Hey V@no!

Agian...

Step 2.5 occors two times in V1.7.3. Am I right to change both?


btw. Is there a simple way to resize the thumbs according to their format? that means not only a width and heigth satatment. I'm seeking for a solution for landscape and portrait orientation.

and second, how can I get thumbs for the subcats in the startscreen, too?
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on October 04, 2006, 08:22:28 AM
Yes, both lines.

sorry, I cant help with further developing the mods untill I get my server back...
Title: Re: [MOD] Category Image v1.0.2
Post by: dave on October 05, 2006, 09:10:35 PM
@V@no:
Great Mod! :D

But the instructions are a bit misunderstanding, as I thought step 1 would be only necessary for versions 1.7 and 1.7.1.
I had just updated to version 1.7.3 and thus followed only explicit instructions for version 1.7.3... :wink:
Title: Re: [MOD] Category Image v1.0.2
Post by: blondl on October 18, 2006, 10:48:26 AM
btw. Is there a simple way to resize the thumbs according to their format? that means not only a width and heigth satatment. I'm seeking for a solution for landscape and portrait orientation.

To answer my own question:

Yes, there is a very simple way...

If you want to see a demo, look here: http://galerie.blondl.net

In the first posting of this thread v@no made a step 3, were he altered includes/functions.php.

If you insert this code below, instead of v@nos code, you will get the thumbs recalculate, not resized, and with correct orietation.
This code is not invented by me, its v@nos code from an other file inserted here with two or three lines added.

Here is the code:
Code: [Select]
    $cat_image = "";
    $cat_image_id = 0;
   
    if ($cat_cache[$category_id]['cat_image'])
    {
      $sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
              FROM ".IMAGES_TABLE."
              WHERE image_id = ".$cat_cache[$category_id]['cat_image'];
      if ($image_row = $site_db->query_firstrow($sql))
      {
        if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
        {
          $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
        }
        else
        {
          $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
          $cat_image_id = $image_row['image_id'];
        }

$file_info = @getimagesize($cat_image);
      $dim = 50;
      $width = $file_info[0];
      $height = $file_info[1];
      if ($width && $height) {
        if ($width > $dim || $height > $dim) {
          @$ratio = $width / $height;
          if ($ratio > 1) {
            $new_width = $dim;
            $new_height = round(($dim/$width) * $height);
          }else {
            $new_width = round(($dim/$height) * $width);
            $new_height = $dim;
          }
        }else{
          $new_width = $width;
          $new_height = $height;
        }
      }else{
        $new_width = $dim;
        $new_height = $dim;
      }
$cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$cat_image_id)."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a>&nbsp";
      }
    }
    $site_template->register_vars("cat_image", $cat_image);


@v@no:
feel free to add this mod of your mod if you want.  :wink:
Title: Re: [MOD] Category Image v1.0.2
Post by: Kane on October 24, 2006, 02:42:00 AM
u dont need this mod, just uncomment
Code: [Select]
      <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}  --> in category_bit.html template.

I've wanted this for a long time and never knew it was so easy.
Title: Re: [MOD] Category Image v1.0.2
Post by: LeeWicKeD on October 28, 2006, 09:45:53 PM
I have a problem installind this mod for 1.7.4...

I can edit a category and enter a IMAGE ID which should be displayed as category image, but it doesn't saves the number i entered. When I press "SAVE" and edit the same category again there is always entered a "0".

 :(
Title: Re: [MOD] Category Image v1.0.2
Post by: jimraynor on January 02, 2007, 04:51:44 AM
i am using 1.7.4 versiyon. How can i do category icons. Otherwise this versiyon have that?
Title: Re: [MOD] Category Image v1.0.2
Post by: alemao59 on January 05, 2007, 11:58:45 PM
hi,
this mod seems to b great and i would like to use it. where do i get the files to install it? help would be appreciated. Thanks
Title: Re: [MOD] Category Image v1.0.2
Post by: CeJay on January 06, 2007, 02:17:12 AM
The install file is attached to the main post from V@no at the bottom by his signature.
Title: Re: [MOD] Category Image v1.0.2
Post by: alemao59 on January 06, 2007, 06:33:07 PM
thanks
Title: Re: [MOD] Category Image v1.0.2
Post by: Ricsca on January 11, 2007, 02:16:02 AM
If in the category it comes put a description, the image it is not visualized...  Why? 
Title: Re: [MOD] Category Image v1.0.2
Post by: binuj01 on January 26, 2007, 01:41:22 PM
I am using ver 1.74  and I get the following error in global.php

Parse error: syntax error, unexpected '[' in /home/wllth/public_html/listvideo/global.php on line 443

I am attaching the revised global.php here.

Title: Re: [MOD] Category Image v1.0.2
Post by: mawenzi on January 26, 2007, 02:04:44 PM
@ binuj01 
... that isn't attaching ... that is inserting ... 
... 33 post and you don't know the "code-button" ... :?
... please correct your post ...

Title: Re: [MOD] Category Image v1.0.2
Post by: binuj01 on January 27, 2007, 12:12:40 PM
Any answer????
Title: Re: [MOD] Category Image v1.0.2
Post by: CeJay on January 27, 2007, 04:34:57 PM
@ binuj01 
... please correct your post ...

I am sure he is talking about posting the code to that file instead of inserting it as a file.  :wink:
Title: Re: [MOD] Category Image v1.0.2
Post by: KurtW on January 27, 2007, 04:37:11 PM
Hi binuj01,

and the copyright notice from 4images???????
Have you bought a license :?:


cu
Kurt
Title: Re: [MOD] Category Image v1.0.2
Post by: binuj01 on January 27, 2007, 05:40:31 PM
Yes. I have. Thanks for your concern.
But that does not answer my question.

Binu
Title: Re: [MOD] Category Image v1.0.2
Post by: Lennforce on January 29, 2007, 12:16:25 AM
Hallo erstmal,

Um welche Seite es geht.
http://www.picture-collection.net/

Die implementierung hat eigentlich ganz gut geklappt. Es funktioniert auch. Es fehlt nur eine sehr schöne Funktion, die beschrieben wurde.

Frage:
Die Funktion die fehlt. Über Bearbeitung des Bildes soll es eine Funktion geben,  mit der ich das Bild über ja oder nein als Vorschaubild der zugehörigen Kategorie einfügen kann.
Do Step 6
Then got to ACP -> Edit images -> find an image -> edit.
In the single image edit screen (not the group image edit!) at the bottom, u sould see a new option "Category Image (yes/no)" simply select "yes" to set that image as "Category Image".
Also if any image was previousle set as "Category Image" u should see its thumbnail and image name.


Die erste Funktion funktioniert wunderbar!
Go to ACP (Admin Control Panel) -> Edit categories -> edit a cegory.
There u should see a new field where u can manualy enter image ID which u want to use as "Category Image". If any image previously was selected, its ID and thumb with image name should be present there


Weiß jemand, bei welchem Step die Funktion eingefügt wird? Oder vielleicht kennt ihr ja selber das Problem.

MfG Lennforce
Title: Re: [MOD] Category Image v1.0.2
Post by: unite on February 15, 2007, 07:58:11 PM
Is this working in 1.7.4?
Title: Re: [MOD] Category Image v1.0.2
Post by: duongtien on February 16, 2007, 04:10:27 PM
not work in 1.7.4 help me
Title: Re: [MOD] Category Image v1.0.2
Post by: unite on February 26, 2007, 05:34:11 PM
Is this going to be fixed to work in 1.7.4?
Title: Re: [MOD] Category Image v1.0.2
Post by: unite on March 07, 2007, 09:01:36 PM
This would really be nice to use in the latest ver. Is this going to be modified?
Title: Re: [MOD] Category Image v1.0.2
Post by: Ferus on March 18, 2007, 07:11:50 AM
This mod is running with 4images 1.7.4  :!: :!:
What not works ? I can help beacuse i've install this mod on 1.7.4 :mrgreen:
Title: Re: [MOD] Category Image v1.0.2
Post by: Biggi on April 01, 2007, 11:52:13 AM
@Ferus:
I think I really need your help. The Link to the database update script described unter Step 5 doesn't work. Could you share yours, please? I have made all the changes and now I can't continue. I'm not experienced enough to uptdate the database manually  :(

Thanks in advance...

Regards, Biggi


My problem is solved, I just found it at the end of Vano's posting....  :D
Title: Re: [MOD] Category Image v1.0.2
Post by: Biggi on April 12, 2007, 10:02:57 AM
Hi @all,

I've managed to install this mod. Everything works fine, but there is one point left that I just can't solve after some days of trial and error and now I'm at the end of my knowledge. I hope someone of you could take some minutes to help me out  :(

The problem is that the table in which the category-thumbs are visible is not centered. The category-images are positioned to the left side.

How can I manage to center the table?

Seems to be pretty easy, but I just can't find the solution where to change the table that includes the category-thumbnails.

Many thanks in advance!

Biggi


Solved again by myself  :)

Title: Re: [MOD] Category Image v1.0.2
Post by: sigma. on May 15, 2007, 09:02:10 AM
Ran into this little nasty error. Cant figure it out.

Anyone spot my mistake?

Quote
DB Error: Bad SQL Query: SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images [qcode], cat_image [/qcode] FROM 4images_categories c LEFT JOIN 4images_images i ON (i.cat_id = c.cat_id AND i.image_date >= 1174028428 AND i.image_active = 1) GROUP BY c.cat_id ORDER BY c.cat_order, c.cat_name ASC
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[qcode], cat_image [/qcode] FROM 4images_categories c LEFT' at line 1

the catimage_install.php completed and installed fine.
I backed up all my files so I reverted back and things work just as they were before I tried the Mod. I'm sure It's something simple. what did I mess up with the [qcode], cat_image [/qcode] insert?
Title: Re: [MOD] Category Image v1.0.2
Post by: sigma. on May 21, 2007, 03:04:16 AM
woohoo got it to work. I took the instructions too literally. got the [/qoute] into my code. someone should fix that on the front page.

aaaanyways. I got a little tweak request if anyone can help me.

I installed this mode thinking it would allow me to specifydifferent folder icons for each category. Which it does in a way but now that I have it installed Im wondering if i could use it a different way. First I tweaked the functions.php code with AcidGod's little tweak..

Quote
    $cat_image = "";
      if ($cat_cache[$category_id]['cat_image'])
      {
         $sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
              FROM ".IMAGES_TABLE."
              WHERE image_id = ".$cat_cache[$category_id]['cat_image'];
         if ($image_row = $site_db->query_firstrow($sql))
         {
            if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
            {
               $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
            }
            else
            {
               $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
            }
         }
      }else {
         $cat_image = TEMPLATE_PATH."/images/folder.png";
      }
      $site_template->register_vars("cat_image", $cat_image);

Now that I have that I would like the ability to set the image size for those categories that do have a Cat Image ID. Would work well in subcategories. Anyone care to take a try? Also going back to my orginal idea of different folder icons for each category. How can I do this, Insted of assigning a Image ID is there a way to specify a URL pointing to a certain icon in my templates directory?

requests..

1. Set a different Category Image size for those categories that have a Cat Image ID set.
2. Insted of Image ID, can I use URL or dropdown box with a list of Folder ICONS i can use.

Title: Re: [MOD] Category Image v1.0.2
Post by: Scarlett on June 06, 2007, 08:33:48 AM
is there a fix on this available for 1.7.4?  it seems that no matter what i do to install this, i still get an error when i try to run catimage_install.php.  keeps on saying there is an error in table creation ALTER TABLE `4images_categories` ADD `cat_image` MEDIUMINT( 8 ) NOT NULL
Title: Re: [MOD] Category Image v1.0.2
Post by: holas on June 25, 2007, 11:46:54 PM
How can I see the second method to show a image in category?

Second method:

Do Step 6
Then got to ACP -> Edit images -> find an image -> edit.
In the single image edit screen (not the group image edit!) at the bottom, u sould see a new option "Category Image (yes/no)" simply select "yes" to set that image as "Category Image".
Also if any image was previousle set as "Category Image" u should see its thumbnail and image name.


I don't see these optión and I don't see the id image. Can I modify admin/images.php?, how?. Thank you.
Title: Re: [MOD] Category Image v1.0.2
Post by: Peppino on July 10, 2007, 05:41:25 PM
Hello!

Can i have the catimage_install.php from someone, or post the code here pls.

Kann mir jemand die catimage_install.php schicken oder den Inhalt hier posten.


Danke
Title: Re: [MOD] Category Image v1.0.2
Post by: mawenzi on July 10, 2007, 06:33:45 PM
@Peppino
... und warum nimst du nicht die catimage_install.zip, die im ersten Post von V@no (am Ende) zum Download angeboten wird ... ?
Title: Re: [MOD] Category Image v1.0.2
Post by: Peppino on July 10, 2007, 06:36:17 PM
lol danke. hab ich garnicht gesehen. :)
Title: Re: [MOD] Category Image v1.0.2
Post by: orb4 on August 15, 2007, 04:27:01 PM
Hi,  :)

I would like to know if these "category images" could show the last posted image (for each category) instead of being static/'manual' images??
You know what I mean?

Thank you.
Title: Re: [MOD] Category Image v1.0.2
Post by: orb4 on August 16, 2007, 08:11:38 PM
Hi,  :)

I would like to know if these "category images" could show the last posted image (for each category) instead of being static/'manual' images??
You know what I mean?

Thank you.
Title: Re: [MOD] Category Image v1.0.2
Post by: thunderstrike on August 16, 2007, 08:13:03 PM
Yes, see 1st time. No get what mean.
Title: Re: [MOD] Category Image v1.0.2
Post by: orb4 on August 16, 2007, 11:37:58 PM
Yes, see 1st time. No get what mean.
Hello,
Could you please be more explicit on what you said because my english is not so good. Thank you.

I just wanted to know if it is possible to display instead of a choosen pic the last image posted in the category.
Title: Re: [MOD] Category Image v1.0.2
Post by: musicsurfer on September 13, 2007, 09:07:42 AM
Wenn ich in der hauptkategorie keine Bilder habe sondern nur 5 Unterkategorien
wird durch dieses Mod in der Hauptkategorie dann trotzdem ein Bild angezeigt ?


If I in the main category pictures do not have separate only 5 subcategories
by this Mod in the main category nevertheless is a picture then indicated?

Gruss
Title: Re: [MOD] Category Image v1.0.2
Post by: musicsurfer on September 14, 2007, 12:09:01 AM
sorry about my english :)
But...

Where can I make my PreviePicture larger ?
They are very smal
Title: Re: [MOD] Category Image v1.0.2
Post by: thunderstrike on September 14, 2007, 12:22:42 AM
sorry about my english :)
But...

Where can I make my PreviePicture larger ?
They are very smal

This might help:

http://www.4homepages.de/forum/index.php?topic=13040.0
http://www.4homepages.de/forum/index.php?topic=3236.0
Title: Re: [MOD] Category Image v1.0.2
Post by: musicsurfer on September 14, 2007, 07:03:28 AM
@thunderstrike
Sorry, not the Image. I mean the category image !

In deutsch:
Ich möchte nur die Vorschaubuilder der Kategorien größer machen, die sind mir viel zu klein
Die Bilder selber in den Kategorien sind ok.
Es geht sich nur um die Vorschaubilder auf der Startseite,
Weiß jemand wo man das hier im MOD ändert ?
Mit den beiden Links einen Beitrag höher geht das nicht
Ich möchte eine feste Größe für die Category Bilder haben

Versuch in englisch:
I would like to make only the Caterogy Images larger, those am much too small for me
The pictures themselves in the categories are ok.
It concerns itself only the preview pictures on the starting side,
Know someone where one in the MOD changes here?
With the two left a contribution more highly that cannot be done

I would have a firm size (fixed size) fpr the Category Image

Please help me  :?

Greets
Title: Re: [MOD] Category Image v1.0.2
Post by: mawenzi on September 14, 2007, 10:22:42 AM
@musicsurfer

... statt ...
Code: [Select]
$dim = 50;
... verwende z.B. dieses (ist die Prozentangabe der Thumbnailgröße ... ) ...
Code: [Select]
$dim = 100;
Title: Re: [MOD] Category Image v1.0.2
Post by: musicsurfer on September 14, 2007, 10:44:27 AM
OK, das werde ich später ausprobieren

Da kommt aber dann gleich die nächste Frage auf
Wenn ich jetzt ein Bild habe, was 100x80 Pixel ist, das ist breiter als ein Bild was 100x70 Pixel ist
Kann man denn keinen festen Wert angeben ?
Denn sonst muss ich ja immer darauf achten das alle Bilder die gleiche Größe haben :(


----


There however then equal the next question arises
If I have now a picture, which 100x80 pixel is, which is than a picture which 100x70 pixel is broader
Can one indicate no fixed value?
Because otherwise I must on it always respect that all pictures the same size to have: (
Title: Re: [MOD] Category Image v1.0.2
Post by: Nicky on September 14, 2007, 11:16:21 AM
ich hab mir den mod nicht angeschaut, aber

Code: [Select]
{if cat_image}<img src="{cat_image}">{endif cat_image}

z.b. auf:
Code: [Select]
{if cat_image}<img src="{cat_image}" width="100" height="70">{endif cat_image}
ändern
Title: Re: [MOD] Category Image v1.0.2
Post by: musicsurfer on September 14, 2007, 11:49:55 AM
Danke Dir
Kann ich leider erst heute spät am Abend testen, da ich erst dann wieder zu hause bin

Melde mich dann nochmal

Gruss
Musicsurfer
Title: Re: [MOD] Category Image v1.0.2
Post by: musicsurfer on September 14, 2007, 04:35:19 PM
Der Code heißt im Original


Quote
    {if cat_image}{cat_image}{endif cat_image}&nbsp;

wie muss ich den denn jetzt bearbeiten ?

Denn wenn ich den z.B. in
Quote
{if cat_image}<img src="{cat_image}">{endif cat_image}
ändere wird mir nichts angezeigt, nur fehlerhafte Bilder


Gruss
Title: Re: [MOD] Category Image v1.0.2
Post by: musicsurfer on September 14, 2007, 04:39:52 PM
@musicsurfer

... statt ...
Code: [Select]
$dim = 50;
... verwende z.B. dieses (ist die Prozentangabe der Thumbnailgröße ... ) ...
Code: [Select]
$dim = 100;

Ok, das hat geklappt
Problem ist nur, das die Bilder dadurch pixelig werden.
Kann man denn nicht irgendwie auf die Originaldatei zugreifen ?

Ok one, that folded
Problem is only, which becomes pixelig the pictures thereby.
Can one access the original file not somehow?

Title: Re: [MOD] Category Image v1.0.2
Post by: P.Sterni on September 20, 2007, 12:59:17 AM
Hallo,

ich hab da mal ne Frage  :roll:

Wo bekomme ich diese Datei denn her ?   


catimage_install.php


Der hier angegebene Link funktioniert nicht :( :cry: :(

Gruß
Peter
Title: Re: [MOD] Category Image v1.0.2
Post by: mawenzi on September 20, 2007, 01:03:03 AM
... bis zum Schluss lesen, denn am Ende des ersten Posts steht ...
... catimage_install.zip (1.78 KB - runtergeladen 517 Mal.) ...
... und bei Klick könntest du die Nr. 518 sein ... ;)
Title: Re: [MOD] Category Image v1.0.2
Post by: P.Sterni on September 20, 2007, 01:09:35 AM
Danke,

die Zeile habe ich glatt übersehen  :) :oops:

Jetzt bin ich Nr. 518  :mrgreen: :D

Gruß
Peter
Title: Re: [MOD] Category Image v1.0.2
Post by: Melissa67 on October 28, 2007, 02:56:45 PM
So is the front page updated? I don't need to go through this entire forum topic to get this MOD working, right?
Title: Re: [MOD] Category Image v1.0.2
Post by: Melissa67 on October 28, 2007, 03:22:50 PM
HOLY CRAP!! What did I do wrong?? My gallery is gone and it says An unexpected error occured. Please try again later.

HELP!!!
Title: Re: [MOD] Category Image v1.0.2
Post by: thunderstrike on October 28, 2007, 03:25:04 PM
Quote
An unexpected error occured.

If login in admin account, what is say for this error ?
Title: Re: [MOD] Category Image v1.0.2
Post by: Melissa67 on October 28, 2007, 11:57:38 PM
Can someone please help me?

I have followed all of the instructions. I now see both options in either using the ID # or selecting Yes/No in the edit image area, however, I am unable to view the image on the gallery page. What have I done wrong?  :(


melissa
Title: Re: [MOD] Category Image v1.0.2
Post by: thunderstrike on October 29, 2007, 12:32:29 AM
You no answer last question.
Title: Re: [MOD] Category Image v1.0.2
Post by: Melissa67 on October 29, 2007, 02:47:10 AM
I don't receive an error now. I just don't see any thumbnail on the gallery page. I have followed all of the instructions. I can add an image ID and I can also view the small thumbnail when I go into Edit image. I choose yes to add the thumbnail but still there is no image - nothing there.

Title: Re: [MOD] Category Image v1.0.2
Post by: Melissa67 on October 29, 2007, 03:04:47 AM
Also, when I try to type a different ID# for the category image it keeps staying the same. So, for example, if I type Category I age to be 121 but then change it to 207 and press save it will not change. I do this over and over again and still does not change. I am using 1.7.4.
Title: Re: [MOD] Category Image v1.0.2
Post by: thunderstrike on October 29, 2007, 12:34:07 PM
Quote
I don't receive an error now.

And how you clean error message if image ID is no update after change ?
Title: Re: [MOD] Category Image v1.0.2
Post by: Melissa67 on October 29, 2007, 02:17:49 PM
I went through some of the suggestions in the forum and it somehow disappeared but the number just stays the same in the Category Image ID and I don't see any category image either.

This is my coding for admin/categories.php
Quote
// Category image 
  $cat_image = "";
  if ($result['cat_image'])
  {
    $sql = "SELECT image_id, image_media_file, image_thumb_file, image_name, cat_id
            FROM ".IMAGES_TABLE."
            WHERE image_id = ".$result['cat_image'];
    if ($image_row = $site_db->query_firstrow($sql))
    {
      if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
      {
        $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
      }
      else
      {
        $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
      }
      $file_info = @getimagesize($cat_image);
      $dim = 50;
      $width = $file_info[0];
      $height = $file_info[1];
      if ($width && $height) {
        if ($width > $dim || $height > $dim) {
          @$ratio = $width / $height;
          if ($ratio > 1) {
            $new_width = $dim;
            $new_height = round(($dim/$width) * $height);
          }else {
            $new_width = round(($dim/$height) * $width);
            $new_height = $dim;
          }
        }else{
          $new_width = $width;
          $new_height = $height;
        }
      }else{
        $new_width = $dim;
        $new_height = $dim;
      }
      $cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a>&nbsp;<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>";
    }
   
  }
  $value = $result['cat_image'];
  if (isset($HTTP_POST_VARS['cat_image'])/* && $value == ""*/) {
    $value = stripslashes($HTTP_POST_VARS['cat_image']);
  }
  echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">Category image</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$value."\">&nbsp;$cat_image</p></td>\n</tr>\n";
//End Category image

Coding for category_bit.html
Quote
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top"> {ifno cat_image}<a href="{cat_url}" class="maincat"><img src="{cat_image}"></a>{endifno
      cat_image}&nbsp;&nbsp;&nbsp; </td>
    <td> <p><a href="{cat_url}" class="maincat">{cat_name}</a>&nbsp;({num_images})
        {if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}<br>
        {if cat_description}<span class="smalltext">{cat_description}</span><br />
        {endif cat_description} {if sub_cats}{sub_cats}{endif sub_cats} </p>
      </td>
  </tr>
</table>


Melissa
Title: Re: [MOD] Category Image v1.0.2
Post by: thunderstrike on October 29, 2007, 03:09:27 PM
Ok but I see this in code:

Quote
if ($result['cat_image'])
  {

Where is rest ? Where is cat_image code for start in admin/categories.php file ?
Title: Re: [MOD] Category Image v1.0.2
Post by: Melissa67 on October 29, 2007, 07:21:50 PM
I'm not sure what you mean  :oops: but I have attached the entire file. I changed it back to what it was originally with the cat_image code but it still does not work.
Title: Re: [MOD] Category Image v1.0.2
Post by: thunderstrike on October 29, 2007, 07:24:55 PM
No need for add 50 folder in ZIP file. :?

Ok, in file ... I no think this is right ...

Find:

Quote
// Category image 
$cat_image = "";
      if ($cat_cache[$category_id]['cat_image'])
      {
         $sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
              FROM ".IMAGES_TABLE."
              WHERE image_id = ".$cat_cache[$category_id]['cat_image'];
         if ($image_row = $site_db->query_firstrow($sql))
         {
            if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
            {
               $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
            }
            else
            {
               $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
            }
         }
      }else {
         $cat_image = TEMPLATE_PATH."/images/folder.gif";
      }
      $site_template->register_vars("cat_image", $cat_image);

//End Category image

replace:

Code: [Select]
// Category image 
$cat_image = "";
      if ($cat_cache[$cat_id]['cat_image'])
      {
         $sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
              FROM ".IMAGES_TABLE."
              WHERE image_id = ".$cat_cache[$cat_id]['cat_image'];
         if ($image_row = $site_db->query_firstrow($sql))
         {
            if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
            {
               $cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
            }
            else
            {
               $cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
            }
         }
      }else {
         $cat_image = TEMPLATE_PATH."/images/folder.gif";
      }
      $site_template->register_vars("cat_image", $cat_image);

//End Category image
Title: Re: [MOD] Category Image v1.0.2
Post by: Melissa67 on October 29, 2007, 07:39:11 PM
I had just added one file to the zip folder.

I did that but now there is no place to insert the Category Image ID # under edit category.
Title: Re: [MOD] Category Image v1.0.2
Post by: thunderstrike on October 29, 2007, 07:52:51 PM
Quote
I had just added one file to the zip folder.

Yes - with 50 folder for one file. :?

Quote
I did that but now there is no place to insert the Category Image ID # under edit category.

Sorry ... is no my MOD ... restore file and you see select ID again ...
Title: Re: [MOD] Category Image v1.0.2
Post by: Mte90 on November 23, 2007, 02:34:56 PM
this mod operate with 4images 1.7.4?
Title: Re: [MOD] Category Image v1.0.2
Post by: albertpr9 on December 10, 2007, 02:19:35 PM
I tried installing it once on 1.7.4 I had a few errors... I just quit trying cause I'm not sure if it actually works with this version....

If someone has made this work on the latest version please let me know, so I can try again. : )

Cheers,

Albert
Title: Re: [MOD] Category Image v1.0.2
Post by: albertpr9 on December 10, 2007, 04:00:12 PM
Ok... Tried again,

This is the error I get on the admin panel >> edit images

Quote
Warning: Cannot modify header information - headers already sent by (output started at /home/albertpr/public_html/mike/projects/admin/categories.php:2) in /home/albertpr/public_html/mike/projects/admin/admin_functions.php on line 168

Warning: Cannot modify header information - headers already sent by (output started at /home/albertpr/public_html/mike/projects/admin/categories.php:2) in /home/albertpr/public_html/mike/projects/admin/admin_functions.php on line 169

Warning: Cannot modify header information - headers already sent by (output started at /home/albertpr/public_html/mike/projects/admin/categories.php:2) in /home/albertpr/public_html/mike/projects/admin/admin_functions.php on line 170

Warning: Cannot modify header information - headers already sent by (output started at /home/albertpr/public_html/mike/projects/admin/categories.php:2) in /home/albertpr/public_html/mike/projects/admin/admin_functions.php on line 171

Warning: Cannot modify header information - headers already sent by (output started at /home/albertpr/public_html/mike/projects/admin/categories.php:2) in /home/albertpr/public_html/mike/projects/admin/admin_functions.php on line 172

I have no idea what I can do to fix it.... Can anyone help?

Thanks!
Title: Re: [MOD] Category Image v1.0.2
Post by: gborislav on December 17, 2007, 07:54:37 PM
Hi,

I have a question for V@no.


1.
There was once a question :

how to do to have random categories image?

You replied : u don't need this mod, just uncomment,

<!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}  -->

2.
i tried do that but nothing happens:

You replied :

random_cat_image must be enabled in includes/constants.php


Now these are  my questions:

a.
Can you put the whole sentence how to enable it and in which category to do it in.

b.
The picture that is going to be picked out randomly, will it be picked out from the same category where the picture shows up,  or from all the picture that there are.

Thank you
Title: Re: [MOD] Category Image v1.0.2
Post by: mawenzi on December 17, 2007, 08:05:37 PM
I have a question for V@no.

... nice statement ... ;)
... V@no : Last Active (http://www.4homepages.de/forum/index.php?action=profile;u=596) ... unfortunately ...
Title: Re: [MOD] Category Image v1.0.2
Post by: gborislav on December 17, 2007, 08:11:00 PM
I have a question for V@no.

... nice statement ... ;)
... V@no : Last Active (http://www.4homepages.de/forum/index.php?action=profile;u=596) ... unfortunately ...


ye, i didn't see that  ( Last Active:     November 03, 2006, 11:56:03 PM.)

SO, anyway can someone help me with my question.

Thanks.
Title: Re: [MOD] Category Image v1.0.2
Post by: jojomart on December 17, 2007, 08:33:17 PM
Ohhh please can someone remodel this for 1.74???

It's lovely and I really want to do it - it will be the perfect addition to my site!

Joanne
Title: Re: [MOD] Category Image v1.0.2
Post by: albertpr9 on December 17, 2007, 08:39:54 PM
No Doubt, it's a great function!!! I tried everything to make it work but had no luck as well...
Title: Re: [MOD] Category Image v1.0.2
Post by: mawenzi on December 17, 2007, 09:44:47 PM
17.12.2007 : editing of the formating of the first post ( v@no's MOD post ) by mawenzi
Title: Re: [MOD] Category Image v1.0.2
Post by: albertpr9 on December 17, 2007, 09:47:19 PM
Great Thanks Mawenzi!  I will try to install it now!
Title: Re: [MOD] Category Image v1.0.2
Post by: jojomart on December 18, 2007, 04:09:34 AM
17.12.2007 : editing of the formating of the first post ( v@no's MOD post ) by mawenzi

Hi Mawenzi,

Thanks so much for making this work with 1.74, however . . . now something has happened to the site. If I click on the paging to go from page 1 to 2 etc. nothing happens, it stays on page one.

Can you help me figure out what happened?

Thanks,
Joanne

//EDIT//

It's not this mod!  Oh my, now I have no idea where the problem is - I've installed quite a few mods

//EDIT 2//

I found the problem - it was something in my .htaccess file!  All Fixed!!
Title: Re: [MOD] Category Image v1.0.2
Post by: piyda on December 30, 2007, 06:07:27 PM
I have version 1.7.4 and have tried to do everything, but it won't work...

@mawenzi - Did you make a new version or is it still on hold until V@no comes back? :-)

EDIT: Well, after much battle with code, I managed to make it work, but only via category.
         In one image options there is no new fileld where I can choose that image to be default for category.
Title: Re: [MOD] Category Image v1.0.2
Post by: shadowhunter on January 01, 2008, 02:31:54 PM
Hallo!
Ich habe einen kleinen Fehler bei mir (gefunden?). Habt ihr dieser auch bei euch?
Habe diesen MOD schon seit längerem und habe kürzlich folgendes entdeckt:
Wenn ich ein Bild von der Kategorie A nach Kategorie B verschiebe (via ACP >> Editimage) und dieses Bild ist nicht "Category Image" von der Kat A oder B, dann wird aber nach dem Verschieben von A nach B das "Category Image" von der Kat A nach Kat B ebenfalls "verschoben" (d.h. dass Kat B das Category Image von Kat A annimmt, obwohl das verschobene Bild kein Category Image ist). Am Schluss haben dann beide Kat (A + B) das selbe "Category Image". Jedoch sollte das Category Image von Kat B (sowie eigentlich Kat A auch) nicht geändert werden.
Woran liegt hier mein Fehler? Sieht es bei euch auch so aus? Habe den MOD genau nach Anleitung installiert! Benutze Version 1.7.4.
Ich danke euch im Voraus!
Happy New Year to all of you!!!
Gruss


EDIT: This is the same problem as "Ferus" has with this mod. Somewhere in the code is a bug...! Has anyone a solution for this?
Title: Re: [MOD] Category Image v1.0.2
Post by: Ferus on January 03, 2008, 06:17:47 PM
Hello. I have problem with this mod, sometimes the category images moving from one to other.

example, i have category calls "SP42" where the category image will be id 6052. One day the category image change to other from other category...
Could anyone help me?

PS In the ACP the ACP don't remember the setting of id in editing category.

Sorry for my english.
Title: Re: [MOD] Category Image v1.0.2
Post by: Manhart on January 05, 2008, 10:05:34 PM
I use 1.7.4 and could integrate the mod without any problems using the steps in the first posting.

Regards

Matthias

Switzerland

http://www.beathis.ch/cgi/pics (http://www.beathis.ch/cgi/pics)
Title: Re: [MOD] Category Image v1.0.2
Post by: whyte on January 31, 2008, 04:11:29 AM
Ive discovered a simple way to put a handy link on the category image to the category, without a border...

In the category_bit file

{if cat_image}<a href="{cat_url}"><img src="{cat_image}"border="0">{endif cat_image}

Makes the useful feature even more useful.

Thanks for the Mod guys it is great.

Andy
NZ
Title: Re: [MOD] Category Image v1.0.2
Post by: arindra on February 07, 2008, 11:39:50 AM
works still nicely on 1.7.4 , thanks :)
Title: Re: [MOD] Category Image v1.0.2
Post by: satine88 on March 08, 2008, 01:26:12 PM
Hello :)

Thanks for this Mod !!! :D

But, is it possible to use images which are sub-categories?

Thanks
Title: Re: [MOD] Category Image v1.0.2
Post by: satine88 on March 11, 2008, 02:44:09 PM
Hello :)

Thanks for this Mod !!! :D

But, is it possible to use images which are sub-categories?

Thanks
Hello,
Can you help please :)
Title: Re: [MOD] Category Image v1.0.2
Post by: Loet on April 23, 2008, 08:48:25 PM
Hello,

Someone with a solution for the second option that is not working?
I think it has to do with a major code change of the images.php i a newer version of the script.
But it would be nice to have that option.

Quote
Second method:

Do Step 6
Then got to ACP -> Edit images -> find an image -> edit.
In the single image edit screen (not the group image edit!) at the bottom, u sould see a new option "Category Image (yes/no)" simply select "yes" to set that image as "Category Image".
Also if any image was previousle set as "Category Image" u should see its thumbnail and image name.

Loet van Oostende
Title: Re: [MOD] Category Image v1.0.2
Post by: sanko86 on April 24, 2008, 09:38:44 AM
ı am speak and write turkish

mod the problem

screen;
Title: Re: [MOD] Category Image v1.0.2
Post by: ipicture on June 09, 2008, 07:55:38 PM
I installed it with 1.7.4 successfully. Great Mod

Thanks
Title: Re: [MOD] Category Image v1.0.2
Post by: silentg on June 19, 2008, 04:27:37 AM
Running 4Images 1.7.6

Got a problem with this mod. I can't seem to edit any category names after I install this mod. I am able to create categories with no problem but just to edit category names and saving wouldn't work at all. Any help regarding this issue?


thanks
Title: Re: [MOD] Category Image v1.0.2
Post by: unite on August 15, 2008, 09:11:14 PM
Is this working with 1.7.6
Title: Re: [MOD] Category Image v1.0.2
Post by: HowdoI on August 21, 2008, 06:46:14 AM
Good Day,

I have not installed this MOD and was reading to see if it worked with V.1.7.6 and read the edit catagory problem.  A round about fix would be create the new catagory with the new name and then use this MOD http://www.4homepages.de/forum/index.php?topic=6759.0 to move the images.  After delete the old catagory.
Title: Re: [MOD] Category Image v1.0.2
Post by: HowdoI on August 21, 2008, 07:30:38 AM
Running 4Images 1.7.6

Got a problem with this mod. I can't seem to edit any category names after I install this mod. I am able to create categories with no problem but just to edit category names and saving wouldn't work at all. Any help regarding this issue?


thanks

I have just installed the MOD successfuly changed the image (to a kitty cat :D) and was able to change the folder name.  I had a second folder that I created before installing and did not change the category image on that folder.  I was able to change the name on that folder also.   So sorry to say I think you may have a typo in you installation somewhere.

- I am also running Version: 1.7.6

- Another thing to remeber is that the image will be the same size as the thumbnails on your site so you will create a new folder and set all levels to admin only.  Just make/get whatever image you want and/or modify it the size you want via your bution creation program and then upload it to the new.  I have not tried it as of yet but in theroy it should work just fine.
Title: Re: [MOD] Category Image v1.0.2
Post by: Lunique on August 22, 2008, 03:12:26 PM
Is this working with 1.7.6
I have 1.7.6 and it works. First it don't but then I realised that I forgot to make the changes to global.php and after that evereything works perfect.
Title: Re: [MOD] Category Image v1.0.2
Post by: Sun Zaza on December 11, 2008, 04:55:57 PM
Hi Vano,

Thank for this great mod.

I just installed it, but I believe I have a little issue here:

Because I want to use small images for the category, I uploaded some images (70X70) to the gallery to use them as Categery image.

It works perfect, but I do not want that those images (Thumbs) to be shown in the homepage as new images or something like this.

How can I trick that?

Do you have the solution for me please?

Many thanks in advance for any tip.

Cheers,
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on December 11, 2008, 05:22:06 PM
Try replace in the Step 3:
Code: [Select]
    if ($cat_cache[$category_id]['cat_image'])

With this:
Code: [Select]
    if ($cat_id && $cat_cache[$category_id]['cat_image'])
Title: Re: [MOD] Category Image v1.0.2
Post by: Sun Zaza on December 11, 2008, 05:31:22 PM
Thanks Vano.

I tried it but I still see the small thumbs.

Do you have any Idea?
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on December 11, 2008, 11:49:45 PM
Oh, I completely misunderstood your question...

I guess, you can create a category that only admin can see, and store your images in there.
But, I think for what you are trying to do [MOD] Static icons in the Category frame (http://www.4homepages.de/forum/index.php?topic=3589.0) would be a better choice.
Title: Re: [MOD] Category Image v1.0.2
Post by: Sun Zaza on December 11, 2008, 11:51:40 PM
Yes, I have.
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on December 11, 2008, 11:58:35 PM
You are quick with responses ;)
I've changed my reply above.
Title: Re: [MOD] Category Image v1.0.2
Post by: Sun Zaza on December 12, 2008, 12:09:38 AM
You are right. That what I was looking for.

I just tried it and it works :D

Thank you very for your support.
Title: Re: [MOD] Category Image v1.0.2
Post by: beule on May 01, 2009, 02:00:55 PM
I install this mod but now i become this error if i want edit Category:

DB Error: Bad SQL Query: UPDATE prignitz_categories SET cat_name = 'Partybilder 2008', cat_description = '', cat_parent_id = 0, cat_order = 15, cat_hits = 278, auth_viewcat = 0, auth_viewimage = 2, auth_download = 2, auth_upload = 2, auth_directupload = 9, auth_vote = 0, auth_sendpostcard = 2, auth_readcomment = 0, auth_postcomment = 0, cat_image = WHERE cat_id = 46
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE cat_id = 46' at line 3

Warning: Cannot modify header information - headers already sent by (output started at /var/www/.../includes/db_mysql.php:190) in /var/www/web267/html/prignitz/includes/functions.php on line 114
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on May 01, 2009, 03:12:32 PM
Double check step 2.2
In fact double check all steps and make sure you didn't skip any.
Title: Re: [MOD] Category Image v1.0.2
Post by: beule on May 02, 2009, 11:36:14 AM
Ohh my english is bad, i read it not good enough!!!


Step 2
Open admin/categories.php
Find two (2) times:


it works! thx!  :roll:
Title: Re: [MOD] Category Image v1.0.2
Post by: 4dabdura on May 06, 2009, 06:02:07 PM
hello
{cat_image} and {if cat_is_new} not working on lightbox.php page
how do i make it work?
Title: Re: [MOD] Category Image v1.0.2
Post by: webbug on May 22, 2009, 04:42:22 PM
I have 1.7.6, just installed it with the optional bulk mod.  Everything is perfect but I have a problem!

I can't create a new category or sub category.  Nothing happens when I do so.  Editing the category is fine though.

Kindly lead me to where I have made mistake or forgotten something.

thank you
Title: Re: [MOD] Category Image v1.0.2
Post by: webbug on May 26, 2009, 12:54:31 PM
Guys I need your support on the above please!
Title: Re: [MOD] Category Image v1.0.2
Post by: whosthis.ee on June 08, 2009, 07:08:52 PM
u dont need this mod, just uncomment
Code: [Select]
      <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}  --> in category_bit.html template.

I did the same but its not working

im using 1.7.6 version, and i set the value to "1" in constatns.php [[define('SHOW_RANDOM_CAT_IMAGE', 1);]]

this is my category_bit.html

<table border="0" cellspacing="0" cellpadding="0">

  <tr>

    <td valign="top">

     <img src="{template_url}/images/folder.gif" alt="" />

{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}

    </td>

    <td>

     <a href="{cat_url}" class="maincat">{cat_name}</a>&nbsp;({num_images})

      {if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}

   </td>

  </tr>

</table>

pls help
Title: Re: [MOD] Category Image v1.0.2
Post by: webbug on June 08, 2009, 09:46:57 PM
Anyone please?

I have 1.7.6, just installed it with the optional bulk mod.  Everything is perfect but I have a problem!

I can't create a new category or sub category.  Nothing happens when I do so.  Editing the category is fine though.

Kindly lead me to where I have made mistake or forgotten something.

thank you

Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on June 09, 2009, 04:06:24 AM
You can start by replacing admin/categories.php with the unmodified one, make sure it works, then apply changes to it again.
Title: Re: [MOD] Category Image v1.0.2
Post by: whosthis.ee on June 09, 2009, 08:07:35 PM
Plssss help


u dont need this mod, just uncomment
Code: [Select]
      <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}  --> in category_bit.html template.

I did the same but its not working

im using 1.7.6 version, and i set the value to "1" in constatns.php [[define('SHOW_RANDOM_CAT_IMAGE', 1);]]

this is my category_bit.html

<table border="0" cellspacing="0" cellpadding="0">

  <tr>

    <td valign="top">

     <img src="{template_url}/images/folder.gif" alt="" />

{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}

    </td>

    <td>

     <a href="{cat_url}" class="maincat">{cat_name}</a>&nbsp;({num_images})

      {if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}

   </td>

  </tr>

</table>

pls help
Title: Re: [MOD] Category Image v1.0.2
Post by: 4ella on June 11, 2009, 02:16:31 PM
@V@no
Is it difficult to let the system to insert automatically first uploaded photo like a Category Image ? And after if somebody change his mind and doesn't like it , use this mod for edit/delete ? I think that everybody would appreciate it , they only need to remember that they must the category picture upload like a first one. I use this super mod , it saved me a lot of time but i have 1200 categories and i have to go everytime IN , see the number - go back to admin and insert it . Thanks Daniel

or to add another field to upload form - category image , and in case that you want this image like category image upload that there.
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on June 11, 2009, 04:13:55 PM
It would require additional steps, meanwhile, you do know that you can edit an image (in ACP) and set it as cat image from that page, right (if you did step 6)? Don't need to remember any numbers.
Title: Re: [MOD] Category Image v1.0.2
Post by: 4ella on June 11, 2009, 04:51:44 PM
@V@no
Yes , i know , it works very well too , but to do this after successful upload from control panel or from category(You helped me to redirect) everytime I have to go back to the category , to choose the picture, click on it , then click on edit , and open it in ACP - mark like u' ve said YES and then to go back again
or
 to find out the number ID and instead open the image in ACP to set YES I have to open category and fill out the number ID , with this change I should save many clicks (at least 5) to have my 1 category image immediately , I can do it , I'm not lazy, but my website is international and used mostly by the girls, so when they upload the pictures they don't know where they are, after every step they do , I have to make 1000 explanations in many languages on every page so I welcome every simple  time saving Mod . That's why i was happy when you showed me how to redirect to the category instead to control panel because after successful upload in control panel nobody knew where they are , where they can continue etc. Automatic image category would help them and visitors of the site better orientation without my intervention
To have the possibility to have immediately the category image after the first upload would be the best addon because I should save many clicks - in fact whole this present MOD operation .
Good thing would also should be if author of the category - to put radio button in upload form - Category image   YES    -    NO ,   
Title: Re: [MOD] Category Image v1.0.2
Post by: GaYan on June 25, 2009, 10:38:21 AM
is this posiible with 1.7.6 ?
Title: Re: [MOD] Category Image v1.0.2
Post by: 4ella on June 25, 2009, 11:05:05 AM
Yes , I have 1.7.6  , it works excellent
Title: Re: [MOD] Category Image v1.0.2
Post by: GaYan on June 25, 2009, 05:19:51 PM
Yes , I have 1.7.6  , it works excellent

can u pls explain me about editing the functions php .. its  hell of a mess  :D

Plesae help me..stpe by step would be great :)

Thanks in advance...im a new comer :)

www.nuwaragedara.com/wallpaper
Title: Re: [MOD] Category Image v1.0.2
Post by: 4ella on June 25, 2009, 06:09:35 PM
Hi , I can be here 5 years and will be always newbie :D but if you want add me to the MSN or ICQ , and I can try to help you , but I only followed the steps from the first post , I have also static category icon MOD installed so it is a little bit more difficult , but happily it works great both Mods, so when I don't put my Static icon category it takes the icon from Category Image or on the contrary .

everywhere install 1.7.3 version and newer and functions.php doesn't seem to be too much difficult , I had no problem with that , will be here at night ROME CEtime , so I can help you out lately on MSN , ICQ , I can send you the code or part from my functions.php file
Title: Re: [MOD] Category Image v1.0.2
Post by: eddyman1us on June 26, 2009, 06:23:32 AM
Hi , this MOD does seem to be very promising.
I am unable to get this mod working on 1.7.7 , people say it is working on 1.7.6 , I believe it should be working fine in 1.7.7 too !
 I have tried and checked every changed file all the steps seem to correct .


I am not getting errors but I cant see any image beside the category , I have installed the catimage_install.php and also added $result = $cat_row; after $cat_image in categories .php

I also checked wether there is cat_image in the sql query and it is present but still I can see any image despite editing image_id in ACP multiple times .
I also tried to add  $cat_image = "blah";  and I cant see "blah" next to the cat image.

I have read the entire thread but still cant get it working any suggestions ????
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on June 27, 2009, 01:57:09 AM
1) did you enter image id at edit category page?
2) does image id stay (it actually should show you thumbnail too) after you save the category and come back at edit category page?
3) check step 4
Title: Re: [MOD] Category Image v1.0.2
Post by: eddyman1us on June 27, 2009, 02:47:54 AM
I have added the code in the category_bit.html (step 4) also I am unable to see image in the category edit page, when I changed  $cat_image = "blah";  in admin/categories.php 

I could see "blah" only in the cat edit page and not in the homepage .
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on June 27, 2009, 03:15:14 AM
I know you said you've double checked, but can you confirm one more time that you've done step 1?
Title: Re: [MOD] Category Image v1.0.2
Post by: eddyman1us on June 27, 2009, 08:18:44 AM
I believe I have MODed global.php ( step 1) correctly .

I have attached the file anyways !
Title: Re: [MOD] Category Image v1.0.2
Post by: eddyman1us on July 02, 2009, 06:00:04 AM
Hey can anybody check wether or not step 1 is correct in the file attached above this post  :roll: !


Also can anybody confirm if this MOD is working on v1.7.7
Title: Re: [MOD] Category Image v1.0.2
Post by: 4ella on July 02, 2009, 09:28:11 AM
was controlling your global.php , I think that everything is ok (but I have 1.7.6) -I think it is the same anyway-it should work

As I see that some people here with 1.7.6 -1.7.7 version has problems - it is my 1.7.6 version with auth_user_manage -( ignore it - its a Buddukes User Area ) , my code works good
Code: [Select]
if (defined("GET_CACHES")) {
   $sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_author, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, auth_user_manage, cat_image



Title: Re: [MOD] Category Image v1.0.2
Post by: Sun on July 08, 2009, 03:28:43 PM
V@no, thanks for this mod  :) . It's works perfect in 1.7.6 
Title: Re: [MOD] Category Image v1.0.2
Post by: TimWiese on July 12, 2009, 07:53:14 PM
i have images4 1.7.7
i will this mod. what do i built?
Title: Re: [MOD] Category Image v1.0.2
Post by: bergblume on July 12, 2009, 07:58:58 PM
hallo tim wiese,
na klar kannst du diesen mod hier für deine gallerie version 1.7.7 verwenden... befolge einfach alle hier beschriebenen schritte (http://www.4homepages.de/forum/index.php?topic=6922.msg30269#msg30269) und ändere deine dateien entsprechend...
viel erfolg!
bergblume
Title: Re: [MOD] Category Image v1.0.2
Post by: Sebas Bonito on July 23, 2009, 01:22:16 AM
Thx, v@no for this fantastic mod. Everything works fine... no probs with 1.7.7  :D
Title: Re: [MOD] Category Image v1.0.2
Post by: GaYan on July 23, 2009, 04:41:21 PM
this is awsm !   :D
Title: Re: [MOD] Category Image v1.0.2
Post by: Sebas Bonito on July 29, 2009, 10:04:30 PM
:flag-en:
For standard I've chosen a pic (#7), if a category will build. But I'd
like to have a new "hack": If somebody has uploaded a picture and
cat_image in the uploaded category is the standard pic (in my case
"7"), it will choose the new uploaded picture. Is this possible?

:flag-de:
Standardmäßig ist es bei mir nicht "0", sondern "7" als Kategoriebild.
Nun möchte ich eine Ergänzung haben: Wenn ich oder ein User ein
Foto hochlädt und in der zu hochladenden Kategorie cat_image = 7
ist, dann soll das neue Bild die neue cat_image sein. Ginge das irgendwie?
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on July 30, 2009, 03:29:53 AM
Idea is interesting, but with current mod only first image will be assigned as cat_image, next image will not be assigned, because the category already has cat_image...will that satisfy?
Title: Re: [MOD] Category Image v1.0.2
Post by: Sebas Bonito on July 31, 2009, 01:40:44 AM
Idea is interesting, but with current mod only first image will be assigned as cat_image, next image will not be assigned, because the category already has cat_image...will that satisfy?
Yes, I guess that's what I've tried to say  :)

- First uploaded image will be assigned as cat_image
- But admin has the possibility to change it manually
- next image(s) will have no effect for cat_image.
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on July 31, 2009, 02:49:26 AM
The following code will only work for images uploaded via members upload form and only for direct upload (no validation).
in members.php find:
       $image_id = $site_db->get_insert_id();

Insert below:
        if ($result && !$cat_cache[$cat_id]['cat_image'])
        {
          $sql = "UPDATE ".CATEGORIES_TABLE."
                  SET cat_image = ".$image_id."
                  WHERE cat_id = ".$cat_id;
          $site_db->query($sql);
        }


P.S. I did not test this.
Title: Re: [MOD] Category Image v1.0.2
Post by: Sebas Bonito on July 31, 2009, 10:56:32 PM
P.S. I did not test this.
Me, too... so far.

One Question: How your code will check something linke "if cat_id is not image_id 7... then take this pic"?
Because: The cat_id is not empty for standard. Normally it's "0", in my case it's "7". Only if THIS number
is in the cat_id, the script has to change it.
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on August 01, 2009, 02:32:27 AM
It's checking cat_image attribute ;)
Title: Re: [MOD] Category Image v1.0.2
Post by: Sebas Bonito on August 01, 2009, 06:07:10 PM
It's checking cat_image attribute ;)
Today I had the time, but it doesn't work (the way you told me).
The cat_image is still "7"... so the default/standard for cat_image.
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on August 01, 2009, 06:37:42 PM
what is 7? if cat_image is 7, then it means there is already an image assigned to that category. Otherwise it would be empty or 0.
Title: Re: [MOD] Category Image v1.0.2
Post by: Sebas Bonito on August 01, 2009, 07:10:37 PM
what is 7? if cat_image is 7, then it means there is already an image assigned to that category. Otherwise it would be empty or 0.
Yeah, that's what I've already told... normally the standard is "0", but in my case I've changed it to "7" for standard (via mysql and for this field).
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on August 01, 2009, 07:36:33 PM
Hmmm try change the first line to this:
        if ($result && (!$cat_cache[$cat_id]['cat_image'] || $cat_cache[$cat_id]['cat_image'] == 7))
Title: Re: [MOD] Category Image v1.0.2
Post by: Sebas Bonito on August 01, 2009, 07:42:17 PM
Hmmm try change the first line to this:
        if ($result && (!$cat_cache[$cat_id]['cat_image'] || $cat_cache[$cat_id]['cat_image'] == 7))

Yes, that works! Thank you very much.  :D
Title: Re: [MOD] Category Image v1.0.2
Post by: whosthis.ee on August 09, 2009, 05:10:18 AM
Hi

alt text is not working for category thumbnail images

i user image_desc as alt text for images

Title: Re: [MOD] Category Image v1.0.2
Post by: Sebas Bonito on August 13, 2009, 04:07:43 PM
V@no So far everything works fine. Thank you so much for your fantastic support.

$image_id = $site_db->get_insert_id();
if ($result && (!$cat_cache[$cat_id]['cat_image'] || $cat_cache[$cat_id]['cat_image'] == 7))
        {
          $sql = "UPDATE ".CATEGORIES_TABLE."
                  SET cat_image = ".$image_id."
                  WHERE cat_id = ".$cat_id;
          $site_db->query($sql);
        }


I have a category-structure for my concert-gallery like

1. Category (interpret)
1.1 Subcategory (date of the concert)
1.1.1 Photos of this concert
1.1.2 Videos of this concert

2. Category (interpret)
2.1 Subcategory (date of the concert)
2.1.1 Photos of this concert
2.1.2 Videos of this concert

3. Category (interpret)
3.1 Subcategory (date of the concert)
3.1.1 Photos of this concert
3.1.2 Videos of this concert

...sooo everytime the same way. And with your help and in combination with the MOD to let users add subcategories, users are building 3 Subcategories: For example 1.1 Subcategory (date of the concert), 1.1.1 Photos of this concert and 1.1.2 Videos of this concert... all in ONE function. If somebody is uploading a picture to the subcategory 1.1.1, the first uploaded picture is also the "category image" for its (sub)category. And this works fine.

NOW I'd like to add also automatically a "category image" to the category above: in this case "1.1 Subcategory (date of the concert)". It's the same way like above, but addionally an catimage for the whole concert not only for the photo or video section. Is there a way to add this Function? So if somebody upload a picture and the catimage is "7" for the default-picture, the thumbnail will be set as the catimage of its category and one category above. I hope, my ugly english will be understand?

Thx!


Below the addcat.php and the member.php attached...
Title: Re: [MOD] Category Image v1.0.2
Post by: GaYan on August 13, 2009, 05:49:23 PM
works fine :) tested it again and finally ended with no error reports  :mrgreen:

Thanks Sir v@no :) !
Title: Re: [MOD] Category Image v1.0.2
Post by: chamkani.net on August 23, 2009, 04:00:35 AM
sir point out me category mod for 1.7.7 in english?
Title: Re: [MOD] Category Image v1.0.2
Post by: Sun on September 29, 2009, 11:43:09 AM
Error in Step 2.4 (when edit category, we didn't see number cat_image):
Code: [Select]
echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">Category image</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$value."\">&nbsp;$cat_image</p></td>\n</tr>\n";
must be:
Code: [Select]
echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">Category image</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$cat_row['cat_image']."\">&nbsp;$cat_image</p></td>\n</tr>\n";

It will be interesting if i can see picture of category when i edit category(how i see it when edit picture). But i don't know how to do this.
Title: Re: [MOD] Category Image v1.0.2
Post by: satine88 on November 14, 2009, 12:40:11 PM
Hello,
Is it possible to set the home page just the thumbnail that
would represent each class (not [MOD] Category Image v1.0.2), but
a mod or images are displayed randomly.

I remove the block classes and put the new system.

Is this possible?
Thank you
Title: Re: [MOD] Category Image v1.0.2
Post by: winracer on November 16, 2009, 03:30:54 PM
I installed this MOD and when I pick a image for the category it shows the image and also still have the folder icon. does anyone know what I did worng?


Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on November 16, 2009, 03:52:36 PM
remove from category_bit.html template (assuming you are using default template):
Code: (HTML "default" Template) [Select]
<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />
Title: Re: [MOD] Category Image v1.0.2
Post by: winracer on November 16, 2009, 04:05:50 PM
remove from category_bit.html template (assuming you are using default template):
Code: (HTML "default" Template) [Select]
<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />

When I removed it then all other folders gone. I have folder on some and images on others.

I tried something like this but it did not work. how can I do something like this use the cat_image if there is one else use folder.

Code: [Select]
{if cat_image}
<img src="{cat_image}">

else{
 <img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />

}

{endif cat_image}

thanks for your help!
winracer
myfunnypets.com
Title: Re: [MOD] Category Image v1.0.2
Post by: satine88 on November 16, 2009, 07:53:35 PM
Hello,
I am applying here : http://www.4homepages.de/forum/index.php?topic=26297.0
so I installed the mod : http://www.4homepages.de/forum/index.php?topic=6922.0
then make the change presented here http://www.4homepages.de/forum/index.php?topic=6675.0

when I click on a category, I have this error:

Code: [Select]
Warning: main(admin_global.php) [function.main]: failed to open stream: No such file or directory in /homez.312/iphonefo/www/categories.php on line 27

Fatal error: main() [function.require]: Failed opening required 'admin_global.php' (include_path='.:/usr/local/lib/php') in /homez.312/iphonefo/www/categories.php on line 27

In categorie line 27 :
Code: [Select]
require('admin_global.php');

admin_global.php on my server

Thanks :)

Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on November 17, 2009, 04:27:37 AM
When I removed it then all other folders gone. I have folder on some and images on others.
In that case use this:
Code: (HTML template) [Select]
{ifno cat_image}<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />{endifno cat_image}

when I click on a category, I have this error:
Looks like you've uploaded categories.php file that belongs in admin/ directory into 4images root directory...I hope you have backups of both files.
Title: Re: [MOD] Category Image v1.0.2
Post by: winracer on November 17, 2009, 02:29:27 PM
When I removed it then all other folders gone. I have folder on some and images on others.
In that case use this:
Code: (HTML template) [Select]
{ifno cat_image}<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />{endifno cat_image}


thanks for your help I got it

Code: [Select]
{if cat_image}<img src="{cat_image}" width="20" height="13" alt="" />{endif cat_image}

{ifno cat_image}<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />{endifno cat_image}



Do you know if  there a mod like this for subcategory image?
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on November 17, 2009, 02:59:55 PM
Absolutely not tested.

In includes/functions.php find:
  $sub_cat_list = "";


Insert below:
  $cat_image_list = array();
  $i = 1;
  foreach ($visible_cat_cache as $subcat_id)
  {
    if ($i > $num_subs || $i > $config['num_subcats'])
      break;

    if (!$cat_cache[$subcat_id]['cat_image'] || isset($cat_cache[$subcat_id]['cat_image_url']))
      continue;

    $cat_image_list[] = $cat_cache[$subcat_id]['cat_image'];
    $i++;
  }
  if (!empty($cat_image_list))
  {
    $sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
            FROM ".IMAGES_TABLE."
            WHERE image_id IN (".implode(",", $cat_image_list).")";
    if ($result = $site_db->query($sql))
    {
      while ($image_row = $site_db->fetch_array($result))
      {
        if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
        {
          $cat_cache[$image_row['cat_id']]['cat_image_url'] = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
        }
        else
        {
          $cat_cache[$image_row['cat_id']]['cat_image_url'] = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
        }
      }
    }
  }



Find:
      $sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\">".format_text($cat_cache[$subcat_id]['cat_name'], 2)."</a>";


Replace with:
      $sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\">";
      if (isset($cat_cache[$subcat_id]['cat_image_url']) && $cat_cache[$subcat_id]['cat_image_url'])
        $sub_cat_list .= '<img src="' . $cat_cache[$subcat_id]['cat_image_url'] . '" width="20" height="13" alt="" /> ';
      $sub_cat_list .= format_text($cat_cache[$subcat_id]['cat_name'], 2);
      $sub_cat_list .= "</a>";
Title: Re: [MOD] Category Image v1.0.2
Post by: winracer on November 17, 2009, 03:45:46 PM
thanks!!!!, I have installed and will test.

Question how do I add the image to the subcategory?

can it be setup like category? what i mean is that when you edit a photo you have some option as category like
Category image
Current image:
 
  Yes     No
 

also have a

Subcategory image
Current image:

  Yes     No


hoep this makes sence
 
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on November 17, 2009, 03:53:41 PM
mmmm...just edit subcategories and add their own images...
Title: Re: [MOD] Category Image v1.0.2
Post by: winracer on November 17, 2009, 04:09:34 PM
mmmm...just edit subcategories and add their own images...


ok can i edit the category_bit.html

and replace this
Code: [Select]
{if sub_cats}{sub_cats}{endif sub_cats}

with this


Code: [Select]
{if subcat_image}<img src="{subcat_image}" width="20" height="13" alt="" />{endif subcat_image}

{ifno subcat_image}<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />{endifno sub_cats_image}


Next question would this work if I took the code at the start of the and added  $subcat_image and  cat_image



sorry I see now that this is only to display the subcat on main page
Title: Re: [MOD] Category Image v1.0.2
Post by: satine88 on May 15, 2010, 02:10:15 PM
Hello
How to get it working for sub categories?
(http://nsa15.casimages.com/img/2010/05/15//100515030413798529.jpg)
http://nsa15.casimages.com/img/2010/05/15//100515030413798529.jpg

Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on May 15, 2010, 07:57:32 PM
Just a few messages before yours
http://www.4homepages.de/forum/index.php?topic=6922.msg143083#msg143083
Title: Re: [MOD] Category Image v1.0.2
Post by: satine88 on May 16, 2010, 11:40:03 AM
Just a few messages before yours
http://www.4homepages.de/forum/index.php?topic=6922.msg143083#msg143083
Ok; sorry
Thanks ;)

But : I've this error :

Code: [Select]
Fatal error: Call to undefined function: get_basename() in /homez.93/fondecra/www/global.php on line 346
global.php on line 346 :
Code: [Select]
  $url = get_basename(getenv("HTTP_REFERER"));

Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on May 16, 2010, 08:19:18 PM
You did something wrong, restore backups and try again ;)
Title: Re: [MOD] Category Image v1.0.2
Post by: satine88 on May 16, 2010, 09:41:17 PM
You did something wrong, restore backups and try again ;)

Thank you!
Will it be possible, just for sub-categories to the name of the sub-category below
image?
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on May 16, 2010, 09:45:54 PM
replace        $sub_cat_list .= '<img src="' . $cat_cache[$subcat_id]['cat_image_url'] . '" width="20" height="13" alt="" /> ';


with:       $sub_cat_list .= '<img src="' . $cat_cache[$subcat_id]['cat_image_url'] . '" width="20" height="13" alt="" /><br />';
Title: Re: [MOD] Category Image v1.0.2
Post by: simpley on July 15, 2010, 12:46:27 PM
Hi, i am using 1.7.7 Does that mean i don't have to change anything in the global as i can not see the line that needs changing ?
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on July 15, 2010, 02:34:47 PM
Hi, i am using 1.7.7 Does that mean i don't have to change anything in the global as i can not see the line that needs changing ?
Every step required. If you can't find exact line, find a similar and add the need part at the end of that line.
Title: Re: [MOD] Category Image v1.0.2
Post by: simpley on July 15, 2010, 05:57:38 PM
ok, cheers!
Title: Re: [MOD] Category Image v1.0.2
Post by: peyv on August 09, 2010, 09:37:53 PM
hallo kann ich das mod auch für version 1.7.7 benutzen?

Danke
Title: Re: [MOD] Category Image v1.0.2
Post by: satine88 on September 05, 2010, 06:43:13 PM
Hello

How to automatically attribute "alt = image name?

Thanks  :wink:
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on September 05, 2010, 11:45:21 PM
In the code from step 3 replace
      $sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
With this:
      $sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id, image_name


Then find:
    $site_template->register_vars("cat_image", $cat_image);

With this:
    $site_template->register_vars(array(
  "cat_image" => $cat_image,
  "cat_image_name" => format_text(@$image_row['image_name'], 2),
));

After that in category_bit.html template use this:
Code: (template category_bit.html) [Select]
{if cat_image}<img src="{cat_image}" alt="{cat_image_name}">{endif cat_image}
Title: Re: [MOD] Category Image v1.0.2
Post by: Bassic Sax on October 05, 2010, 01:43:24 AM
hallo kann ich das mod auch für version 1.7.7 benutzen?

Danke

Ja. Ich habe das mod am Wochenende in meine 4images Gallerie 1.7.7 installiert.
Title: Re: [MOD] Category Image v1.0.2
Post by: b.o.fan on October 10, 2010, 10:05:28 PM
Hello!

Can i Use This Mod with 1.78?
Title: Re: [MOD] Category Image v1.0.2
Post by: x23piracy on October 11, 2010, 01:04:42 PM
Hello!

Can i Use This Mod with 1.78?

yep


EDIT:

Is it possible to display more then one category image, and can they be random?



Greetz X23
Title: Re: [MOD] Category Image v1.0.2
Post by: haider512 on December 05, 2010, 12:56:06 AM
hello ..
i want to use it with 1.7.9??

but i dont know how to install...

and when i tried to manually change the script,, the coding specifed here is little different .. like in global.php..the coding dosent match to global.php of my site.

please help what to do??

---------------------------------------------------------------


Help help help help help.....\

I tried changing the codes manually as said.. i did as written here...

but i dont know where it go wrong...


Please Help...

im having this error...

An unexpected error occured. Please try again later.



what to do what to do???


Help required..any one..

-----------------------------

No worries problem fixed..problem was in global.php..sorry my bad..
but image not showing..how to set image id in catogries..??
Title: Re: [MOD] Category Image v1.0.2
Post by: kasun0777 on December 06, 2010, 04:17:54 PM
....

yes bro
l have same problem




unnecessary full quote removed, Rembrandt
Title: Re: [MOD] Category Image v1.0.2
Post by: FadenMary on December 20, 2010, 06:09:56 PM
@haider512 and @kasun0777

do you have run the installer?
Step 5 on the first side?

regards,
Mary from germany
lila13. de und knipslust.de

Title: Re: [MOD] Category Image v1.0.2
Post by: haider512 on December 21, 2010, 02:37:23 PM
@haider512 and @kasun0777

do you have run the installer?
Step 5 on the first side?

regards,
Mary from germany
lila13. de und knipslust.de



yup sure..i did the step 5..the problem was i did mistaked in global.php

and then it did worked for me..but i found out..that my site is better off without the catogaries images..cuz i have alot of catogries.. and it will all look messy if i use images as catogaries..

Any how..are you facing any problems with it?
Title: Re: [MOD] Category Image v1.0.2
Post by: Lunique on December 25, 2010, 09:33:53 PM
Hi,
I get this error when i try to execute catimage_install.php;
1. Error: Duplicate column name 'cat_image'
ALTER TABLE `4images_categories` ADD `cat_image` MEDIUMINT( 8 ) NOT NULL

Can somebody help me, please?

just ignore it, everything is fine. continue to the next step if you wish.
Hello,
How can I skip a step while installing "catimage_install.php" ? I got the error above just wanted to update from 1.7.7 to 1.7.9 I'm sure I made all steps right but after this error in catimage_install I can not continue with it and so catimages are not shown.
Greetings & thanks, Luna
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on December 25, 2010, 09:49:34 PM
That error just says that your database already updated, no need run the installer again.
When you edit a category with cat image in it, do you see the image id in the cat image field? if so, the database is correctly working, something else is wrong.
Title: Re: [MOD] Category Image v1.0.2
Post by: Lunique on December 25, 2010, 09:52:19 PM
NO I don't see a cat image there. And also all the numbers that where written there before are gone, if I write them again and save it the field stays empty...
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on December 25, 2010, 10:29:00 PM
Then it's possible you've made a mistake in some step(s). Since the instructions are written for v1.7.3 it's possible that they are not compatible with v1.7.9 (I don't have time install it and check on each 4images version).
Title: Re: [MOD] Category Image v1.0.2
Post by: Lunique on December 25, 2010, 10:36:07 PM
OK I've redone all the steps and found out I forgot step 2.6 now it shows the small image in "edit categories". I still don't get it to show in the gallery it shows only red x where it should be. Is that maybe because it is not compatible or should it still be a mistake of me?

Btw: At step 2.3 I just added ", cat_image" at the end because my line is slightly different. I have "cat_order" in that line too I think that's new in 1.7.9

Thanks for your mod and your fast answers!
Luna
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on December 25, 2010, 10:49:32 PM
Now we are getting somewhere. What you need to do now is see what is the path on these "red x" images. Right click and select properties (in IE) or "view image info" (in FF), then copy the address and open in the browser, see if any error shows.
Title: Re: [MOD] Category Image v1.0.2
Post by: Lunique on December 25, 2010, 11:10:37 PM
I found out that the red x is only because of the ifno clause I used so if I tried to get the path it will only link to the category. I tried changing it to only the code you suggested and now there is nothing seen above the category name. Btw. random cat image is working properly.
Here's my category bit with if-clause:

<table border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
  <tr>
    <td align="center" width="160">
{if cat_image}<a href="{cat_url}"><img src="{cat_image}"  height="150" border="0"></a>{endif cat_image}
{ifno cat_image}{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}{endifno cat_image}</td>
  </tr>
  <tr>
    <td align="center" width="160">
<a href="{cat_url}" class="maincat">{cat_name}</a>&nbsp;({num_images}){if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}</td>
  </tr>
</table>

{if sub_cats}{sub_cats}{endif sub_cats}
&nbsp;
Title: Re: [MOD] Category Image v1.0.2
Post by: V@nо on December 25, 2010, 11:47:55 PM
just try add {cat_image} somewhere in the template so it would seen on the page as plain text
Title: Re: [MOD] Category Image v1.0.2
Post by: Lunique on December 25, 2010, 11:55:51 PM
Thanks that you are still there!
I've added it but it isn't seen at all, no text visible.
Title: Re: [MOD] Category Image v1.0.2
Post by: cookie on December 27, 2010, 10:02:08 PM
I've just updated from 1.7.7 to 1.7.9 and all my mods work fine except this one.

I have my mods all neatly commented, so that each time a new version of 4images comes out, I can use text wrangler and meticulously diff each file to see what's new and where to makes changes for my mods.

I've gone through this process several times over the past 4 or 5 years.

I believe that this mod may now be incompatible with 1.7.9.

Can anyone report if this works with 1.7.9??

Thanks.

I do see the category images when I edit the categories in the admin control panel, but they are not showing up on my main gallery site.
Title: Re: [MOD] Category Image v1.0.2
Post by: Lunique on December 27, 2010, 10:13:50 PM
I've just updated from 1.7.7 to 1.7.9 and all my mods work fine except this one.

I have my mods all neatly commented, so that each time a new version of 4images comes out, I can use text wrangler and meticulously diff each file to see what's new and where to makes changes for my mods.

I've gone through this process several times over the past 4 or 5 years.

I believe that this mod may now be incompatible with 1.7.9.

Can anyone report if this works with 1.7.9??

Thanks.

I do see the category images when I edit the categories in the admin control panel, but they are not showing up on my main gallery site.
Ok so it seems we have the same problem and you are maybe right that it's not compatible with 1.7.9 really sad I think I will go back to 1.7.7 then it worked finde with all my mods.
Title: Re: [MOD] Category Image v1.0.2
Post by: V@no on December 27, 2010, 11:56:26 PM
Well, guys, I don't know what you are doing wrong, but I just installed this mod on fresh v1.7.9 and it worked just fine without a hiccup...
Make sure that you choose the right instructions - when a step has instructions for different 4images versions, you must use the instructions closest to your version (mostly for v1.7.3)

If cat image displays fine at edit category page, but not on categories/home page, then I'd bet on mistake in step 1, 3 and/or 4
Title: Re: [MOD] Category Image v1.0.2
Post by: Lunique on December 28, 2010, 12:09:05 AM
Thank you so much you are totally right.
It was step 1 which was missing.
I was sure I made it I even checked it twice, now on the third check I found out it wasn't there.
I confess I'm naturally blonde ;)

Thanks for all your help and this great mod!
Title: Re: [MOD] Category Image v1.0.2
Post by: nagmat on March 13, 2011, 05:50:13 AM
When Finished all

 :( :( :( :( :( :( when i click edit or add cat

Warning: include() [function.include]: Unable to access ./global.php in /home/nagmat/public_html/admin/categories.php on line 30

Warning: include(./global.php) [function.include]: failed to open stream: No such file or directory in /home/nagmat/public_html/admin/categories.php on line 30

Warning: include() [function.include]: Unable to access ./global.php in /home/nagmat/public_html/admin/categories.php on line 30

Warning: include(./global.php) [function.include]: failed to open stream: No such file or directory in /home/nagmat/public_html/admin/categories.php on line 30

Warning: include() [function.include]: Failed opening './global.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nagmat/public_html/admin/categories.php on line 30

Warning: require() [function.require]: Unable to access ./includes/sessions.php in /home/nagmat/public_html/admin/categories.php on line 31

Warning: require(./includes/sessions.php) [function.require]: failed to open stream: No such file or directory in /home/nagmat/public_html/admin/categories.php on line 31

Warning: require() [function.require]: Unable to access ./includes/sessions.php in /home/nagmat/public_html/admin/categories.php on line 31

Warning: require(./includes/sessions.php) [function.require]: failed to open stream: No such file or directory in /home/nagmat/public_html/admin/categories.php on line 31

Fatal error: require() [function.require]: Failed opening required './includes/sessions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nagmat/public_html/admin/categories.php on line 31
Title: Re: [MOD] Category Image v1.0.2
Post by: Sleepy on May 19, 2011, 04:34:24 PM
Thank you very much. I love this MOD ^_^!
Title: Re: [MOD] Category Image v1.0.2
Post by: hummel on July 12, 2011, 09:12:41 PM
Hallöchen

habe leider wieder mal ein Problem.

wollte das auf der home seite, anstelle Kategorien z.b Text: Rosen, halt ein Bild zu sehen ist welches in dieser drin ist.(im Ordner)

hatte dieses mod benutzt.
alles schritt für schritt.
http://www.4homepages.de/forum/index.php?topic=6922.0 (http://www.4homepages.de/forum/index.php?topic=6922.0)

wenn ich als letztes unter Kategorien bearbeiten gehe steht auch Category image wo man die ID einstellt.

Aber wenn ich zu den Bildbearbeitung gehe sollte dort stehen welches ich als Vorschau nehmen möchte aber leider fehlt das bei mir!

da dieses mod , ja doch etwas älter ist, könnte es sein das es daran liegt?

oder aber das es so eingebunden werden sollte

{if cat_image}<img src="{cat_image}">{endif cat_image}





aber meine category_bit.html sieht so aus:
<div class="cat"><a href="{cat_url}">{cat_name}</a><span>({num_images})</span>{if cat_is_new} <span class="new">{lang_new}</span>{endif cat_is_new}</div>
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}
{if sub_cats}{sub_cats}{endif sub_cats}



wäre toll wenn jemand helfen könnte oder aber ein bessere Idee hätte


so habe es geschafft das ich im Control panel-Haupkategoriebearbeitung die bild id eingeben konnte, sehe auch dort das tumb. aber wie bekomme ich es auf die Hauptseite?

ich denke mir es liegt an dem einbinden aber wie kann ich es bei meinem

 category_bit.html  einbinden?:
<div class="cat"><a href="{cat_url}">{cat_name}</a><span>({num_images})</span>{if cat_is_new} <span class="new">{lang_new}</span>{endif cat_is_new}</div>
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}
{if sub_cats}{sub_cats}{endif sub_cats}



Title: Re: [MOD] Category Image v1.0.2
Post by: Rembrandt on July 13, 2011, 05:04:07 AM
in deiner categorie.bit, vor oder nach  {cat_name} fügst du das ein.
Code: [Select]
{if cat_image}<img src="{cat_image}">{endif cat_image}
je nach dem wo du den categorie namen haben möchtest.

und wenn du das bild immer noch nicht siehst dann:
Quote
If cat image displays fine at edit category page, but not on categories/home page, then I'd bet on mistake in step 1, 3 and/or 4

mfg Andi
Title: Re: [MOD] Category Image v1.0.2
Post by: szymanski on March 10, 2012, 10:14:46 PM
thanks work on 1.7.10
Title: Re: [MOD] Category Image v1.0.2
Post by: chamkani.net on October 08, 2012, 11:12:52 AM
One of the great mod i needed, please review my gallery having this mode installed, publisher can change the demo address to mind gallery if he want

http://pukhtoogle.com/gallery
Title: Re: [MOD] Category Image v1.0.2
Post by: JoBi on January 12, 2013, 09:05:16 PM
Ok......Habe mir den Thread durchgelesen.....aber irgendwie den Überblick verloren.... Welche Schritte muss ich jetzt genau für die Version 1.7.10 machen????

Ich Blick echt nicht mehr durch!!,!,

Bitte um Hilfe


VG
Josef
Title: Re: [MOD] Category Image v1.0.2
Post by: JoBi on January 25, 2013, 06:30:29 PM
I´ve tried it a lot of times to install that mod....I cant get it work!     My version is 1.7.10

Please somebody help me!

Here are my Probs!

First Problem:

Does not work.....can´t see yes or no option

Second method:

Do Step 6
Then got to ACP -> Edit images -> find an image -> edit.
In the single image edit screen (not the group image edit!) at the bottom, u sould see a new option "Category Image (yes/no)" simply select "yes" to set that image as "Category Image".
Also if any image was previousle set as "Category Image" u should see its thumbnail and image name.[/i]

Second Problem

I can´t find this in step 2.   $auth_postcomment = $HTTP_POST_VARS['auth_postcomment'];


I find this: $auth_postcomment = intval($HTTP_POST_VARS['auth_postcomment']);     I dont know if this is the right one.......


and my third problem:   I can't see an image....... I only see the link to the thumbnail. Looks like this    <img src="./data/thumbnails/9/20120922-jb-0467.jpg">


I hope somebody can help me!


Greetz
josef




Title: Re: [MOD] Category Image v1.0.2
Post by: whyte on February 25, 2013, 04:12:58 AM
Hi there. If you could help me it would be wonderful. I purchased the software and have used it tremendously.
I have updated to 1.7.11 and cant get the category image to work. I am almost there and have it working by copying the global.php file for 1.7.3. Problem is it only works for a while then the whole gallery goes down and wont get up and running till I return the global file again. Strange.
I also cant find the text I am required to change in the 1.7.11 global file. Has this changed since the mod was invented.

Thanks so muclh

Andrew from New Zealand.