approval
Permalink 1 user found helpful
Hi,
I have three groups - admin who have full rights, editors whom can view pages and edit and managers who can view pages, edit and approve pages.
I do not want to set up the manager on full rights. Is there a way for the manager to search for pages that have not been approved rather than going through all pages manually, without going into the dashboard? Can I set-up a page that they can go to and hide from everyone else's group that shows them all?
Thanks
Mike
I have three groups - admin who have full rights, editors whom can view pages and edit and managers who can view pages, edit and approve pages.
I do not want to set up the manager on full rights. Is there a way for the manager to search for pages that have not been approved rather than going through all pages manually, without going into the dashboard? Can I set-up a page that they can go to and hide from everyone else's group that shows them all?
Thanks
Mike
Yes, sorry I know how to approve. Want my 'Manager' group to be able to approve WITHOUT going into the dashboard. If it is possible, otherwise will have to re-think!!
you can make a single page that does that if you want,
or just give them access to that page in the dashboard,
or just give them access to that page in the dashboard,
But they still have to get into the dashboard to approve it. I dont want them to get into the dashboard at all. A single page with a list of pages that need to be approved would be brilliant, but not a page that they can edit and approve - want them to edit / approve all the site
here is some code,
make /single_pages/non_approved.php
in it put
you can change the h1 text
and in
/controllers/non_approved.php
then go to Dashboard->Pages and Themes->Singlepages
scroll to the bottom and put in non_approved
then there should be site.com/non_approved
just set the permissions on it
make /single_pages/non_approved.php
in it put
<h1>Pages Requiring Approval:</h1> <ol> <?php foreach($files as $f) { print '<li><a href="'.$f[1].'">'.$f[0].'</a> - '.$f[2].'</li>'; } ?> </ol>
you can change the h1 text
and in
/controllers/non_approved.php
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); class NonApprovedController extends Controller { public function view() { $db = Loader::db(); $nh = Loader::helper('navigation'); $q = "SELECT cv1.cID AS cID,u.uName AS uName FROM CollectionVersions AS cv2,Users as u,(SELECT MAX(cv.cvID) AS cvID,cv.cID,cv.cvIsApproved FROM Pages AS p INNER JOIN CollectionVersions AS cv ON p.cID=cv.cID WHERE p.cIsTemplate=0 AND p.ctID!=0 GROUP BY cv.cID) cv1 WHERE cv1.cID=cv2.cID AND cv1.cvID=cv2.cvID AND cv2.cvIsApproved=0 AND cv2.cvAuthorUID=u.uID"; $r = $db->query($q); $files=array(); if($r) { while($row = $r->fetchRow()) { $c = Page::getByID($row['cID']); $files[] = array( $c->getCollectionName(), $nh->getLinkToCollection($c),
Viewing 15 lines of 21 lines. View entire code block.
then go to Dashboard->Pages and Themes->Singlepages
scroll to the bottom and put in non_approved
then there should be site.com/non_approved
just set the permissions on it
Sorry, I come up with mad ideas like this every now and again!
Try explaining little bit better
Want a page (hidden from everyone except the 'manager' group, which can set them only to view). On the page a list of pages that need approval. Or a search box to search for unapproved pages.
Basicly I do not want them to enter the dashboard, know they will start changing themes and all sorts!
Like say, not sure will be possible, but in theory it should - shouldn't it!!
Try explaining little bit better
Want a page (hidden from everyone except the 'manager' group, which can set them only to view). On the page a list of pages that need approval. Or a search box to search for unapproved pages.
Basicly I do not want them to enter the dashboard, know they will start changing themes and all sorts!
Like say, not sure will be possible, but in theory it should - shouldn't it!!
Thanks
Will give that a go.
Will give that a go.
Sorry, but got an error message:
Parse error: syntax error, unexpected '<', expecting ')' in /home/galact/public_html/conc/single_pages/non_approved.php on line 36
Line 36, taking it doesn't need the </body>?
Parse error: syntax error, unexpected '<', expecting ')' in /home/galact/public_html/conc/single_pages/non_approved.php on line 36
Line 36, taking it doesn't need the </body>?
that error makes no sense...
That what it got, and when I take away the line it says it says error on what would be the last line. I'll re-copy and paste to check.
Parse error: syntax error, unexpected '<' in /home/galact/public_html/conc/single_pages/non_approved.php on line 47
Parse error: syntax error, unexpected '<' in /home/galact/public_html/conc/single_pages/non_approved.php on line 47
OK, taken away all the </body></html> at end and left with
Warning: Invalid argument supplied for foreach() in /home/galact/public_html/conc/single_pages/non_approved.php on line 12
Sorry for this.
Warning: Invalid argument supplied for foreach() in /home/galact/public_html/conc/single_pages/non_approved.php on line 12
Sorry for this.
works for me,
http://screencast.com/t/EobTSbt1sI...
controller:
single_page:
http://screencast.com/t/EobTSbt1sI...
controller:
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); class NonApprovedController extends Controller { public function view() { $db = Loader::db(); $nh = Loader::helper('navigation'); $q = "SELECT cv1.cID AS cID,u.uName AS uName FROM CollectionVersions AS cv2,Users as u,(SELECT MAX(cv.cvID) AS cvID,cv.cID,cv.cvIsApproved FROM Pages AS p INNER JOIN CollectionVersions AS cv ON p.cID=cv.cID WHERE p.cIsTemplate=0 AND p.ctID!=0 GROUP BY cv.cID) cv1 WHERE cv1.cID=cv2.cID AND cv1.cvID=cv2.cvID AND cv2.cvIsApproved=0 AND cv2.cvAuthorUID=u.uID"; $r = $db->query($q); $files=array(); if($r) { while($row = $r->fetchRow()) { $c = Page::getByID($row['cID']); $files[] = array( $c->getCollectionName(), $nh->getLinkToCollection($c),
Viewing 15 lines of 21 lines. View entire code block.
single_page:
<h1>Pages Requiring Approval:</h1> <ol> <?php foreach($files as $f) { print '<li><a href="'.$f[1].'">'.$f[0].'</a> - '.$f[2].'</li>'; } ?> </ol>
Ok.When you say controller, where is this code to be placed? Is there place for coding for the controller in their user part of the dashboard or is it a separate single page, etc...?
sorry, been through post and it makes complete sense now!
Just having a mental block moment.
Sorry.
Thanks for all your help.
Just having a mental block moment.
Sorry.
Thanks for all your help.
You could enable advanced permissions and then prevent access to all pages except the sitemap? that way they would not see the other pages within the dashboard.
under page search hit the +
select approved version then hit unapproved, thats it :)