Only staff can submit news.
|
Posted
#1369
(In Topic #330)
|
|
|---|---|
|
Fan in training |
Only staff can submit news.in do_news() function … start.php Function do_news() { . . . if ((get_user()!=get_guest_id())&&(is_staff(get_user()))) $news_text.="<p align=\"center\"><a href=\"".build_url(array("page"=>"news"))."\">More News</a> | <a href=\"".build_url(array("page"=>"submit","ipage"=>"newsadd" ))."\">Submit News</a></p>"; else $news_text.="<p align=\"center\"><a href=\"".build_url(array("page"=>"news"))."\">More News</a> </p>"; put_in_table($news_text,"width='100%'",0,"News"); } im newsview.php u can do the same … use the condition : if ((get_user()!=get_guest_id())&&(is_staff(get_user()))) |
|
Posted
|
|
|
ocStaff (admin) |
1) No one can submit news to your site and have it display, unless you as a member of staff validate it. 2) If you really want to stop non-admincenter-submission of news… In pages/submit.php delete the following lines… Code
if ($page=='newsadd') include (get_file_base()."/admincenter/pages/newsadd.php");
Code
else if (($page=='newsadd') && ($itype=='_ad')) _newsadd();
Code
else if (($page=='newsadd') && ($itype=='ad')) newsadd();
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Fan in training |
Ok but still need that to remove links , isnt it ? |
|
Posted
|
|
|
ocStaff (admin) |
If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource. |
|
Posted
|
|
|
Fan in training |
function newsadd() { if (is_staff(get_user())) interface_add_newsadd(build_url(array("page"=>"_SELF","ty pe"=>"_ad","ipage"=>"newsadd"))); else echo "Access denied"; } To prevent a user of link to the page using a direct link. (i think) |
1 guests and 0 members have just viewed this: None
Control functions:







