Giter VIP home page Giter VIP logo

theme's Introduction

Themosis framework

Build Status

The Themosis framework is a tool aimed to WordPress developers of any levels. But the better WordPress and PHP knowledge you have the easier it is to work with.

Themosis framework is a tool to help you develop websites and web applications faster using WordPress. Using an elegant and simple code syntax, Themosis framework helps you structure and organize your code and allows you to better manage and scale your WordPress websites and applications.

Installation

Please see the installation section of the Themosis documentation.

Development team

The framework was created by Julien Lambé, who continues to lead the development.

Contributing

Any help is appreciated. The project is open-source and we encourage you to participate. You can contribute to the project in multiple ways by:

  • Reporting a bug issue
  • Suggesting features
  • Sending a pull request with code fix or feature
  • Following the project on GitHub
  • Following us on Twitter: @Themosis
  • Sharing the project around your community

For details about contributing to the framework, please check the contribution guide.

License

The Themosis framework is open-source software licensed under GPL-2+ license.

theme's People

Contributors

9585999 avatar guix77 avatar jaspervv avatar jlambe avatar ntsim avatar solverat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

theme's Issues

WooCommerce load template issue

Hello @jlambe
I'm working with Themosis on a website based on WooCommerce but I have some problems loading the right views templates.
Like wrote in your docs I added this on the routes.php file:

Route::get('product', function()
{
    return View::make('shop.product');
});

but the website always load the file singe-product.php stored in the woocommerce/template plugin's folder.

any idea on how can I load my scout file instead of the woocommerce default?

themosisRouteConditions filter isn't accessible from admin directory

Bonjour,
I am trying to add some woocommerce conditions with themosisRouteConditions filter from the theme/admin directory.
If i look in function.php, the RouteProvider is load before any of these files. My conditions are ignored.

So i think it's impossible to use add_filter('themosisRouteConditions', ...); from theme/admin directory.
Did i missed something ?

Thank you.

Wrong config format sent to $theme->images

I'm upgrading to Themosis 2.0 and ran into the following problem. In my new theme's functions.php there are three calls to $theme->* methods that have config values as arguments. But these config values are in an array under the key config, which the theme-> methods don't expect. For everything to work I have to send the values in ['config'] to the theme methods:

Screenshot 2021-04-18 at 8 57 08

The theme was created using the command from the upgrade guide: php console theme:install your-theme-name

WPML plugin problem domain

Hi guys after installation WPML plugin I've one problem my page fix this ERROR:

Unhandled Exception

Message:

include(/htdocs/cms/): failed to open stream: No such file or directory

Do you have an idea of the problem that I have ?

Thanks a lot

Customize register

Hello,

it's great to add on this framework a section for add customize register for the theme.
With add section etc...

Help with Models and namespaces

Hi! I am having issues running my models. I created a model called RegistrationModel and I want to call a function called init

when i call it via RegistrationModel::init() it says that RegistrationModel Class can not be found.

I edited the loading config file to
'MyTheme' => [themosis_path('theme').'controllers', themosis_path('theme').'models']

and added namespace in my class
namespace MyTheme\Models;
class RegistrationModel {

public function init() {

}

then try to use it in another file

use MyTheme\Models\RegistrationModel;
RegistrationModel::init();

I dont know what i am doing wrong. Hope you can guide me thanks!

No gulpfile found

Hello,
I just installed the Framework and the Theme and wanted to start the development.

The documentation says the theme uses Gulp, but there's no gulpfile.js in the theme.

Am I missing something? How do I start the dev session?

Themosis plugin's bootstrap/start.php included instead of theme's

When doing the command wp rewrite flush --hard, rewrite rules for my custom post types defined in resources/actions.php where not being generated. When going to backend of the WordPress install to Settings \ Permalinks, they did get generated.

I traced it to a problem in the theme's functions.php at the line:

require_once('bootstrap'.DS.'start.php');

For some reason this seems to include the bootstrap/start.php file in the themosis framework and not the theme's bootstrap/start.php when running in wp cli.

@jlambe do you agree? I can do a PR, just want to make sure its not just me

Option to disable routing ?

Hi there,

We took a look theses past days to your framework and this theme. There are some really great things there, awesome folder structure like laravel, lots of helpers in your framework, and more. We would really like to use thoses functionnalities, but as we are premium theme developpers, we are looking for a solution that doesn't break the default wordpress routing, to maximize the compatibility with plugins when distributing the themes. We would also like to keep the basic child-themes functionnalities working, so a user can create for example a file archive-mytag.php that would override the main theme template.

Well, is there an way to disable the routing feature of your framework, and keep the WP structure for templates files like 404.php, archive.php, search.php, etc ..?

Or maybe we could think about an automated routing for all standards wp conditonals checks to work as below :
if is_<test>() return true, route to <test>Controller@index
then the controller could check if the corresponding default wp file exist in get_stylesheet_directory_uri() . '/app/views/wp-default-templates', and then load it.

The goal is to use the laravel controllers/models/views(blade) structure, without needing to re-create the whole wp routing, to help us develop premium themes that we can redistribute, and grant them compatibles with most of the wp features or plugins.

What do you think ?
Thanks.

Loading SVG file to media field

Hello,
I have a problem with svg images. I added them to the list of allowed files extensions, so I can upload them to Wordpress Media Library. But I still can not upload them to Themosis Media Field. How to make this possible?
Many thanks.

Composer HTTPS 'Not allow connections'

Hi there, if you made an update to composer this one requires the connections to be secure (https), in order to work with this I think we can update the URLs or add into the composer.json file in the config section "secure-http": false that will do the work.

Maybe we can add this into the docs or something.
Cheers

Multi Language

Hi,

Nice framework!!!

i do have some questions about multi language. Does your framework support wpml or qtranslate ?

or how we should behave if we would like to make a site with 2-3 languages?

thanks a lot.

Shortcode

Hello,

How use shortcode, it's doesn't work.

Thanks

Add config file

How add a config file for example in folder config :

test.config.php

How add this file in the ConfigFactory ?

Thanks

Specify namespace for route controllers

With the following code you can simply add define a namespace for route controller inside the theme.config.php:

# functions.php

/**
 * Include routes.
 */
$routesPath = themosis_path('theme.resources').'routes.php';
$controllerNamespace = Themosis\Facades\Config::get('theme.controller_namespace');

if($controllerNamespace && !is_array($controllerNamespace)) {
    \Themosis\Facades\Route::group(['namespace' => $controllerNamespace], function (\Themosis\Route\Router $router) use ($routesPath) {
        require $routesPath;
    });
} else {
    require $routesPath;
}

Now you CAN add the following rule to the theme.config.php

# theme.config.php

    /* --------------------------------------------------------------- */
    // Controller namespace
    /* --------------------------------------------------------------- */
    'controller_namespace' => 'App\\Controllers',

If the key is not defined the routes.php will just be included like it always was.

UnitTest

Hello,

I'd like to write some UnitTest for my template ! How i could do it throw themosis ?

Thanks!

Shortcodes with Twig template

Hello,

In my template I use {{ wpautop(post.post_content)|raw }} to display the content of my page.
But HTML from shortcodes are not display. I also tried wptexturize().
If I add {{ wpautop(fn.do_shortcode(post.post_content))|raw }}, it works.

Is there a better solution?
Thank you for your help.

change font source url(s) to avoid http/https conflicts

Hi!

P.e. in welcome.scout.php the font url to load starts with the http:// protocol.

src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v10/cJZKeOuBrn4kERxqtaUH3ZBw1xU1rKptJj_0jans920.woff2) format('woff2');

To avoid "Mixed Content" errors the url(s) should just start with //.

src: local('Open Sans'), local('OpenSans'), url(//fonts.gstatic.com/s/opensans/v10/cJZKeOuBrn4kERxqtaUH3ZBw1xU1rKptJj_0jans920.woff2) format('woff2');

source:
http://stackoverflow.com/a/35978435/5335755
http://www.amixa.com/blog/2012/06/06/how-to-use-google-fonts-under-both-ssl-and-non-ssl-without-ssl-insecure-messages/

Kernel instantiation is not handled as a singleton

The current implementation of the theme's index.php instantiates a non-singleton instance of App\Http\Kernel when $app->manage is called. This is despite the container registering an instance already through the Illuminate\Contracts\Http\Kernel contract in bootstrap/app.php.

By this point the App\Http\Kernel may have already been instantiated (e.g. through a service provider), so we can potentially end up having multiple instances of App\Http\Kernel floating around in the context.

From my perspective, this is incorrect behaviour, but I don't know if there is some more background to how this theme worked in v1 (I have only used v2), or how it is intended to be used.

Regardless, it has personally been problematic as middleware registered by a third-party service provider were seemingly being unregistered (even though they appeared to be registered when the application first bootstraps). In reality, the middleware was being registered on the older Kernel instance.

If I have correctly identified this as a bug, then it can simply be fixed by providing Illuminate\Contracts\Http\Kernel to $app->manage.

Pronto class not available

I changed Pronto to View and it worked as desired. Should I be using Pronto?

class BaseController extends Controller
{
    /**
     * Setup the layout used by the controller.
     *
     * @return void
     */
    protected function setupLayout()
    {
        if (!is_null($this->layout))
        {
            $this->layout = Pronto::make($this->layout);
        }
    }
} 

Disable part of themosis routing

Hello! Let me know. Can i disable part of themosis routes? I want to use standart wp rewrite rules to use creating pages from admin panel, but i want to save themosis api routes. Thanks in advance!

migrate functions.php code to a plugin or the framework plugin?

As a company we have our own starter with lots of functionality we generally want in most sites. This means that we if themosis has an new update (and it does alot because we're working on the dev-master for the latest updates :). We have to update our functions.php pretty much. Though we never touch it and never will touch it. I was asking myself why shouldnt we you just add the functions.php in the current themosis framework and load it the same time as the functions.php is being loaded. You even could make a seperate plugin which handles this. Currently we have some "third party dependent" code outside of the package manager, that is something what struggles me.

What do you think about this?

Overloading config with child Themes.

Hi,

A very good improvment wiil be to overload config files with current active child theme. It's not a big improvment, but it will be realy usefull.

I did it, with some hack, and it change my developper life.

Testing your theme's code

I was looking on how to test my wordpress theme using automated test. Have you already implemented something to test the functionality of a themosis theme? If not are you planning to implement this

Conditional filter

Not if I'm expressing myself correctly, but I need to apply a CSS class according to a specific page. In the documentation I did not find clear how to do this, is there a way to do this? For example, if it's page X include a CSS class?

Automate tasks

It would be nice to automate the tasks to build the JS, CSS and the like using or Gulp or Grunt ... And not forgetting Bower.

I would like to do this. But I'm a little confused where I can implement this, I think it's here. 😅

Keeping up to date

How do you suggest we keep our theme based on this repo up to date after customising for our project?

Themosis and Child Themes 1.3

Hey! I've seen two threads about child-themes, but seemingly around previous versions of Themosis.

We're using 1.3. Creating a childtheme works, but overriding assets/resources cannot be done, as noted in previous threads.

I've tried the solution here for views/assets https://github.com/themosis/themosis/issues/39

I've looked at this thread for overriding resources https://github.com/themosis/themosis/issues/80

I've not been able to get either solution to work for 1.3. Do you have any pointers for me?

Keep up the good work!

Best regards
Tomas

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.