Author Topic: details.html per category / subcategory  (Read 10763 times)

0 Members and 1 Guest are viewing this topic.

Offline pietg

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • http://www.totaaldigitaal.nl
details.html per category / subcategory
« on: July 10, 2002, 10:16:04 AM »
Hello Jan,

First of all, let me say this program is very cool. Also very easy to install!

I am wondering if it is possible to tweak the scripts a little bit.
I would like to have a details.html per category or subcategory.

The program should check whether there is a details.html in the database/media/
  • -directory and use this html-file. If there isn't a details.html in the database/media/
  • -directory the program should use the default details.html.


Is this possible and if so where should I start looking for hacking the code?
Is this in details.php?

Why I want this? To make an "e-commerce" version of 4images in combination with MOFcart. Currently I am using ImageFolio in combination with MOFcart but I like your program much more.
If I can make this work I will buy the license  :D

Kind regards,
Piet

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
details.html per category / subcategory
« Reply #1 on: July 10, 2002, 10:39:09 AM »
Details template:

Open details.php and add

Code: [Select]
if (file_exists(TEMPLATE_PATH."/details_".$cat_id.".html")) {
  $main_template = "details_".$cat_id;
}


before
Code: [Select]
$site_template->print_template($site_template->parse_template($main_template));

After that you can use templates with this name: details_CAT-ID.html.
Replace CAT-ID with the ID of the category the image is in.


Integration of MOFcart

I need first a week with 14 days and days with 48 hours. After that i can integrate the hundred of mods user requested in this forum ;)

Greets Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline pietg

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • http://www.totaaldigitaal.nl
details.html per category / subcategory
« Reply #2 on: July 10, 2002, 11:17:24 AM »
THANK YOU.
It works great.

Quote from: Jan Sorgalla

Integration of MOFcart

I need first a week with 14 days and days with 48 hours. After that i can integrate the hundred of mods user requested in this forum ;)


Integration is a big word. Making them work together is easy !
If I am finished converting my site to 4Images I will send the url.

And a week with 14 days? I will see what I can do for you  8)
But a day with 48 hours can't be done :-(

For now, I will go on testing.

Kind regards,
Piet

Offline dabri

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
    • http://www.12geschworene.de
details.html per category / subcategory
« Reply #3 on: August 03, 2002, 03:01:38 PM »
Hallo Jan,

das mit den verschiedenen details-Seiten mit dem obigen Code klappt prima!

Ich müsste aber für die jeweilige Kategorie, die details.html und categories.html geändernt haben.

Wie müsste dann der Code für die Änderung der Kategorien aussehen?

Ist für die Zukunft vielleicht eine ähnliche Handhabung mit Templates wie z. B. beim phpBB Forum geplant? Oder eine ähnliche Funktion wie bei der Wahl der Sprache index.php?l=english, so eine Auswahl des Templates zu realisieren?

Gruß Daniel

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
details.html per category / subcategory
« Reply #4 on: August 04, 2002, 08:51:22 AM »
Quote from: dabri
Ich müsste aber für die jeweilige Kategorie, die details.html und categories.html geändernt haben.

Wie müsste dann der Code für die Änderung der Kategorien aussehen?


Genaus wie oben, nur mit dem Templatenamen für categories.html. Das in categories.php einfügen:

Code: [Select]
if (file_exists(TEMPLATE_PATH."/categories_".$cat_id.".html")) {
  $main_template = "categories_".$cat_id;
}


Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline threelum

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • http://www.threelum.com/imagenation/
details.html per category / subcategory
« Reply #5 on: August 15, 2002, 04:11:56 PM »
hallo jan,

habe das mit den categories ausprobiert, funktioniert aber nicht einwandfrei. es wird zwar die detailseite angezeigt, man kann dann aber nicht mehr auf die einzelnen Vorschauseiten (thumbnails) zugreifen.

siehe: http://www.threelum.com/imagenation/categories.php?cat_id=3

liegt es eventuell daran das die "categories_cat_id.html" nun als main_template definiert wurde?


vielen dank threelum

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
details.html per category / subcategory
« Reply #6 on: August 15, 2002, 07:06:13 PM »
Ich vermute mal, Du hast irgendwas aus Deinen Templates gelöscht, wahrscheinlich das Tag {thumbnails}.

Gruß Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline threelum

  • Newbie
  • *
  • Posts: 20
    • View Profile
    • http://www.threelum.com/imagenation/
details.html per category / subcategory
« Reply #7 on: August 15, 2002, 09:10:23 PM »
:D  :D  :D  :D  :D

Jan du hattest recht, es war der thumbnail tag. Ich bin davon ausgegangen das die Detailseite eine eigene Seite ohne thumbnails ist, von der dann auf die thumb seite gesprungen wird. Aber so ist es noch viel besser, da man die Beschreibung auf jeder Seite sieht.

vielen Dank für deine Hilfe