4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: nameless on March 23, 2010, 01:55:57 PM

Title: Need Tooltip for Category
Post by: nameless on March 23, 2010, 01:55:57 PM
Hi to evry one

i found Tooltip for Thumbnails

i'ts very good

but i need Need Tooltip for Category
and it display image when mouse over

and thanks for all your help
Title: Re: Need Tooltip for Category
Post by: Rembrandt on March 23, 2010, 03:22:38 PM
Hi!
...
i found Tooltip for Thumbnails ...
link?

Quote
...
and it display image when mouse over
mean you, on mouseover the cat_name, the thumbnail popup?

mfg Andi
Title: Re: Need Tooltip for Category
Post by: nameless on March 23, 2010, 04:00:42 PM
thanks for your replay

http://www.4homepages.de/forum/index.php?topic=22030.0 (http://www.4homepages.de/forum/index.php?topic=22030.0)

yes i mean when on mouseover the cat_name an display image

for example i make ca sits for cars the catagory is cars type
i want when i on mouseover the bmw the loge of it dispaly

and sorry for my bad english
thanks
Title: Re: Need Tooltip for Category
Post by: Rembrandt on March 23, 2010, 05:06:40 PM
....
i want when i on mouseover the bmw the loge of it dispaly ....
you mean, on mouseover the cat_name e.g. BMW,  BMW logo is displayed

the logos come from a folder, or database?
Title: Re: Need Tooltip for Category
Post by: nameless on March 23, 2010, 06:56:03 PM
Thanks for your replay
I mean like this
(http://www.welcome2net.com/test1.JPG)
i think the image came from folder
Title: Re: Need Tooltip for Category
Post by: Rembrandt on March 24, 2010, 05:29:02 AM
ok , the "wz_tooltip.js" have you allready installed.


search template/category_bit.html and replace all:
Code: [Select]
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
     <div id="{cat_name}" class="tooltip2"><img src="{random_cat_image_file}" alt=""></div>
      <!-- <img src="{template_url}/images/folder.gif" width="20" height="13" 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>
      {if random_cat_image_file}<a href="{cat_url}" class="maincat" onmouseover="TagToTip('{cat_name}')" onmouseout="UnTip()">{cat_name}</a>&nbsp;({num_images}){endif random_cat_image_file}
      {ifnot random_cat_image_file}<a href="{cat_url}" class="maincat" >{cat_name}</a>&nbsp;({num_images}){endifnot random_cat_image_file}
     {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}

in your style.css write this:
Code: [Select]
.tooltip2 {
display : none;
}

.tooltip3 {
display : none;
}

search in includes/constans.php:
//define('SHOW_RANDOM_CAT_IMAGE', 1);

and replace:
define('SHOW_RANDOM_CAT_IMAGE', 1);

search in includes/functions.php

$sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\">".format_text($cat_cache[$subcat_id]['cat_name'], 2)."</a>";

replace:

$category_id="";
$sub_cat_list .="<div id=\"".format_text($cat_cache[$subcat_id]['cat_name'], 2)."\" class=\"tooltip3\"><img src=\"".get_random_image($category_id, 0, 1)."\" alt=\"\"></div>";
      $sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\" onmouseover=\"TagToTip('".format_text($cat_cache[$subcat_id]['cat_name'], 2)."')\" onmouseout=\"UnTip()\">".format_text($cat_cache[$subcat_id]['cat_name'], 2)."</a>";


Title: Re: Need Tooltip for Category
Post by: nameless on March 25, 2010, 04:25:06 AM
thanks for all your help

1- in constans.php
i did't find //define('SHOW_RANDOM_CAT_IMAGE', 1);
but i found this
define('SHOW_RANDOM_CAT_IMAGE', 0);

when i replace it i have this erorr

Parse error: syntax error, unexpected $end in /home/welcome/public_html/cars/includes/template.php(101) : eval()'d code on line 310

this error came when i go to any sup category not in the main page (main gategory)

2- i have this and i dot know where to but the image
(http://www.welcome2net.com/test.JPG)


by the way for example
i have main category BMW and from it 5 Sup category like Year 2009 - year 2008 and from Year 2009 it have sub category for the BMW models car then the images for th car model

(http://www.welcome2net.com/test2.JPG)
Title: Re: Need Tooltip for Category
Post by: Rembrandt on March 25, 2010, 08:39:26 AM
ok, you have no images in your main cat folder.
in 4images default the "random cat images" shows only in the main category.

i have edit my last posting, test it.

mfg Andi
Title: Re: Need Tooltip for Category
Post by: nameless on March 27, 2010, 11:02:34 PM
it's Amazing
thanks for all your help