4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started 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
-
a dropdown is not enough?
-
Well, let's call it a replacement.. hehe
Cheers,
Albert Abrantes
-
Is this something hard to do?
-
i am looking for this as well... use for sitemap
-
yeah... And for images already have it for administrator... so I think it would be fairly simple to do...
Cheers,
Albert Abrantes
-
ok, guys, here is a "ripoff" from ACP -> Edit categories
1) insert into includes/functions.php: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(" ", $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 //-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
this block:$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
-
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
-
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
-
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:
$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 :
$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
-
yeah...i saw it try to save it but couldn't. So I had to draw it, took me a while..lol
-
nothing to say - it works! :lol:
vincent
-
nothing to say
Vincent ... mmm ... und wie wäre es mit ... thanks ... :wink:
mawenzi
-
@Mawenzi
Sorry :oops: :oops: :oops:
THANKS A LOT FOR THIS MOD
Vincent :wink:
-
@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
-
@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 :
$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
-
@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
-
hi Vincent,
habe die Reihenfolge im Code oben geändert ... hoffe es passt jetzt ... :wink:
mawenzi
-
@mawenzi
du kannst zaubern - bis auf ein detail hat es geklappt am ende der Zeile fehlt der umbruch <br />
Kannst du die noch gelb markieren welche neue Bilder inne haben? :D :wink:
vincent
-
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
-
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
-
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
-
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.
-
- 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
-
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
-
MANY THANKS FOR THIS!
(http://www.graficalicus.com/modules/PNphpBB2/images/smiles/bowdown.gif)
-
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:
-
please post the url to your category_list.php.
mawenzi
-
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
-
in continuation with V@no's statements :
1. in category_list_table.php find :
function get_category_html_bits($cat_id = 0, $cid = 0, $depth = 1) {
and replace with :
function get_category_list_bits($cat_id = 0, $cid = 0, $depth = 1) {
and find :
$category_list .= get_category_html_bits($cat_id, $category_id, $depth + 1);
and replace with :
$category_list .= get_category_list_bits($cat_id, $category_id, $depth + 1);
2. in category_list.php find :
"categories_list" => get_category_html_bits()
and replace with :
"categories_list" => get_category_list_bits()
mawenzi
-
Thanks for V@no & mawenzi :lol:
Now it works great
By the way, the url is :
http://album.ossu.pri.ee/category_list.php
-
hi urmasmuld,
only translation is still missing ... in category_list_table.php ... German does not look so good on your Website ... :wink:
mawenzi
-
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.
-
English translation of category_list_table.php:
<?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(" ", $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 /> ".$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 /> ".$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!
-
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?
-
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
-
@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
-
just published it:
http://www.4homepages.de/forum/index.php?topic=9299.0
-
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
-
How would I need to modify the code to show only main categories in the list?
finde this :
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 :
if ($depth > 1) {
$category_list .= "";
}
mawenzi
-
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:
$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 :
$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:
$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 :
$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
-
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:
-
:( 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 :?:
-
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...
-
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.
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.
-
And did u add the needed tags in the template?
-
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
-
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
-
@ 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
-
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?
-
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 $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
-
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...
-
here is the line that you have to modify:
$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
<br />
add in the line--------------<br />
-
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
-
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 ?
-
With this MOD, is no possible for set LIMIT - category cache is use same for thumbnails categories in categories.php file.
-
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 ?
$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 />";
-
$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 />";
-
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) ??
-
Sorry, I don't understand your question.
-
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
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
-
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.
-
ok, guys, here is a "ripoff" from ACP -> Edit categories
1) insert into includes/functions.php: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(" ", $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 //-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
this block:$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 :)