[MOD] Hiding storie...
 
Notifications
Clear all

[MOD] Hiding stories

16 Posts
5 Users
0 Reactions
6,696 Views
(@guest15376)
Posts: 0
 

I made two changes to this so that t would appear in the table with the other story management options authors have.

Instead of this statement

if ($story['validated'] != "H" && $story['validated'] != "I") {
// It's not currently hidden, so offer the chance to hide
$output .= "<a href=""stories.php?action=hide&amp;sid=".$story['sid'"]."">"._HIDE."</a> - ";
} else {
// It's already hidden, offer the chance to unhide
$output .= "<a href=""stories.php?action=unhide&amp;sid=".$story['sid'"]."">"._UNHIDE."</a> - ";
}
}

use this

if ($story['validated'] != "H" && $story['validated'] != "I") {
// It's not currently hidden, so offer the chance to hide
$output .= "<td class="tblborder" align="center"> <a href=""stories.php?action=hide&amp;sid=".$story['sid'"]."">"._HIDE."</a> - </td>";
} else {
// It's already hidden, offer the chance to unhide
$output .= "<td class="tblborder" align="center"><a href=""stories.php?action=unhide&amp;sid=".$story['sid'"]."">"._UNHIDE."</a> - </td> ";
}

the only difference is adding the table data code. To make this align with the table headers, go up a bit and find the table header code and change it to this:

<div style="width: 90%; margin: 0 auto;"><table cellpadding="3" cellspacing="0" width="100%" class="tblborder"><tr><th class="tblborder">"._STORIES."</th><th colspan="3" class="tblborder">"._OPTIONS."</th><th colspan="1" class="tblborder">"._HIDE."</th>".($reviewsallowed ? "<th class="tblborder">"._REVIEWS."</th>" : "").($autovalidate ? "" : "<th class="tblborder">"._VALIDATED."</th>")."<th class="tblborder">"._READS."</th></tr>";

With these updates it works beautifully in 3.5.5 and aligns well with the other story management options.


 
Posted : 19/10/2016 1:47 am
Page 2 / 2
Share: