• Page 1 of 1
  • 1
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
Harina
Posts: 8
Reputation: 0

Message # 1 | 4:42 AM
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)
---------------------------------------------
Or make certain category select by default...i want to achieve this

Gromov
Posts: 500
Reputation: 13

Message # 2 | 6:43 AM
Harina, sorry, but it's a system's limitation and it can't be bypassed.
Harina
Posts: 8
Reputation: 0

Message # 3 | 7:14 AM
There is some way i did it before i just forgotten how but its possible
Gromov
Posts: 500
Reputation: 13

Message # 4 | 1:15 PM
Harina, no, it's not possible, sorry.
bigblog
node_modules
Posts: 1552
Reputation: 73

Message # 5 | 6:03 PM
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'm a twink, please enjoy your stay

i do not work for the company anymore, sorry for the late replies
icon by Nathan Butler
Harina
Posts: 8
Reputation: 0

Message # 6 | 6:13 PM
bigblog, Thank you it kinda worked thank you so much. If you could also help me with an report entry script to admin. An entry can be reported to admin if its kinda violating. Thank you
bigblog
node_modules
Posts: 1552
Reputation: 73

Message # 7 | 7:10 PM
Harina, I've answered your pm
hey i'm joe and i'm a twink, please enjoy your stay

i do not work for the company anymore, sorry for the late replies
icon by Nathan Butler
Soldierdevil
Posts: 127
Reputation: 0

Message # 8 | 6:52 AM
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)
---------------------------------------------
Sorry i meant you can remove the display none from the table so that its visible and a user can select category by choice if you add more category choices


I hate politics, people who do not make an effort with people and those who try hard to be cool
uCoz Community » For Webmasters » Design Customization » Do away with selecting categories in file catalog
  • Page 1 of 1
  • 1
Search: