• [MOD] Category Image v1.0.2 4 0 5 1
Currently:  

Author Topic: [MOD] Category Image v1.0.2  (Read 378125 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Category Image v1.0.2
« Reply #255 on: August 01, 2009, 02:32:27 AM »
It's checking cat_image attribute ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD] Category Image v1.0.2
« Reply #256 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.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Category Image v1.0.2
« Reply #257 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.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD] Category Image v1.0.2
« Reply #258 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).

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Category Image v1.0.2
« Reply #259 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))
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD] Category Image v1.0.2
« Reply #260 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

Offline whosthis.ee

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Category Image v1.0.2
« Reply #261 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


Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD] Category Image v1.0.2
« Reply #262 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...

Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
Re: [MOD] Category Image v1.0.2
« Reply #263 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 :) !
I'm Back :)

Offline chamkani.net

  • Jr. Member
  • **
  • Posts: 91
  • Moxet Khan
    • View Profile
    • Pukhtoogle
Re: [MOD] Category Image v1.0.2
« Reply #264 on: August 23, 2009, 04:00:35 AM »
sir point out me category mod for 1.7.7 in english?
Digital Marketing Specialist

Offline Sun

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: [MOD] Category Image v1.0.2
« Reply #265 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.
Tatyana.
I use 4images v.1.7.6
You can answer me in English and Russian languages.
Sorry, my English is not very good.

Offline satine88

  • Sr. Member
  • ****
  • Posts: 265
    • View Profile
Re: [MOD] Category Image v1.0.2
« Reply #266 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

Offline winracer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Help Me With Perl
Re: [MOD] Category Image v1.0.2
« Reply #267 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?


winracer

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Category Image v1.0.2
« Reply #268 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="" />
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline winracer

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Help Me With Perl
Re: [MOD] Category Image v1.0.2
« Reply #269 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
« Last Edit: November 16, 2009, 08:45:59 PM by winracer »
winracer