Author Topic: Hide sub categories / sub kategorien verstecken  (Read 14763 times)

0 Members and 1 Guest are viewing this topic.

Offline zerozero

  • Newbie
  • *
  • Posts: 22
    • View Profile
Hide sub categories / sub kategorien verstecken
« on: December 31, 2007, 12:43:52 AM »
Hello,


i want to make a gallery with 2 main categories... in this 2 categories i want to make sub categoris with the names of car companys like Audi ^^

Now... if i do, the list gets very long (i changed the list to the left so it is like a menu)...
Is there any way to hide the sub categories... and by clicking on the categorie name the sub categories will show under the categorie and by clicking again it will hide again...

i hope you understand what i mean  :?

thx very much!

--

Hallo

Ich wollte eine Gallerie mit  2 Kategorien erstellen mit subkategoren von Automarken... nun dann wird aber die liste sehr sehr lang... ich hab die kategoren im moment links als menu...
Gibt es eine Möglichkeit alle sub kategorien zu verstecken und wenn man auf den kategorie namen klick die dann wieder unten drunter gezeigt werden... und beim erneuten klicken wieder verschwinden?

Danke im vorraus!



zerozero
« Last Edit: December 31, 2007, 07:59:14 AM by KurtW »

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Hide sub categories / sub kategorien verstecken
« Reply #1 on: December 31, 2007, 12:48:13 AM »
Quote
Is there any way to hide the sub categories... and by clicking on the categorie name the sub categories will show under the categorie and by clicking again it will hide again...

This is AJAX code. Is no exist in 4images.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Hide sub categories / sub kategorien verstecken
« Reply #2 on: December 31, 2007, 08:00:37 AM »
thunderstrike,

we know that this do not exist in 4images..

Question was: is it possible or not. please stop confusing people.

zerozero,
vielleicht meldet sich jemand, musst auf thunderstrike nicht "hören".
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 KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Hide sub categories / sub kategorien verstecken
« Reply #3 on: December 31, 2007, 09:03:35 AM »
hallo,

ist schon möglich  :wink:

http://www.malediven-bilder.de/category_list.php    :wink:



KurtW

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Hide sub categories / sub kategorien verstecken
« Reply #4 on: December 31, 2007, 09:38:36 AM »
okay,

this is what i call SUPPORT without to confuse newbies with PHP and programming.
if you do not know the answer, don't reply on this posts  :twisted:

KurtW,

das schaut echt spitzenmässsig aus.
jetzt brauchen wir nur noch den code dafür  :mrgreen:
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 nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: Hide sub categories / sub kategorien verstecken
« Reply #5 on: December 31, 2007, 10:09:43 AM »
Hei,

vielleicht ist das ja was  :arrow: http://www.act4you.de/produkte/tree_menue/index.asp?ShowWhat=,73&SelEntry=73 , oder Googlen  :wink:

Und unten eins zum Basteln.

nobby
« Last Edit: December 31, 2007, 10:37:32 AM by nobby »

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Hide sub categories / sub kategorien verstecken
« Reply #6 on: December 31, 2007, 11:56:33 AM »
Tja nobby, es gibt hunderte von "tree menüs"

Das Problem ist, diese für eine automatische Menü- Generation einzubinden...


KurtW

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: Hide sub categories / sub kategorien verstecken
« Reply #7 on: December 31, 2007, 12:02:09 PM »
So wie bei Dir ?
War ja auch nur eine idee  :|

Ich habe oft in HTML-Seiten mit den Tree-Menüs experimentier, war nicht immer Einfach.

nobby

Offline zerozero

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Hide sub categories / sub kategorien verstecken
« Reply #8 on: December 31, 2007, 02:46:17 PM »
Danke für die hilfe... genau so ein menü meint ich  :D

Nur... ich kann es nicht selber programmieren... PHP kann ich nicht... ich könnts vielleicht verstehn aber deswegen kann mans noch lang nicht schreiben :(
HTML hab ich sowas noch nie gemacht deswegen fehlte mir der begriff

Würde mich freuen wenn einer ein Code für mich hat...

Daaaankee schon mal im vorraus!

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Hide sub categories / sub kategorien verstecken
« Reply #9 on: December 31, 2007, 03:01:45 PM »
Quote
Question was: is it possible or not. please stop confusing people.

okay,

this is what i call SUPPORT without to confuse newbies with PHP and programming.
if you do not know the answer, don't reply on this posts

I no confuse people - I reply. Please stop post critic to people. :?

Quote
vielleicht meldet sich jemand, musst auf thunderstrike nicht "hören".

If you say no one need hear from me - please check all post I help user :!:
« Last Edit: December 31, 2007, 03:34:32 PM by thunderstrike »
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Hide sub categories / sub kategorien verstecken
« Reply #10 on: December 31, 2007, 03:15:09 PM »
@zerozero

... unter Verwendung von 4images Codeschnipsel aus dem ACP kann man ein "Klappmenue" basteln ...
... eine Sidemap wie in der Kategorie-Übersicht ... z.B. so ...
... die sich natürlich auch "selbst" aktualisiert ...
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 zerozero

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Hide sub categories / sub kategorien verstecken
« Reply #11 on: December 31, 2007, 03:38:24 PM »
Ich hab keine Ahnung mit welchen Codeschnipseln ich da arbeiten muss und wie ich die zusammfügen müsste... da das ACP doch auch in php ist :roll:

Und wo ist im ACP von 4images 1.7.4 ein sollches Klappmenü  8O

Danke nochmals :)

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Hide sub categories / sub kategorien verstecken
« Reply #12 on: December 31, 2007, 03:49:55 PM »
... sagte ich bereits ... in der ACP Kategorieübersicht ...
... bzw. ACP -> Kategorien bearbeiten ...
... Datei : .../admin/categories.php?action=modifycats ...
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 zerozero

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Hide sub categories / sub kategorien verstecken
« Reply #13 on: December 31, 2007, 06:43:51 PM »
Ok... den code werd ich wohl habn... aber wenn ich ihn in der index.php bei show cat. einfüge kommen verschiedene fehlermeldungen... bin soweot gekommen bis dann das hier kam:

Quote
Fatal error: Call to undefined function show_category_rows() in \index.php on line 169

Ist das hier der Code...:
Code: [Select]
if (isset($HTTP_GET_VARS['opencat'])) {
    $opencat = intval($HTTP_GET_VARS['opencat']);
    $GLOBALS['map'][$opencat] = $opencat;
  }

  if (isset($HTTP_GET_VARS['closecat'])) {
    $closecat = intval($HTTP_GET_VARS['closecat']);
    unset($GLOBALS['map'][$closecat]);
  }

  $open_all = false;

  if (isset($HTTP_GET_VARS['openall'])) {
    $open_all = true;
  }

  if (isset($HTTP_GET_VARS['closeall'])) {
    $open_all = false;
    $GLOBALS['map'] = array();
  }

  $sql = "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
          FROM ".CATEGORIES_TABLE."
          WHERE cat_parent_id = 0
          ORDER BY cat_order, cat_name ASC";
  $result = $site_db->query($sql);

  $category_cache = array();
  while ($row = $site_db->fetch_array($result)) {
    $category_cache[$row['cat_parent_id']][$row['cat_id']] = $row;
  }

  if ($show_all_subcats || $open_all || (!empty($GLOBALS['map']) && is_array($GLOBALS['map']))) {
    $where_sql = "";
    if (!$show_all_subcats && !$open_all) {
        $where_sql = "WHERE cat_parent_id IN (".implode(", ", $GLOBALS['map']).")";
    }
    $sql = "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
            FROM ".CATEGORIES_TABLE."
            $where_sql
            ORDER BY cat_order, cat_name ASC";

    $result = $site_db->query($sql);

    while ($row = $site_db->fetch_array($result)) {
      $category_cache[$row['cat_parent_id']][$row['cat_id']] = $row;
      if ($open_all) {
        $GLOBALS['map'][$row['cat_id']] = $row['cat_id'];
      }
    }
  }

  echo "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" align=\"center\"><tr><td class=\"tableborder\">\n<table cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"100%\">\n";
  echo "<tr class=\"tableseparator\">\n";
  if (!$GLOBALS['show_all_subcats']) {
    echo "<td class=\"tableseparator\" width=\"30\">";
    $href = $site_sess->url("categories.php?action=modifycats&openall=1");
    echo '<a href="'.$href.'">'.$GLOBALS['open_cat_link'].'</a>';
    $href = $site_sess->url("categories.php?action=modifycats&closeall=1");
    echo '<a href="'.$href.'">'.$GLOBALS['close_cat_link'].'</a>';
    echo "</td>";
  }
  echo "<td class=\"tableseparator\">".$lang['nav_categories_edit']."</td>\n<td class=\"tableseparator\" align=\"center\">".$lang['cat_order']."</td>\n</tr>\n";
  if (sizeof($category_cache) == 0) {
    echo "<tr class=\"".get_row_bg()."\">\n<td colspan=\"3\">".$lang['no_categories']."</td></tr>";
  }
  else {
    show_category_rows();
  }
  show_table_footer();

  $site_sess->set_session_var('map', serialize($GLOBALS['map']));
}

Muss man zufällig noch was ändern... ich hab keine ahnung von php...  :x

ich hab auch schon den ganzen code kopiert (von "if ($action == "editcat") {" aus)... ich bekomm nur fehlermeldungen...