| Author |
Message |
jbartus
Joined: 11 Oct 2007 Posts: 31
|
|
Scrollbox for CATEGORIES in Add / Edit News |
|
I created this little code modification for use on a CuteNews.ru installation on which I had over sixty categories with high odds of adding more in the future. Needless to say, the sixty alone created quite a page stretch.
I am not very familiar with PHP so my code may not have been made in the most practical manner, if you have any thoughts or tips please feel free to contribute.
To add this to your add / edit news page:
Open /inc/plugins.inc.php
Find:
 |  | if ($category = category_get_tree(' ', '<label for="cat{id}"><input type="checkbox" [php]multicats({id})[/php] name="cat[{id}]" id="cat{id}")"> {name}</label><br />')){
return '<fieldset><legend>'.$echo['category'].'</legend>'.$category.'</fieldset>';
} |
Replace with:
 |  | if ($category = category_get_tree(' ', '<label for="cat{id}"><input type="checkbox" [php]multicats({id})[/php] name="cat[{id}]" id="cat{id}")"> {name}</label><br />')){
return ' <font style="color: #ccc; width: 100%; font-size: 10px; font-weight: bold; border-bottom: solid 1px #f7f7f7; padding-bottom: 5px; margin-bottom: 5px;">Category</font><br><br>
<div style="margin-left: 10px; width: 220; height: 200; border: solid 1px #a7a6aa; text-align: left; overflow: auto; padding: 5px;"><fieldset>'.$category.'</fieldset></div><br>';
} |
And there you should be all set!
Last edited by jbartus on Wed Dec 05, 2007 2:29 pm; edited 1 time in total |
|
| Thu Nov 29, 2007 4:46 am |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
jbartus
Joined: 11 Oct 2007 Posts: 31
|
|
Categories not Comments... |
|
Ugh, I mis-named this topic originally. Categories, not comments, are scrollable from this.
|
|
| Fri Nov 30, 2007 4:55 am |
|
 |
Partyism
Joined: 25 Sep 2007 Posts: 156
|
|
|
|
Do you have a screenshot please?
|
|
| Fri Nov 30, 2007 11:02 am |
|
 |
jbartus
Joined: 11 Oct 2007 Posts: 31
|
|
|
|
Screenshot uploaded.
|
|
| Wed Dec 05, 2007 6:49 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1802 Location: US |
|
|
|
Oooh, I like. I always have the dilemma of too many categories, not enough room. Nice work 
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Thu Dec 06, 2007 9:56 am |
|
 |
Partyism
Joined: 25 Sep 2007 Posts: 156
|
|
|
|
Mwah its an ok alternative when you have many categories, maybe you should work on a dropdown box instead of that scrollbar.
|
|
| Thu Dec 06, 2007 11:18 am |
|
 |
jbartus
Joined: 11 Oct 2007 Posts: 31
|
|
|
|
 |  | Oooh, I like. I always have the dilemma of too many categories, not enough room. Nice work  | Thanks, I decided I needed to do something cause I had 60+ categories and it is destined to grow over time.
 |  | Mwah its an ok alternative when you have many categories, maybe you should work on a dropdown box instead of that scrollbar. | I'm honestly not sure how I would do that. I like the checkboxes which is why I did it this way.
|
|
| Thu Dec 06, 2007 5:18 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1802 Location: US |
|
|
|
 |  | I like the checkboxes which is why I did it this way. |
I agree.. how else can you select multiples?
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Fri Dec 07, 2007 6:16 am |
|
 |
Partyism
Joined: 25 Sep 2007 Posts: 156
|
|
|
|
Multiple dropdown boxes?
|
|
| Fri Dec 07, 2007 10:56 am |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2668 Location: Germany |
|
|
| Mon Dec 10, 2007 7:16 pm |
|
 |
kirby145

Joined: 08 Sep 2007 Posts: 36 Location: look behind you |
|
|
|
Is there nothing you can't do
|
|
| Fri Dec 14, 2007 8:39 am |
|
 |
jbartus
Joined: 11 Oct 2007 Posts: 31
|
|
|
|
That's cool, but I still like checkboxes. 
|
|
| Tue Dec 25, 2007 9:21 am |
|
 |
|