GithubHelp home page GithubHelp logo

themosis / framework Goto Github PK

View Code? Open in Web Editor NEW
668.0 668.0 123.0 8.52 MB

The Themosis framework core.

Home Page: https://framework.themosis.com/

License: GNU General Public License v2.0

PHP 84.19% CSS 0.04% JavaScript 0.41% TypeScript 7.54% SCSS 3.47% Blade 4.36%
php themosis-framework wordpress

framework's People

Contributors

3runodesign avatar 9585999 avatar antoscarface avatar arjendejong12 avatar augustuswm avatar chenalon avatar chielteuben avatar dependabot[bot] avatar erezmus avatar fabianmarz avatar fatk avatar gitter-badger avatar jaspervv avatar jlambe avatar jminguely avatar jozan avatar juje avatar kevinbatdorf avatar lauhakari avatar ogorzalka avatar ramon-villain avatar rumur avatar simnom avatar szepeviktor avatar tbtmuse avatar tipytechnique avatar vinicius73 avatar yanmorinokamca 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  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

framework's Issues

Global Javascript namespace application is not defined in admin

app/config/application.config.php
'namespace' => 'themosis',
'ajaxurl' => 'admin-ajax',

javascript in custom metabox of post edit page
alert(themosis.ajaxurl); //also tried alert(themosis.admin-ajax);

Console logs
Uncaught ReferenceError: themosis is not defined

Problem installing bookstore demo

I tried to install the bookstore demo like said on the github page, but I got that error message then :
Unhandled Exception

Message:

Trying to get property of non-object
Location:

/Applications/XAMPP/xamppfiles/htdocs/themosis/wp-content/plugins/themosis/app/admin/help.php on line 22

Update Themosis

First of all , CONGRATULATIONS for this Awesome Job !

I will use it on a project that I have pending. I guess you add things every day.

I can update ? I lose things?.

Thanks for all :)

Multi-Site functionality

I've tried to get this working with both subdomains and the file structure method. Whenever I do it breaks Themosis in varying ways and I think it has something to do with how multisite tries to control the rewrite rules while themosis is also trying to control the routes.

Have you had experience with a working multisite instance? I've added the multisite to my shared configuration but once again have to flatten the database because I can't seem to get the admin state to work and it also seems to break the routing. It also forced a /blog/ prepend to the custom routes which isn't something that I desired.

Any documentation on how this should be set up would be much appreciated, I am going to explore potentially not using multisite but it would make it much easier to keep a lot of this content separate.

Route::get('page', array(array(15)... not working

When using syntax to match specifig page routes like this:

Route::get('page', array(array(15), function(){

    global $post;

    return View::make('pagetemplate', array(
        'page'  => $post
    ));

}));

Router is not working. This will match all pages, not just the single one with id #15

Clash of directory separators ahead

I just opened the main plugin file on GitHub for the first time. And the first thing I saw was this line:

defined('DS') ? DS : define('DS', '/');

That's not good. I use the exact same constant in my wp-config.php files already. And as you are checking if it already is defined, it will work ... in my case. The directory separator isn't always / on all systems. That needs to get changed to the system default:

defined( 'DS' ) or define( 'DS', DIRECTORY_SEPARATOR );

AssetFactory::add (Problem with URIs with no extension)

Currently the $type is defined by the extension. AssetsFactory.php[46]
$type = (pathinfo($path, PATHINFO_EXTENSION) == 'css') ? 'style' : 'script';

But, as you specify in the docs, the $type variable might be defined depending of the $mixed (the fifth argument) value.
$type = is_string($mixed) ? 'style' : 'script';

Field default value not being output

In the Field documentation it states that the $extras array can contain a default value for the field created on the options page. I have tested with both a text field and a select field. The other attributes in the array (title and info) are output on the generated options page as expected, but the default attribute is not honoured.

My code is looking like this:

$options_page_settings['functionality'] = array(
    Field::select('setting-sidebar-default', array(
            array(
                'left'  => __('Left', THEMOSIS_THEME_TEXTDOMAIN),
                'right' => __('Right', THEMOSIS_THEME_TEXTDOMAIN),
                'none'  => __('None', THEMOSIS_THEME_TEXTDOMAIN)
            )
        ), $multiple = false, array(
        'title'     => __('Sidebar default position', THEMOSIS_THEME_TEXTDOMAIN),
        'info'      => __('Can be overridden on a per-page basis', THEMOSIS_THEME_TEXTDOMAIN),
        'default'   => 'none'
    )),
    Field::text('setting-custom', array(
        'title'     => __('Custom text', THEMOSIS_THEME_TEXTDOMAIN),
        'info'      => __('Custom text info', THEMOSIS_THEME_TEXTDOMAIN),
        'default'   => 'Some default value'
    ))
);
$options_page->addSettings($options_page_settings);

The result of this is that for these two options, the select field by default shows the first value (left) and the text field is by default blank.

Allow an array of post types to be passed into Taxonomy::make

Currently you can only pass one post type into the taxonomy make declarations and in the standard wordpress taxonomy_registration function you can pass in an array of postTypes to allow for multiple postTypes to use the same taxonomy categories.

Is there a reason why you opted to not do it this way?

Suppress Unhandled Exception

If I already cleaned up the default WP_Widget_Recent_Comments, the plugin will produce Unhandled Exception:

Undefined index: WP_Widget_Recent_Comments
Location:

/wp-content/plugins/themosis-plugin/src/Themosis/Configuration/Configuration.php on line 92

If you want you can solve this by adding @ just before:

$wp_widget_factory->widgets['WP_Widget_Recent_Comments']

Thanks for creating this amazing framework 👍

Custom routes

Hi, i have a little Doubt.

Can i create custom routes without create pages ??

For example i have register page with custom code, i dont need blank page in wordpress admin.

Example:

routes.php
--> Route::any('page', 'PageController@showPage');

PageController.php
--> public function showPage()
{
return 'this is a custom page!!';
}

blank

.gitignore

I added the vendor folder to .gitignore as in Laravel default repo.

Could the whole wordpress ( htdocs/cms folder ) also be added to .gitignore it it's installed via composer?

Really appreciating Themosis, thanks for your work Julien!

Admin assets directory behaves like a route...

Issue for loading assets saved in the admin directory. The response returns "No routes defined for this request".

Seems to have a conflict between the route and asset api and how directories are registered.

Issue happened when trying to register modernzr script from: app/admin/assets/js/vendor/modernizr.js using the following statement:
Asset::add('th-modernizr', 'js/vendor/modernizr.js', array(), '2.6.2');

ERROR: The theme directory "twentyfourteen" does not exist.

Hi,

I've tried to install it on dev env. since my document root is public_html I've copied everything but htdocs from install directory to root directory. Then I've copied the content of htdocs to public_html.
Changed the changed the environment settings for local and visited the website.
I've entered the site title and username and password end email and logged in to wp-admin.
When I try to change the theme it gives an error ERROR: The theme directory "twentyfourteen" does not exist.

View::composer

I use it a lot in Laravel projects.

Do you plan to add View::composer functionality from Laravel to Themosis?

themosis installation

Hi All,

First of all, I am really excited when themosis is out and many thanks to @jlambe for the effort.
I do not know what happen exactly. I have followed the instructions in the website.

It is a newbie question.
So, I make a project with composer and name it "themosis-first".
I follow all the instructions, setting this and that to make it work.

I give the 'WP_HOME' => 'http://smaba.dev', and 'WP_SITEURL'=> 'http://smaba.dev/cms'.
when I am trying to open it, the browser did not give me a result.

1

So, I try to open "localhost/themosis-first", I can open it, and then I click "htdocs" and the URL change to "http://smaba.dev/cms/wp-admin/install.php" and did not give me any result to.

install

And then, I change the url to "http://localhost/themosis-first/htdocs/cms/wp-admin/install.php" it become like this.

2

3

I am successful at installing it, but, maybe I miss something, because I knwo that the url should be like this "http://smaba.dev/cms/wp-admin/install.php"
help me, I could not figure it out.

It's already 2 nights since I start to make it working.

Field class methods should return an instance ?

Currently the Field class methods work as helper functions by returning an array of parameters.

By returning Field instances, the Field class could perform extra filter functions on its datas before saving them...

View::share

Is View::share an actual feature? It really comes in handy
Thanks

Rewrite the custom fields APIs

Rewrite the core API of custom fields so it is easier to define fields for:

  • metabox
  • taxonomy
  • user
  • admin page(settings)
  • ...

print_r(Application::get('aliases')); doesn't return correct results

Ajax
[Themosis\Facades\Asset] => Asset
[Themosis\Configuration\Application] => Application
[Themosis\Route\Controller] => Controller
[Themosis\Facades\Field] => Field
[Themosis\Facades\Form] => Form
[Themosis\Facades\Html] => Html
[Themosis\Facades\Input] => Input
[Themosis\Metabox\Meta] => Meta
[Themosis\Facades\Metabox] => Metabox
[Themosis\Page\Option] => Option
[Themosis\Facades\Page] => Page
[Themosis\Facades\PostType] => PostType
[Themosis\Facades\Route] => Route
[Themosis\Facades\Section] => Section
[Themosis\Session\Session] => Session
[Themosis\Taxonomy\TaxField] => TaxField
[Themosis\Taxonomy\TaxMeta] => TaxMeta
[Themosis\Facades\Taxonomy] => Taxonomy
[Themosis\Facades\User] => User
[Themosis\Facades\Validator] => Validator
[Themosis\View\Loop] => Loop
[Themosis\Facades\View] => View
)

the 'head' was cutted

Field::media failing to open file dialog

I've added a Field::media to a PostType. When attempting to add a file, I click the button 'Add', but nothing occurs.

I see the following in the JS Console in Chrome:

Uncaught TypeError: Cannot read property 'id' of undefined                   media-audiovideo.js?ver=4.0:90
Uncaught TypeError: Cannot read property 'limitExceeded' of undefined           media-views.js?ver=4.0:1868

But the output in Firefox is probably more helpful:

TypeError: wp.media.view.settings.post is undefined       media-audiovideo.js:90
TypeError: wp.Uploader is undefined                                media-views.js:1868

This happens both on new post screen and in edit screen for post as well. Wordpress v4.0

Symfony Class Loader component not found

Hi. Whilst developing with Themosis, I've suddenly got two errors in the WP admin and the front end is no longer working. The errors are:

Themosis plugin: Symfony Class Loader component not found. Make sure to include it before proceeding.
Themosis theme: Symfony Class Loader component not found. Make sure the Themosis plugin includes it before proceeding.

I cannot figure out what is causing them. I've uninstalled the framework plugin and placed one in that I know is working, but the errors do not change. On the front end I have a screen that just says The theme won't work until you install the Themosis framework plugin correctly.

Any ideas how I can fix this? Thanks.

Building a Relationship Field

I have been building a relationship field similar to how the select dropdown works, but instead of an array you put in a post type that pulls in all the posts from that particular post type, I might add some custom options to it as well but I am having difficulty saving and I'm not sure what aspect I need to update to get it totally working... (once it works I'll probably set up a pull request since I think the relationship field is important enough to avoid the need for AFC)

I forked the framework and you can see my modifications here:

https://github.com/iamkevingreen/framework/compare/relationship-field

I don't have a total grasp of this framework since I've only been using it today but if anyone has some insight I would appreciate it, otherwise I'm sure I'll get it tomorrow, but thought other people might be interested in this as well regardless.

Allow empty metabox

When calling the set() method with the Metabox class, allow empty array and build an empty Metabox UI.

Note: Allow developer to customize metabox content (later feature)

Write app logic as a plugin rather than as a theme?

What if I wanted to write an app for a multi-site installation where each site has a different theme? I would think writing it as a plugin would be better. Is this currently possible? Any plans for this?

Remove bloat and therefore direct file access check and empty index files

I understand that they are there as I used to do this all the time and a lot of my public code in the wild surely still uses that. Only problem it's useless and shouldn't happen on that level: PHP files. This is task that is sever specific. And aside from that, DS is a very common constant. I could imagine that someone who writes a bot or crawler will have set this constant himself. Please just remove it from all the files.

The same goes for emtpy index.php or index.html files as honey pots. That doesn't work. Those files are chosen by a .htaccess or similar file and there could easily be app.htm or whatäver else as first file.

Get rid of the eval() function

Actually, view files are evaluated by the eval() function. For "security" and bad reputation of the eval function, this has to be removed for the release 1.0.

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.