MyBB Community Forums

Full Version: [WIP] Responsive Theme: Foundation 3 for MyBB 1.8.x+ and WP Hybrid
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm working on a project to incorporate Foundation 3 with MyBB 1.8.x+ (at this time it's code named 1.7) and Wordpress.
[attachment=28485]


Right now I'm working on it's functionality:
http://www.webdevandphoto.com/?theme=mybbfoundationwp

Will have a ton of goodies, minified code, proper/validated markup, and whatever else I can manage to pull off.

LeeFish, Alex Smith, you're welcomed to hop on if you want,
I'm going to Git the project as soon as I've got the basics done.


Side note:
Has anyone tried to put MyBB into a wordpress theme since wordpress themes run on php files?
I can put Wordpress in a subdir and run it in the root with MyBB but are still completely separate so have to make themes match perfectly.
[attachment=28536]
Can't remove tables without losing functionality (At least currently, jQuery might change that), and you can't use the grid with tables without heavy modifications.

But an honest good luck from me. Smile
(2013-02-02, 03:07 PM)Eric J. Wrote: [ -> ]Can't remove tables without losing functionality (At least currently, jQuery might change that), and you can't use the grid with tables without heavy modifications.

You could if you rewrote the JavaScript, although 1.8 might alleviate the need for that.
The tables are generated by php in MyBB 1.6.x, changing the format (in those files) to divs instead of tables would be fine. For 1.8.x check here: https://github.com/mybb/mybb/tree/feature
After comparing php files against 1.6.9 functions are restructured what seems quite a bit (haven't looked at all the files yet).

In MyBB 1.6.9 all the files with tables in them are (unordered):
themes.js
html.js
mybb.js
mod_tools.php
thread_prefixes.php
warning.php
announcement.php
themes.php
groups.php
mass_mail.php
users.php
jquery-1.7.2.min.js
db_mysql.php
db_mysqli.php
db_pgsql.php
db_sqlite.php
functions_serverstats.php
pcltrace.lib.php
prototype.js
and of course the rest are in the theme xmls
(not counting tables rendered by plugins)

Correct me if I'm wrong but the following:
users.php
groups.php
warning.php
thread_prefixes.php
themes.php
Shouldn't be too much of a hassle to change to the foundation div grid system.
Can always fork MyBB 1.8.x if implementing Foundation 3 becomes a problem.
Any backend can stay in tables, it's just the front end that can make best use of responsive display.

Anyway I'm working on getting in WP first, then MyBB. Smile
It's not a matter of how the tables are generated, but how Prototype reads them. Things like the collapse and inline moderation check for tables.

Like Firestryke31 said, you can rewrite the JS, but hopefully while it's being rewritten for 1.8 the inline moderation will check for a certain class and highlight a certain class, instead of searching for HTML and highlighting a table row.

$('.checkbox').click(function() {
    var tableRow = $(this).parent('.table-row).find('.trow1,.trow2');
    if (tableRow.hasClass('highlighted')) {
        tableRow.removeClass('highlighted');
    } else {
        tableRow.addClass('highlighted');
    }
});

Something like that would make it possible to use divs OR tables, obviously it's not accurate but you get the idea (A combination of cookies and adding classes to the elements would be needed in addition to this code).
Eric,
fork it brother:
https://github.com/sstephenson/prototype
https://github.com/mybb/mybb/blob/featur...ototype.js


I'm still learning Javascript and how to use the JQuery and derivitive libraries/plugins:
http://www.codecademy.com/users/levyimagedesign
So I'm not quite to that level yet but it doesn't seem too difficult depending on how the functions are coded.

Edit:
Looks like MyBB 1.8 already does this:
http://community.mybb.com/thread-133957-...#pid969539

SO good news for Theme Developers!
I've been prepping a full MyBB 1.6.9 theme early (taking a quick fun break from WP)... but HOLY CRAP.. 591 individual MyBB core templates?!! WHOOOZA.... lol just finished exporting a 564KB theme xml with all of them primed for customizing... maybe 591 templates is a bit excessive eh? lol. Could have combined a great deal of them.