Fixing Some Dingy's

Anonymous (not verified) - November 25, 2003 - 05:24
Project:Review
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

Description and Review Item not showing up in Module section....

LOOK AT THIS:

function review_help() {
$output .= "";
return $output;

REPLACE WITH THIS:

function review_help($section = "admin/help#Review") {
$output = "";

Before I did this it had a "Coming soon" or whatever in it... this actually gave it a description and let me see the link in the administrator section.. (not user link section).

If I wasn't supposed to alter that, sorry... if you already know... sorry.. I'm just new.

#1

Anonymous - November 25, 2003 - 05:45
Category:task» bug report
Priority:minor» critical

Upon fixing these few lines of code one can enable the module and see it's description, but there is another problem in which he or she will face.

After you set the review module in the module category and 'refresh' the page... clicking the "configuration" link in the admin links, the "blocks" like disappears.. I swear to god... it does.

~David~

#2

Anonymous - November 25, 2003 - 16:02
Title:Modules Description Help (I'm new, perhaps I've submitted this and you all already know).» Fixing Some Dingy's

After doing these above changes. The links finally showed up in the administrator's links. They also show up when the user tries to "create content" (only in the body of the page, not at the menu via toolbar).

By altering this code, it creates a problem with the administrator's toolbar (as stated above the "blocks" link disappears (yes, it really does).

With out further ado, you can delete the following lines to solve the problem:

if ($type == "system" && user_access("administer blocks")) {

menu("admin/system/block", "blocks", "block_admin", block_help("admin/system/block"), 3);

menu("admin/system/block/add", "new block", "block_admin", block_help("admin/system/block/add"), 2);
menu("admin/system/block/preview", "preview placement", "block_admin", block_help("admin/system/block/preview"), 3);
menu("admin/system/block/help", "help", "block_help", NULL, 9);

}



Now with that solved, the administrator can select blocks and they will find that the "Recent Review" option shows up. Check permissions, because admin's have to allow users to create reviews (obviously, if you want them to).

NOW! With all that finished... we can move on to the link that doesn't appear in the toolbar (i.e. HOME : BOOK : REVIEWS : (and so on, REVIEW doesn't show up).

LOOK AT THIS LINE:

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

if ($type == "page" && user_access("access content")) {

$links[] = l(t("reviews"), "review");

}

(to me, the reason why I changed this line is because it looked like the programmer tried to get a link @ taskbar level)

(if that's the case)

CHANGE IT TO THIS:

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

if ($type == "page" && user_access("reviews")) {

$links[] = l(t("reviews"), "node/review", array("title" => t("View latest reviews.")));

return $links ? $links : array();

}

---

Again, another (perhaps, perhaps not) problem arises... not sure how the god's of the "Review" mod intended this to work out, but after the link appears (and it does, it really does) when clicking on it, the link takes the traveler to a list of the recent blogs. Blogs? Yes. Now I know--because I've published a review to test it--that the review takes on the same perspectives of a blog. Perhaps when trying to view them it comes up as node/view/10 for example. But clicking the 'reviews' link that I helped you create above doesn't direct users to a static page displaying the "latest or (all for that matter) reviews. Maybe I'm just completely mad and I don't know what I'm doing. If that's the case then read another blog here in fifteen minutes.

#3

Bèr Kessels - November 26, 2003 - 08:28

Sorry to say,

but this fix should be one of the most straightforward ones imaginable.
review.module is nothing more that a simple story.module with some small additions. nothing more-nothing less.

And besides that, david, is it *fixed* on you're installation, for marking this bugreport fixed indicated that the bug is fixed in the current download. I dont see any changes in the cvs. Could you send me your cahnges please?

Ber

#4

Anonymous - December 10, 2003 - 09:20
 
 

Drupal is a registered trademark of Dries Buytaert.