Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #3486 Missing Moderation Notices #3488

Merged
merged 4 commits into from Nov 11, 2018
Merged

Fixes #3486 Missing Moderation Notices #3488

merged 4 commits into from Nov 11, 2018

Conversation

effone
Copy link
Member

@effone effone commented Nov 6, 2018

Attempt to fix #3486

@Ben-MyBB Ben-MyBB added the b:1.8 Branch: 1.8.x label Nov 6, 2018
@effone effone modified the milestone: 1.8.20 Nov 8, 2018
@Eldenroot
Copy link
Contributor

Great, testing since yesterday, seems to be fine. I had been using plugin for that. Thank you!

@effone
Copy link
Member Author

effone commented Nov 9, 2018

Thanks for testing @Eldenroot, There is a very neat-pick issue I have observed with this PR but failed to find the root cause, is an additional space after each link.
snap
I have cross-checked templates, used trim() but no luck. That may be my cluttered experiment-exhausted code base. Can you confirm and / or try to find the root cause?

@Eldenroot
Copy link
Contributor

I will try to reproduce in 5 hours, back in my office right now. Maybe sometjing similar with board stats (online members) in footer bug which was solved in 1.8.17 IIRC?

@effone
Copy link
Member Author

effone commented Nov 9, 2018

Okay I have found the issue. Its the new line inserted by template class.

if($htmlcomments)
{
	if($mybb->settings['tplhtmlcomments'] == 1)
	{
		$template = "<!-- start: ".htmlspecialchars_uni($title)." -->\n{$template}\n<!-- end: ".htmlspecialchars_uni($title)." -->";
	}
	else
	{
		$template = "\n{$template}\n";
	}
}

If I remove all \n from it issue gets resolved. I don't know how to handle this.
@euantorano ?

@effone
Copy link
Member Author

effone commented Nov 9, 2018

Alright I have fixed it. There was a parameter $htmlcomments for get() method that required to be set to false. Love MyBB.

@euantorano
Copy link
Member

Nice catch @effone!

@euantorano euantorano merged commit 737b1a3 into mybb:feature Nov 11, 2018
@effone effone deleted the missing-modnotice branch November 11, 2018 14:30
lairdshaw pushed a commit to lairdshaw/mybb that referenced this pull request Oct 11, 2021
[Rebased for 1.9 by Laird]

* Missing Moderation Notices

* unwanted space correction

* Unused variable removed

* Fine tuning to avoid non-countable warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing Moderation Notices
4 participants