Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Scrollbox for CATEGORIES in Add / Edit News

 
Reply to topic    Forum Index » Skins and snippets View previous topic
View next topic
Scrollbox for CATEGORIES in Add / Edit News
Author Message
jbartus



Joined: 11 Oct 2007
Posts: 31

Post Scrollbox for CATEGORIES in Add / Edit News Reply with quote
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:
Code:
   if ($category = category_get_tree('&nbsp;', '<label for="cat{id}"><input type="checkbox" [php]multicats({id})[/php] name="cat[{id}]" id="cat{id}")">&nbsp;{name}</label><br />')){
      return '<fieldset><legend>'.$echo['category'].'</legend>'.$category.'</fieldset>';
   }


Replace with:
Code:
        if ($category = category_get_tree('&nbsp;', '<label for="cat{id}"><input type="checkbox" [php]multicats({id})[/php] name="cat[{id}]" id="cat{id}")">&nbsp;{name}</label><br />')){
                return '&nbsp;&nbsp;&nbsp;&nbsp;<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 View user's profile Send private message
Guest








Please login to hide the ads.

jbartus



Joined: 11 Oct 2007
Posts: 31

Post Categories not Comments... Reply with quote
Ugh, I mis-named this topic originally. Categories, not comments, are scrollable from this.
Fri Nov 30, 2007 4:55 am View user's profile Send private message
Partyism



Joined: 25 Sep 2007
Posts: 156

Post Reply with quote
Do you have a screenshot please?
Fri Nov 30, 2007 11:02 am View user's profile Send private message
jbartus



Joined: 11 Oct 2007
Posts: 31

Post Reply with quote
Screenshot uploaded.
Wed Dec 05, 2007 6:49 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1802
Location: US

Post Reply with quote
Oooh, I like. I always have the dilemma of too many categories, not enough room. Nice work Smile

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Thu Dec 06, 2007 9:56 am View user's profile Send private message Visit poster's website AIM Address
Partyism



Joined: 25 Sep 2007
Posts: 156

Post Reply with quote
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 View user's profile Send private message
jbartus



Joined: 11 Oct 2007
Posts: 31

Post Reply with quote
scottdallas wrote:
Oooh, I like. I always have the dilemma of too many categories, not enough room. Nice work Smile
Thanks, I decided I needed to do something cause I had 60+ categories and it is destined to grow over time.

Partyism wrote:
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 View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1802
Location: US

Post Reply with quote
Quote:
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 Smile
last update: 07-22-08: 8:30 pm
Fri Dec 07, 2007 6:16 am View user's profile Send private message Visit poster's website AIM Address
Partyism



Joined: 25 Sep 2007
Posts: 156

Post Reply with quote
Multiple dropdown boxes?
Fri Dec 07, 2007 10:56 am View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2668
Location: Germany

Post Reply with quote
What about this:
http://english.cutenews.ru/forum/categories-in-drop-down-menu-t335.html#1978
Mon Dec 10, 2007 7:16 pm View user's profile Send private message
kirby145



Joined: 08 Sep 2007
Posts: 36
Location: look behind you

Post Reply with quote
FI-DD wrote:
What about this:
http://english.cutenews.ru/forum/categories-in-drop-down-menu-t335.html#1978

Is there nothing you can't do
Fri Dec 14, 2007 8:39 am View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jbartus



Joined: 11 Oct 2007
Posts: 31

Post Reply with quote
FI-DD wrote:
What about this:
http://english.cutenews.ru/forum/categories-in-drop-down-menu-t335.html#1978
That's cool, but I still like checkboxes. Razz
Tue Dec 25, 2007 9:21 am View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Skins and snippets All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.