|
|
Forum moderator: bigblog |
uCoz Community For Webmasters Design Customization Do away with selecting categories in file catalog |
Do away with selecting categories in file catalog |
Ucoz is a wonderfull thing but sometime they sack! They have made a system considering users of the system only not minding the users of websites created in the system. I dont understand why they made the category selection compulsory in file catalog. Users of my site are finding it hectic to get error messages all the time they try to upload simply because they forget to select category. I want a user friendly thing that is enjoyable to use so help me tell me how i can do away with your categories in file catalog. I will sort my users files by my self dont worry
Added (2018-10-02, 6:34 AM) |
Harina, general idea would be to write an onload script that sets the value of the category dropdown to whatever category you have, and eventually hides it afterwards. I can't remember the exact way the uCoz add forms work, but it should be something like this:
Code <script> window.onload = function () { const categoryField = document.querySelector('#fieldID'); categoryField.value = 1; categoryField.style.display = 'none'; }; where #fieldID is the id of the category field hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau sometimes i lurk here |
Harina, a quicker and simplest way to do it is this. Go to Design customisation>>file catalog>>entry adding form and look for this line
Code <?if($CAT_FL$)?> <li><label>$CAT_SIGN$:</label> <li>$CAT_FL$ <li class="notcolumn"><hr /><li class="notcolumn"><?endif?> Delete that line and replace it with this one Code <table style=" display: none; min-width: 100%; margin-top: 20px; margin-bottom: 20px;" class="x-unselectable u-combo" cellspacing="0" cellpadding="0" border="0" align="left"> <tr> <td class="u-comboeditcell" onclick="_uMenu.show('uCatsMenu7');"> <input id="catSelector9" class="x-selectable u-comboedit u-comboeditimg" type="button" value="Select broadcaste category" hidefocus autocomplete="off" readonly /></td> </tr> <tr> <td> <div id="uCatsMenu7" > <div class="u-combolist" id="uCatsMenu9" > <div><input type="radio" name="ocat" id="cus1" value="1" checked onclick="insertselcat(this ); setTimeout('_uMenu.hide(\'uCatsMenu7\')',300);" > <label style="vertical-align:middle;" for="cus1">My files</label></div> </div> <script type="text/javascript">new _uMenu('uCatsMenu7'); </script> </td> </tr> </table> That will do the magic. All entries will add without asking for category and will be stored in the my files category by default. One catch is the category selection will nolonger be visible. But if you want a user to select a category by choice not mandatory you can use the display none. Code <table min-width: 100%; margin-top: 20px; margin-bottom: 20px;" class="x-unselectable u-combo" cellspacing="0" cellpadding="0" border="0" align="left"> <tr> <td class="u-comboeditcell" onclick="_uMenu.show('uCatsMenu7');"> <input id="catSelector9" class="x-selectable u-comboedit u-comboeditimg" type="button" value="Select broadcaste category" hidefocus autocomplete="off" readonly /></td> </tr> <tr> <td> <div id="uCatsMenu7" > <div class="u-combolist" id="uCatsMenu9" > <div><input type="radio" name="ocat" id="cus1" value="1" checked onclick="insertselcat(this ); setTimeout('_uMenu.hide(\'uCatsMenu7\')',300);" > <label style="vertical-align:middle;" for="cus1">My files</label></div> </div> <script type="text/javascript">new _uMenu('uCatsMenu7'); </script> </td> </tr> </table> and add more category selector lines of this kind while considering their IDs respectively. Code <div><input type="radio" name="ocat" id="cus1" value="1" checked onclick="insertselcat(this ); setTimeout('_uMenu.hide(\'uCatsMenu7\')',300);" > <label style="vertical-align:middle;" for="cus1">My files</label></div> hope that helps! Added (2018-10-11, 7:01 AM) Systems developer
|
| |||
| |||