Hi,
- We've created a menu option like "Show All Categories", if the categories are empty are not displayed and therefore does not show the "add book"
Yes in book library software - we not show categories what empty.
You can change that go to file
{yours site}/components/com_booklibrary/booklibrary.php
and remove
Code: |
$cat_all_temp = array();
foreach($cat_all as $tmp=>$cat_item){
if($cat_all[$tmp]->books > 0 ) $cat_all_temp[] = $cat_item;
}
$cat_all = $cat_all_temp;
|
and replace
Code: |
$cat_all_temp = array();
foreach($cat_all as $tmp=>$cat_item){
if($cat_all[$tmp]->books > 0 and $cat_all[$tmp]->parent_id == $catid ) $cat_all_temp[] = $cat_item;
}
$cat_all = $cat_all_temp;
|
to
Code: |
$cat_all_temp = array();
foreach($cat_all as $tmp=>$cat_item){
if( $cat_all[$tmp]->parent_id == $catid ) $cat_all_temp[] = $cat_item;
}
$cat_all = $cat_all_temp;
|
at all place where find
Hello,
- if we create a category with a book when we register a new book from the front-end can not choose a category that is empty
In Book Library software you can change that with help code edit
For that open file
{yours site}/components/com_booklibrary/booklibrary.php
Find function: add_book_fe
and in it
change code:
Code: |
$clist = mosHTML :: selectList($categories, 'catid', 'class="inputbox" size="1" disabled="disabled"', 'value', 'text',$catid);
|
to
Code: |
$clist = mosHTML :: selectList($categories, 'catid', 'class="inputbox" size="1" ', 'value', 'text',$catid);
|
Before any update please backup book library files
Thanks,
OrdaSoft team