[ MOD ] Links in &q...
 
Notifications
Clear all

[ MOD ] Links in "Reviews Received" page on review numbers instead of title

1 Posts
1 Users
0 Reactions
2,874 Views
(@guest1754)
Posts: 0
 

Description: Changes the "Reviews Received" table to have the links to see reviews in the number of reviews rather than under the title.  Because of this, with additional changes, the number under "unanswered reviews" will show only the reviews with no response.

Requirements: Ex: Works with 3.0 +

First set of changes: user/revreceived.php:

At around line 38

if($story['reviews'] > 0) {
// MOD START
        // (ORIGINAL LINE) $output .= "<tr><td class="tblborder"><a href=""reviews.php?type=SE&amp;item=".$story['seriesid'"]."">".$story['title']."</a>
        //    </td><td class="tblborder" align="center">".$story['reviews']."</td><td class="tblborder" align="center">"
        //    .($story['reviews'] - $story['respond'])."</td></tr>";
        $output .= "<tr><td class="tblborder">".$story['title']."</td><td class="tblborder" align="center"><a href=""reviews.php?type=SE&amp;item=""
                  .$story['seriesid']."">".$story['reviews']."</a></td><td class="tblborder" align="center"><a href=""reviews.php?type=SE&amp;item=""
                  .$story['seriesid']."&amp;unresponded">".($story['reviews'] - $story['respond'])."</a></td></tr>";
// MOD END
$x++;
}

And again at around line 54:


if($story['reviews'] > 0) {
// MOD START
        // (ORIGINAL LINE) $output .= "<tr><td class="tblborder"><a href=""reviews.php?type=ST&amp;item=".$story['sid'"]."">".$story['title']."</a>
        //    </td><td class="tblborder" align="center">".$story['reviews']."</td><td class="tblborder" align="center">"
        //    .($story['reviews'] - $story['respond'])."</td></tr>";
        $output .= "<tr><td class="tblborder">".$story['title']."</td><td class="tblborder" align="center"><a href=""reviews.php?type=ST&amp;item=""
                  .$story['sid']."">".$story['reviews']."</a></td><td class="tblborder" align="center"><a href=""reviews.php?type=ST&amp;item=""
                  .$story['sid']."&amp;unresponded">".($story['reviews'] - $story['respond'])."</a></td></tr>";
// MOD END
        $x++;
}

Finally, I had to make a slight change to reviews.php because I was getting an error.  Making this change solved my problem, but I don't know what else this might affect. So far, after a lot of testing, I haven't seen anything broken because of this mod, but if someone knows what I may have damaged, please let me know.

In reviews.php, around line 334:

#
if(isset($_GET['unresponded'])) {
        // MOD START
        // (ORIGINAL LINE) $query .= "AND review.respond = '0' ";
        // (ORIGINAL LINE) $count .= "AND review.respond = '0' ";
        $query .= "AND respond = '0' ";
        $count .= "AND respond = '0' ";
        // MOD END
}

 
Posted : 27/03/2007 8:59 pm
Share: