Search in support tickets

#210 – mod_adsmanager_search what is the Root Category ID?

Posted in ‘Support’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Tuesday, 16 January 2018 18:11 CET
robysev74
Joomla! version : 3.7
PHP version : 5.6.29
AdsManager version : 3.1.11

i ve a question what is a value Root Category ID ? i need to see only one category of ads its possible? if i put the id number of cat it do all ads.
t.y.
Roby
Custom Fields
Joomla Version
3.7
PHP Version
5.6.29
Product
AdsManager
Product Version
3.1.11
Attachment
 
Wednesday, 17 January 2018 16:44 CET
loic
Hello,

The root category ID must be a parent category, it will only display the ads that belong to the children categories of the root selected.

If you wish to display the ads from only one category, you only need to put the category id in the category ID field, not the root one.

Best regards.
 
Wednesday, 17 January 2018 17:33 CET
robysev74
i dont see the category id fild....where is in the module search?
Attachment
 
Thursday, 18 January 2018 16:32 CET
loic
Hello,

Ah, sorry, there in no way to select a default category in the search module.

The only way is to custom the code.

Best regards.
 
Thursday, 18 January 2018 17:27 CET
robysev74
Really? so i ve pay for the bronze pack, u can help me?
 
Friday, 19 January 2018 16:46 CET
loic
Hello,

The software is sold as it is. The custom code can be done but it is a supplementary cost.

What you can do is open the search module template file and replace the category select by something like this :
<input type="hidden" name="catid" value="{your catid value}" />


Best regards.
 
Friday, 19 January 2018 21:08 CET
robysev74
i dont understand where that code i write it.

i put this code :

mod_adsmanager_search.php:

riga 55 $catselect = $params->get('catselect',"no");

mod_adsmanager_search.xml:

riga 52 <field name="catselect" type="text" default="" size="4" label="MOD_ADSMANAGER_ADS_CATSELECT" description="MOD_ADSMANAGER_ADS_CATSELECT_DESC" />

but its not enough.

i ve the field in the module where i put the catid, but it doesnt work. You can help me?



Thank you.
Attachment
 
Monday, 22 January 2018 16:56 CET
loic
Hello,

The code you need to modify is in modules/mod_adsmanager_search/tmpl/default.php

replace the line:
switch(@$conf->single_category_selection_type) {
            default:
            case 'normal':
                JHTMLAdsmanagerCategory::displayNormalCategories("catid",$cats,$catid,array("allow_empty"=>true,'id'=>"catid-".$moduleId));break;
            case 'color':
                JHTMLAdsmanagerCategory::displayColorCategories("catid",$cats,$catid,array("allow_empty"=>true,'id'=>"catid-".$moduleId));break;
            case 'combobox':
                JHTMLAdsmanagerCategory::displayComboboxCategories("catid",$cats,$catid,array("allow_empty"=>true,'id'=>"catid-".$moduleId));break;
                break;
            case 'cascade':
                if ($type == "horizontal") 
                    $separator = "";
                else
                    $separator = "<br/>";
                JHTMLAdsmanagerCategory::displaySplitCategories("catid",$cats,$catid,array('separator'=>$separator,'id'=>"catid-".$moduleId));break;
        }


By that:
<input type="hidden" name="catid" value="{your catid value}" />


Best regards.
 
Monday, 22 January 2018 18:46 CET
robysev74
ok, but it doesnt work.
i need only to modified the module search with join the search by catid

i put this code :

mod_adsmanager_search.php:

riga 55 $catselect = $params->get('catselect',"no");

mod_adsmanager_search.xml:

riga 52 <field name="catselect" type="text" default="" size="4" label="MOD_ADSMANAGER_ADS_CATSELECT" description="MOD_ADSMANAGER_ADS_CATSELECT_DESC" />

but its not enough.

i ve the field in the module where i put the catid, but it doesnt work. You can help me?
 
Tuesday, 23 January 2018 16:32 CET
loic
Hello,

I don't understand what you did in the code and in the xml.

I understand that you wish to add a default category for the search module.
The catselect attribute will just hide the dropdown if you choose no, it doesn't have another functionnality.

Best regards.
 
Tuesday, 23 January 2018 16:41 CET
robysev74
i need only to modified the module search with join the search by id of category. like the image.

not a default category, but i need to select category in the back end, not only 1, but also more.


Attachment
 
Tuesday, 23 January 2018 18:45 CET
robysev74
i think i do. the solutions is:

mod_adsmanager_search.php:

row 21 $catid = $params->get('catselect',"0");

row 22 $catselect = $catid;

mod_adsmanager_search.xml:

riga 52 <field name="catselect" type="text" default="" size="4" label="MOD_ADSMANAGER_ADS_CATSELECT" description="MOD_ADSMANAGER_ADS_CATSELECT_DESC" />


and it do what i want.....i hope......u can confirm?
T.y.
 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.