MyBB Community Forums

Full Version: MyBB Scratchboard – Post your random admin/dev stuff
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Looks great, can't wait to see the new products Eric. For the Flex theme, is the black background .trow2 or a new post indicator?
Thanks guys! Big Grin

It's unread posts, it does look like .trow2 in the mockup though haha. Basically just wanted to take a different approach to the usual changing icons.
Preview of the responsive layout on leefish.

http://www.leefish.nl/mybb/forumdisplay.php?fid=30

I don't have a phone or iPad, so input welcome. The point of the theme is that it responds to changes in browser size, I know the styling is not so great, the layout is only available in that forum and it's subs so Index is not available to preview..
It looks very good Leefish! I should do something similar whenever I'll get the chance.

Here's my new editor, finally complete.

[Image: Schermata%2006-2456446%20alle%2010.59.04.png]
Looking for some jQuery help here. Been working on a solution to round all corners on categories and make sure they're still rounded on a reload. I'm utilizing MyBB's "collapsed" cookie to determine which categories are collapsed and round them on all 4 sides (this can also be used to do whatever you wish with collapsed categories). The dilemma is, when the category is collapsed then uncollapsed the corners will stay rounded. It's easy to understand why it is doing that, but fixing it is what's hard. I'm hoping maybe one of you jQuery gurus can take a look and determine a solution.

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
var x = readCookie('collapsed');
var id = x.replace("%7C", ', ');
var regexp = new RegExp('cat', 'ig');
var ids = id.replace(regexp, '#cat');

jQuery("<style type='text/css'>" + ids + "{ border-radius:4px } </style>").appendTo("head");

if (jQuery('.thead > .expcolimage').not('.all-radius')) {
jQuery('.thead > .expcolimage').click(function () {
 jQuery(this).parent().toggleClass('all-radius');
});
} else {
 jQuery('.thead > .expcolimage').click(function () {
  jQuery(this).parent().toggleClass('no-radius');
 });
}

It's live and visible at this development board. Ignore the theme, it's undergoing a PSD to MyBB conversion Toungue.


The problem has seem to solved itself, ok! Feel free to use the code on your own boards. It's fairly self explanatory.
Props to Ferron for writing the second half.
I see what you mean after looking at the board.
You might want to rephrase; "The dilemma is, when a category is collapsed/uncollapsed it will still have all 4 corners rounded but on a reload it will fix itself." to "The dilemma is, when a category is collapsed the .thead will have all 4 rounded corners but on a reload the .thead will have 4 rounded corners even after uncollapsing. This is only fixed by refreshing the page."
Sorry if you interoperate that as rude, but when I first read your post I found it hard to understand your issue. Smile
(2013-06-02, 02:53 PM)JordanMussi Wrote: [ -> ]I see what you mean after looking at the board.
You might want to rephrase; "The dilemma is, when a category is collapsed/uncollapsed it will still have all 4 corners rounded but on a reload it will fix itself." to "The dilemma is, when a category is collapsed the .thead will have all 4 rounded corners but on a reload the .thead will have 4 rounded corners even after uncollapsing. This is only fixed by refreshing the page."
Sorry if you interoperate that as rude, but when I first read your post I found it hard to understand your issue. Smile

I apologize, although..it seems to have fixed itself! jQuery Gods, wherever you are, I thank you!
Doesn't seem to have fixed for me Sad
http://i.imgur.com/lXBVz3o.png
Try a hard refresh
Nope, sorry, still doesn't work. Confused
This makes it harder for you to test out solutions if it suddenly works for you :p
I'll try it out in a different browser.
Edit: No tried IE but same result as Chrome...