ok.. as promised.. here are the 2 hacks..
ATTENTION.. this is very beta... and straight forward.. only apply if you know what you are doing!!!
1. the styledependent category icons.. (its a file edit and the category icons ONLY!!)
open
includes/local_links_include.php
find:
PHP Code:
$iconnew_setting = ldm_lookup_setting($catid, 'cat_icon_new');
below add:
PHP Code:
//xba iconcache
$ldm_icon_cache['category_new'] = $stylevar['imgdir_misc'] . '/ldm/' . 'category_new.png';
$ldm_icon_cache['category'] = $stylevar['imgdir_misc'] . '/ldm/' . 'category.png';
save the file.
then create a "ldm" directory in the
misc image directory of your style... (in every style)
into that directory copy "category_new.png" and "category.png" corresponding to the style..
that was all i needed..
------------------
2. multi language category titles and descriptions..
Ok this is more complicated..
1 product (see attachment)
what the product does:
every time you create a category or you modify a category title or description, it creates a 2 custom phrase.
it inserts your title (the one you created or modified the "normal" way as custom phrase in masterlanguage.
the name of the title-phrase will be
$vbphrase[ll_cat_
catid_title]
in the vbulletin phrasemanager you can then add translations to that phrase..
IF you modify the title (as u usually do) the phrase gets overwritten in masterlanguage
IF you delete the category the phrase gets deleted.
It also adds a "Translations" link below "Category name" and "Category description" and the phrase: Translations
--------- ok thats the product... the hooks where there in the ideal places.
Now the fileedits... (they are in locations where i did not find any hooks)
open
includes/local_links_include.php
find:
PHP Code:
$child[$linkscat[$k]['parentid']][] = $k;
below add:
PHP Code:
//xba multilang dropdown
if(!empty($vbphrase['ll_cat_' . $k . '_title']))
{
$linkscat[$k]['catname'] = $linkscat[$k]['catname_clean'] = htmlspecialchars_uni($vbphrase['ll_cat_' . $k . '_title']);
}
//xba multilang dropdown end
then find:
PHP Code:
$catid = $thiscat["catid"];
below add:
PHP Code:
//xba multilang on main page
if(!empty($vbphrase['ll_cat_' . $catid . '_title']))
{
$thiscat["catname"] = $vbphrase['ll_cat_' . $catid . '_title'];
}
if(!empty($vbphrase['ll_cat_' . $catid . '_desc']))
{
$thiscat["catdesc"] = $thiscat["cattext"] = $vbphrase['ll_cat_' . $catid . '_desc'];
}
//xba multilang on main page end
save local_links_include.php
then open:
includes/local_links_profile.php
find:
PHP Code:
$thislinkid = -1;
while ($myrow = $vbulletin->db->fetch_array($rec)) {
below add:
PHP Code:
//xba multilang
if(!empty($vbphrase['ll_cat_' . $myrow['catid'] . '_title']))
{
$myrow['catname'] = $vbphrase['ll_cat_' . $myrow['catid'] . '_title'];
}
//xba multilang end
save: local_links_profile.php
and finally open the main
local_links.php in the vbulletin directory
find:
PHP Code:
if ($links_defaults['sync_enabled'] and $linkscat[$viewcatid]['catsyncdir']) {
require_once(DIR . '/includes/local_links_misc.php');
$resync = $vbulletin->GPC['resync'];
ldm_synchronise_category($viewcatid, iif($resync, $links_defaults['sync_maxcpu_allowed_manual'], $links_defaults['sync_maxcpu_allowed']), $resync);
}
below add:
PHP Code:
//xba multilang on main page
if(!empty($vbphrase['ll_cat_' . $viewcatid . '_title']))
{
$linkscat["$viewcatid"]["catname"] = $vbphrase['ll_cat_' . $viewcatid . '_title'];
$linkscat["$viewcatid"]["catname_clean"] = htmlspecialchars_uni($vbphrase['ll_cat_' . $viewcatid . '_title']);
}
if(!empty($vbphrase['ll_cat_' . $viewcatid . '_desc']))
{
$linkscat["$viewcatid"]["cattext"]=$linkscat["$viewcatid"]["catdesc"] = $vbphrase['ll_cat_' . $viewcatid . '_desc'];
}
//xba multilang end
save: local_links.php
Don't forget to import the product...
ATTENTION: This will only work if you have more than 1 language installed in vbulletin. At least 2 languages must exist!!!! if you have only 1 language installed.. it will do nothing!!!
AND .. you will only see the translations after you actually translated the phrases
IF you have existing categories.. clicking the "translations" link will give: phrase does not exist.
In that case.. just hit the submit button on the Add/Edit Category page.
Then only the phrase is created and then you will get the phrase when clicking the translations link.
This has to be done once for every existing category. When creating a new category you also
have to save it. Then only the translations link gets you to the phrase.
Todo:
verify if the phrase replacements are needed in other places..
for the moment it works in main page, category pages ( the dropdown is also translated) and in the search page.. (I did not test the profile page but added the translation)
thats it..
I hope this is usefull for someone.. and if there were hooks.. that would save the file edits..
-------------
PS @ andrew
Just got a great fright... when editing a template i somehow seen that there were no sessionurls in the links.. (in the office.. they have disabled cookies on our browsers

) which meens that i get logged out each link i click.. i meen if for example i go to page 2.. i get logged out

I didnt have the time to check all the templates and all the files.