themosis / framework Goto Github PK
View Code? Open in Web Editor NEWThe Themosis framework core.
Home Page: https://framework.themosis.com/
License: GNU General Public License v2.0
The Themosis framework core.
Home Page: https://framework.themosis.com/
License: GNU General Public License v2.0
@fi5u The customize page keeps showing "No routes for this request" message.
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
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
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 :)
This method allows you to share data across all views in your application.
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.
Replace in all add_action and Action class calls "&$this" by "$this"
static page create by scout templates engine?
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
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 );
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';
Unhandled Exception
Message:
The route condition [test] is no found.
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.
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?
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 👍
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!!';
}
have a easy way to customize "_themosisNoRoute.scout.php" in my theme ?
but not in framework plugin...
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!
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');
Uncaught TypeError: Cannot read property 'id' of undefined media-audiovideo.js?ver=4.0
only after active framework plugins occur in javascript console.
the error does not cause any problem except the log
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.
Add a control check to avoid passing associative array for the $options parameter of the Field::checkboxes method.
Should throw a FieldException.
Add a Field class to handle the load of a group of images or files.
I use it a lot in Laravel projects.
Do you plan to add View::composer functionality from Laravel to Themosis?
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.
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.
And then, I change the url to "http://localhost/themosis-first/htdocs/cms/wp-admin/install.php" it become like this.
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.
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...
Is View::share an actual feature? It really comes in handy
Thanks
Rewrite the core API of custom fields so it is easier to define fields for:
Allow a developer to define the singular and/or plural name of his custom post type.
In the list of hooks that get attached by the AssetFactory and then get worked on, there are styles for the customizer missing. More info in this WP.StackExchange answer, the comment by Otto and in Codex.
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
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
When adding new rows or re-arrange the rows of an infinite field, values of the radio fields break.
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.
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.
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)
auto clear the cache files in "app\storage\views"?
Move the sections and settings parameters to the Page->set() method.
Currently the PostType object returns a PostTypeData object. But you can't access the PostType parameters.
Provide a method to get those custom post type arguments.
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?
Add method to the Taxonomy class.
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.
Add a password field to the Field class.
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.
First check if indexed value exists or isset before proceding.
Also remove the exception otherwise it kills the application. Return empty string as not found value.
Update path to themosis_path('app').
Set path to WordPress.
WordPress requires some methods to stay with a public
access in order to work. But not all public
methods are part of the public API.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.