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

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

0 Members and 1 Guest are viewing this topic.

Offline eddyman1us

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

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 #241 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?
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 eddyman1us

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: [MOD] Category Image v1.0.2
« Reply #242 on: June 27, 2009, 08:18:44 AM »
I believe I have MODed global.php ( step 1) correctly .

I have attached the file anyways !

Offline eddyman1us

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: [MOD] Category Image v1.0.2
« Reply #243 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
« Last Edit: July 02, 2009, 06:19:48 AM by eddyman1us »

Offline 4ella

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • http://www.dancersrecruit.com/pictures/
Re: [MOD] Category Image v1.0.2
« Reply #244 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




http://www.dancersrecruit.com/pictures/
4IMAGES 1.7.6 version/default theme
Apache version   2.2.11 (Unix)
PHP version   5.2.9
MySQL version   5.0.75-community-log
Architecture   x86_64
Operating system   Linux

Offline Sun

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: [MOD] Category Image v1.0.2
« Reply #245 on: July 08, 2009, 03:28:43 PM »
V@no, thanks for this mod  :) . It's works perfect in 1.7.6 
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 TimWiese

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: [MOD] Category Image v1.0.2
« Reply #246 on: July 12, 2009, 07:53:14 PM »
i have images4 1.7.7
i will this mod. what do i built?

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: [MOD] Category Image v1.0.2
« Reply #247 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 und ändere deine dateien entsprechend...
viel erfolg!
bergblume

Offline Sebas Bonito

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

Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
Re: [MOD] Category Image v1.0.2
« Reply #249 on: July 23, 2009, 04:41:21 PM »
this is awsm !   :D
I'm Back :)

Offline Sebas Bonito

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

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 #251 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?
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 #252 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.

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 #253 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.
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 #254 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.