• [MOD COMPLETE] Show newest images in main cat from sub cat. + paging! 3 0 5 1
Currently:  

Author Topic: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!  (Read 69638 times)

0 Members and 1 Guest are viewing this topic.

Offline littleteam

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Littleteam.de
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #30 on: April 19, 2009, 08:38:09 PM »
I tried to install this mod (1.7.6) but I get an error message:

Code: [Select]
DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_parent_id, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_parent_id = 3 AND c.cat_id = i.cat_id ORDER BY image_date DESC LIMIT 0, 12
Unknown column 'i.user_id' in 'on clause'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/web147/html/littleteam/4images/includes/db_mysql.php on line 116

Has someone an idea what I did wrong?
trust no-one

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 COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #31 on: April 19, 2009, 10:27:53 PM »
re-do step 3.3
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 littleteam

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Littleteam.de
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #32 on: April 22, 2009, 05:52:29 PM »
Hi,

thanks for the reply :). So far so good, the error-message is gone. But now I have the problem, that in the Control Panel I cannot save the settings for cat_master. Each time I click at "yes" and then onto "safe changes" nothing happens. When I check the settings again "no" is still highlighted  :?:
trust no-one

Offline khurramalvi

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #33 on: June 16, 2009, 07:54:28 PM »
Hi,

I'm getting this error

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_master FROM 4images_categories WHERE cat_parent_id = 0 ORDER BY cat_order, cat_name ASC
Unknown column 'cat_master' in 'field list'

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #34 on: June 16, 2009, 10:23:34 PM »
hi,

you are missing 1st step

Quote
1) First thing to do is create a field in the CATEGORIES_TABLE using a program like PHPMyAdmin. This field should be named cat_master and a type of tinyint(1), not null, and 0 for default.
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #35 on: July 14, 2009, 04:14:47 PM »
Dont forget, if you upload an image to that category and it has cat_master enabled that image will now show, so you should disable uploading for that category.
Kann das mal wer bitte auf Deutsch erklären. Danke!
Warum sollte das Uploading deaktiviert werden?


Update 1: Eine andere Geschichte. Die MOD läuft soweit, bis auf eine kleine Macke:
Über den "Neuesten Fotos" ist das Paging offenbar falsch:
Code: [Select]
Gefunden: 0 Bild(er) auf 0 Seite(n). Angezeigt: Bild 0 bis 0. Das ist leider nicht richtig. Von mir aus, müssen diese "paging_stats"  
auch nicht über den "Show Sub Images" erscheinen. Jemand ne Idee?

Update 2: So, da fälschlicherweise eine NULL bei mir angezeigt (siehe Update 1),
hab ich mit if und else ein wenig nachgeholfen. Das ist zwar nicht die eleganteste Lösung, aber es funktioniert.  :D
Suche in der categories.php
Code: [Select]
$site_template->register_vars(array(
  "paging" => $getpaging->get_paging(),
  "paging_stats" => $getpaging->get_paging_stats()
));

...und ersetze es mit

Code: [Select]
if ($master_cat['cat_master'] == 1) {
$site_template->register_vars(array(
  "paging" => $getpaging->get_paging()
));
}
else {
$site_template->register_vars(array(
  "paging" => $getpaging->get_paging(),
  "paging_stats" => $getpaging->get_paging_stats()
));
}

...so wird diese Statistikzeile nicht angezeigt, wenn wir diese Vorschaubilder (der neuesten Fotos einer Subkategorie) haben.
« Last Edit: July 14, 2009, 05:40:49 PM by Schnick und Schnack »

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #36 on: July 23, 2009, 04:00:17 PM »
I've found a bug for 1.7.7

If you've changed the cat_master to 1 (on), save the category and you'll come back to edit something in the category, it says "no" in the cat_master field (even if its "yes" in database).

So search:
Code: [Select]
show_radio_row("cat_master", "cat_master", $result['cat_master']);
and replace it with:
Code: [Select]
show_radio_row("cat_master", "cat_master", $cat_row['cat_master']);
For me it helps!  8)

Offline Rinner

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #37 on: August 15, 2009, 10:23:49 AM »
Hi! This is a great mod!
I think that this code, added by Riser should be added in the first post.
Code: [Select]
$site_template->register_vars(array(
  "paging" => $getpaging->get_paging(),
  "paging_stats" => $getpaging->get_paging_stats()
));
« Last Edit: August 16, 2009, 10:44:12 AM by Rinner »

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #38 on: August 23, 2009, 03:07:57 PM »
Hello,

I just discover a bug. After installing this mod, you cannot add any category anymore to you galery.
(Version: 1.7.7)

I got this error message:


Code: [Select]
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_password, cat_hide, cat_master) VALUES ('dddd', '', 0, 20, 0, 0, 2, 2, 9, 0, 0, 0, 2, '', 0, )
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 /hsphere/local/home/*****/******/includes/db_mysql.php:192) in /hsphere/local/home/****/****/includes/functions.php on line 130


Anyone can solve this issue?

Cruxy
« Last Edit: August 24, 2009, 05:03:17 AM by cruxy »

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 COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #39 on: August 24, 2009, 03:23:43 AM »
in the original instructions no changes being made to the INSERT query...maybe you've changes something else by yourself?
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 Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #40 on: August 24, 2009, 05:05:29 AM »
Thanks V@no for your reply. Actualy I cannot remember that I change something in the code. I don't think so!!!

Offline lopsi

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #41 on: October 29, 2009, 07:51:17 PM »
Hi,
is it possible, to show all images from subcategories if i have multiple levels of subcategories?

Example:There is a main category, with two subcategories, each with (sub)subcategories.
All images form the (sub)subcategories should be shown in the above subcategory, all images from the subcategories in the main category.

In the actual mod this only works for 1 level.

Or is there another solution/mod for this (I couldnt find one here)? It´s not necessary to have the possibility to select if a categroy is cat_master or not - i just wan´t to put images in only one category

Thanks for ypur help!

Offline StanleyJoey

  • Pre-Newbie
  • Posts: 3
    • View Profile
    • http://aquaboard.tk
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #42 on: April 24, 2010, 12:40:29 PM »
Everything works perfect after reading all posts , thanks!

Offline DPHAZE

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #43 on: October 25, 2010, 12:16:16 AM »
Hello there,

just a short question related to this great mod.
is there any solution to limit the number of the shown images (1 or 2 images) from each sub-cat? ( i.e. show only the latest image from a sub-cat)

if so, that would be a great possibility to show a "preview-like-image" as a reference for each sub-cat content.

thanks in advance and cheers

Offline jacobmathias

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: [MOD COMPLETE] Show newest images in main cat from sub cat. + paging!
« Reply #44 on: March 10, 2011, 08:33:55 PM »
this mod works great, followed the replies and got some extra fixes, like the paging. Follow the instructions and you can set this up in less than 10 minutes.