Skip to content
Permalink
Browse files

one new hook, commentary fix

  • Loading branch information...
NB-Core committed Jan 20, 2015
1 parent 057b444 commit 824c7dfd0602c276977230bc6500ba4f3a3a4dde
Showing with 14 additions and 6 deletions.
  1. +5 −0 CHANGELOG.txt
  2. +5 −4 lib/commentary.php
  3. +4 −2 superuser.php
@@ -2,8 +2,13 @@ Changes to 1.2.5 +nb

[CHANGES]
*lib/commentary.php --> added a new hook "gmcommentarea" with section and "allow_gm"=>false to handle module requests to allow /game comments
added a fix (GM titles didn't work due to wrong variable used)
*lib/forest.php --> new hook "forest" to add stuff before the description (i.e. for mobile buttons that need to be top)
*superuser.php --> new hook to make the section "switchable"
[FIXES]
*lib/commentary.php --> forgot a closing > at a </div> - section close
[REMOVES]

Changes to 1.2.4 +nb
[CHANGES]
*home.php --> added a "forgotten password" link below the Login Button
@@ -155,12 +155,13 @@ function injectcommentary($section, $talkline, $comment, $schema=false) {
$commentary = ":`3$talkline, \\\"`#$commentary`3\\\"";
}
//add a hook if a module wants to post a non-GM with /game (more power for modules)
$args = modulehook("gmcommentarea", array("section"=>$section,"allow_gm"=>false));
$args = modulehook("gmcommentarea", array("section"=>$section,"allow_gm"=>false,"commentary"=>$commentary));
if (substr($commentary,0,5)=="/game" && ((($session['user']['superuser']&SU_IS_GAMEMASTER)==SU_IS_GAMEMASTER) ||
$args['allow_gm']===true)) {
//handle game master inserts now, allow double posts
injectsystemcomment($section,$commentary);
injectsystemcomment($section,$args['commentary']);
} else {
$commentary = $args['commentary'];
$sql = "SELECT comment,author FROM " . db_prefix("commentary") . " WHERE section='$section' ORDER BY commentid DESC LIMIT 1";
$result = db_query($sql);
$row = db_fetch_assoc($result);
@@ -344,7 +345,7 @@ function viewcommentary($section,$message="Interject your own commentary?",$limi
// disabled until I make the user prefs into their own good-fucking table because it is SO annoying to unserialize THEM!
// update: you can now set empty - if there should be an option for *specific accounts* to hide/show the tag, I will ignore it for now (workload)
if (($row['superuser']&SU_IS_GAMEMASTER)==SU_IS_GAMEMASTER) {
$chat_tag=getsetting('chat_tag_gm','[GM]');
$chat_tag_gm=getsetting('chat_tag_gm','[GM]');
$row['name']="`\$".$chat_tag_gm."`0".$row['name'];
}
if (($row['superuser']&SU_EDIT_COMMENTS)==SU_EDIT_COMMENTS) {
@@ -537,7 +538,7 @@ function viewcommentary($section,$message="Interject your own commentary?",$limi
return $collected;
}
rawoutput("</div"); //close section
rawoutput("</div>"); //close section
}
function talkline($section,$talkline,$limit,$schema,$counttoday,$message) {
@@ -51,8 +51,10 @@
output("Inside you are greeted by the sight of numerous scantily clad buxom women who wave palm fronds at you and offer to feed you grapes as you lounge on Greco-Roman couches draped with silk.`n`n");
}
//comment visible only for those who are MORE than translators
if ($session['user']['superuser'] !=SU_IS_TRANSLATOR) commentdisplay("", "superuser","Engage in idle conversation with other gods:",25);
//make section customizable for view / switching to different superuser chats possible
$args = modulehook("superusertop", array("section"=>"superuser"));
if ($session['user']['superuser'] !=SU_IS_TRANSLATOR)
commentdisplay("", $args['section'],"Engage in idle conversation with other gods:",25);
addnav("Actions");
if ($session['user']['superuser'] & SU_EDIT_PETITIONS) addnav("Petition Viewer","viewpetition.php");

0 comments on commit 824c7df

Please sign in to comment.
You can’t perform that action at this time.