We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

I'd Like To Create A Full Bootstrap Theme | Forum

Darryl B Leader
Darryl B Aug 8 '16
Some pages are constant like Dashboard, Main, Members, Profile..etc "base pages". Some plugins create pages, and users have the capability to create custom pages. The custom pages are just assigned a number, and aren't really identifiable. Any layout to those is provided through manual css styling.
Miss Nookie
Miss Nookie Aug 8 '16
*nods*

I've seen the manual stuff. This is fascinating to poke through.

And thank you billions for all of your assistance! *smiles*
Darryl B Leader
Darryl B Aug 8 '16
I'll pitch in where I can. We're kinda neighbors. State to State anyway.
Ebenezer from Bluetide Webs
OW_Theme_Dev 101
*************************
I don't want to assume you are already familiar with the basics. So I'm going to start right from the crash: explaining files and folders.
 
Firstly, you need to create a folder for your theme. The name of your folder is also your theme key and can only be in this format:
 
 - foldername
 - folder_name
 - folder2name
 
*You cannot have whitespace in your folder name.
 
For a quick boost, you cam duplicate Oxwall simplicity theme, rename the folder and customize them accordingly... Or you can start from the very scratch. 
 
theme.xml
************************
Create a theme.xml file in your root folder.
 
This is the xml file that contains your theme information. It contains the theme two vital components: The theme key and developer key. The theme key is a unique name that is reserved for each Oxwall commercial theme to avoid conflits (like an id). To make sure that your key is unique run a check here https://developers.oxwall.com/store/dev-tools. Your developer key is also on the right panel of that page. Developer key and theme key is needed for plugin license check and updates.
 
Below is the content of theme.xml
 
<?xml version="1.0" encoding="utf-8"?>
<theme>
    <name>Theme Name</name>
    <key>foldername</key>
    <version>1.0</version>
    <compatibility>1.7 and higher</compatibility>
    <description>Your amazing theme description</description>
    <author>Oxwall Foundation</author>
    <authorEmail>email@example.com</authorEmail>
    <developerKey>yourDeveloperKey</developerKey>
    <build>1</build>
    <copyright>(C) Fancy copyrights. All rights reserved.</copyright>
    <license>The BSD License</license>
</theme>
 
You don't always have to use The BSD License. OSCL is the legal license for commercial Oxwall items https://developers.oxwall.com/store/oscl.
 
base.css
************************
This is the CSS base file for Oxwall themes. We will come to this later.
 
README.md
*************************
Add some special information users need to use your theme here.
 
images folder
*************************
This folder contains all the statics files you intend using on your theme. You images, fonts, js, additional css, etc can go here.
 
master_pages folder
************************
This folder contains all the html templates used to structure Oxwall system. By default, each of the master tempplates are inherited from the Oxwall simplicity theme or the current default theme. Adding any of blank, general, dndindex or html_documents templates to your theme master pages will overide simplicy master page for that template.
 
This is also where we will be throwing all our bootstrap codes.
 
 - blank.html tempalates structures the blank pages such as the sign-in page, forgot password page, email verification page, etc.
 - dndindex.html tempalates structures the index page when it's on customization mode.
 - html_document.html tempalates structures custom html pages such privacy policy, terms, and your custom pages.
 - general.html tempalates structures the rest of the site (apart from the admin area).
 
 It is also worthy of note that most pages has there own document unique key which is the unique class for that document. For instance, the unique class for the join page is '.base_user_join', that of the sign-in page is '.base_sign_in', the user profile page is '.base_profile_page', etc.
 
 You can add your custom classes with just a simple plugin tweaking.
 
 mobile
 ***********************
 This is for mobile version of your theme. Will be discussed much later.
 
 theme.jpg
 **********************
 A small thumbnail image of your theme. Usually 154px X 93px
 
 theme_preview.jpg
 ***********************
 A larger preview of your theme. Usually 700px X 525px.
 
 OW_Theme_Dev 102
*************************
This section follows next after you must have digested OW_Theme_Dev 101.

Miss Nookie
Miss Nookie Aug 8 '16
Ok. I have copied the files and made my custom theme.

*smiles*

I'll be back in my morning. I'm exhausted... I hope I'm not too excited to sleep tonight!

THANK YOU!

I hope others will benefit from this, because this is gonna ROCK!
Darryl B Leader
Darryl B Aug 8 '16
+1 Ebenezer. That's good stuff.
Miss Nookie
Miss Nookie Aug 9 '16
Ok. So I have my Simplicity clone. I modified the preview, thumb, theme.xml, and README.md.

I am going to share the files I create as we go through each step to get a good base-level (bare-bones) Bootstrap template, in case others want to follow along.

*smiles*
Attachments:
  das_boot.zip (2079Kb)
Miss Nookie
Miss Nookie Aug 9 '16
And I'll be developing on my Oxwall installation here:

http://kinkyambassadors.com
Ebenezer from Bluetide Webs
Nice work Miss. I will be coming up with  OW_Theme_Dev 102 shortly. It's a long one, so I need your patience.


I checked your theme.xml. There is an error in line 7:


<description>A bare-bones bootstrap theme for Oxwall/SkaDate./description>


1. <description> tag is not closed properly.

2.  <compatibility> is 1.8.4 not 1.84



The Forum post is edited by Ebenezer from Bluetide Webs Aug 9 '16
Miss Nookie
Miss Nookie Aug 9 '16
Thanks... I did that last night. I'm an early bird. I should not do anything code related after 13 hours of work and working out hard.

*smiles*


Miss Nookie
Miss Nookie Aug 9 '16
New version, with fixed files. *smiles*
Attachments:
  das_boot_1.0.1.zip (2082Kb)
Miss Nookie
Miss Nookie Aug 9 '16

Quote from Darryl B Here's probably a stupid question. If you did create a full bootstrap theme, how would it address plugins. They are all calling for the standard classes for placement, and or design.
So, I've been noodling on this, and it seems that the BEST way to do this is with Less mix-ins.

Reference link: http://transmission.vehikl.com/...antic-mixin-library/

If we can apply the mix-ins to standard classes, and null or customize the others on a site-wide basis, then any plugin would theoretically drop in with minimal adjustments.

Thoughts?
Ebenezer from Bluetide Webs

OW_Theme_Dev 102
*********************

This part of the tutorial covers Oxwall basic HTML structure, things you need to start your theme development and how to integrate Bootstrap classes.

Requirements
**********************
- Notepad++: Code editing software https://notepad-plus-plus.org/download/v6.9.2.html
- Oxwall Cache Cleaner: You will need to clear your theme & template cache to see live changes on your website https://developers.oxwall.com/store/item/579
- Oxwall Bootstrap Plugin: Integrate bootstrap framework to Oxwall https://developers.oxwall.com/store/item/1289

In this tutorial, we will deal mainly with the general.html template. You can modify other templates if you fully grab the concept behind Oxwall theme master pages.

General page markup
*********************
The general page templates controls up to 90% of the website. The HTML structure is as follows:

<div class="ow_page_wrap">
<div class="ow_menu_fullpage">
<div class="ow_menu_fullpage_wrap">
<!-- Main menu goes here -->
{$main_menu}
</div>
</div>
<div class="ow_site_panel clearfix">
<a class="ow_logo ow_left" href="{$siteUrl}"></a><!-- This is the logo area. -->
<div class="ow_nav_btn"></div>
<div class="ow_console_right">
<!-- Console items goes here -->
{component class='BASE_CMP_Console'}
</div>
<div class="ow_menu_wrap">
<!-- Responsive main menu goes here -->
{component class='BASE_CMP_MainMenu' responsive=true}
</div>
</div>
<div class="ow_header">
<div class="ow_header_pic"></div>
</div>
<!-- Theme header image -->
{*if isset($imageControlValues.headerImage.src)}
<div class="ow_header">
<img class="ow_header_img" src="{$imageControlValues.headerImage.src}" />
<div class="ow_header_pic"><img class="ow_header_img" src="{$themeImagesUrl}header.jpg" /></div>
</div>
{/if*}
<div class="ow_page_padding">
<div class="ow_page_container">
<div class="ow_canvas">
<div class="ow_page ow_bg_color clearfix">
{if !empty($heading)}
<!-- Page heading -->
<h1 class="ow_stdmargin {$heading_icon_class}">
{$heading}
</h1>
{/if}
<!-- Page content -->
<div class="ow_content">
{add_content key='base.add_page_top_content'}
{$content}
{add_content key='base.add_page_bottom_content'}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Page footer -->
<div class="ow_footer">
<div class="ow_canvas">
<div class="ow_page clearfix">
{$bottom_menu} <!-- Bottom menu links -->
<div class="ow_copyright">
{text key='base+copyright'} <!-- Website copyright -->
</div>
<div style="float:right;padding-bottom: 30px;">
{$bottomPoweredByLink} <!-- Oxwall Attribution -->
</div>
</div>
</div>
</div>

The above is a simple html found in ow_themes/themefolder/master_pages/general.html. I have added comments to explain the key areas. You can always ask question if find anything complex.

Play around with the html a bit to see how easy it is to modify. You can pick any of the classes, find it in base.css and add your own style. Just remember to clear your cache whenever you make changes.

Integrating Bootstrap
*************************

Adding bootstrap to the template is the easiest part. All you have to do is add the bootstrap classes to their respective areas or where you want to use theme.

Example 1
***************************
<div class="ow_page_wrap">
<div class="container-fluid">
<!--ow_page_wrap contents-->
</div>
</div>

<div class="ow_footer">
<div class="container-fluid">
<!--ow_footer contents-->
</div>
</div>

In your base.css you can add:

.container-fluid{
padding:0px;
}

To remove padding from container-fluid.

Example 2
***************************

Bootstrap menu area. Coming soon...........

Miss Nookie
Miss Nookie Aug 9 '16
Ok. So, I worked on general.html. I created a copy that is my original with comments and modified the working file. Both are attached in a zip.

However, the cache cleaning plugin does not seem to be functioning for me, as the code (checked with firebug) is not updating.

Thoughts?
Attachments:
  general_files.zip (2Kb)
Ebenezer from Bluetide Webs
Show me a screenshot of your cache clean settings.
Miss Nookie
Miss Nookie Aug 9 '16
I got it! It's working fine. I changed the theme, did a couple of tests, it worked, and reloaded my theme. May have just been a local internet connection issue, as things were moving slow.

So, now I have this showing as my code at the footer:

<div class="ow_footer">
    <div class="container-fluid">
        <!-- Bottom menu links -->
        <div class="ow_footer_menu">
    <a href="http://kinkyambassadors.com/terms-of-use">Terms of use</a> |     <a href="http://kinkyambassadors.com/privacy-policy">Privacy Policy</a> |     <a target="_blank" href="http://www.oxwall.org/">Community software</a> |     <a href="http://kinkyambassadors.com/mobile-version">Mobile version</a></div>
       
        <div class="ow_copyright">
            <!-- Website copyright -->
            &copy; Copyright Kinky Ambassadors
        </div>
           
        <div style="float:right;padding-bottom: 30px;">
               <!-- Oxwall Attribution -->
            <a title="Powered by Oxwall Community Software" target="_blank" href="https://developers.oxwall.com/"><img alt="Oxwall Community Software" src="http://kinkyambassadors.com/...owered-by-oxwall.png"></a>
        </div>
    </div>

--

WOOHOO! *smiles*
Miss Nookie
Miss Nookie Aug 9 '16
So, I'm looking over the site, while I'm dinking around, and I don't see the Bootstrap class actually pulling into the code inspector (Firebug) at all.

It seems like it's not actually connecting with the Bootstrap, unless I'm missing something.
Miss Nookie
Miss Nookie Aug 9 '16
Nevermind. So many small things to adjust to with a new system. This time, I didn't activate it. When I thought about it and did it, it works perfectly.

SMH
Darryl B Leader
Darryl B Aug 9 '16
I'm still checking in regular. Maybe I'll learn a little something.
Miss Nookie
Miss Nookie Aug 9 '16
Me, too, Darryl!

I'm pretty curious about the less mixins, and whether we could make that work as part of this, for overall control of the oxwall classes through Bootstrap standards.

Makes sense to do that, in my head, anyway.
Pages: « 1 2 3 4 5 »