4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on March 20, 2005, 09:14:38 PM
-
This mod will let admin set an image to be showed as a category image instead of folder icon in the categories list.
--------- [ Changed Files ] --------
global.php
admin/categories.php
admin/images.php (optional)
includes/functions.php
templates/<your template>/category_bit.html
---------- [ New files ] -----------
catimage_install.php
---------- [ Installation ] -----------
Before you do each step, scroll down and make sure that there is no exclusive for you 4images version changes. If there no version specifyed, then it means its for any 4images version.
If you see "For 4images v1.7" then it means only for v1.7, scroll down and look for the changes needed for your version. In some cases there are two separate changes for v1.7 and v1.7.1 for instance, but your version is v1.7.3, then you should do the changes for the closest to your version (in this example it would be v1.7.1)
Step 1
Open global.php
For 4images v1.7
Find:
$sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images
At the end of that line (!) add:
, c.cat_image
after u've changed it, the line should looks something like this:
$sql = "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images, c.cat_image
For 4images v1.7.1
Find:
$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
At the end of that line (!) add:
, cat_image
after u changed it, the line should looks something like this:
$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, cat_image
Step 2
Open admin/categories.php
Find two (2) times:
$auth_postcomment = $HTTP_POST_VARS['auth_postcomment'];
Insert below each line:
//Category Image
$cat_image = (isset($HTTP_POST_VARS['cat_image']) && intval($HTTP_POST_VARS['cat_image'])) ? intval($HTTP_POST_VARS['cat_image']) : 0;
//End Category Image
Step 2.1
Find:
$sql = "INSERT INTO ".CATEGORIES_TABLE."
(cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment)
VALUES
('$cat_name', '$cat_description', $cat_parent_id, $cat_order, $auth_viewcat, $auth_viewimage, $auth_download, $auth_upload, $auth_directupload, $auth_vote, $auth_sendpostcard, $auth_readcomment, $auth_postcomment)";
Replace with:
$sql = "INSERT INTO ".CATEGORIES_TABLE."
(cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image)
VALUES
('$cat_name', '$cat_description', $cat_parent_id, $cat_order, $auth_viewcat, $auth_viewimage, $auth_download, $auth_upload, $auth_directupload, $auth_vote, $auth_sendpostcard, $auth_readcomment, $auth_postcomment, $cat_image)";
Step 2.2
4images v1.7-1.7.2
Find:
SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment
Replace with:
SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, cat_image = $cat_image
4images v1.7.3
Find: SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_order = $cat_order, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment
Replace with: SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_order = $cat_order, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, cat_image = $cat_image
Step 2.3
Find:
$sql = "SELECT cat_name, cat_description, cat_parent_id, cat_hits, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment
Replace with:
$sql = "SELECT cat_name, cat_description, cat_parent_id, cat_hits, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image
4images v1.7.3
Find: $sql = "SELECT 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
Replace with: $sql = "SELECT 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, cat_image
Step 2.4
Find:
show_form_footer($lang['save_changes'], $lang['reset'], 2, $lang['back']);
Insert above:
// Category image
$cat_image = "";
if ($result['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, image_name, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$result['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
$file_info = @getimagesize($cat_image);
$dim = 50;
$width = $file_info[0];
$height = $file_info[1];
if ($width && $height) {
if ($width > $dim || $height > $dim) {
@$ratio = $width / $height;
if ($ratio > 1) {
$new_width = $dim;
$new_height = round(($dim/$width) * $height);
}else {
$new_width = round(($dim/$height) * $width);
$new_height = $dim;
}
}else{
$new_width = $width;
$new_height = $height;
}
}else{
$new_width = $dim;
$new_height = $dim;
}
$cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a> <a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>";
}
}
$value = $result['cat_image'];
if (isset($HTTP_POST_VARS['cat_image'])/* && $value == ""*/) {
$value = stripslashes($HTTP_POST_VARS['cat_image']);
}
echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">Category image</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$value."\"> $cat_image</p></td>\n</tr>\n";
//End Category image
Step 2.5
Find (in 4images v1.7.2 and above there are two instances of this line, find and replace both!):
$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
Replace with:
$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, cat_image
Step 2.6 (added 2006-03-13)
This step only needed for 4images v1.7.2 (or maybe newer)! (thanks to roger13 (http://www.4homepages.de/forum/index.php?topic=6922.msg64509#msg64509) for this find)
Find: $cat_image = "";
Insert below: $result = $cat_row;
Step 3
Open includes/functions.php
Find:
if (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0 || defined("SHOW_RANDOM_CAT_IMAGE") && SHOW_RANDOM_CAT_IMAGE == 0) {
Insert above:
$cat_image = "";
if ($cat_cache[$category_id]['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$cat_cache[$category_id]['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
}
}
$site_template->register_vars("cat_image", $cat_image);
Step 4
Open templates/<your template>/category_bit.html
Insert where u want the image to be displayed:
{if cat_image}<img src="{cat_image}">{endif cat_image}
Note that it will not display anything if no category image was set.
Step 5
Download database update script (#post_a)
Unpack it and upload the catimage_install.php file into your 4images root dir. Then start the updater by typing in your browser: http://<your site address>/<path to 4images>/catimage_install.php
Step 6 (optional)
For a better experience I'd suggest u install this (http://www.4homepages.de/forum/index.php?topic=6759.0) mod as well (v3.5 or newer).
------- [ How to use it ] -------
First method:
Go to ACP (Admin Control Panel) -> Edit categories -> edit a cegory.
There u should see a new field where u can manualy enter image ID which u want to use as "Category Image". If any image previously was selected, its ID and thumb with image name should be present there.
Second method:
Do Step 6
Then got to ACP -> Edit images -> find an image -> edit.
In the single image edit screen (not the group image edit!) at the bottom, u sould see a new option "Category Image (yes/no)" simply select "yes" to set that image as "Category Image".
Also if any image was previousle set as "Category Image" u should see its thumbnail and image name.
------- [ Extra ] ---------
If u wish to show something else if no "Category Image" was set, then u'll need this (http://www.4homepages.de/forum/index.php?topic=6036.0) (for 4images v1.7) or this (http://www.4homepages.de/forum/index.php?topic=7493.0) (for 4images v1.7.1) mod. Then in category_bit.html template u can use {ifno cat_image} and {endifno cat_image} in Step 4
Edit :
- 17.12.2007 : editing of the formating of this post by mawenzi
-
Hi V@no I have install this mod and it works great!! but I have a question ... when I select and image to be the category image it show its thumbnail and the thumbnail of my gallery are 140 x 140 and that is too big for a category image is there any way to show a smaller one? I could upload a small pic a put that one but i don't wanr that the user see that one
-
I'm stupid I just realized how to do it :):)
{if cat_image}<img src="{cat_image}" width="33" height="33">{endif cat_image}
-
and how to do to have random categorie image?
vincent
-
u dont need this mod, just uncomment
<!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file} -->
in category_bit.html template.
-
:lol: @V@no
:lol: thanks V@no it works - :? but what could i do if there is no picture in a category only in the subcategorie?
sincerly
vincent
-
V@no Thank You :D
I fund this mod for a longtime.
Now I can made it.
you see this is doing ....http://vpcdavid.idv.tw
Thank you again. :P
-
Hello
asking again but what could i do if there is no picture in a category only in the subcategorie?
Vincent
-
Hi V@no - right now your mod displays the thumbnail of the selected image. Is it possible to change it to have the image itself displayed?
-
display where? :?
@Vincent, your question is not belong to this mod, please start a new topic or something.
-
Hi, this is an interesting mod. What i am not quite sure about is ... how can I add an image as category image but don't want it to show up as regular image in the categories?
If I understand it right the category image has to be an image in the specific category.
And I have the same question as karimun .. if I define an image as category image not the image itself appears as category image but its thumbnail and I would have to adjust the thumbnail size to the category image size. Is this the right way to go or have I overlooked something?
-
Hi, this is an interesting mod. What i am not quite sure about is ... how can I add an image as category image but don't want it to show up as regular image in the categories?
you are looking for another mod then ;)
http://www.4homepages.de/forum/index.php?topic=3589.0
-
Hi V@no, thanks so much ... this is exactly what I was looking for.
What a great source this forum is. You guys are the best ... :mrgreen:
-
u dont need this mod, just uncomment <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file} -->
in category_bit.html template.
hey i tried do that but nothing happens! the variable is not parsed i guess coz of the if statement. which means its empty.....
-
hey i tried do that but nothing happens! the variable is not parsed i guess coz of the if statement. which means its empty.....
random_cat_image must be enabled in includes/constants.php
-
hi.. i want to remove the MOD and i can do that but ..
how can i remove the changes from the phpmyadmin
thanks
-
all you need to remove is cat_image field from 4images_categories table.
-
just a little tweak of this great mod:
if you'd like to show the category image smaller, than the thumbnail,
replace the code from step 3 by this:
(includes/functions.php)
//cat image
$cat_image = "";
if ($cat_cache[$category_id]['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$cat_cache[$category_id]['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
$file_info = @getimagesize($cat_image);
$dim = 40;
$width = $file_info[0];
$height = $file_info[1];
if ($width && $height) {
if ($width > $dim || $height > $dim) {
@$ratio = $width / $height;
if ($ratio > 1) {
$new_width = $dim;
$new_height = round(($dim/$width) * $height);
}else {
$new_width = round(($dim/$height) * $width);
$new_height = $dim;
}
}else{
$new_width = $width;
$new_height = $height;
}
}else{
$new_width = $dim;
$new_height = $dim;
}
$cat_image = "<img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\">";
}
}
}
$site_template->register_vars("cat_image", $cat_image);
//end cat image
and step 4 by:
{if cat_image}{cat_image}{endif cat_image}
-
Can I see an example of this mod online? :oops: :roll:
-
Si.
Just look at V@no's page ;)
-
Great MOD and it nearly works :lol:
It just shows me the adress of the thumb, but not the thumb itself...?
It looks like this:
<img src="./data/thumbnails/34/bitte_recht_freundlich.jpg" >Tiere (44) neu
In ACP the Thumb is shown correctly.
Thx for Help!
-
where I can see it in action?
-
here:
http://www.amberger-fotogalerie.de
at the first category.
Thx
-
category_bit.html
<a href="{cat_url}" class="maincat"> {if cat_image}
<img src="{cat_image}" >{endif cat_image}{cat_name}</a>
-
Have a littel Modification for this Mod...
Take this Code in Step 3
$cat_image = "";
if ($cat_cache[$category_id]['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$cat_cache[$category_id]['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
}
}else {
$cat_image = TEMPLATE_PATH."/images/folder.png";
}
$site_template->register_vars("cat_image", $cat_image);
And then it shows the Placeholder (red Code) when there is no Category Image...
-
Hy V@no I just install this mode and everything work great, but when I go to CP and I try to change the category name or any field show me this message:
DB Error: Bad SQL Query: UPDATE 4images_categories SET cat_name = 'December 05', cat_description = '', cat_parent_id = 0, cat_hits = 0, auth_viewcat = 0, auth_viewimage = 2, auth_download = 2, auth_upload = 2, auth_directupload = 9, auth_vote = 0, auth_sendpostcard = 2, auth_readcomment = 0, auth_postcomment = 2, cat_image = WHERE cat_id = 3
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE cat_id = 3' at line 3
Error editing category
Please help me how fix this ....
-
reinstall the Mod, i think you have make a mistake... (o:
-
Step 2
Open admin/categories.php
Find two (2) times:
I'm pretty much sure that's the problem.
-
I can't create new categories! You have a fix to this bug?
-
I can't create new categories! You have a fix to this bug?
Restore backups and try again
-
Is there an update for 1.7.1
Some of the lines don't match whats in my files, so I was hoping there was an update to this.
-
Please be specific, what lines?
-
Please be specific, what lines?
I am so sorry, I didnt see the section for 1.7.1 on the first post for the global file, I feel stupid.
-
Please be specific, what lines?
I am so sorry, I didnt see the section for 1.7.1 on the first post for the global file, I feel stupid.
Mod works great makes my site look 100 times better :) Thanks a million :)
-
Help!
I install this mod but i dont see a thumbnail :(
http://www.niddlfanclub.com/picture/index.php
What V@no write before doesnt works to...
<a href="{cat_url}" class="maincat"> {if cat_image}
<img src="{cat_image}" >{endif cat_image}{cat_name}</a>
Can anybody help me please.
thanks a lot
-
<a href="{cat_url}" class="maincat"> {if cat_image}
<img src="{cat_image}" >{endif cat_image}{cat_name}</a>
replace the above
with this one :
{if cat_image}<a href="{cat_url}" class="maincat"><img src="{cat_url}">{cat_name}</a>{endif cat_name}
;)
-
No :(
nothing works..
my category_bit.html:now
{if cat_image}<a href="{cat_url}" class="maincat"><img src="{cat_url}">{cat_name}</a>{endif cat_name}
{cat_name} ({num_images}) {if cat_is_new}{lang_new}{endif cat_is_new}
{if cat_description}{cat_description}
{endif cat_description} {if sub_cats}{sub_cats}{endif sub_cats}
not a nice site now: www.niddlfanclub.com/picture :(
In my ACP i can see the thumbnail picture normally
(http://www.niddlfanclub.com/acp.jpg)
-
{if cat_image}<a href="{cat_url}" class="maincat"><img src="{cat_url}">{cat_name}</a>{endif cat_name}
{cat_name} ({num_images}) {if cat_is_new}{lang_new}{endif cat_is_new}
{if cat_description}{cat_description}
{endif cat_description} {if sub_cats}{sub_cats}{endif sub_cats}
This is NOT what you posted on your earlier post. This is different then.
Change the new block to simply read :
{if cat_image}<a href="{cat_url}" class="maincat"><img src="{cat_url}">{cat_name}</a>{endif cat_name} ({num_images})
{if cat_is_new}{lang_new}{endif cat_is_new}
{if cat_description}{cat_description}{endif cat_description}
{if sub_cats}{sub_cats}{endif sub_cats}
-
This was i postet before..was the tipp was v@no gave another user before..not mine..but the other has the same problem how me..
Thanx for the new code..i will try it again :)
-
@oracle..i know. i´m not a easy user ;=)
The Code doesnt work too
---
Now i have take the first code..its in the first script:
{if cat_image}<img src="{cat_image}">{endif cat_image}
{cat_name} ({num_images}) {if cat_is_new}{lang_new}{endif cat_is_new}
{if cat_description}{cat_description}
{endif cat_description} {if sub_cats}{sub_cats}{endif sub_cats}
---
it shows only the link, not the thumbnail
--
This Code:
{if cat_image}<a href="{cat_url}" class="maincat"><img src="{cat_url}">{cat_name}</a>{endif cat_name}
{cat_name} ({num_images}) {if cat_is_new}{lang_new}{endif cat_is_new}
{if cat_description}{cat_description}
{endif cat_description} {if sub_cats}{sub_cats}{endif sub_cats}
--
Makes the problems you have seen before..
-
Most probably made a misstake in Step 1 or Step 3 (make sure you added it ABOVE not BELOW)
-
Ich habe gestern einen Fehler festegestell.
Ich habe zuletzt diesen Mod eingebaut.
Nun wollte ich gestern eine neue Kategorie anlegen..kommen lauter fehlermeldung im Admin..
es werden keine Ordner mehr automatisch erstellt..erst wie ich manuell die Ordner der Thumbnail und der Images angelegt hab..ging es wieder.
Wo liegt der Fehler bitte?
danke + liebe grüße
Alexx
-
Wenn ich in der admin/categories.php die Änderungen durchführe, kann ich nicht mehr die Kategorien bearbeiten (Im Admin Bereich). Keinerlei Änderungen werden dann übernommen (kein Text und keine Einstellung). Tausche ich wieder gegen die Originaldatei geht alles.
Ich benutze Version 1.7.2
Es liegt an Step 2.2
SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, cat_image = $cat_image
Sobald ich , cat_image = $cat_image ransetze, geht nichts mehr außer das ich im Feld für das Kategorie Image was eintragen kann. Das wird dann auch übernommen, aber im Formularfeld nicht angzeigt. Alle anderen Felder sind ohne Funktion. Nimm ich cat_image = $cat_image weg, geht alles andere, aber das Kategorie Image dafür nicht. :roll:
-
Also a great mod. :D
Install was easy. 8)
Thanks for the mod. :lol:
-
kann mir bitte jemand helfen?
can somebody help me please!
I have installed this mod..it works great, but i have one problem.
When i create a new category.it shows the category, but the orders were not created automaticlly...
i have to create the orders in thumbnails and media manually.then it works only...
when i create in my admin panel a new category i get the following error above:
Warning: mkdir(./../data/media/95): Permission denied in /www/htdocs/v154903/picture/admin/categories.php on line 78
Warning: mkdir(./../data/media/95): Permission denied in /www/htdocs/v154903/picture/admin/categories.php on line 81
Warning: mkdir(./../data/thumbnails/95): Permission denied in /www/htdocs/v154903/picture/admin/categories.php on line 78
Warning: mkdir(./../data/thumbnails/95): Permission denied in /www/htdocs/v154903/picture/admin/categories.php on line 81
Kategorie erfolgreich hinzugefügt
Please help me, to find the error!
Thanks a lot!
-
1) Your problem has absolutely nothing to do with this mod.
2) Please read docs/installation.txt instructions and read our FAQ
-
Thanks i find the little problem.
-
@V@no
can you help me?
Wenn ich in der admin/categories.php die Änderungen durchführe, kann ich nicht mehr die Kategorien bearbeiten (Im Admin Bereich). Keinerlei Änderungen werden dann übernommen (kein Text und keine Einstellung). Tausche ich wieder gegen die Originaldatei geht alles.
Ich benutze Version 1.7.2
Es liegt an Step 2.2
SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, cat_image = $cat_image
Sobald ich , cat_image = $cat_image ransetze, geht nichts mehr außer das ich im Feld für das Kategorie Image was eintragen kann. Das wird dann auch übernommen, aber im Formularfeld nicht angzeigt. Alle anderen Felder sind ohne Funktion. Nimm ich cat_image = $cat_image weg, geht alles andere, aber das Kategorie Image dafür nicht. :roll:
-
@V@no
can you help me?
How can I, if I don't understand a single word you wrote...I don't speak german...
-
Sorry
When I make changes in
admin/categories.php, i can not chance anything (categories) in the admincenter.
I use Version 1.7.2
Here is the problem Step 2.2
Code:
SET cat_name = '$cat_name', cat_description = '$cat_description', cat_parent_id = $cat_parent_id, cat_hits = $cat_hits, auth_viewcat = $auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment, cat_image = $cat_image
When i add , cat_image = $cat_image only the Category- Image field is ok. When I delete it, the other fields are ok. (Admiin-Center)
Sorry for my bad english.
-
Hi,
I've tryed to install this mod now 4 times with the latest release of 4images (1.7.2) in the admin menue / edit categories / it doesn't show me a thumbnail from the image id I add (for example ID 13, it shows me after save a blanc field and I see no thumb image - it only shows the category image in my album, but not in admin pannel / edit category / categoryname.
Any Ideas?
Thanks for your feedback.
Pat
-
:( not working in 1.7.2
-
Hi,
I've tryed to install this mod now 4 times with the latest release of 4images (1.7.2) in the admin menue / edit categories / it doesn't show me a thumbnail from the image id I add (for example ID 13, it shows me after save a blanc field and I see no thumb image - it only shows the category image in my album, but not in admin pannel / edit category / categoryname.
Any Ideas?
Thanks for your feedback.
Pat
In admin\categories.php replace this code
// Category image
$cat_image = "";
if ($result['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, image_name, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$result['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
$file_info = @getimagesize($cat_image);
$dim = 50;
$width = $file_info[0];
$height = $file_info[1];
if ($width && $height) {
if ($width > $dim || $height > $dim) {
@$ratio = $width / $height;
if ($ratio > 1) {
$new_width = $dim;
$new_height = round(($dim/$width) * $height);
}else {
$new_width = round(($dim/$height) * $width);
$new_height = $dim;
}
}else{
$new_width = $width;
$new_height = $height;
}
}else{
$new_width = $dim;
$new_height = $dim;
}
$cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a> <a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>";
}
}
$value = $result['cat_image'];
if (isset($HTTP_POST_VARS['cat_image'])/* && $value == ""*/) {
$value = stripslashes($HTTP_POST_VARS['cat_image']);
}
echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">Category image</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$value."\"> $cat_image</p></td>\n</tr>\n";
//End Category image
with this one:
// Category image
$cat_image = "";
if ($cat_row['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, image_name, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$cat_row['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
$file_info = @getimagesize($cat_image);
$dim = 50;
$width = $file_info[0];
$height = $file_info[1];
if ($width && $height) {
if ($width > $dim || $height > $dim) {
@$ratio = $width / $height;
if ($ratio > 1) {
$new_width = $dim;
$new_height = round(($dim/$width) * $height);
}else {
$new_width = round(($dim/$height) * $width);
$new_height = $dim;
}
}else{
$new_width = $width;
$new_height = $height;
}
}else{
$new_width = $dim;
$new_height = $dim;
}
$cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a> <a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>";
}
}
$value = $cat_row['cat_image'];
if (isset($HTTP_POST_VARS['cat_image'])/* && $value == ""*/) {
$value = stripslashes($HTTP_POST_VARS['cat_image']);
}
echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">Category image</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$value."\"> $cat_image</p></td>\n</tr>\n";
//End Category image
..the variable $image_row has changed to $cat_row
:( not working in 1.7.2
Sure, it do very well! :wink:
-
ups sorry... I meant the variable $result has canged to $cat_row...
-
ups sorry... I meant the variable $result has canged to $cat_row...
oh, thanks, the easiest fix would be add below $cat_image = "";
this line:$result = $cat_row;
;)
-
oh, thanks, the easiest fix would be add below...
Yes, of course.. it's as simple as that... i'ts looks more smart AND modular! Thank you :)
-
8O so confused now... i guess i'll have to read everything.
-
8O so confused now... i guess i'll have to read everything.
I guess, since you provided absolutly no usefull information about what is wrong and what is going on...
-
Thanx, the changes from roger13 works. :D
-
Thanx, the changes from roger13 works. :D
you're welcome. But you can use V@no's little change, because I forgot also to change in my code ($result to $cat_row) in this line:
$cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a> <a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>";
it should be like this:
$cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$cat_row['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a> <a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$cat_row['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>";
..so then you will get also the correct thumb link, if you click on it... but anyway, I think V@nos change is more easy..
-
:!: And is very important, that both kind of changes only works in Version: 1.7.2 :!:
-
V@no -
I get this when I try to add a new category. I believe it is because there is no field for a category image number when you add a new category. It still creates the category and all though.
Notice: Undefined index: 0 in /home/weston3/public_html/photographybyweston/gallery/admin/categories.php on line 500
Warning: Cannot modify header information - headers already sent by (output started at /home/weston3/public_html/photographybyweston/gallery/admin/categories.php:500) in /home/weston3/public_html/photographybyweston/gallery/includes/functions.php on line 47
-
Actually I kind of figured it out sort of. So what it is is there is no where in you're mod where you put a new row in the add categories field unless I am completely skipin something. I restored and redid the whole mod three times and got the same error. I eventually found the part where it is addcat form and i added a row right under the category name. Problem is on the left, it gives you no field name description which is kind of frustrating. Otherwise it works. If you could tell me how to give it a description name on the left I would appreciate it.
Thanks!
-
Again, nevermind I found it. Ok so you need to go into the categories.php file:
Find this:
show_form_header("categories.php", "savecat", "cat_form");
show_table_header($lang['nav_categories_add'], 2);
show_input_row($lang['field_category_name'], "cat_name", "", $textinput_size);
Add Below this:
/*cat image row*/
show_input_row($lang['field_cat_image'], "cat_image", "", $textinput_size);
Now go into your template package and open admin.php...
Find:
$lang['field_image_name'] = "Image name";
$lang['field_category_name'] = "Category name";
Add Below:
$lang['field_cat_image'] = "Image ID Number";
Where the "Image ID Number" is the row description for that field.
Save and upload, no more error.
-
this mod works perfect in 1.7.2 :D
thanks for this mod :lol:
-
Hi, I use this mod.
but my problem is that I use the Category Images on the 1st Level and have subcategories, once I go into the 1st Level category, it list the Logo. but i dont wan to show the logo images as a thumbnail.
can anyone help me please
-
I dont understand neither is what you are using (asuming you are not using this mod), nor what is the problem...
This mod will show a thumbnail as a category icon only on the categories YOU selected.
-
Íàäåþñü åñòü êîìó ïðî÷èòàòü è îòâåòèòü?
Óñòàíîâèë ìîä Category Image v1.0.1, ñäåëàë âñå êàê íàïèñàíî.
Åñëè â Àäìèí ïàíåëè óñòàíàâëèâàåì êàðòèíêó äëÿ êàòåãîðèè, îíà ïîêàçûâàåòñÿ íà ïåðâîé ñòðàíèöå, åñëè óáèðàåì è äåëàåì, ÷òîáû ïîêàçûâàëèñü âûáîðî÷íî, òî íà ïåðâîé ñòðàíèöå íå ïîêàçûâàåò êàðòèíêè, çàõîäèøü â ïîäðàçäåë, òàì ïîêàçûâàåò ;(
 ÷åì ìîæåò áûòü ïðîáëåìà??
-
Если в Админ панели устанавливаем картинку для категории, она показывается на первой странице, если убираем и делаем, чтобы показывались выборочно, то на первой странице не показывает картинки, заходишь в подраздел, там показывает ;(
В чем может быть проблема??
Предполагаю проблема в category_bit.html темплете, точнее проблема с тагами в той темплете.
-
Ïðîñìîòðåë ñîäåðæèìîå âûâîäà ïåðâîé ñòðàíèöû, è òàêîå âïå÷àòëåíèå ÷òî íå íàõîäèò ïóòü ê èçîáðàæåíèÿì, à òîëüêî ê äèðåêòîðèè, âîò ÷òî âíóòðè ñòðàíèöû ãäå äîëæíà áûòü êàðòèíêà:
<a href="./categories.php?cat_id=5&sessionid=839f0c48e738da9e3ffc97405c294cff"><img src="" width="40" border="1" heigh="30" /></a>
à âîò ñîäåðæèìîå category_bit.html
-----------------------
<table border="0" cellspacing="0" cellpadding="0">
<tr> <td valign="top">
<!-- <img src="{template_url}/images/folder.gif" width="20" height="13" alt="">!-->
{if cat_image}<img src="{cat_image}" width="40" height="30" border="1" hspace="3" align="left">{endif cat_image}
{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1" width="40" heigh="30"></a> {endif random_cat_image_file}
</td>
<td>
<a href="{cat_url}" class="maincat">{cat_name}</a> ({num_images})
{if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}
</td>
</tr>
</table>
{if cat_description}
<span class="smalltext">{cat_description}</span><br />{endif cat_description}
{if sub_cats}{sub_cats}{endif sub_cats}
----------------------------------------
-
on my index page, im getting this error:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/likewoah/public_html/whoopiedoo/includes/functions.php:5) in /home/likewoah/public_html/whoopiedoo/includes/sessions.php on line 86
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/likewoah/public_html/whoopiedoo/includes/functions.php:5) in /home/likewoah/public_html/whoopiedoo/includes/sessions.php on line 86
Warning: Cannot modify header information - headers already sent by (output started at /home/likewoah/public_html/whoopiedoo/includes/functions.php:5) in /home/likewoah/public_html/whoopiedoo/includes/sessions.php on line 94
Warning: Cannot modify header information - headers already sent by (output started at /home/likewoah/public_html/whoopiedoo/includes/functions.php:5) in /home/likewoah/public_html/whoopiedoo/includes/sessions.php on line 94
Warning: Cannot modify header information - headers already sent by (output started at /home/likewoah/public_html/whoopiedoo/includes/functions.php:5) in /home/likewoah/public_html/whoopiedoo/includes/sessions.php on line 94
also, that update forv1.7.2, i couldnt find $cat_image = "";
-
what is on line 5 in your include/functions.php?
You cant find it? that line is from step 2.4! if you cant find it, then I'd suggest you follow more carefully the instructions ;)
-
on line 5: *
and i looked through the file adn i couldnt find it, i did a search adn i think i found, but is it the same $cat_image = ""; that i had to add to the file?
and thnx for replying
-
make sure you upload .php files in ASCII (text) and not BINARY mode!
-
that may be why
-
hey guys is it possable to view the cat image in the category beside the name of the catagory
-
edit category_bit.html template
-
no i was woundering if u can show it in catagory.html templet i tryed it just shows me this {if cat_image}<img src="{cat_image}">{endif cat_image} no pictures
thanks
-
Then try insert in categories.php below
$random_cat_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" : get_random_image($cat_id);
This block:$cat_image = "";
if ($cat_cache[$cat_id]['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$cat_cache[$cat_id]['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
}
}
$site_template->register_vars("cat_image", $cat_image);
-
hey thanks alot man ur the gratest
i can see the image but it still sows {if cat_image} "i can see the image" {endif cat_image}
-
anyone wanan do this for me? lol
im afriad i will mess up again
-
Hallo Leute
Ich habe gerade versucht Vorschaubilder für die Kategorien nach der Anleitung V@no zu erstellen, global.php &co bearbeiten wie in der Anleitung cat_image.php installiert (Aktualisierung der Datenbank erfolgreich). Nur sobald ich im ACP Kategorien bearbeiten auswähle bekomme ich folgender Fehlermedlung: DB Error: Bad SQL Query: 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, cat_image WHERE cat_parent_id = 0 ORDER BY cat_order, cat_name ASC
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE cat_parent_id = 0 ORDER BY cat_order, cat_name aus der ich nicht schlau werde.
Wenn jemand mir helfen könnte wäre ich sehr dankbar.
Gruss
-
@ fanttomas
http://www.4homepages.de/forum/index.php?topic=12957.msg69551#msg69551
-
@ fanttomas
http://www.4homepages.de/forum/index.php?topic=12957.msg69551#msg69551
Danke, schon ein gelöstes Problem; hab immer noch Erklärung keine Lösung für das Problem mit dem Mod Category image gefunden und hoffe weiterhein auf Hilfe.
gruss
-
Подскажите пожалста как установить картинку по умолчанию чтоб была не 0 а любая другая на усмотрение админа
-
Hi,
I get this error when i try to execute catimage_install.php;
1. Error: Duplicate column name 'cat_image'
ALTER TABLE `4images_categories` ADD `cat_image` MEDIUMINT( 8 ) NOT NULL
Can somebody help me, please?
-
just ignore it, everything is fine. continue to the next step if you wish.
-
just ignore it, everything is fine. continue to the next step if you wish.
Hi V@neo, i fear make something wrong while replacing with the Mod. I am using the release 1.7.2 of 4images. I can't set the Steps 2.2 & 2.3,not found the code to replace in the admin/categories.php file.
I also couldn't find this part " $cat_image = "";" in the same file, have you some idea please?
thx
-
i did everything you say but nothing :(
i dont see the thumbnails
really i dont see nothing beside the caqtegories names
helpme please
just ignore it, everything is fine. continue to the next step if you wish.
Hi V@neo, i fear make something wrong while replacing with the Mod. I am using the release 1.7.2 of 4images. I can't set the Steps 2.2 & 2.3,not found the code to replace in the admin/categories.php file.
I also couldn't find this part " $cat_image = "";" in the same file, have you some idea please?
thx
-
I've updated to 1.7.2 and everything works fine with this mod except the ifno_catimage does not work.
I've alredy fixed the "ifnot" problem with this: http://www.4homepages.de/forum/index.php?topic=12251.0 but still no pictures are shown there. My code is: {ifno cat_image}
{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="0" height="100" alt="" ></a>{endif random_cat_image_file}{endifno cat_image}
Also I'm wondering why theres written that I can change optional something in "admin/images.php" but not written what I could change there ;)
Hugs Luna
-
I fixed the Problem I had to change something in includes/constants
define('SHOW_RANDOM_IMAGE', 1);
define('SHOW_RANDOM_CAT_IMAGE', 0);
to
define('SHOW_RANDOM_IMAGE', 1);
define('SHOW_RANDOM_CAT_IMAGE', 1);
Somehow this happend while updating to 1.7.2
-
hi.. if i do this, I can´t Add new categories?
if i do it so came this error mgs.
Notice: Undefined variable: cat_image in /usr/home/web/web97959/mysite.com/4images/admin/categories.php on line 522
DB Error: Bad SQL Query: INSERT INTO 4images_categories (cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image) VALUES ('iiiiiiiiiii', '', 0, 220, 0, 0, 2, 2, 9, 0, 0, 0, 2, )
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 4
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/web/web97959/mysite.com/4images/admin/categories.php:522) in /usr/home/web/web97959/mysite.com/4images/includes/functions.php on line 47
but if I change (old file) /admin/categories.php so can i make new categories...
if i change (new file) /admin/categories.php so can I cange Category Image..
any body can help me???
thanks, Janick...
-
made a misstake in step 2, 2.1 or 2.2
-
sorry, came across a litle problem..
Everything works fine, i can choose and pick the cat image on 'edit catergories' page, but I can't see it on the individual 'edit image' page, theres no 'Category image'shown on that page.
or do I need to have the 'batch move, edit, delete' mod to get it??
-
do I need to have the 'batch move, edit, delete' mod to get it??
Correct.
Step 6 ;)
-
I tried everything from A - Z but i still cant see the Category Image when editing the category.
-
and image id 389 exists and has thumbnail?
-
yes and it is working as the category image.
-
This is wierd...and if you replace in admin/categories.php
$cat_image = "";
with: $cat_image = "blah";
will you see word "blah" next to the cat image field?
-
i have fixed it thanks
-
In case somebody esle experience this problem, would please tell what was wrong?
-
, cat_image
this was missing in includes/functions.php
-
Hi,
I am using 1.7.3 , i installed this mod with the batch edit mod as V@no adviced,
the mod is working great but not fully...the first method shown by V@no as below does not work
First method:
Go to ACP (Admin Control Panel) -> Edit categories -> edit a cegory.
There u should see a new field where u can manualy enter image ID which u want to use as "Category Image". If any image previously was selected, its ID and thumb with image name should be present there.
It shows me a blank box in Category ID every time , even when i put a img no. it does not show after i save and refresh
Where as I can use the second method (Thanks to V@no for advicing to install the other mod too) ... where i can edit a single image and assign it to be the default categroy image.
I hope this was successful explanation ... :P
-
One more error caught just now,
If i add a sub cat to any cat ... it is added no doubt but shows me this error
Notice: Undefined index: cat_image in C:\wamp\www\impgal\4images1.7.3\4images\admin\categories.php on line 499
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\impgal\4images1.7.3\4images\admin\categories.php:499) in C:\wamp\www\impgal\4images1.7.3\4images\includes\functions.php on line 114
-
You made a misstake in Step 1.
-
No, V@no,
I checked my global.php , the change of adding ,cat_image is perfectly done..I think its something else hindering.
Pls. Help
-
maybe its done in a wrong place?
-
maybe its done in a wrong place?
V@no thanks for taking time in correcting this : but the problem still persist
Notice: Undefined index: cat_image in C:\wamp\www\impgal\4images1.7.3\4images\admin\categories.php on line 499
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\impgal\4images1.7.3\4images\admin\categories.php:499) in C:\wamp\www\impgal\4images1.7.3\4images\includes\functions.php on line 114
whenever i try to add a sub category the above error is shown i think its a little bug : :wink:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
and secondly i cannot see any digit in category image box ...
i am attaching my global.php
-
please show what is on line 499 (include 10 lines above and below it)
-
Ok, I "think" I fixed it...redo step 2
-
You are a Genius again V@no! :P
No words!!!
Working perfect (with ver 1.7.3)... both the errors are gone! :P
Thank you very much
-
Then try insert in categories.php below$random_cat_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" : get_random_image($cat_id);
This block:$cat_image = "";
if ($cat_cache[$cat_id]['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$cat_cache[$cat_id]['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
}
}
$site_template->register_vars("cat_image", $cat_image);
i cant get this to work i removed {if cat_image} {endif cat_image} and keept <img src="{cat_image}"> but i get the link of the image to my index page
-
Err...maybe I am too stupid to install it... :(
I have installed the mod and it works perfect. However for the 2nd method
Second method:
Do Step 6
Then got to ACP -> Edit images -> find an image -> edit.
In the single image edit screen (not the group image edit!) at the bottom, u sould see a new option "Category Image (yes/no)" simply select "yes" to set that image as "Category Image".
Also if any image was previousle set as "Category Image" u should see its thumbnail and image name.
I couldn't find the new option "Category Image (yes/no)"...I have checked many times but I still couldn't find where I missed...
Please help me...Thanks!
-
Hi i have problem with my galeery. I chcange all lines, and when I go to edit categories i see something like this:
http://pc.vsv.pl/error.jpg
Error is line 571.
Line 571:
http://pc.vsv.pl/categories.jpg
HELP!!!!
-
strange, I dont see anything wrong on that line...what if you restore backups and try again and make sure you upload .php files in ASCII mode not BINARY
-
V@no ... I'd like to give this mod a shot but I was wondering if you could attach the file:
http://gallery.vano.org/file60dl
I searched the thread and didn't see it attached anywhere and your site is down.
Thanks!
-
done
-
Thanks V@no. I have run into a problem though. I have version 1.7.3 and when I try to find the code in step 2.2 I can't find it. Any ideas?
-
@ Vano: I looking forward to try the Category Image MOD but i need the file which is down on http://gallery.vano.org/file60dl
EDIT:
so I have open my eyes completely and found the file :wink:
-
Huuummmm.... and where you find it?? 8O I cant see it :(!! If is possible to email me the database update, is gonna be really appreciate!!
Thanks
WhiteSun
p.s.: Sorry for my rrreally bad english :P
-
Hey V@no,
step 2.2 in the find-string "cat_order = $cat_order," is missing for V1.7.3.
same in the replace-string, too.
-
step 2.2? there is nothing about cat_order in step 2.2 :?
-
step 2.2? there is nothing about cat_order in step 2.2 :?
This is what I said :wink:
In the source of V1.7.3 is cat_order included, not in the mod
-
Got it. thanks.
I've update that step for v1.7.3
;)
-
Hey V@no!
Agian...
Step 2.5 occors two times in V1.7.3. Am I right to change both?
btw. Is there a simple way to resize the thumbs according to their format? that means not only a width and heigth satatment. I'm seeking for a solution for landscape and portrait orientation.
and second, how can I get thumbs for the subcats in the startscreen, too?
-
Yes, both lines.
sorry, I cant help with further developing the mods untill I get my server back...
-
@V@no:
Great Mod! :D
But the instructions are a bit misunderstanding, as I thought step 1 would be only necessary for versions 1.7 and 1.7.1.
I had just updated to version 1.7.3 and thus followed only explicit instructions for version 1.7.3... :wink:
-
btw. Is there a simple way to resize the thumbs according to their format? that means not only a width and heigth satatment. I'm seeking for a solution for landscape and portrait orientation.
To answer my own question:
Yes, there is a very simple way...
If you want to see a demo, look here: http://galerie.blondl.net
In the first posting of this thread v@no made a step 3, were he altered includes/functions.php.
If you insert this code below, instead of v@nos code, you will get the thumbs recalculate, not resized, and with correct orietation.
This code is not invented by me, its v@nos code from an other file inserted here with two or three lines added.
Here is the code:
$cat_image = "";
$cat_image_id = 0;
if ($cat_cache[$category_id]['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$cat_cache[$category_id]['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
$cat_image_id = $image_row['image_id'];
}
$file_info = @getimagesize($cat_image);
$dim = 50;
$width = $file_info[0];
$height = $file_info[1];
if ($width && $height) {
if ($width > $dim || $height > $dim) {
@$ratio = $width / $height;
if ($ratio > 1) {
$new_width = $dim;
$new_height = round(($dim/$width) * $height);
}else {
$new_width = round(($dim/$height) * $width);
$new_height = $dim;
}
}else{
$new_width = $width;
$new_height = $height;
}
}else{
$new_width = $dim;
$new_height = $dim;
}
$cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$cat_image_id)."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a> ";
}
}
$site_template->register_vars("cat_image", $cat_image);
@v@no:
feel free to add this mod of your mod if you want. :wink:
-
u dont need this mod, just uncomment <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file} -->
in category_bit.html template.
I've wanted this for a long time and never knew it was so easy.
-
I have a problem installind this mod for 1.7.4...
I can edit a category and enter a IMAGE ID which should be displayed as category image, but it doesn't saves the number i entered. When I press "SAVE" and edit the same category again there is always entered a "0".
:(
-
i am using 1.7.4 versiyon. How can i do category icons. Otherwise this versiyon have that?
-
hi,
this mod seems to b great and i would like to use it. where do i get the files to install it? help would be appreciated. Thanks
-
The install file is attached to the main post from V@no at the bottom by his signature.
-
thanks
-
If in the category it comes put a description, the image it is not visualized... Why?
-
I am using ver 1.74 and I get the following error in global.php
Parse error: syntax error, unexpected '[' in /home/wllth/public_html/listvideo/global.php on line 443
I am attaching the revised global.php here.
-
@ binuj01
... that isn't attaching ... that is inserting ...
... 33 post and you don't know the "code-button" ... :?
... please correct your post ...
-
Any answer????
-
@ binuj01
... please correct your post ...
I am sure he is talking about posting the code to that file instead of inserting it as a file. :wink:
-
Hi binuj01,
and the copyright notice from 4images???????
Have you bought a license :?:
cu
Kurt
-
Yes. I have. Thanks for your concern.
But that does not answer my question.
Binu
-
Hallo erstmal,
Um welche Seite es geht.
http://www.picture-collection.net/
Die implementierung hat eigentlich ganz gut geklappt. Es funktioniert auch. Es fehlt nur eine sehr schöne Funktion, die beschrieben wurde.
Frage:
Die Funktion die fehlt. Über Bearbeitung des Bildes soll es eine Funktion geben, mit der ich das Bild über ja oder nein als Vorschaubild der zugehörigen Kategorie einfügen kann.
Do Step 6
Then got to ACP -> Edit images -> find an image -> edit.
In the single image edit screen (not the group image edit!) at the bottom, u sould see a new option "Category Image (yes/no)" simply select "yes" to set that image as "Category Image".
Also if any image was previousle set as "Category Image" u should see its thumbnail and image name.
Die erste Funktion funktioniert wunderbar!
Go to ACP (Admin Control Panel) -> Edit categories -> edit a cegory.
There u should see a new field where u can manualy enter image ID which u want to use as "Category Image". If any image previously was selected, its ID and thumb with image name should be present there
Weiß jemand, bei welchem Step die Funktion eingefügt wird? Oder vielleicht kennt ihr ja selber das Problem.
MfG Lennforce
-
Is this working in 1.7.4?
-
not work in 1.7.4 help me
-
Is this going to be fixed to work in 1.7.4?
-
This would really be nice to use in the latest ver. Is this going to be modified?
-
This mod is running with 4images 1.7.4 :!: :!:
What not works ? I can help beacuse i've install this mod on 1.7.4 :mrgreen:
-
@Ferus:
I think I really need your help. The Link to the database update script described unter Step 5 doesn't work. Could you share yours, please? I have made all the changes and now I can't continue. I'm not experienced enough to uptdate the database manually :(
Thanks in advance...
Regards, Biggi
My problem is solved, I just found it at the end of Vano's posting.... :D
-
Hi @all,
I've managed to install this mod. Everything works fine, but there is one point left that I just can't solve after some days of trial and error and now I'm at the end of my knowledge. I hope someone of you could take some minutes to help me out :(
The problem is that the table in which the category-thumbs are visible is not centered. The category-images are positioned to the left side.
How can I manage to center the table?
Seems to be pretty easy, but I just can't find the solution where to change the table that includes the category-thumbnails.
Many thanks in advance!
Biggi
Solved again by myself :)
-
Ran into this little nasty error. Cant figure it out.
Anyone spot my mistake?
DB Error: Bad SQL Query: SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images [qcode], cat_image [/qcode] FROM 4images_categories c LEFT JOIN 4images_images i ON (i.cat_id = c.cat_id AND i.image_date >= 1174028428 AND i.image_active = 1) GROUP BY c.cat_id ORDER BY c.cat_order, c.cat_name ASC
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[qcode], cat_image [/qcode] FROM 4images_categories c LEFT' at line 1
the catimage_install.php completed and installed fine.
I backed up all my files so I reverted back and things work just as they were before I tried the Mod. I'm sure It's something simple. what did I mess up with the [qcode], cat_image [/qcode] insert?
-
woohoo got it to work. I took the instructions too literally. got the [/qoute] into my code. someone should fix that on the front page.
aaaanyways. I got a little tweak request if anyone can help me.
I installed this mode thinking it would allow me to specifydifferent folder icons for each category. Which it does in a way but now that I have it installed Im wondering if i could use it a different way. First I tweaked the functions.php code with AcidGod's little tweak..
$cat_image = "";
if ($cat_cache[$category_id]['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$cat_cache[$category_id]['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
}
}else {
$cat_image = TEMPLATE_PATH."/images/folder.png";
}
$site_template->register_vars("cat_image", $cat_image);
Now that I have that I would like the ability to set the image size for those categories that do have a Cat Image ID. Would work well in subcategories. Anyone care to take a try? Also going back to my orginal idea of different folder icons for each category. How can I do this, Insted of assigning a Image ID is there a way to specify a URL pointing to a certain icon in my templates directory?
requests..
1. Set a different Category Image size for those categories that have a Cat Image ID set.
2. Insted of Image ID, can I use URL or dropdown box with a list of Folder ICONS i can use.
-
is there a fix on this available for 1.7.4? it seems that no matter what i do to install this, i still get an error when i try to run catimage_install.php. keeps on saying there is an error in table creation ALTER TABLE `4images_categories` ADD `cat_image` MEDIUMINT( 8 ) NOT NULL
-
How can I see the second method to show a image in category?
Second method:
Do Step 6
Then got to ACP -> Edit images -> find an image -> edit.
In the single image edit screen (not the group image edit!) at the bottom, u sould see a new option "Category Image (yes/no)" simply select "yes" to set that image as "Category Image".
Also if any image was previousle set as "Category Image" u should see its thumbnail and image name.
I don't see these optión and I don't see the id image. Can I modify admin/images.php?, how?. Thank you.
-
Hello!
Can i have the catimage_install.php from someone, or post the code here pls.
Kann mir jemand die catimage_install.php schicken oder den Inhalt hier posten.
Danke
-
@Peppino
... und warum nimst du nicht die catimage_install.zip, die im ersten Post von V@no (am Ende) zum Download angeboten wird ... ?
-
lol danke. hab ich garnicht gesehen. :)
-
Hi, :)
I would like to know if these "category images" could show the last posted image (for each category) instead of being static/'manual' images??
You know what I mean?
Thank you.
-
Hi, :)
I would like to know if these "category images" could show the last posted image (for each category) instead of being static/'manual' images??
You know what I mean?
Thank you.
-
Yes, see 1st time. No get what mean.
-
Yes, see 1st time. No get what mean.
Hello,
Could you please be more explicit on what you said because my english is not so good. Thank you.
I just wanted to know if it is possible to display instead of a choosen pic the last image posted in the category.
-
Wenn ich in der hauptkategorie keine Bilder habe sondern nur 5 Unterkategorien
wird durch dieses Mod in der Hauptkategorie dann trotzdem ein Bild angezeigt ?
If I in the main category pictures do not have separate only 5 subcategories
by this Mod in the main category nevertheless is a picture then indicated?
Gruss
-
sorry about my english :)
But...
Where can I make my PreviePicture larger ?
They are very smal
-
sorry about my english :)
But...
Where can I make my PreviePicture larger ?
They are very smal
This might help:
http://www.4homepages.de/forum/index.php?topic=13040.0
http://www.4homepages.de/forum/index.php?topic=3236.0
-
@thunderstrike
Sorry, not the Image. I mean the category image !
In deutsch:
Ich möchte nur die Vorschaubuilder der Kategorien größer machen, die sind mir viel zu klein
Die Bilder selber in den Kategorien sind ok.
Es geht sich nur um die Vorschaubilder auf der Startseite,
Weiß jemand wo man das hier im MOD ändert ?
Mit den beiden Links einen Beitrag höher geht das nicht
Ich möchte eine feste Größe für die Category Bilder haben
Versuch in englisch:
I would like to make only the Caterogy Images larger, those am much too small for me
The pictures themselves in the categories are ok.
It concerns itself only the preview pictures on the starting side,
Know someone where one in the MOD changes here?
With the two left a contribution more highly that cannot be done
I would have a firm size (fixed size) fpr the Category Image
Please help me :?
Greets
-
@musicsurfer
... statt ...
$dim = 50;
... verwende z.B. dieses (ist die Prozentangabe der Thumbnailgröße ... ) ...
$dim = 100;
-
OK, das werde ich später ausprobieren
Da kommt aber dann gleich die nächste Frage auf
Wenn ich jetzt ein Bild habe, was 100x80 Pixel ist, das ist breiter als ein Bild was 100x70 Pixel ist
Kann man denn keinen festen Wert angeben ?
Denn sonst muss ich ja immer darauf achten das alle Bilder die gleiche Größe haben :(
----
There however then equal the next question arises
If I have now a picture, which 100x80 pixel is, which is than a picture which 100x70 pixel is broader
Can one indicate no fixed value?
Because otherwise I must on it always respect that all pictures the same size to have: (
-
ich hab mir den mod nicht angeschaut, aber
{if cat_image}<img src="{cat_image}">{endif cat_image}
z.b. auf:
{if cat_image}<img src="{cat_image}" width="100" height="70">{endif cat_image}
ändern
-
Danke Dir
Kann ich leider erst heute spät am Abend testen, da ich erst dann wieder zu hause bin
Melde mich dann nochmal
Gruss
Musicsurfer
-
Der Code heißt im Original
{if cat_image}{cat_image}{endif cat_image}
wie muss ich den denn jetzt bearbeiten ?
Denn wenn ich den z.B. in
{if cat_image}<img src="{cat_image}">{endif cat_image}
ändere wird mir nichts angezeigt, nur fehlerhafte Bilder
Gruss
-
@musicsurfer
... statt ...
$dim = 50;
... verwende z.B. dieses (ist die Prozentangabe der Thumbnailgröße ... ) ...
$dim = 100;
Ok, das hat geklappt
Problem ist nur, das die Bilder dadurch pixelig werden.
Kann man denn nicht irgendwie auf die Originaldatei zugreifen ?
Ok one, that folded
Problem is only, which becomes pixelig the pictures thereby.
Can one access the original file not somehow?
-
Hallo,
ich hab da mal ne Frage :roll:
Wo bekomme ich diese Datei denn her ?
catimage_install.php
Der hier angegebene Link funktioniert nicht :( :cry: :(
Gruß
Peter
-
... bis zum Schluss lesen, denn am Ende des ersten Posts steht ...
... catimage_install.zip (1.78 KB - runtergeladen 517 Mal.) ...
... und bei Klick könntest du die Nr. 518 sein ... ;)
-
Danke,
die Zeile habe ich glatt übersehen :) :oops:
Jetzt bin ich Nr. 518 :mrgreen: :D
Gruß
Peter
-
So is the front page updated? I don't need to go through this entire forum topic to get this MOD working, right?
-
HOLY CRAP!! What did I do wrong?? My gallery is gone and it says An unexpected error occured. Please try again later.
HELP!!!
-
An unexpected error occured.
If login in admin account, what is say for this error ?
-
Can someone please help me?
I have followed all of the instructions. I now see both options in either using the ID # or selecting Yes/No in the edit image area, however, I am unable to view the image on the gallery page. What have I done wrong? :(
melissa
-
You no answer last question.
-
I don't receive an error now. I just don't see any thumbnail on the gallery page. I have followed all of the instructions. I can add an image ID and I can also view the small thumbnail when I go into Edit image. I choose yes to add the thumbnail but still there is no image - nothing there.
-
Also, when I try to type a different ID# for the category image it keeps staying the same. So, for example, if I type Category I age to be 121 but then change it to 207 and press save it will not change. I do this over and over again and still does not change. I am using 1.7.4.
-
I don't receive an error now.
And how you clean error message if image ID is no update after change ?
-
I went through some of the suggestions in the forum and it somehow disappeared but the number just stays the same in the Category Image ID and I don't see any category image either.
This is my coding for admin/categories.php
// Category image
$cat_image = "";
if ($result['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, image_name, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$result['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
$file_info = @getimagesize($cat_image);
$dim = 50;
$width = $file_info[0];
$height = $file_info[1];
if ($width && $height) {
if ($width > $dim || $height > $dim) {
@$ratio = $width / $height;
if ($ratio > 1) {
$new_width = $dim;
$new_height = round(($dim/$width) * $height);
}else {
$new_width = round(($dim/$height) * $width);
$new_height = $dim;
}
}else{
$new_width = $width;
$new_height = $height;
}
}else{
$new_width = $dim;
$new_height = $dim;
}
$cat_image = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a> <a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>";
}
}
$value = $result['cat_image'];
if (isset($HTTP_POST_VARS['cat_image'])/* && $value == ""*/) {
$value = stripslashes($HTTP_POST_VARS['cat_image']);
}
echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">Category image</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$value."\"> $cat_image</p></td>\n</tr>\n";
//End Category image
Coding for category_bit.html
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"> {ifno cat_image}<a href="{cat_url}" class="maincat"><img src="{cat_image}"></a>{endifno
cat_image} </td>
<td> <p><a href="{cat_url}" class="maincat">{cat_name}</a> ({num_images})
{if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}<br>
{if cat_description}<span class="smalltext">{cat_description}</span><br />
{endif cat_description} {if sub_cats}{sub_cats}{endif sub_cats} </p>
</td>
</tr>
</table>
Melissa
-
Ok but I see this in code:
if ($result['cat_image'])
{
Where is rest ? Where is cat_image code for start in admin/categories.php file ?
-
I'm not sure what you mean :oops: but I have attached the entire file. I changed it back to what it was originally with the cat_image code but it still does not work.
-
No need for add 50 folder in ZIP file. :?
Ok, in file ... I no think this is right ...
Find:
// Category image
$cat_image = "";
if ($cat_cache[$category_id]['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$cat_cache[$category_id]['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
}
}else {
$cat_image = TEMPLATE_PATH."/images/folder.gif";
}
$site_template->register_vars("cat_image", $cat_image);
//End Category image
replace:
// Category image
$cat_image = "";
if ($cat_cache[$cat_id]['cat_image'])
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id = ".$cat_cache[$cat_id]['cat_image'];
if ($image_row = $site_db->query_firstrow($sql))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_image = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_image = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
}
}else {
$cat_image = TEMPLATE_PATH."/images/folder.gif";
}
$site_template->register_vars("cat_image", $cat_image);
//End Category image
-
I had just added one file to the zip folder.
I did that but now there is no place to insert the Category Image ID # under edit category.
-
I had just added one file to the zip folder.
Yes - with 50 folder for one file. :?
I did that but now there is no place to insert the Category Image ID # under edit category.
Sorry ... is no my MOD ... restore file and you see select ID again ...
-
this mod operate with 4images 1.7.4?
-
I tried installing it once on 1.7.4 I had a few errors... I just quit trying cause I'm not sure if it actually works with this version....
If someone has made this work on the latest version please let me know, so I can try again. : )
Cheers,
Albert
-
Ok... Tried again,
This is the error I get on the admin panel >> edit images
Warning: Cannot modify header information - headers already sent by (output started at /home/albertpr/public_html/mike/projects/admin/categories.php:2) in /home/albertpr/public_html/mike/projects/admin/admin_functions.php on line 168
Warning: Cannot modify header information - headers already sent by (output started at /home/albertpr/public_html/mike/projects/admin/categories.php:2) in /home/albertpr/public_html/mike/projects/admin/admin_functions.php on line 169
Warning: Cannot modify header information - headers already sent by (output started at /home/albertpr/public_html/mike/projects/admin/categories.php:2) in /home/albertpr/public_html/mike/projects/admin/admin_functions.php on line 170
Warning: Cannot modify header information - headers already sent by (output started at /home/albertpr/public_html/mike/projects/admin/categories.php:2) in /home/albertpr/public_html/mike/projects/admin/admin_functions.php on line 171
Warning: Cannot modify header information - headers already sent by (output started at /home/albertpr/public_html/mike/projects/admin/categories.php:2) in /home/albertpr/public_html/mike/projects/admin/admin_functions.php on line 172
I have no idea what I can do to fix it.... Can anyone help?
Thanks!
-
Hi,
I have a question for V@no.
1.
There was once a question :
how to do to have random categories image?
You replied : u don't need this mod, just uncomment,
<!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file} -->
2.
i tried do that but nothing happens:
You replied :
random_cat_image must be enabled in includes/constants.php
Now these are my questions:
a.
Can you put the whole sentence how to enable it and in which category to do it in.
b.
The picture that is going to be picked out randomly, will it be picked out from the same category where the picture shows up, or from all the picture that there are.
Thank you
-
I have a question for V@no.
... nice statement ... ;)
... V@no : Last Active (http://www.4homepages.de/forum/index.php?action=profile;u=596) ... unfortunately ...
-
I have a question for V@no.
... nice statement ... ;)
... V@no : Last Active (http://www.4homepages.de/forum/index.php?action=profile;u=596) ... unfortunately ...
ye, i didn't see that ( Last Active: November 03, 2006, 11:56:03 PM.)
SO, anyway can someone help me with my question.
Thanks.
-
Ohhh please can someone remodel this for 1.74???
It's lovely and I really want to do it - it will be the perfect addition to my site!
Joanne
-
No Doubt, it's a great function!!! I tried everything to make it work but had no luck as well...
-
17.12.2007 : editing of the formating of the first post ( v@no's MOD post ) by mawenzi
-
Great Thanks Mawenzi! I will try to install it now!
-
17.12.2007 : editing of the formating of the first post ( v@no's MOD post ) by mawenzi
Hi Mawenzi,
Thanks so much for making this work with 1.74, however . . . now something has happened to the site. If I click on the paging to go from page 1 to 2 etc. nothing happens, it stays on page one.
Can you help me figure out what happened?
Thanks,
Joanne
//EDIT//
It's not this mod! Oh my, now I have no idea where the problem is - I've installed quite a few mods
//EDIT 2//
I found the problem - it was something in my .htaccess file! All Fixed!!
-
I have version 1.7.4 and have tried to do everything, but it won't work...
@mawenzi - Did you make a new version or is it still on hold until V@no comes back? :-)
EDIT: Well, after much battle with code, I managed to make it work, but only via category.
In one image options there is no new fileld where I can choose that image to be default for category.
-
Hallo!
Ich habe einen kleinen Fehler bei mir (gefunden?). Habt ihr dieser auch bei euch?
Habe diesen MOD schon seit längerem und habe kürzlich folgendes entdeckt:
Wenn ich ein Bild von der Kategorie A nach Kategorie B verschiebe (via ACP >> Editimage) und dieses Bild ist nicht "Category Image" von der Kat A oder B, dann wird aber nach dem Verschieben von A nach B das "Category Image" von der Kat A nach Kat B ebenfalls "verschoben" (d.h. dass Kat B das Category Image von Kat A annimmt, obwohl das verschobene Bild kein Category Image ist). Am Schluss haben dann beide Kat (A + B) das selbe "Category Image". Jedoch sollte das Category Image von Kat B (sowie eigentlich Kat A auch) nicht geändert werden.
Woran liegt hier mein Fehler? Sieht es bei euch auch so aus? Habe den MOD genau nach Anleitung installiert! Benutze Version 1.7.4.
Ich danke euch im Voraus!
Happy New Year to all of you!!!
Gruss
EDIT: This is the same problem as "Ferus" has with this mod. Somewhere in the code is a bug...! Has anyone a solution for this?
-
Hello. I have problem with this mod, sometimes the category images moving from one to other.
example, i have category calls "SP42" where the category image will be id 6052. One day the category image change to other from other category...
Could anyone help me?
PS In the ACP the ACP don't remember the setting of id in editing category.
Sorry for my english.
-
I use 1.7.4 and could integrate the mod without any problems using the steps in the first posting.
Regards
Matthias
Switzerland
http://www.beathis.ch/cgi/pics (http://www.beathis.ch/cgi/pics)
-
Ive discovered a simple way to put a handy link on the category image to the category, without a border...
In the category_bit file
{if cat_image}<a href="{cat_url}"><img src="{cat_image}"border="0">{endif cat_image}
Makes the useful feature even more useful.
Thanks for the Mod guys it is great.
Andy
NZ
-
works still nicely on 1.7.4 , thanks :)
-
Hello :)
Thanks for this Mod !!! :D
But, is it possible to use images which are sub-categories?
Thanks
-
Hello :)
Thanks for this Mod !!! :D
But, is it possible to use images which are sub-categories?
Thanks
Hello,
Can you help please :)
-
Hello,
Someone with a solution for the second option that is not working?
I think it has to do with a major code change of the images.php i a newer version of the script.
But it would be nice to have that option.
Second method:
Do Step 6
Then got to ACP -> Edit images -> find an image -> edit.
In the single image edit screen (not the group image edit!) at the bottom, u sould see a new option "Category Image (yes/no)" simply select "yes" to set that image as "Category Image".
Also if any image was previousle set as "Category Image" u should see its thumbnail and image name.
Loet van Oostende
-
ı am speak and write turkish
mod the problem
screen;
-
I installed it with 1.7.4 successfully. Great Mod
Thanks
-
Running 4Images 1.7.6
Got a problem with this mod. I can't seem to edit any category names after I install this mod. I am able to create categories with no problem but just to edit category names and saving wouldn't work at all. Any help regarding this issue?
thanks
-
Is this working with 1.7.6
-
Good Day,
I have not installed this MOD and was reading to see if it worked with V.1.7.6 and read the edit catagory problem. A round about fix would be create the new catagory with the new name and then use this MOD http://www.4homepages.de/forum/index.php?topic=6759.0 to move the images. After delete the old catagory.
-
Running 4Images 1.7.6
Got a problem with this mod. I can't seem to edit any category names after I install this mod. I am able to create categories with no problem but just to edit category names and saving wouldn't work at all. Any help regarding this issue?
thanks
I have just installed the MOD successfuly changed the image (to a kitty cat :D) and was able to change the folder name. I had a second folder that I created before installing and did not change the category image on that folder. I was able to change the name on that folder also. So sorry to say I think you may have a typo in you installation somewhere.
- I am also running Version: 1.7.6
- Another thing to remeber is that the image will be the same size as the thumbnails on your site so you will create a new folder and set all levels to admin only. Just make/get whatever image you want and/or modify it the size you want via your bution creation program and then upload it to the new. I have not tried it as of yet but in theroy it should work just fine.
-
Is this working with 1.7.6
I have 1.7.6 and it works. First it don't but then I realised that I forgot to make the changes to global.php and after that evereything works perfect.
-
Hi Vano,
Thank for this great mod.
I just installed it, but I believe I have a little issue here:
Because I want to use small images for the category, I uploaded some images (70X70) to the gallery to use them as Categery image.
It works perfect, but I do not want that those images (Thumbs) to be shown in the homepage as new images or something like this.
How can I trick that?
Do you have the solution for me please?
Many thanks in advance for any tip.
Cheers,
-
Try replace in the Step 3:
if ($cat_cache[$category_id]['cat_image'])
With this: if ($cat_id && $cat_cache[$category_id]['cat_image'])
-
Thanks Vano.
I tried it but I still see the small thumbs.
Do you have any Idea?
-
Oh, I completely misunderstood your question...
I guess, you can create a category that only admin can see, and store your images in there.
But, I think for what you are trying to do [MOD] Static icons in the Category frame (http://www.4homepages.de/forum/index.php?topic=3589.0) would be a better choice.
-
Yes, I have.
-
You are quick with responses ;)
I've changed my reply above.
-
You are right. That what I was looking for.
I just tried it and it works :D
Thank you very for your support.
-
I install this mod but now i become this error if i want edit Category:
DB Error: Bad SQL Query: UPDATE prignitz_categories SET cat_name = 'Partybilder 2008', cat_description = '', cat_parent_id = 0, cat_order = 15, cat_hits = 278, auth_viewcat = 0, auth_viewimage = 2, auth_download = 2, auth_upload = 2, auth_directupload = 9, auth_vote = 0, auth_sendpostcard = 2, auth_readcomment = 0, auth_postcomment = 0, cat_image = WHERE cat_id = 46
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE cat_id = 46' at line 3
Warning: Cannot modify header information - headers already sent by (output started at /var/www/.../includes/db_mysql.php:190) in /var/www/web267/html/prignitz/includes/functions.php on line 114
-
Double check step 2.2
In fact double check all steps and make sure you didn't skip any.
-
Ohh my english is bad, i read it not good enough!!!
Step 2
Open admin/categories.php
Find two (2) times:
it works! thx! :roll:
-
hello
{cat_image} and {if cat_is_new} not working on lightbox.php page
how do i make it work?
-
I have 1.7.6, just installed it with the optional bulk mod. Everything is perfect but I have a problem!
I can't create a new category or sub category. Nothing happens when I do so. Editing the category is fine though.
Kindly lead me to where I have made mistake or forgotten something.
thank you
-
Guys I need your support on the above please!
-
u dont need this mod, just uncomment <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file} -->
in category_bit.html template.
I did the same but its not working
im using 1.7.6 version, and i set the value to "1" in constatns.php [[define('SHOW_RANDOM_CAT_IMAGE', 1);]]
this is my category_bit.html
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<img src="{template_url}/images/folder.gif" alt="" />
{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}
</td>
<td>
<a href="{cat_url}" class="maincat">{cat_name}</a> ({num_images})
{if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}
</td>
</tr>
</table>
pls help
-
Anyone please?
I have 1.7.6, just installed it with the optional bulk mod. Everything is perfect but I have a problem!
I can't create a new category or sub category. Nothing happens when I do so. Editing the category is fine though.
Kindly lead me to where I have made mistake or forgotten something.
thank you
-
You can start by replacing admin/categories.php with the unmodified one, make sure it works, then apply changes to it again.
-
Plssss help
u dont need this mod, just uncomment <!-- {if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file} -->
in category_bit.html template.
I did the same but its not working
im using 1.7.6 version, and i set the value to "1" in constatns.php [[define('SHOW_RANDOM_CAT_IMAGE', 1);]]
this is my category_bit.html
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<img src="{template_url}/images/folder.gif" alt="" />
{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}
</td>
<td>
<a href="{cat_url}" class="maincat">{cat_name}</a> ({num_images})
{if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}
</td>
</tr>
</table>
pls help
-
@V@no
Is it difficult to let the system to insert automatically first uploaded photo like a Category Image ? And after if somebody change his mind and doesn't like it , use this mod for edit/delete ? I think that everybody would appreciate it , they only need to remember that they must the category picture upload like a first one. I use this super mod , it saved me a lot of time but i have 1200 categories and i have to go everytime IN , see the number - go back to admin and insert it . Thanks Daniel
or to add another field to upload form - category image , and in case that you want this image like category image upload that there.
-
It would require additional steps, meanwhile, you do know that you can edit an image (in ACP) and set it as cat image from that page, right (if you did step 6)? Don't need to remember any numbers.
-
@V@no
Yes , i know , it works very well too , but to do this after successful upload from control panel or from category(You helped me to redirect) everytime I have to go back to the category , to choose the picture, click on it , then click on edit , and open it in ACP - mark like u' ve said YES and then to go back again
or
to find out the number ID and instead open the image in ACP to set YES I have to open category and fill out the number ID , with this change I should save many clicks (at least 5) to have my 1 category image immediately , I can do it , I'm not lazy, but my website is international and used mostly by the girls, so when they upload the pictures they don't know where they are, after every step they do , I have to make 1000 explanations in many languages on every page so I welcome every simple time saving Mod . That's why i was happy when you showed me how to redirect to the category instead to control panel because after successful upload in control panel nobody knew where they are , where they can continue etc. Automatic image category would help them and visitors of the site better orientation without my intervention
To have the possibility to have immediately the category image after the first upload would be the best addon because I should save many clicks - in fact whole this present MOD operation .
Good thing would also should be if author of the category - to put radio button in upload form - Category image YES - NO ,
-
is this posiible with 1.7.6 ?
-
Yes , I have 1.7.6 , it works excellent
-
Yes , I have 1.7.6 , it works excellent
can u pls explain me about editing the functions php .. its hell of a mess :D
Plesae help me..stpe by step would be great :)
Thanks in advance...im a new comer :)
www.nuwaragedara.com/wallpaper
-
Hi , I can be here 5 years and will be always newbie :D but if you want add me to the MSN or ICQ , and I can try to help you , but I only followed the steps from the first post , I have also static category icon MOD installed so it is a little bit more difficult , but happily it works great both Mods, so when I don't put my Static icon category it takes the icon from Category Image or on the contrary .
everywhere install 1.7.3 version and newer and functions.php doesn't seem to be too much difficult , I had no problem with that , will be here at night ROME CEtime , so I can help you out lately on MSN , ICQ , I can send you the code or part from my functions.php file
-
Hi , this MOD does seem to be very promising.
I am unable to get this mod working on 1.7.7 , people say it is working on 1.7.6 , I believe it should be working fine in 1.7.7 too !
I have tried and checked every changed file all the steps seem to correct .
I am not getting errors but I cant see any image beside the category , I have installed the catimage_install.php and also added $result = $cat_row; after $cat_image in categories .php
I also checked wether there is cat_image in the sql query and it is present but still I can see any image despite editing image_id in ACP multiple times .
I also tried to add $cat_image = "blah"; and I cant see "blah" next to the cat image.
I have read the entire thread but still cant get it working any suggestions ????
-
1) did you enter image id at edit category page?
2) does image id stay (it actually should show you thumbnail too) after you save the category and come back at edit category page?
3) check step 4
-
I have added the code in the category_bit.html (step 4) also I am unable to see image in the category edit page, when I changed $cat_image = "blah"; in admin/categories.php
I could see "blah" only in the cat edit page and not in the homepage .
-
I know you said you've double checked, but can you confirm one more time that you've done step 1?
-
I believe I have MODed global.php ( step 1) correctly .
I have attached the file anyways !
-
Hey can anybody check wether or not step 1 is correct in the file attached above this post :roll: !
Also can anybody confirm if this MOD is working on v1.7.7
-
was controlling your global.php , I think that everything is ok (but I have 1.7.6) -I think it is the same anyway-it should work
As I see that some people here with 1.7.6 -1.7.7 version has problems - it is my 1.7.6 version with auth_user_manage -( ignore it - its a Buddukes User Area ) , my code works good
if (defined("GET_CACHES")) {
$sql = "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_author, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, auth_user_manage, cat_image
-
V@no, thanks for this mod :) . It's works perfect in 1.7.6
-
i have images4 1.7.7
i will this mod. what do i built?
-
hallo tim wiese,
na klar kannst du diesen mod hier für deine gallerie version 1.7.7 verwenden... befolge einfach alle hier beschriebenen schritte (http://www.4homepages.de/forum/index.php?topic=6922.msg30269#msg30269) und ändere deine dateien entsprechend...
viel erfolg!
bergblume
-
Thx, v@no for this fantastic mod. Everything works fine... no probs with 1.7.7 :D
-
this is awsm ! :D
-
:flag-en:
For standard I've chosen a pic (#7), if a category will build. But I'd
like to have a new "hack": If somebody has uploaded a picture and
cat_image in the uploaded category is the standard pic (in my case
"7"), it will choose the new uploaded picture. Is this possible?
:flag-de:
Standardmäßig ist es bei mir nicht "0", sondern "7" als Kategoriebild.
Nun möchte ich eine Ergänzung haben: Wenn ich oder ein User ein
Foto hochlädt und in der zu hochladenden Kategorie cat_image = 7
ist, dann soll das neue Bild die neue cat_image sein. Ginge das irgendwie?
-
Idea is interesting, but with current mod only first image will be assigned as cat_image, next image will not be assigned, because the category already has cat_image...will that satisfy?
-
Idea is interesting, but with current mod only first image will be assigned as cat_image, next image will not be assigned, because the category already has cat_image...will that satisfy?
Yes, I guess that's what I've tried to say :)
- First uploaded image will be assigned as cat_image
- But admin has the possibility to change it manually
- next image(s) will have no effect for cat_image.
-
The following code will only work for images uploaded via members upload form and only for direct upload (no validation).
in members.php find:
$image_id = $site_db->get_insert_id();
Insert below:
if ($result && !$cat_cache[$cat_id]['cat_image'])
{
$sql = "UPDATE ".CATEGORIES_TABLE."
SET cat_image = ".$image_id."
WHERE cat_id = ".$cat_id;
$site_db->query($sql);
}
P.S. I did not test this.
-
P.S. I did not test this.
Me, too... so far.
One Question: How your code will check something linke "if cat_id is not image_id 7... then take this pic"?
Because: The cat_id is not empty for standard. Normally it's "0", in my case it's "7". Only if THIS number
is in the cat_id, the script has to change it.
-
It's checking cat_image attribute ;)
-
It's checking cat_image attribute ;)
Today I had the time, but it doesn't work (the way you told me).
The cat_image is still "7"... so the default/standard for cat_image.
-
what is 7? if cat_image is 7, then it means there is already an image assigned to that category. Otherwise it would be empty or 0.
-
what is 7? if cat_image is 7, then it means there is already an image assigned to that category. Otherwise it would be empty or 0.
Yeah, that's what I've already told... normally the standard is "0", but in my case I've changed it to "7" for standard (via mysql and for this field).
-
Hmmm try change the first line to this:
if ($result && (!$cat_cache[$cat_id]['cat_image'] || $cat_cache[$cat_id]['cat_image'] == 7))
-
Hmmm try change the first line to this:
if ($result && (!$cat_cache[$cat_id]['cat_image'] || $cat_cache[$cat_id]['cat_image'] == 7))
Yes, that works! Thank you very much. :D
-
Hi
alt text is not working for category thumbnail images
i user image_desc as alt text for images
-
V@no So far everything works fine. Thank you so much for your fantastic support.
$image_id = $site_db->get_insert_id();
if ($result && (!$cat_cache[$cat_id]['cat_image'] || $cat_cache[$cat_id]['cat_image'] == 7))
{
$sql = "UPDATE ".CATEGORIES_TABLE."
SET cat_image = ".$image_id."
WHERE cat_id = ".$cat_id;
$site_db->query($sql);
}
I have a category-structure for my concert-gallery like
1. Category (interpret)
1.1 Subcategory (date of the concert)
1.1.1 Photos of this concert
1.1.2 Videos of this concert
2. Category (interpret)
2.1 Subcategory (date of the concert)
2.1.1 Photos of this concert
2.1.2 Videos of this concert
3. Category (interpret)
3.1 Subcategory (date of the concert)
3.1.1 Photos of this concert
3.1.2 Videos of this concert
...sooo everytime the same way. And with your help and in combination with the MOD to let users add subcategories, users are building 3 Subcategories: For example 1.1 Subcategory (date of the concert), 1.1.1 Photos of this concert and 1.1.2 Videos of this concert... all in ONE function. If somebody is uploading a picture to the subcategory 1.1.1, the first uploaded picture is also the "category image" for its (sub)category. And this works fine.
NOW I'd like to add also automatically a "category image" to the category above: in this case "1.1 Subcategory (date of the concert)". It's the same way like above, but addionally an catimage for the whole concert not only for the photo or video section. Is there a way to add this Function? So if somebody upload a picture and the catimage is "7" for the default-picture, the thumbnail will be set as the catimage of its category and one category above. I hope, my ugly english will be understand?
Thx!
Below the addcat.php and the member.php attached...
-
works fine :) tested it again and finally ended with no error reports :mrgreen:
Thanks Sir v@no :) !
-
sir point out me category mod for 1.7.7 in english?
-
Error in Step 2.4 (when edit category, we didn't see number cat_image):
echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">Category image</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$value."\"> $cat_image</p></td>\n</tr>\n";
must be:
echo "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">Category image</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$cat_row['cat_image']."\"> $cat_image</p></td>\n</tr>\n";
It will be interesting if i can see picture of category when i edit category(how i see it when edit picture). But i don't know how to do this.
-
Hello,
Is it possible to set the home page just the thumbnail that
would represent each class (not [MOD] Category Image v1.0.2), but
a mod or images are displayed randomly.
I remove the block classes and put the new system.
Is this possible?
Thank you
-
I installed this MOD and when I pick a image for the category it shows the image and also still have the folder icon. does anyone know what I did worng?
-
remove from category_bit.html template (assuming you are using default template):
<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />
-
remove from category_bit.html template (assuming you are using default template):
<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />
When I removed it then all other folders gone. I have folder on some and images on others.
I tried something like this but it did not work. how can I do something like this use the cat_image if there is one else use folder.
{if cat_image}
<img src="{cat_image}">
else{
<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />
}
{endif cat_image}
thanks for your help!
winracer
myfunnypets.com
-
Hello,
I am applying here : http://www.4homepages.de/forum/index.php?topic=26297.0
so I installed the mod : http://www.4homepages.de/forum/index.php?topic=6922.0
then make the change presented here http://www.4homepages.de/forum/index.php?topic=6675.0
when I click on a category, I have this error:
Warning: main(admin_global.php) [function.main]: failed to open stream: No such file or directory in /homez.312/iphonefo/www/categories.php on line 27
Fatal error: main() [function.require]: Failed opening required 'admin_global.php' (include_path='.:/usr/local/lib/php') in /homez.312/iphonefo/www/categories.php on line 27
In categorie line 27 :
require('admin_global.php');
admin_global.php on my server
Thanks :)
-
When I removed it then all other folders gone. I have folder on some and images on others.
In that case use this:
{ifno cat_image}<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />{endifno cat_image}
when I click on a category, I have this error:
Looks like you've uploaded categories.php file that belongs in admin/ directory into 4images root directory...I hope you have backups of both files.
-
When I removed it then all other folders gone. I have folder on some and images on others.
In that case use this:
{ifno cat_image}<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />{endifno cat_image}
thanks for your help I got it
{if cat_image}<img src="{cat_image}" width="20" height="13" alt="" />{endif cat_image}
{ifno cat_image}<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />{endifno cat_image}
Do you know if there a mod like this for subcategory image?
-
Absolutely not tested.
In includes/functions.php find:
$sub_cat_list = "";
Insert below:
$cat_image_list = array();
$i = 1;
foreach ($visible_cat_cache as $subcat_id)
{
if ($i > $num_subs || $i > $config['num_subcats'])
break;
if (!$cat_cache[$subcat_id]['cat_image'] || isset($cat_cache[$subcat_id]['cat_image_url']))
continue;
$cat_image_list[] = $cat_cache[$subcat_id]['cat_image'];
$i++;
}
if (!empty($cat_image_list))
{
$sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
FROM ".IMAGES_TABLE."
WHERE image_id IN (".implode(",", $cat_image_list).")";
if ($result = $site_db->query($sql))
{
while ($image_row = $site_db->fetch_array($result))
{
if (!get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 0))
{
$cat_cache[$image_row['cat_id']]['cat_image_url'] = ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif";
}
else
{
$cat_cache[$image_row['cat_id']]['cat_image_url'] = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
}
}
}
}
Find:
$sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\">".format_text($cat_cache[$subcat_id]['cat_name'], 2)."</a>";
Replace with:
$sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\">";
if (isset($cat_cache[$subcat_id]['cat_image_url']) && $cat_cache[$subcat_id]['cat_image_url'])
$sub_cat_list .= '<img src="' . $cat_cache[$subcat_id]['cat_image_url'] . '" width="20" height="13" alt="" /> ';
$sub_cat_list .= format_text($cat_cache[$subcat_id]['cat_name'], 2);
$sub_cat_list .= "</a>";
-
thanks!!!!, I have installed and will test.
Question how do I add the image to the subcategory?
can it be setup like category? what i mean is that when you edit a photo you have some option as category like
Category image
Current image:
Yes No
also have a
Subcategory image
Current image:
Yes No
hoep this makes sence
-
mmmm...just edit subcategories and add their own images...
-
mmmm...just edit subcategories and add their own images...
ok can i edit the category_bit.html
and replace this
{if sub_cats}{sub_cats}{endif sub_cats}
with this
{if subcat_image}<img src="{subcat_image}" width="20" height="13" alt="" />{endif subcat_image}
{ifno subcat_image}<img src="{template_url}/images/folder.gif" width="20" height="13" alt="" />{endifno sub_cats_image}
Next question would this work if I took the code at the start of the and added $subcat_image and cat_image
sorry I see now that this is only to display the subcat on main page
-
Hello
How to get it working for sub categories?
(http://nsa15.casimages.com/img/2010/05/15//100515030413798529.jpg)
http://nsa15.casimages.com/img/2010/05/15//100515030413798529.jpg
-
Just a few messages before yours
http://www.4homepages.de/forum/index.php?topic=6922.msg143083#msg143083
-
Just a few messages before yours
http://www.4homepages.de/forum/index.php?topic=6922.msg143083#msg143083
Ok; sorry
Thanks ;)
But : I've this error :
Fatal error: Call to undefined function: get_basename() in /homez.93/fondecra/www/global.php on line 346
global.php on line 346 :
$url = get_basename(getenv("HTTP_REFERER"));
-
You did something wrong, restore backups and try again ;)
-
You did something wrong, restore backups and try again ;)
Thank you!
Will it be possible, just for sub-categories to the name of the sub-category below
image?
-
replace $sub_cat_list .= '<img src="' . $cat_cache[$subcat_id]['cat_image_url'] . '" width="20" height="13" alt="" /> ';
with: $sub_cat_list .= '<img src="' . $cat_cache[$subcat_id]['cat_image_url'] . '" width="20" height="13" alt="" /><br />';
-
Hi, i am using 1.7.7 Does that mean i don't have to change anything in the global as i can not see the line that needs changing ?
-
Hi, i am using 1.7.7 Does that mean i don't have to change anything in the global as i can not see the line that needs changing ?
Every step required. If you can't find exact line, find a similar and add the need part at the end of that line.
-
ok, cheers!
-
hallo kann ich das mod auch für version 1.7.7 benutzen?
Danke
-
Hello
How to automatically attribute "alt = image name?
Thanks :wink:
-
In the code from step 3 replace
$sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id
With this:
$sql = "SELECT image_id, image_media_file, image_thumb_file, cat_id, image_name
Then find:
$site_template->register_vars("cat_image", $cat_image);
With this:
$site_template->register_vars(array(
"cat_image" => $cat_image,
"cat_image_name" => format_text(@$image_row['image_name'], 2),
));
After that in category_bit.html template use this:
{if cat_image}<img src="{cat_image}" alt="{cat_image_name}">{endif cat_image}
-
hallo kann ich das mod auch für version 1.7.7 benutzen?
Danke
Ja. Ich habe das mod am Wochenende in meine 4images Gallerie 1.7.7 installiert.
-
Hello!
Can i Use This Mod with 1.78?
-
Hello!
Can i Use This Mod with 1.78?
yep
EDIT:
Is it possible to display more then one category image, and can they be random?
Greetz X23
-
hello ..
i want to use it with 1.7.9??
but i dont know how to install...
and when i tried to manually change the script,, the coding specifed here is little different .. like in global.php..the coding dosent match to global.php of my site.
please help what to do??
---------------------------------------------------------------
Help help help help help.....\
I tried changing the codes manually as said.. i did as written here...
but i dont know where it go wrong...
Please Help...
im having this error...
An unexpected error occured. Please try again later.
what to do what to do???
Help required..any one..
-----------------------------
No worries problem fixed..problem was in global.php..sorry my bad..
but image not showing..how to set image id in catogries..??
-
....
yes bro
l have same problem
unnecessary full quote removed, Rembrandt
-
@haider512 and @kasun0777
do you have run the installer?
Step 5 on the first side?
regards,
Mary from germany
lila13. de und knipslust.de
-
@haider512 and @kasun0777
do you have run the installer?
Step 5 on the first side?
regards,
Mary from germany
lila13. de und knipslust.de
yup sure..i did the step 5..the problem was i did mistaked in global.php
and then it did worked for me..but i found out..that my site is better off without the catogaries images..cuz i have alot of catogries.. and it will all look messy if i use images as catogaries..
Any how..are you facing any problems with it?
-
Hi,
I get this error when i try to execute catimage_install.php;
1. Error: Duplicate column name 'cat_image'
ALTER TABLE `4images_categories` ADD `cat_image` MEDIUMINT( 8 ) NOT NULL
Can somebody help me, please?
just ignore it, everything is fine. continue to the next step if you wish.
Hello,
How can I skip a step while installing "catimage_install.php" ? I got the error above just wanted to update from 1.7.7 to 1.7.9 I'm sure I made all steps right but after this error in catimage_install I can not continue with it and so catimages are not shown.
Greetings & thanks, Luna
-
That error just says that your database already updated, no need run the installer again.
When you edit a category with cat image in it, do you see the image id in the cat image field? if so, the database is correctly working, something else is wrong.
-
NO I don't see a cat image there. And also all the numbers that where written there before are gone, if I write them again and save it the field stays empty...
-
Then it's possible you've made a mistake in some step(s). Since the instructions are written for v1.7.3 it's possible that they are not compatible with v1.7.9 (I don't have time install it and check on each 4images version).
-
OK I've redone all the steps and found out I forgot step 2.6 now it shows the small image in "edit categories". I still don't get it to show in the gallery it shows only red x where it should be. Is that maybe because it is not compatible or should it still be a mistake of me?
Btw: At step 2.3 I just added ", cat_image" at the end because my line is slightly different. I have "cat_order" in that line too I think that's new in 1.7.9
Thanks for your mod and your fast answers!
Luna
-
Now we are getting somewhere. What you need to do now is see what is the path on these "red x" images. Right click and select properties (in IE) or "view image info" (in FF), then copy the address and open in the browser, see if any error shows.
-
I found out that the red x is only because of the ifno clause I used so if I tried to get the path it will only link to the category. I tried changing it to only the code you suggested and now there is nothing seen above the category name. Btw. random cat image is working properly.
Here's my category bit with if-clause:
<table border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td align="center" width="160">
{if cat_image}<a href="{cat_url}"><img src="{cat_image}" height="150" border="0"></a>{endif cat_image}
{ifno cat_image}{if random_cat_image_file}<a href="{cat_url}"><img src="{random_cat_image_file}" border="1"></a>{endif random_cat_image_file}{endifno cat_image}</td>
</tr>
<tr>
<td align="center" width="160">
<a href="{cat_url}" class="maincat">{cat_name}</a> ({num_images}){if cat_is_new}<sup class="new">{lang_new}</sup>{endif cat_is_new}</td>
</tr>
</table>
{if sub_cats}{sub_cats}{endif sub_cats}
-
just try add {cat_image} somewhere in the template so it would seen on the page as plain text
-
Thanks that you are still there!
I've added it but it isn't seen at all, no text visible.
-
I've just updated from 1.7.7 to 1.7.9 and all my mods work fine except this one.
I have my mods all neatly commented, so that each time a new version of 4images comes out, I can use text wrangler and meticulously diff each file to see what's new and where to makes changes for my mods.
I've gone through this process several times over the past 4 or 5 years.
I believe that this mod may now be incompatible with 1.7.9.
Can anyone report if this works with 1.7.9??
Thanks.
I do see the category images when I edit the categories in the admin control panel, but they are not showing up on my main gallery site.
-
I've just updated from 1.7.7 to 1.7.9 and all my mods work fine except this one.
I have my mods all neatly commented, so that each time a new version of 4images comes out, I can use text wrangler and meticulously diff each file to see what's new and where to makes changes for my mods.
I've gone through this process several times over the past 4 or 5 years.
I believe that this mod may now be incompatible with 1.7.9.
Can anyone report if this works with 1.7.9??
Thanks.
I do see the category images when I edit the categories in the admin control panel, but they are not showing up on my main gallery site.
Ok so it seems we have the same problem and you are maybe right that it's not compatible with 1.7.9 really sad I think I will go back to 1.7.7 then it worked finde with all my mods.
-
Well, guys, I don't know what you are doing wrong, but I just installed this mod on fresh v1.7.9 and it worked just fine without a hiccup...
Make sure that you choose the right instructions - when a step has instructions for different 4images versions, you must use the instructions closest to your version (mostly for v1.7.3)
If cat image displays fine at edit category page, but not on categories/home page, then I'd bet on mistake in step 1, 3 and/or 4
-
Thank you so much you are totally right.
It was step 1 which was missing.
I was sure I made it I even checked it twice, now on the third check I found out it wasn't there.
I confess I'm naturally blonde ;)
Thanks for all your help and this great mod!
-
When Finished all
:( :( :( :( :( :( when i click edit or add cat
Warning: include() [function.include]: Unable to access ./global.php in /home/nagmat/public_html/admin/categories.php on line 30
Warning: include(./global.php) [function.include]: failed to open stream: No such file or directory in /home/nagmat/public_html/admin/categories.php on line 30
Warning: include() [function.include]: Unable to access ./global.php in /home/nagmat/public_html/admin/categories.php on line 30
Warning: include(./global.php) [function.include]: failed to open stream: No such file or directory in /home/nagmat/public_html/admin/categories.php on line 30
Warning: include() [function.include]: Failed opening './global.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nagmat/public_html/admin/categories.php on line 30
Warning: require() [function.require]: Unable to access ./includes/sessions.php in /home/nagmat/public_html/admin/categories.php on line 31
Warning: require(./includes/sessions.php) [function.require]: failed to open stream: No such file or directory in /home/nagmat/public_html/admin/categories.php on line 31
Warning: require() [function.require]: Unable to access ./includes/sessions.php in /home/nagmat/public_html/admin/categories.php on line 31
Warning: require(./includes/sessions.php) [function.require]: failed to open stream: No such file or directory in /home/nagmat/public_html/admin/categories.php on line 31
Fatal error: require() [function.require]: Failed opening required './includes/sessions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nagmat/public_html/admin/categories.php on line 31
-
Thank you very much. I love this MOD ^_^!
-
Hallöchen
habe leider wieder mal ein Problem.
wollte das auf der home seite, anstelle Kategorien z.b Text: Rosen, halt ein Bild zu sehen ist welches in dieser drin ist.(im Ordner)
hatte dieses mod benutzt.
alles schritt für schritt.
http://www.4homepages.de/forum/index.php?topic=6922.0 (http://www.4homepages.de/forum/index.php?topic=6922.0)
wenn ich als letztes unter Kategorien bearbeiten gehe steht auch Category image wo man die ID einstellt.
Aber wenn ich zu den Bildbearbeitung gehe sollte dort stehen welches ich als Vorschau nehmen möchte aber leider fehlt das bei mir!
da dieses mod , ja doch etwas älter ist, könnte es sein das es daran liegt?
oder aber das es so eingebunden werden sollte
{if cat_image}<img src="{cat_image}">{endif cat_image}
aber meine category_bit.html sieht so aus:
<div class="cat"><a href="{cat_url}">{cat_name}</a><span>({num_images})</span>{if cat_is_new} <span class="new">{lang_new}</span>{endif cat_is_new}</div>
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}
{if sub_cats}{sub_cats}{endif sub_cats}
wäre toll wenn jemand helfen könnte oder aber ein bessere Idee hätte
so habe es geschafft das ich im Control panel-Haupkategoriebearbeitung die bild id eingeben konnte, sehe auch dort das tumb. aber wie bekomme ich es auf die Hauptseite?
ich denke mir es liegt an dem einbinden aber wie kann ich es bei meinem
category_bit.html einbinden?:
<div class="cat"><a href="{cat_url}">{cat_name}</a><span>({num_images})</span>{if cat_is_new} <span class="new">{lang_new}</span>{endif cat_is_new}</div>
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}
{if sub_cats}{sub_cats}{endif sub_cats}
-
in deiner categorie.bit, vor oder nach {cat_name} fügst du das ein.
{if cat_image}<img src="{cat_image}">{endif cat_image}
je nach dem wo du den categorie namen haben möchtest.
und wenn du das bild immer noch nicht siehst dann:
If cat image displays fine at edit category page, but not on categories/home page, then I'd bet on mistake in step 1, 3 and/or 4
mfg Andi
-
thanks work on 1.7.10
-
One of the great mod i needed, please review my gallery having this mode installed, publisher can change the demo address to mind gallery if he want
http://pukhtoogle.com/gallery
-
Ok......Habe mir den Thread durchgelesen.....aber irgendwie den Überblick verloren.... Welche Schritte muss ich jetzt genau für die Version 1.7.10 machen????
Ich Blick echt nicht mehr durch!!,!,
Bitte um Hilfe
VG
Josef
-
I´ve tried it a lot of times to install that mod....I cant get it work! My version is 1.7.10
Please somebody help me!
Here are my Probs!
First Problem:
Does not work.....can´t see yes or no option
Second method:
Do Step 6
Then got to ACP -> Edit images -> find an image -> edit.
In the single image edit screen (not the group image edit!) at the bottom, u sould see a new option "Category Image (yes/no)" simply select "yes" to set that image as "Category Image".
Also if any image was previousle set as "Category Image" u should see its thumbnail and image name.[/i]
Second Problem
I can´t find this in step 2. $auth_postcomment = $HTTP_POST_VARS['auth_postcomment'];
I find this: $auth_postcomment = intval($HTTP_POST_VARS['auth_postcomment']); I dont know if this is the right one.......
and my third problem: I can't see an image....... I only see the link to the thumbnail. Looks like this <img src="./data/thumbnails/9/20120922-jb-0467.jpg">
I hope somebody can help me!
Greetz
josef
-
Hi there. If you could help me it would be wonderful. I purchased the software and have used it tremendously.
I have updated to 1.7.11 and cant get the category image to work. I am almost there and have it working by copying the global.php file for 1.7.3. Problem is it only works for a while then the whole gallery goes down and wont get up and running till I return the global file again. Strange.
I also cant find the text I am required to change in the 1.7.11 global file. Has this changed since the mod was invented.
Thanks so muclh
Andrew from New Zealand.