Hi I just installed the review.module and when in admin mode I see the link to the reviews at the top of the page. However as an authorised user the link does not appear. In the permissions settings the only option that seems relevant is 'create reviews'. But I dont want users to be able to create them, just read them, but if the link does not appear how can they?
thanks, kenny

Comments

kennysto’s picture

ok, i found this little bit of code in the review.module which seems to indicate that the 'review' link that gets placed in the navigation links takes you to the 'add a review' page, so it is no surprise that it dosen't display for a user who cannot create a review. However this does seem to go against how all the other functions work (blog, story etc), where the add content link is placed under 'create content' and the links along the top are used to take you to the blog, story etc view pages.

Any clues how I can alter it so that it works like this? thank you..

function review_link($type, $node = 0) {

if ($type == "menu.create" && user_access("create reviews")) {
$links[] = l(t("create review"), "node/add/review", array("title" => t("Add a new review.")));
}

return $links ? $links : array();
}

adrian’s picture

function review_link($type, $node = 0) {
if ($type=="system") {
if (user_access("create reviews")) {
menu("node/add/review"."create review");
}
}
return $links ? $links : array();
}

We have recently revamped the menu system, and not all of the contrib modules have caught up with cvs yet.

kennysto’s picture

thanks Adrian but that still dosen't seem to add the link. I looked at another module for comparison (event.module) and it has a line in it that includes user_access("access events") which adds 'event' to the end of the url. This seems to be missing from the review.module and I guess that I can't simply add a similar line because whilst there is a permission to set 'create reviews' there does not seem to be a permission to set "access reviews"