This!
Category: Web-design
Quick MyBB MySQL fix
Quick SQL fix to address the following issues for some MyBB users:
- Hotlinked images and videos are not shown
- Quoted images and videos are not shown
- Classic layout is not enforced
- “Friendly redirects” are not disabled
UPDATE `mybb_users` SET classicpostbit=1 WHERE classicpostbit=0; UPDATE mybb_users SET showimages=1,showvideos=1 WHERE showimages=0; UPDATE mybb_users SET showredirect=0 WHERE showredirect=1;
The first line is the most important because of the bug in MyBB UserCP.
Web-page performance testers
getElementsByClassName
getElementsByClassName is defined in HTML5. From WhatWG:
Checking status updater
Why does x^0 equal 1?
Since basic school we know, that [math]x^0=1[/math], but only recently when our kids began to study mathematics we asked ourselves “why?”.
I came up with this explanation:
[math]x^0=x^{n-n}=x^n \times x^{-n}=\frac {x^n} {x^n}=1[/math]
Also a good test for the Easy LaTeX WordPress plug-in.
And here’s jsxgraph plug-in test:
Continue reading “Why does x^0 equal 1?”
How to get out of frames
One of the methods to break out of frames:
<!–
if (top.location.href != self.location.href)
top.location.href = self.location.href;
// –>
</script>
Jion – tutorial
Jion (normal + slow speed) performed by Hirokazu Kanazawa, Ogura.
Continue reading “Jion – tutorial”
External searching in mybb
Sometimes you need to integrate web-pages with corresponding forum threads. Here’s one of the ways to do it.
$keywords=”MyBB integration”; // The search keywords
?>
<!– The path to mybb search.php –>
<form method=”post” action=”http://www.yoursite.com/mybb/search.php”>
<input type=”hidden” name=”action” value=”do_search” />
<input type=”hidden” name=”keywords” value=”<?php echo $keywords; ?>” />
<!– search titles only –>
<input type=”hidden” name=”postthread” value=”2″ />
<!– Search in all forums –>
<input type=”hidden” name=”forums[]” size=”15″ multiple=”multiple” value=”all”>
<!– All dates –>
<input type=”hidden” name=”postdate” value=”0″>
<input type=”hidden” name=”pddir” value=”1″ />
<input type=”hidden” name=”sortby” value=”lastpost”>
<input type=”hidden” name=”sortordr” value=”asc” />
<!– the result will be threads, not posts –>
<input type=”hidden” name=”showresults” value=”threads” />
<input type=”submit” class=”button” name=”submit” value=”Forum” />
</form>
How to remove frames
One of the methods to break out of frames:
<!–
if (top.location.href != self.location.href)
top.location.href = self.location.href;
// –>
</script>