4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Albert on July 01, 2005, 11:34:02 PM

Title: [REQ] List links for all Categories and Subcategories in one page.
Post by: Albert on July 01, 2005, 11:34:02 PM
A mod to list all categories and subcateries in one page would be great.  Just like the administrator can see on the Control Panel when Edit Category is clicked.

This way member can take at everything on the website in one single page.

Cheers,

Albert Abrantes
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: V@no on July 02, 2005, 01:01:26 AM
a dropdown is not enough?
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Albert on July 02, 2005, 09:41:35 AM
Well, let's call it a replacement.. hehe

Cheers,

Albert Abrantes
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Albert on July 04, 2005, 01:03:10 AM
Is this something hard to do?
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: hien on July 04, 2005, 01:35:04 AM
i am looking for this as well... use for sitemap
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Albert on July 09, 2005, 06:50:17 PM
yeah... And for images already have it for administrator... so I think it would be fairly simple to do...

Cheers,

Albert Abrantes
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: V@no on July 09, 2005, 07:34:19 PM
ok, guys, here is a "ripoff" from ACP -> Edit categories

1) insert into includes/functions.php:
Code: [Select]
function get_category_html_bits($cat_id = 0, $cid = 0, $depth = 1) {
  global $site_db, $html_cat_cache, $cat_cache, $site_sess;

  if (!isset($html_cat_cache[$cid])) {
    return "";
  }
  $category_list = "";
  foreach ($html_cat_cache[$cid] as $key => $category_id) {
    if (check_permission("auth_viewcat", $category_id)) {
      if ($depth > 1) {
        $category_list .= str_repeat("&nbsp;&nbsp;&nbsp;&nbsp;", $depth - 1)."<img src=\"".get_gallery_image("folder_path.gif")."\" alt=\"\">\n";
      }
      $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></b><br />";
      $category_list .= get_category_html_bits($cat_id, $category_id, $depth + 1);
    }
  }
  unset($html_cat_cache[$cid]);
  return $category_list;
}

Then insert into index.php or any other files where u want the category list to be displayed, above
Code: [Select]
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
this block:
Code: [Select]
$html_cat_cache = $cat_parent_cache;
$site_template->register_vars(array(
  "categories_list" => get_category_html_bits()
));

3) Now, in the "main" template (home.html) that is associates with the file u've insert the code (index.php) use this tag: {categories_list}

P.S. almost forgot, copy admin/images/folder_path.gif into templates/<your template>/images/ folder
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: mawenzi on July 09, 2005, 11:17:35 PM
ok, V@no ...  :wink:

it is a nice Addon to give the websitevisitor a good overview of the categories ... (I still added images and hits) ...  :D
for navigation visitors can still use the dropdownmenu as quickjump !

thanks mawenzi
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Legendary on July 19, 2005, 06:17:54 PM
mawenzi:  How were you able to add the number of images and number of hits to your sitemap?  Would you mind sharing the code?

Thanks
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: mawenzi on July 19, 2005, 09:19:13 PM
hi Legendary,

nice folder_path.gif in your sitemap ...  :wink:

... for number of category-images and category-hits after category-name
replace this code-line:
Code: [Select]
$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></b><br />";
with this :
Code: [Select]
$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></b> - ( Images: ".$cat_cache[$category_id]['num_images']." ; Hits: ".$cat_cache[$category_id]['cat_hits']." )<br />";

mawenzi


Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Legendary on July 19, 2005, 09:36:57 PM
yeah...i saw it try to save it but couldn't.  So I had to draw it, took me a while..lol
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Vincent on July 20, 2005, 11:45:07 PM
nothing to say - it works!  :lol:

vincent
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: mawenzi on July 21, 2005, 01:51:34 AM
nothing to say

Vincent ... mmm ... und wie wäre es mit ... thanks ...  :wink:

mawenzi
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Vincent on July 21, 2005, 09:20:05 AM
@Mawenzi

Sorry  :oops:  :oops:  :oops:

THANKS A LOT FOR THIS MOD  

Vincent  :wink:
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Vincent on July 21, 2005, 12:48:40 PM
@mawenzi
wäre es möglich hinter dem Kategorie name die Beschreibung einzufügen?

wäre auch cool das dort wo neue Bilder sind die schrift gelb ist oder das New hinten ansteht wie bei den fotos?

gruss
vincent
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: mawenzi on July 21, 2005, 11:59:17 PM
@mawenzi
wäre es möglich hinter dem Kategorie name die Beschreibung einzufügen?

Ja Vincent ...  :wink: ... dann nimm diesen Code zum Tausch wie bereits oben angegeben :
Code: [Select]
$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></b> - ".$cat_cache[$category_id]['cat_description']." - ( Bilder: ".$cat_cache[$category_id]['num_images']." ; Hits: ".$cat_cache[$category_id]['cat_hits']." ]<br />";
Reihenfolge : Kat.-Name -> Kat.-Beschreibung -> Kat.-Bilder -> Kat.Hits (in einer Zeile ... :wink:)


mawenzi
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Vincent on July 22, 2005, 07:02:50 AM
@mawenzi
hat geklappt - DANKE  - bloss ist die reihenfolge etwas komisch - die cat_description legt es mir auf eine neue zeile, statt hinten anzufügen!

würde mir das aber so vorstellen:
Katergorie - kategoriebeschreibung (anzahl Bilder - anzahl Hits) eventuell noch Neue Bilder (Anzahl neue Bilder)

gruss
vincent
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: mawenzi on July 22, 2005, 09:59:42 AM
hi Vincent,

habe die Reihenfolge im Code oben geändert ... hoffe es passt jetzt ...  :wink:

mawenzi
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Vincent on July 22, 2005, 12:38:39 PM
@mawenzi
du kannst zaubern - bis auf ein detail hat es geklappt am ende der Zeile fehlt der umbruch
Code: [Select]
<br />
Kannst du die noch gelb markieren welche neue Bilder inne haben?   :D  :wink:

vincent
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: mawenzi on July 22, 2005, 01:57:03 PM
hi Vincent,

ja beim ganzen Hin- und Herschieben ist mir das <br> abhanden gekommen, habe es wieder im Code ergänzt.
So ... und deine Kategorien-Sitemap sieht doch jetzt richtig gut aus ...  :D
Habe noch eine Bilder- bzw. Details-Sitemap am testen ... mit der erzeugt man jede Menge Seiten ...  8O ,
aber auch wieder einen guten Überblick ... sofern ihn ein User überhaupt haben möchte ...  :wink:

mawenzi
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Vincent on August 01, 2005, 11:18:44 AM
Ich frage nochmals -

1) wäre es möglich die Kategorien mit mit neuen Fotos gelb darzustellen?
2) Wie kann ich die liste auf 2 Spalten aufteilen?
3) Wie kann ich zwischen den hauptkategorien einen <BR> haben?

gruss
vincent
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Vincent on August 04, 2005, 11:13:49 PM
OK asking in english to encrase the chance of a answer  :wink:

Vano an Mawenzi both have it already i just need the code

- How to have the Directory with new Picture in a different colot marked?
- how to splitt the list in 2 rows?
- where to add a <P> between the major categorie?

sincerly
vincent
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: bibabobu on August 10, 2005, 10:33:52 PM
I would also like to know how to change the color of the cats which are having new images.
Thanks.

@ v@no:
how you make it to mark the cats if they are accessable or not?
I saw that on your sitemap.
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: graficalicus on August 10, 2005, 10:46:15 PM
Quote
- where to add a <P> between the major categorie?

I'd like this as well!

Also, mawenzi, I like the detail_list.php you have - - any way for you to share that code as well?   :D
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: mawenzi on August 11, 2005, 12:18:40 AM
hi vincent, hi oswald, hi graficalicus, hi all ... ,

yes ... my Categories-Sitemap ... with :
- separate representation of the main categories incl. cat.-description ... and <br>
- number of images / cat. , number of hits / cat. , number of new images / cat in red
- new / red-folder for categories with new images

example : ... here (http://klick.funpic.de/category_list.php) ... look well you say  :mrgreen: , than ...

all necessary files inclusive instruction for installation are : ...  here (http://klick.kl.funpic.de/showthread.php?bid=3&threadid=40) ... !

mawenzi
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: graficalicus on August 11, 2005, 01:10:21 AM
MANY THANKS FOR THIS!

(http://www.graficalicus.com/modules/PNphpBB2/images/smiles/bowdown.gif)
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: urmasmuld on August 11, 2005, 01:34:09 PM
I've installed this (http://klick.kl.funpic.de/category_list.php) and I get this message :
Fatal error: Cannot redeclare get_category_html_bits() in category_list_table.php on line 37

Could anyone tell me what's wrong ?
 :roll:
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: mawenzi on August 11, 2005, 02:40:26 PM
please post the url to your category_list.php.

mawenzi
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: V@no on August 11, 2005, 02:54:55 PM
get_category_html and get_category_html_bits functions were used in Chris' mod (cant recall the name), which seems to be missing after the hack...:S

what you can do is rename the functions in category_list_table.php to something else and then update category_list_table.php and category_list.php files with the new names
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: mawenzi on August 11, 2005, 03:25:09 PM
in continuation with V@no's statements :

1. in category_list_table.php find :
Code: [Select]
function get_category_html_bits($cat_id = 0, $cid = 0, $depth = 1) {
and replace with :
Code: [Select]
function get_category_list_bits($cat_id = 0, $cid = 0, $depth = 1) {
and find :
Code: [Select]
$category_list .= get_category_html_bits($cat_id, $category_id, $depth + 1);
and replace with :
Code: [Select]
$category_list .= get_category_list_bits($cat_id, $category_id, $depth + 1);

2. in category_list.php find :
Code: [Select]
"categories_list" => get_category_html_bits()
and replace with :
Code: [Select]
"categories_list" => get_category_list_bits()

mawenzi
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: urmasmuld 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
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: mawenzi 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
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: urmasmuld 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.
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: graficalicus 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!
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: bibabobu 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?
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Vincent 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
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Vincent 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
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: V@no on August 14, 2005, 06:54:46 PM
just published it:
http://www.4homepages.de/forum/index.php?topic=9299.0
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: lapinkulta 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
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: mawenzi 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
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: mawenzi 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 (http://klick.kl.funpic.de/category_list.php)

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
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: bibabobu 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:
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: bibabobu 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 :?:
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: V@no 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...
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: bibabobu 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.
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: V@no on November 15, 2005, 07:47:13 AM
And did u add the needed tags in the template?
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: bibabobu on November 15, 2005, 08:41:06 AM
Ok thank you very much v@no for the tipp.
I missed to add some tags in the category_list.html file and first i did not find out.
But now it is working.  :D
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: ascanio on March 10, 2006, 06:31:58 PM
hi every one
how can I add the {categories_list}
to another template
like for example left_menu.html which is going to be in all the templates

{categories_list} worked for the home.html
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: Eagle Eye on March 17, 2006, 07:28:28 PM
@ v@no

How can we add "Subcategories in Control Panel categories overview can be expanded/collapsed" of 1.7.2 to the code you gave here: http://www.4homepages.de/forum/index.php?topic=8682.msg40823#msg40823

Thanks
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: ccsakuweb on June 09, 2007, 04:55:40 AM
hi mawenci and vano nice mod :D
i have used this mod to a menu, and i only want to show main categories. that's ok, but it don't count new images in subcategories and only show the number of new images in main categorie. i tried it with a count but it doesn't works fine.. please i need help, could you help me please?
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: ccsakuweb on June 09, 2007, 05:03:38 AM
hi every one
how can I add the {categories_list}
to another template
like for example left_menu.html which is going to be in all the templates

{categories_list} worked for the home.html
is too late but it works in page_header.php if you add
Code: [Select]
$html_cat_cache = $cat_parent_cache;
$site_template->register_vars(array(
  "categories_list" => get_category_html_bits()
));
and delete the code from index.php


ok i fix my problem.. a demo: http://www.myart.es
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: ashfaq on June 13, 2007, 04:12:34 AM
This mod work great, Thanks
I need some modifications in it, I wanna add a seperate line after every category, Also how to change folder icon with side categories and its size ?

Category 1
--------------
Category 2
--------------
Category 3...
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: ccsakuweb on June 15, 2007, 10:48:58 AM
here is the line that you have to modify:
Code: [Select]
      $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></b><br />";for the separator after
Code: [Select]
<br />add in the line
Code: [Select]
--------------<br />
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: ccsakuweb on June 18, 2007, 03:52:01 AM
hi! i added thiis list of links in page header and then i can use it like a menu. demo: www.myart.es
but after install this mod, my website has problems about the quota of my server. They said me that it is because i use more than 20%cpu, or there is some ineficient algorithm.. Is because this mod in all my pages??? in page header??

thank you in advance
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: killer007 on October 09, 2007, 08:25:15 AM
Hello can any body tell me how to make it like this
Main category [Bold or Different Color]
 Sub Category [Normal or Different Color]

Any Body ?
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: thunderstrike on January 29, 2008, 03:13:49 AM
With this MOD, is no possible for set LIMIT - category cache is use same for thumbnails categories in categories.php file.
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: FrankUSA on August 28, 2008, 06:52:19 AM
The code below is work fine, it does show up the number images, but what if that category doesn't have any image, it didn't show the number ( 0 ), how do I make that work ?

Code: [Select]
$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></b> - ( Images: ".$cat_cache[$category_id]['num_images']." ; Hits: ".$cat_cache[$category_id]['cat_hits']." )<br />";
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: V@no on August 28, 2008, 07:18:55 AM
$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></b> - (".($cat_cache[$category_id]['num_images'] ? " Images: ".$cat_cache[$category_id]['num_images']." ;" : "")." Hits: ".$cat_cache[$category_id]['cat_hits']." )<br />";
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: FrankUSA on September 09, 2008, 05:55:46 PM
Great small change V@no .. but it will receive an errors msg from latest gallery page how can you make the same class color like the middle category look ? (blue color link) ??
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: V@no on September 10, 2008, 05:12:04 AM
Sorry, I don't understand your question.
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: FrankUSA on September 11, 2008, 06:25:25 PM
Sorry if my question is confusing you.

Question: I use your fixed code but when I click on New Image page, I do receive an error for some reason.

Question 2: How do you insert the class style which is same color as the center categories (main categories in center) ?

Let me know if my question is not clear enough thanks bro. Check the error below

Quote
Notice: Undefined index: num_images in /home/content/xxx/html/coupons/includes/functions.php on line 40

Notice: Undefined index: num_images in /home/content/xxx/html/coupons/includes/functions.php on line 40

Notice: Undefined index: num_images in /home/content/xxx/html/coupons/includes/functions.php on line 40

Notice: Undefined index: num_images in /home/content/xxx/html/coupons/includes/functions.php on line 40

Notice: Undefined index: num_images in /home/content/xxx/html/coupons/includes/functions.php on line 40

Notice: Undefined index: num_images in /home/content/xxx/html/coupons/includes/functions.php on line 40

Notice: Undefined index: num_images in /home/content/xxx/html/coupons/includes/functions.php on line 40

Notice: Undefined index: num_images in /home/content/xxx/html/coupons/includes/functions.php on line 40
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: V@no on September 12, 2008, 12:57:45 AM
1) unless you did "other" modifications out of this topic I see no reason for these errors based on the code on first page. Please be more specific which code you are referring to. Also, its a good idea whenever you see error messages, quote the exact error message (as you did) AND provide part of code from the file where error occur 10 lines above and 10 lines below the error.
2) when it comes to styles it is very hard to envision what one is talking about without seeing it on a screenshot or even better on the site.
Title: Re: [REQ] List links for all Categories and Subcategories in one page.
Post by: satine88 on September 23, 2008, 06:49:40 PM
ok, guys, here is a "ripoff" from ACP -> Edit categories

1) insert into includes/functions.php:
Code: [Select]
function get_category_html_bits($cat_id = 0, $cid = 0, $depth = 1) {
  global $site_db, $html_cat_cache, $cat_cache, $site_sess;

  if (!isset($html_cat_cache[$cid])) {
    return "";
  }
  $category_list = "";
  foreach ($html_cat_cache[$cid] as $key => $category_id) {
    if (check_permission("auth_viewcat", $category_id)) {
      if ($depth > 1) {
        $category_list .= str_repeat("&nbsp;&nbsp;&nbsp;&nbsp;", $depth - 1)."<img src=\"".get_gallery_image("folder_path.gif")."\" alt=\"\">\n";
      }
      $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></b><br />";
      $category_list .= get_category_html_bits($cat_id, $category_id, $depth + 1);
    }
  }
  unset($html_cat_cache[$cid]);
  return $category_list;
}

Then insert into index.php or any other files where u want the category list to be displayed, above
Code: [Select]
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
this block:
Code: [Select]
$html_cat_cache = $cat_parent_cache;
$site_template->register_vars(array(
  "categories_list" => get_category_html_bits()
));

3) Now, in the "main" template (home.html) that is associates with the file u've insert the code (index.php) use this tag: {categories_list}

P.S. almost forgot, copy admin/images/folder_path.gif into templates/<your template>/images/ folder

Hello :)

How do (edit files) if I put this code in a new
files?

Comment faire (quel fichier éditer) si j'ai placé ce code dans un nouveaux fichiers ?



---------------------->>> in page_header.php :)