Author Topic: [REQ] List links for all Categories and Subcategories in one page.  (Read 79029 times)

0 Members and 1 Guest are viewing this topic.

Offline urmasmuld

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #30 on: August 11, 2005, 03:31:44 PM »
Thanks for V@no & mawenzi  :lol:
Now it works great
By the way, the url is :
http://album.ossu.pri.ee/category_list.php

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #31 on: August 11, 2005, 11:16:17 PM »
hi urmasmuld,

only translation is still missing ... in category_list_table.php ...  German does not look so good on your Website ... :wink:

mawenzi
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 ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline urmasmuld

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #32 on: August 12, 2005, 07:41:19 PM »
I don't use German language in my site actually. I have this site only in english and in estonian. I've translated Categories_list in estonian. I don't know so well german language, therefore I could not to translate into greman.

Offline graficalicus

  • Full Member
  • ***
  • Posts: 235
    • View Profile
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #33 on: August 12, 2005, 08:42:34 PM »
English translation of category_list_table.php:

Code: [Select]
<?php 
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *    Scriptversion: 4images 1.7                                          *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *              Web: http://www.4homepages.de                             *
 **************************************************************************
 *             File: detail_list_table.php                                *
 *           Autor : www.detlev-kostka.de                                 *
 **************************************************************************
 *    Diese Datei ist nicht Bestandteil des Ursprungscipts !              *
 *    Sie wurde für www.detlev-kostka.de zur erweiterten Verwendung       *
 *    des 4image-Gallery-Management-Systems erstellt.                     *
 *************************************************************************/

// Als gesicherte Datei angelegt !
if (!defined('ROOT_PATH')) {
  die("Security violation");
}

//---------------------------------------------------------------
//-- Auskommentieren, wenn nur reg.User die Liste sehen sollen --
//---------------------------------------------------------------

//if ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) {
//  show_error_page($lang['no_permission_sitemap']);
//  exit;
//}

//----------------------------------------------------------------
//-- Kategorie-Liste eingebaut am 09.07.2005 ---------------------
//----------------------------------------------------------------

function get_category_html_bits($cat_id 0$cid 0$depth 1) {
  global $site_db$html_cat_cache$cat_cache$new_image_cache$site_sess;

  if (!isset($html_cat_cache[$cid])) {
    return "";
  }
  $category_list "";

  foreach ($html_cat_cache[$cid] as $key => $category_id) {
    $cat_num_new = (isset($new_image_cache[$category_id])) ? $new_image_cache[$category_id] : 0;

    if (check_permission("auth_viewcat"$category_id)) {
      if ($depth 1) {
      $category_list .= " ";
      }
      else {
      $category_list .= "<br>";
      }
      $category_list .= str_repeat("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"$depth 1)."<img src=\"".get_gallery_image("node_last.gif")."\" alt=\"\">\n";
      if ($depth 1) {
            if ($cat_num_new 0) {
            $category_list .= "<img src=\"".get_gallery_image("folder_sl_new.gif")."\" alt=\"New Images in this Category\"><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\"><small>".$cat_cache[$category_id]['cat_name']."</a> ... [ Images: ".$cat_cache[$category_id]['num_images']." ; <span style=\"color:#FF0000;\">New Images: <b>".$cat_num_new."</b></span> ; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</small><br />";
            }
            else {
            $category_list .= "<img src=\"".get_gallery_image("folder_sl.gif")."\" alt=\"\"><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\"><small>".$cat_cache[$category_id]['cat_name']."</a> - [ Images: ".$cat_cache[$category_id]['num_images']." ; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</small><br />";
            }
      }
      else {
            if ($cat_num_new 0) {
            $category_list .= "<img src=\"".get_gallery_image("folder_new.gif")."\" alt=\"New Images in this Category\"><b><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\">".$cat_cache[$category_id]['cat_name']."</a><small> - Main Category - [ Images: ".$cat_cache[$category_id]['num_images']." ; <span style=\"color:#FF0000;\">New: <b>".$cat_num_new."</b></span>; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</b><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$cat_cache[$category_id]['cat_description']."</small><br>";
            }
            else {
            $category_list .= "<img src=\"".get_gallery_image("folder.gif")."\" alt=\"\"><b><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\">".$cat_cache[$category_id]['cat_name']."</a><small> - Main Category - [ Images: ".$cat_cache[$category_id]['num_images']." ; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</b><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$cat_cache[$category_id]['cat_description']."</small><br>";
            }
      }
      $category_list .= get_category_html_bits($cat_id$category_id$depth 1);
    }
  }
  unset($html_cat_cache[$cid]);
  return $category_list;
}

?>


Cheers!

Offline bibabobu

  • Sr. Member
  • ****
  • Posts: 311
  • Technische und künstlerische Gravuren
    • View Profile
    • Technische und künstlerische Gravuren für die gesamte Metall-, Kunststoff- und Papierindustrie
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #34 on: August 12, 2005, 10:33:15 PM »
Could someone help me please?

My category-sitemap seems to be working well for me. :D

you can see at http://www.industrie-gravuren.de/galerie/category_list_test.php

My problem is the strange looking template according to the other pages.
A mistake in parsing the page i think :oops:

What is missing? What i was doing wrong?
Any solution for me?

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #35 on: August 12, 2005, 11:13:16 PM »
ok bei mir funktioniert es unterdessen wunderbar!
ich hab es aber als sitemap umbennent.
vielen Dank Mawenzi

http://www.foto-kocher.com/sitemap.php

gruss
vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #36 on: August 12, 2005, 11:14:54 PM »
@bibabobu

ich denke du hast wie Mawenzi empfohlen hat die datei error.html genommen und angepasst!
ich würde vorschlagen Du nimmst eine HTML datei die du bereits angepasst hast - die detail, categorie.html dateien zum beispiel

gruss
vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


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
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 lapinkulta

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • Avatar Essentials
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #38 on: October 03, 2005, 09:36:13 PM »
How would I need to modify the code to show only main categories in the list?
I would like to "missuse" it as left navigation where all main categories can be directly linked.

Thanks,

lapinkulta
Two hours of try and error can save ten minutes of manual reading.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #39 on: October 06, 2005, 12:50:08 PM »
How would I need to modify the code to show only main categories in the list?

finde this :
Code: [Select]
if ($depth > 1) {
            if ($cat_num_new > 0) {
            $category_list .= "<img src=\"".get_gallery_image("folder_sl_new.gif")."\" alt=\"New Images in this Category\"><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\"><small>".$cat_cache[$category_id]['cat_name']."</a> ... [ Images: ".$cat_cache[$category_id]['num_images']." ; <span style=\"color:#FF0000;\">New Images: <b>".$cat_num_new."</b></span> ; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</small><br />";
            }
            else {
            $category_list .= "<img src=\"".get_gallery_image("folder_sl.gif")."\" alt=\"\"><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\"><small>".$cat_cache[$category_id]['cat_name']."</a> - [ Images: ".$cat_cache[$category_id]['num_images']." ; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</small><br />";
            }
      }

and replace it with the following :
Code: [Select]
if ($depth > 1) {
            $category_list .= "";
}

mawenzi
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 ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #40 on: October 17, 2005, 11:36:43 PM »
Sitemap - Erweiterung

habe die Sitemap um folgendes Feature erweitert :

Die als neu in der Sitemap angezeigten Bilder werden jetzt als Link dargestellt, so dass man sich direkt (über die Suchfunktion) per Klick die neuen Bilder aus der Kategorie als Thumbnails anzeigen lassen kann :

Beispiel :  Sitemap

Für die Aktualisierung deiner Sitemap ist folgender Code auszutauschen.

1. Finde diese Code-Zeile:
Code: [Select]
$category_list .= "<img src=\"".get_gallery_image("folder-sl-new.gif")."\" alt=\"Neue Bilder in der Kategorie\"><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\"><small>".$cat_cache[$category_id]['cat_name']."</a> ... [ <img src=\"".get_gallery_image("doc.gif")."\" alt=\"\"> Bilder: ".$cat_cache[$category_id]['num_images']." ; <img src=\"".get_gallery_image("doc_new.gif")."\" alt=\"\"> <span style=\"color:#FF0000;\">neue Bilder: <b>".$cat_num_new."</b></span> ; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</small><br />";

und ersetze diese durch die folgende Code-Zeile :
Code: [Select]
$category_list .= "<img src=\"".get_gallery_image("folder-sl-new.gif")."\" alt=\"Neue Bilder in der Kategorie\"><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\"><small>".$cat_cache[$category_id]['cat_name']."</a> ... [ <img src=\"".get_gallery_image("doc.gif")."\" alt=\"\"> Bilder: ".$cat_cache[$category_id]['num_images']." ; <img src=\"".get_gallery_image("doc_new.gif")."\" alt=\"\"> <a href=\"".$site_sess->url(ROOT_PATH."search.php?search_new_images=1&cat_id=".$category_id."&sub_cat=no")."\"><span style=\"color:#FF0000;\">neue Bilder: <b>".$cat_num_new."</b></span></a> ; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</small><br />";

2. Finde diese Code-Zeile:
Code: [Select]
$category_list .= "<img src=\"".get_gallery_image("folder-new.gif")."\" alt=\"Neue Bilder in der Kategorie\"><b><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\">".$cat_cache[$category_id]['cat_name']."</a><small> ... Hauptkategorie ... [ Bilder: ".$cat_cache[$category_id]['num_images']." ; <img src=\"".get_gallery_image("doc_new.gif")."\" alt=\"\"> <span style=\"color:#FF0000;\">neue Bilder: <b>".$cat_num_new."</b></span> ; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</b><br /><img src=\"".get_gallery_image("node_01.gif")."\" alt=\"\">".$cat_cache[$category_id]['cat_description']."</small><br>";
und ersetze diese durch die folgende Code-Zeile :
Code: [Select]
$category_list .= "<img src=\"".get_gallery_image("folder-new.gif")."\" alt=\"Neue Bilder in der Kategorie\"><b><a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$category_id)."\">".$cat_cache[$category_id]['cat_name']."</a><small> ... Hauptkategorie ... [ Bilder: ".$cat_cache[$category_id]['num_images']." ; <img src=\"".get_gallery_image("doc_new.gif")."\" alt=\"\"> <a href=\"".$site_sess->url(ROOT_PATH."search.php?search_new_images=1&cat_id=".$category_id."&sub_cat=no")."\"><span style=\"color:#FF0000;\">neue Bilder: <b>".$cat_num_new."</b></span></a>; Hits: ".$cat_cache[$category_id]['cat_hits']." ]</b><br /><img src=\"".get_gallery_image("node_01.gif")."\" alt=\"\">".$cat_cache[$category_id]['cat_description']."</small><br>";

mawenzi
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 ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline bibabobu

  • Sr. Member
  • ****
  • Posts: 311
  • Technische und künstlerische Gravuren
    • View Profile
    • Technische und künstlerische Gravuren für die gesamte Metall-, Kunststoff- und Papierindustrie
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #41 on: October 25, 2005, 10:36:58 PM »
Hello!

I have a little template problem with my sitemap :?

As you can see on my URL there is missing the newsletter function, calendar and rss feature on my sitemap link although i integrated it like you can see on the other pages of my URL.

I do not know why :?:

Has somebody a solution for that? :roll:

Offline bibabobu

  • Sr. Member
  • ****
  • Posts: 311
  • Technische und künstlerische Gravuren
    • View Profile
    • Technische und künstlerische Gravuren für die gesamte Metall-, Kunststoff- und Papierindustrie
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #42 on: November 15, 2005, 01:21:25 AM »
 :( Please could someone help me with my prob in the posting above :?:

And also i have one more question:

Is it possible to add all other single web pages of a website for example as maincategory to the sitemap plan :?:

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: [REQ] List links for all Categories and Subcategories in one page.
« Reply #43 on: November 15, 2005, 01:45:32 AM »
As you can see on my URL there is missing the newsletter function, calendar and rss feature on my sitemap link although i integrated it like you can see on the other pages of my URL.
So you say, but apperently you made a misstake...

As of your second quesiton: I guess you could simply add all needed links directly into the template...
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 bibabobu

  • Sr. Member
  • ****
  • Posts: 311
  • Technische und künstlerische Gravuren
    • View Profile
    • Technische und künstlerische Gravuren für die gesamte Metall-, Kunststoff- und Papierindustrie
Re: [REQ] List links for all Categories and Subcategories in one page.
« Reply #44 on: November 15, 2005, 07:35:16 AM »
Quote
As of your second quesiton: I guess you could simply add all needed links directly into the template
ok thanks v@ano i will try that. I think that this is simply HTML, so that i do not become big problems to add some other links.

Quote
As you can see on my URL there is missing the newsletter function, calendar and rss feature on my sitemap link although i integrated it like you can see on the other pages of my URL.
Perhaps do you have an idea what the mistake is, which i could made.
I had a look at it for several times, but i can't find out.
Please could you have a short look at my sitemap.php which i will attach. Thanks.