selected categories journalist - only show allowed category

Need some help with the script?

selected categories journalist - only show allowed category

Postby fg » Fri Mar 03, 2006 5:26 am

ok this should be a hard one :P



anyway, when a selected journalist who is only allowed to add news to limited categories goes on the news page he see's all the categories, but the ones he can't post to are grayed out. Any way to only show him the allowed catergories ?



and second, how resource intensive is this script ? is it optimized for high traffic ?



thanks
fg
 
Posts: 14
Joined: Sun Dec 25, 2005 2:10 am

Re: selected categories journalist - only show allowed categ

Postby FI-DD » Fri Mar 03, 2006 11:46 am

fg wrote:anyway, when a selected journalist who is only allowed to add news to limited categories goes on the news page he see's all the categories, but the ones he can't post to are grayed out. Any way to only show him the allowed catergories ?


Open inc/plugins.inc.php and find this:

Code: Select all
return 'disabled';




change it to this:

Code: Select all
return 'style="display:none"';




and find this:

Code: Select all
if ($category = category_get_tree('&nbsp;', '<label for="cat{id}">




and change it to this:

Code: Select all
if ($category = category_get_tree('&nbsp;', '<label [php]multicats({id})[/php] for="cat{id}">






and second, how resource intensive is this script ? is it optimized for high traffic ?


I can't tell you from experience because I don't have a high traffic page. But I can tell you that it is far superior to the original Cutenews. The database (MySQL and even txtSQL) is way faster, and the whole script is optimized to reduce the number of database queries. And of course there is the cache which saves database queries, too.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

restricted categories show up in Category list (search/calen

Postby nos » Fri Mar 31, 2006 4:58 pm

Hello,

that works fine. but the other problem is, in the Category list they show up again. I tryed a lot with that code in etc.php and show.inc but I didn't succeed. Could someone help?



the next is to exclude them from search and calendar for the members who do not have the right login rights. Then it would be perfect (for me) I think.
nos
 
Posts: 11
Joined: Sun Mar 19, 2006 6:13 pm

Postby scottdallas » Fri Jun 09, 2006 12:57 pm

So who's the genius that redesigned cutenews? Was it that guy you mentioned before FI-DD?
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby FI-DD » Fri Jun 09, 2006 1:19 pm

scottdallas wrote:So who's the genius that redesigned cutenews? Was it that guy you mentioned before FI-DD?


Don't know why you chose this topic to ask a question about the other but yes, lexa created it. :)
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby scottdallas » Fri Jun 09, 2006 4:42 pm

you're right i have no idea either... i will choose better in the future.. i was just thinking it after reading about all the speed optimization and got carried away.. cause that's impressive
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby ky0t1c » Sat Jul 01, 2006 3:43 am

nos wrote:Hello,

that works fine. but the other problem is, in the Category list they show up again. I tryed a lot with that code in etc.php and show.inc but I didn't succeed. Could someone help?



the next is to exclude them from search and calendar for the members who do not have the right login rights. Then it would be perfect (for me) I think.




Has there been a fix for this yet?
ky0t1c
 
Posts: 20
Joined: Tue Jun 20, 2006 9:09 pm

Postby FI-DD » Sat Jul 08, 2006 7:03 pm

Not possible because you only can restrict by user (which means you need to be logged in). As soon as you are logged out you will see everything in category view or search.
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby scottdallas » Sun Oct 29, 2006 8:16 pm

one thing I don't understand about this is.. it works and they no longer show up in the category list for 'writer' status.. but how can i set categories that only specific writers can see specific categories? right now im able to add to 0 categories. like how do i make it so i can be like



Category name: Products

Category for user: scodal



?



update: nevermind this.. i must have been out of my mind when i wrote this
Everyday I'm tumblin http://scodal.tumblr.com
User avatar
scottdallas
 
Posts: 2209
Joined: Thu May 04, 2006 6:46 pm
Location: US

Postby sudip » Fri Jul 18, 2008 12:01 pm

I was searching this option since long time... and finally i got it.. and it worked like a charm..... :D :D
Thank you very much FI-DD.. You Rock..
sudip
 
Posts: 33
Joined: Mon Jun 02, 2008 3:57 am

journalist category selected

Postby marcusmagalhaes » Fri Dec 04, 2009 11:19 pm

when I select a category for journalist, the page as blank space in category list...
Image

full list ...


Image
marcusmagalhaes
 
Posts: 172
Joined: Tue Apr 24, 2007 1:17 pm

Postby DarkSlim » Sun Dec 06, 2009 8:16 am

Very nice, havn't seen this one, and yes, the code just makes
the categories invisible so there will be blank spaces, if anyone
wants to try make the spaces smaller, I have some suggestions
for you to try:

In the first change:
Code: Select all
return 'style="display:none"';


Try add this maybe:
Code: Select all
return 'style="display:none;font-size:1px;width:1px;height:1px;"';


Tell me if that works somehow, if not we can try something else. :)
User avatar
DarkSlim
 
Posts: 298
Joined: Thu Aug 06, 2009 4:18 pm
Location: IL

Postby marcusmagalhaes » Mon Dec 07, 2009 7:18 pm

not working!!!!! thank you....

DarkSlim wrote:Very nice, havn't seen this one, and yes, the code just makes
the categories invisible so there will be blank spaces, if anyone
wants to try make the spaces smaller, I have some suggestions
for you to try:

In the first change:
Code: Select all
return 'style="display:none"';


Try add this maybe:
Code: Select all
return 'style="display:none;font-size:1px;width:1px;height:1px;"';


Tell me if that works somehow, if not we can try something else. :)
marcusmagalhaes
 
Posts: 172
Joined: Tue Apr 24, 2007 1:17 pm

Postby DarkSlim » Mon Dec 07, 2009 8:18 pm

Ok, hmm try this maybe:
Code: Select all
return 'style="display:none;font-size:0px;width:0px;height:0px;margin:0px;padding:0px;z-index:-999;position:absolute;"';


Or this:
Code: Select all
return 'style="display:none;font-size:0px;width:0px;height:0px;margin:0px;padding:0px;margin-bottom:-20px;"';


Or this:
Code: Select all
return 'style="display:none;font-size:0px;width:0px;height:0px;margin:0px;padding:0px;float:right;"';


Or maybe this:
Code: Select all
return 'style="display:none;font-size:0px;width:0px;height:0px;margin:0px;padding:0px;position:absolute;left:999;"';


Just some css ideas, tell me if one of them works. :)
User avatar
DarkSlim
 
Posts: 298
Joined: Thu Aug 06, 2009 4:18 pm
Location: IL

Postby marcusmagalhaes » Tue Dec 08, 2009 2:34 pm

not working... I'm try all, but none worked..... thank you again!!!

DarkSlim wrote:Ok, hmm try this maybe:
Code: Select all
return 'style="display:none;font-size:0px;width:0px;height:0px;margin:0px;padding:0px;z-index:-999;position:absolute;"';


Or this:
Code: Select all
return 'style="display:none;font-size:0px;width:0px;height:0px;margin:0px;padding:0px;margin-bottom:-20px;"';


Or this:
Code: Select all
return 'style="display:none;font-size:0px;width:0px;height:0px;margin:0px;padding:0px;float:right;"';


Or maybe this:
Code: Select all
return 'style="display:none;font-size:0px;width:0px;height:0px;margin:0px;padding:0px;position:absolute;left:999;"';


Just some css ideas, tell me if one of them works. :)
:cry: :cry: :cry: :cry: :cry:
marcusmagalhaes
 
Posts: 172
Joined: Tue Apr 24, 2007 1:17 pm

Next

Return to Help



Who is online

Users browsing this forum: No registered users and 2 guests

cron