how to display in admin panel news only one category?
how to display in admin panel news only one category?
hi.
I created several users and they can add news.
user - editor(group) - see and add or edit only "category1" news,
user2 - designer(group) - see and add or edit only "category2" news,
user3 - nextgroup(group) - see and add or edit only "category3" news,
user4 - editor(group) - see and add or edit only "category1" news,
...
help me please
it's very important too me
and I thinsk that different people will be very happy with solve this problem
I'm sorry for my english
I created several users and they can add news.
user - editor(group) - see and add or edit only "category1" news,
user2 - designer(group) - see and add or edit only "category2" news,
user3 - nextgroup(group) - see and add or edit only "category3" news,
user4 - editor(group) - see and add or edit only "category1" news,
...
help me please
it's very important too me
and I thinsk that different people will be very happy with solve this problem
I'm sorry for my english
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: how to display in admin panel news only one category?
News doesn't support this at this time. If you have rights to add news articles, you have rights to add news articles to any category.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: how to display in admin panel news only one category?
ok but is anybody who can help me change code and solve this problem.
I sugest
when we create new user we can insert his login the same like category name in news.
and we can equal this values
if login(user) is equal category(news) then user can see, edit or delete only his category articles.
maby it is solution.
what do you think about it.
where and what could I changing in php code.
I install last wersion cms 1.1.2
help me please
thx
I sugest
when we create new user we can insert his login the same like category name in news.
and we can equal this values
if login(user) is equal category(news) then user can see, edit or delete only his category articles.
maby it is solution.
what do you think about it.
where and what could I changing in php code.
I install last wersion cms 1.1.2
help me please
thx
Re: how to display in admin panel news only one category?
help me please
I don't know where to find this code
maby somebody have similar solution
thanks
I don't know where to find this code
maby somebody have similar solution
thanks
Re: how to display in admin panel news only one category?
maby somebody told me how to find variable with login user name
I am in action.defaultadmin.php file and I would like to display login name and category (news) name.
I think, when I find this variables I solve my problem
thank you very much
I am in action.defaultadmin.php file and I would like to display login name and category (news) name.
I think, when I find this variables I solve my problem
thank you very much
Re: how to display in admin panel news only one category?
Use:piotr22 wrote: maby somebody told me how to find variable with login user name
I am in action.defaultadmin.php file and I would like to display login name and category (news) name.
I think, when I find this variables I solve my problem
thank you very much
$login_user_name = $_SESSION['login_user_username'];
In action.defaultadmin.php, in this array (about #110) you have the list of categories:
$categorylist[$row['long_name']] = $row['news_category_id'];
Alby
Last edited by alby on Mon Sep 24, 2007 10:56 am, edited 1 time in total.
Re: how to display in admin panel news only one category?
thank you very much alby
but when I change in action.defoultadmin.php :
$categorylist = array();
$query = "SELECT * FROM ".cms_db_prefix()."module_news_categories ORDER BY hierarchy";
$dbresult = $db->Execute($query);
$login_user_name = $_SESSION['login_user_username'];
while ($dbresult && $row = $dbresult->FetchRow())
{
$categorylist[$row['long_name']] = $login_user_name;
# $categorylist[$row['long_name']] = $row['news_category_id'];
}
nothink was change and I don't know why ?
could you tell me what is wrong.
thx
but when I change in action.defoultadmin.php :
$categorylist = array();
$query = "SELECT * FROM ".cms_db_prefix()."module_news_categories ORDER BY hierarchy";
$dbresult = $db->Execute($query);
$login_user_name = $_SESSION['login_user_username'];
while ($dbresult && $row = $dbresult->FetchRow())
{
$categorylist[$row['long_name']] = $login_user_name;
# $categorylist[$row['long_name']] = $row['news_category_id'];
}
nothink was change and I don't know why ?
could you tell me what is wrong.
thx
Re: how to display in admin panel news only one category?
No, in this waypiotr22 wrote: $categorylist = array();
$query = "SELECT * FROM ".cms_db_prefix()."module_news_categories ORDER BY hierarchy";
$dbresult = $db->Execute($query);
$login_user_name = $_SESSION['login_user_username'];
while ($dbresult && $row = $dbresult->FetchRow())
{
$categorylist[$row['long_name']] = $login_user_name;
# $categorylist[$row['long_name']] = $row['news_category_id'];
}
nothink was change and I don't know why ?

Alby$categorylist = array();
$query = "SELECT * FROM ".cms_db_prefix()."module_news_categories ORDER BY hierarchy";
$dbresult = $db->Execute($query);
$login_user_name = $_SESSION['login_user_username'];
while ($dbresult && $row = $dbresult->FetchRow())
{
if ($row['long_name'] != $login_user_name) continue;
$categorylist[$row['long_name']] = $row['news_category_id'];
}
Re: how to display in admin panel news only one category?
sorry it's me again 
I'm so iritate this problem.
still somethink is wrong.
the worst is that I can't nothink to change, nothing to display in news admin panel
could you send me code with this changes.
please
thx

I'm so iritate this problem.
still somethink is wrong.
the worst is that I can't nothink to change, nothing to display in news admin panel
could you send me code with this changes.
please
thx
Re: how to display in admin panel news only one category?
Tested 1.1.2piotr22 wrote: sorry it's me again
I'm so iritate this problem.
still somethink is wrong.
the worst is that I can't nothink to change, nothing to display in news admin panel
could you send me code with this changes.
please

admin user: modify ALL in News, user: articles in category with your login name only
Backup your News folder.
Download attach files.
Rename to php and overwrite your files in folder News.
Exercise: hack action.addarticle.php and action.editarticle.php (for view category with your login name only)!
Alby
- Attachments
-
[The extension mpg has been deactivated and can no longer be displayed.]
-
[The extension mpg has been deactivated and can no longer be displayed.]
Re: how to display in admin panel news only one category?
ALBY thank you very very much 
I'm testing now, but I think that news work fine.
but when I try to add new news I see all category in category field
ti is possible to change code and display only one category in category field (the same category like user login)
thx

I'm testing now, but I think that news work fine.
but when I try to add new news I see all category in category field
ti is possible to change code and display only one category in category field (the same category like user login)
thx
Re: how to display in admin panel news only one category?
piotr22 wrote: but when I try to add new news I see all category in category field
ti is possible to change code and display only one category in category field (the same category like user login)
add new and modify this articlealby wrote: Exercise: hack action.addarticle.php and action.editarticle.php (for view category with your login name only)!

Alby
Re: how to display in admin panel news only one category?
ups
sorry my fault
thx

thx