ansonphong / postworld Goto Github PK
View Code? Open in Web Editor NEWWordpress Theme Development Framework
License: GNU General Public License v2.0
Wordpress Theme Development Framework
License: GNU General Public License v2.0
Hi Haidy,
I made the mistake when documenting the points functions of writing basically the same thing for both calculate_post_points() and cache_post_points()
Essentially, calculate_post_points() should just calculate and return the points, and cache_post_points() can use calculate_post_points() and additionally update the values in the database.
I have updated the docs to this specification, and the change can be made.
Thanks
Hi Michel,
You will notice that I added a new function, embedly_extract which we will be a dependency for some upcoming development.
embedly_extract
https://github.com/phongmedia/postworld/tree/master/js#embedly_extract--url-object-
Let me know if you need any clarification.
Hi Haidy,
Here you will find updated documentation for the Database structure, which makes the old Evernote documentation obsolete.
https://github.com/phongmedia/postworld/blob/master/dev/DATABASE-STRUCTURE.md
There are a few updates to the structure
user_share_report()
stored in __ share_points_meta__ columnAll the functions which this affects, I will be documenting and will submit as issues to be updated.
These operations have been assigned to you :
Today I will be documenting all changes to the functions.
Thanks!
Phong
Hello phong,
I have a question concerning pw_get_templates
In case of if($templates_object['posts']), if template name is link-detail.html
The scenario will be as follows: (please confirm)
Check if ( link-detail.html doesn't exist in override path then use post-list.
and if post-list is not present in the override path then use that in the default path?
For all the *set...() *_ PHP Methods, I discovered a security hole wherby users could set the values of other users if they know their user_id. As a result, let's remove 'user_id' from the input parameters, and instead check which user is currently calling the set function, and apply it to that user ID.
This is how to get the ID of the current user :
**
$current_user = wp_get_current_user();
$current_user_ID = $current_user->ID;
**
This applies to the following functions:
set_points()
set_favorites()
set_viewed()
Hi Haidy,
Corresponding with the database structure update, there are some new functions to getting and setting data to the post_relationships column in the User Meta table which you can create.
You can see the updated database structure here :
https://github.com/phongmedia/postworld/blob/master/dev/DATABASE-STRUCTURE.md#post_relationships--json
Here are the new functions :
You can find the documentation here :
https://github.com/phongmedia/postworld/tree/master/php#set_post_relationship-relationship-post_id-user_id-switch-
I will update descriptions of get_viewed(), get_favorite(), is_favorite(), etc, as wrappers for this function.
Thanks.
Phong, from where could I get the post_class in wp_postworld_post_meta table?
I found a function get_post_class($class, $post_id) : http://codex.wordpress.org/Function_Reference/get_post_class
which returns : array() {
0 => string 'post-[ID]' (length=7)
1 => string '[post_type]' (length=4)
2 => string 'type-[post_type]' (length=9)
3 => string 'status-[post_status]' (length=14)
4 => string 'format-[post_format]' (length=15)
5 => string 'hentry' (length=6)
6 => string 'category-[...]'
X => string 'tag-[...]'
}
which field should I use? The category?
Hi Phong, i was discussing with Haidy the Load-Feed Directive.
it seems that all related PHP functins are already created.
However i am still going to work on the JS part, it seems simple given that we have the framework already in place.
I just needed to confirm how it works from a user perspective.
Where will the user register feed [administrator feature only?] Should he have a button where he can register a feed after changing parameters in the live feed component on the page?
Load Feed seems to be only a feed, no search panels, since it will just display pre-cached results.
The more you tell about the user experience, the easier it will be for me to figure out what needs to be done. i will do something quickly to prototype it for now.
Hi Michel,
I added some documentation for a route to create --- let me know if you need any more clarification on this. Also feel free to update the documentation as necessary and to reflect the usage, etc.
edit-post [ route ]
https://github.com/phongmedia/postworld/tree/master/js#edit-post--route-
Hi Haidy,
I added some functions for Comment Points to the documentation, and updated your spreadsheet here, highlighted in green:
Production Spreadsheet:
https://docs.google.com/a/phong.com/spreadsheet/ccc?key=0AuJE3deO2IR6dGhrY1h3NkNrcG1rT1cyUmV1Nlh3d2c&usp=drive_web#gid=0
Updated Documentation:
https://github.com/phongmedia/postworld/tree/master/php#points
Have a look at the refactored method for using the meta-function 'set_points', which set_comment_points and set_post_points can be wrapper functions of. Let me know if you have any questions about this.
Hi Haidy,
You can see the issue in this case :
Make a file theme-dir/postworld/templates/panels/load_feed_A1.html
json_encode(pw_get_templates(array('panels' => array('load_feed_A1'))));
Produces :
{"panels":{"load_feed_A1":"http:\/\/localhost:8888\/wp-content\/themes\/RSV2\/postworld\/templates\/panels\/Array.html"}}
You will notice that the filename is Array.html, with 'Array' instead of the template_id.
Hi Michel,
The Edit Field directive is ready for your review.
Much of the prototype is in place in terms of inserting HTML. Now it is ready for you to work your magic, which will lead-in to the methods for the Edit Post directive and routing methods which I plan to document this week.
If you look in /dev/theme/ you will find a template called : edit-post.php
If you copy that to your theme folder, and make a new page with that template set (Edit Post), then you will see a working example of the directive.
It currently allows you to produce an input field, or a select field, or a text-area, with various settings which are documented here.
https://github.com/phongmedia/postworld/tree/master/js#edit-field--postworlddirective-
What I would like to do with it which I am looking for your help with :
<span edit-field="post_title" data-input="input-text" data-bind="edit_fields.post_title"></span>
The post_title field should be bound to the edit_fields.post_title variable, so when we update this on the DOM, the model changes - so when we're ready to save the post via AJAX, all we have to do is submit the edit_fields object to pw_update/insert_post() PHP method.
Does this make sense? What's the best way to do this?
There are other more advanced fields which we'll want to have controllers synching up to a central object, although this is a good place to start.
Hi Haidy,
I have made some modifications to the following table structure and functions. You can go ahead and make updates.
post_points_meta :
{
post_type : {
post : 242,
link : 523,
blog : 123,
event : 12
}
}
Have a look through the updated documentation for these functions, and let me know if you have any questions. You can go ahead and make the new post_points_meta column in user_meta table , and update the functions.
I added several HINTS where I found it easier to describe things in PHP code which you may be able to re-use. Once the function is updated, I will remove the hints from the documentation.
The plugin generated 1998 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.
I think it's the result of MySQL errors, since when I turn off MySQL errors on various definitions, the number reduces.
Phong, i am trying to use some functions through Ajax, namely pw_live_feed.
Did you work on that function? or is Haidy supposed to complete it?
I am not getting expected results. and getting the following warnings multiple times.
! ) Warning: Invalid argument supplied for foreach() in D:\wamp\www\wordpress\wp-content\plugins\postworld\php\postworld_posts.php on line 406
Warning: array_slice() expects parameter 1 to be array, object given in D:\wamp\www\wordpress\wp-content\plugins\postworld\php\postworld_feeds.php on line 23
Aqua Resizer file is missing from the repo, it generates error when activating the plugin or using it. We should either add the missign file, or remove references to it if not being used.
The following is the common warning/error appearing in all pages:-
include_once(C:\wamp\apps\wordpress\htdocs\wp-content\plugins\postworld/submodules/Aqua-Resizer/aq_resizer.php): failed to open stream: No such file or directory on line 6 in file C:\wamp\apps\wordpress\htdocs\wp-content\plugins\postworld\php\postworld_images.php
Warning include_once(): Failed opening 'C:\wamp\apps\wordpress\htdocs\wp-content\plugins\postworld/submodules/Aqua-Resizer/aq_resizer.php' for inclusion (include_path='.;C:/wamp/php/PEAR') on line 6 in file C:\wamp\apps\wordpress\htdocs\wp-content\plugins\postworld\php\postworld_images.php
Hi Michel,
I found a bug in the live-feed directive. Perhaps you already know about this.
When you change the post view template, and then do infinite scrolling, when it loads the new posts with the previous / original post view template, not the new one that it's set to.
Are you able to re-create that?
Hi Haidy
When I run pw_register_feed()
, then it's only returning the first 10 results, even if 'post_count' is set to 200. I have to add a 'posts_per_page' value in order to make it return more than 10.
Let's make post_count an alias for posts_per_page.
Hi Haidy,
There is a small adjustment to the favorites method which will allow for more flexibility in the future. Here are the adjustments :
PHONG :
The documentation has been updated to reflect this changes :
https://www.evernote.com/shard/s275/sh/7fd5bb62-0902-4050-9889-338f847d044c/5fe6f3da3510557663e8693251ac8557
**HAIDY : **
These updates can be made to the set_favorite() method.
That is all for now. The rest of the favorites methods will still operate in the same way. This new favorites DB table will allow us to see how many people have favorited each post, and also it will allow us to query on favorites in the future.
Hi Haidy,
Here is a function which will be really helpful while creating the get_post_data() function which I am working on right now. This might also work well as a meta-function for any other functions which access this data.
Do you think that would affect performance?
Here is the function, it is also listed in the documentation.
https://www.evernote.com/shard/s275/sh/7fd5bb62-0902-4050-9889-338f847d044c/5fe6f3da3510557663e8693251ac8557
pw_get_post_meta( $post_id )
• Get an Associative Array of all columns in the wp_postworld_post_meta table
• Keys are column names, values are values
return : Array
'post_id' => {{integer}}
'author_id' => {{integer}}
'post_class' => {{string}}
'post_format' => {{string}}
'link_url' => {{string}}
'post_points' => {{integer}}
'rank_score' => {{integer}}
Hi Haidy,
I modified the postworld_install_data() function so that it pre-populates the wp_postworld_user_roles table with the basic necessary to start working on the get_user_vote_points () function.
If you de-activate and then re-activate the Postworld plugin in the Wordpress plugins manager, you should see this data in place.
Administrator 10
Editor 5
Author 2
Contributor 1
Default 1
Hi Haidy,
In the main postworld.php file, there is a global object $pw_table_names which defines the names of the databases, depending on what the user has set their default wordpress db prefix (default is 'wp_') as well as the default Postworld prefix (default is 'postworld_')
Since the user may have customized their wp_ prefix, or we may choose to change the Postworld prefix to pw_ in the future, we should reference this object in all the functions where the table names are required.
This would involve making $pw_table_names GLOBAL in all functions which use the database, and then referencing the tables by $pw_table_names['post_meta']. Do you think this is this the best way to do it, or is there a better method?
I ran into some issue today that triggered a question related to which AngularJS version should we use.
The issue is a minor one, about how to make AngularJS initiate Ajax Requests with Post Data as in a form. this makes it easier for the server side to parse and work with request's arguments [post data].
While it is not possible out of the box in version 1.0.8 of Angular, which is the release that we are using; There are 2 solutions. 1 - is to make some workaround on the server side. 2 - is to work with a later version of Angular.
I found the following 2 articles:-
http://blog.angularjs.org/2013/08/angularjs-120-rc1-spooky-giraffe.html
http://blog.angularjs.org/2012/07/angularjs-10-12-roadmap.html
And i was wondering, if we should go with 1.2 RC2 - as it could be released by the time this module is public. We're currently not going to see any major updates to the 1.0.x, and at the same time, 1.1.x is only a development branch that keeps getting updated and is not safe to use
Hi Haidy,
With your good idea to use foreign keys for the database, I have also described a way to implement these on functions and table names. I should have thought of this earlier, although it was very good that you pointed this out.
Also with the addition of some functions (which we will add later) for managing comment_points, as well as post_points, we will have to build in this differentiation at the global level.
For updated info, including data for the naming schema and new tables, see this documentation :
https://www.evernote.com/shard/s275/sh/7fd5bb62-0902-4050-9889-338f847d044c/5fe6f3da3510557663e8693251ac8557
POINTS SCHEMA CHANGE
TABLE CHANGES
• 'wp_postworld_points' >> rename to >> 'wp_postworld_post_points'
• 'wp_postworld_meta' >> rename to >> 'wp_postworld_post_meta'
• create 'wp_postworld_comment_points' table
• create 'wp_postworld_comment_meta' table
COLUMN CHANGES
• in table 'wp_postworld_post_points' : column 'points' >> rename to >> 'post_points'
• in table 'wp_postworld_post_meta' : column 'points' >> rename to >> 'post_points'
• in table 'wp_postworld_user_meta' : ++ add 'post_points' column and 'comment_points' column
*FUNCTION NAME CHANGES *
• 'get_points()' >>>> >> rename to >> 'get_post_points()'
• 'calculate_points ()' >> rename to >> 'calculate_post_points ()'
• 'cache_points ()' >> rename to >> 'cache_post_points ()'
• 'set_points()' >> rename to >> 'set_post_points()'
• 'has_voted()' >> rename to >> 'has_voted_on_post()'
• 'get_user_points()' >> rename to >> 'get_user_points_voted_to_posts()'
• 'get_user_votes()' >> rename to >> 'get_user_votes_on_posts()'
Hi Haidy,
I updated the documentation for Share methods - which are now ready for production. You can go ahead and create these when you're ready.
You can see the functions here :
https://github.com/phongmedia/postworld/tree/master/php#sharing
Also the coorosponding data structure here :
https://github.com/phongmedia/postworld/blob/master/dev/DATABASE-STRUCTURE.md#share_points--integer
Let me know if you have any questions.
Hi Michel & Haidy,
To note, I have moved the documents from Evernote into GitHub and translated them into GitHub Flavored Markdown. There are some advantages and disadvantages to this :
Let me know if you have any questions.
Phong
Hi Michel,
You will notice in the JS documentation under load-panel, there is a new section :
Usage : With Parameters
https://github.com/phongmedia/postworld/tree/master/js#usage--with-parameters
Let me know if this needs any clarifications. This will help for developing advanced functionality into loading panels.
Hi Michel,
I have added a controller called post-link to the documentation.
https://github.com/phongmedia/postworld/tree/master/js#post-link--controller-
Here is an illustration of end user functionality:
Is this best suited as a controller or something else? Let me know what you think.
Hi Haidy,
I was working with implementing pw_update_post()
and I noticed that we should make it just like the wp_update_post()
method and return the post ID - not the post Array / Object.
Note to self -
Create default object for var feed_init = {}, and merge with feed_init['feed_id'] object which overrides settings, before setting it into feed_data Object, otherwise undefined settings will cause the controllers to malfunction.
Hi Haidy,
I was looking through the DB structure, and I noticed we haven't implemented the new methods for storing favorites , view_later posts and viewed posts.
If you look in the updated User Meta table, and configuration in postworld_install.php you'll see we're still running on an old system.
Here is the new structure:
https://github.com/phongmedia/postworld/blob/master/dev/DATABASE-STRUCTURE.md#post_relationships--json
You can update all the install script, and corresponding methods : set_favorite(), add_favorite(), set_viewed(), etc.
These should all be using the get_post_relationship() and set_post_relationship() methods.
get_post_relationship()
https://github.com/phongmedia/postworld/tree/master/php#get_post_relationship-relationship-post_id-user_id-
set_post_relationship()
https://github.com/phongmedia/postworld/tree/master/php#set_post_relationship-relationship-post_id-user_id-switch-
Let me know if you have any questions about this.
wp_ajax functions are distinguished in wordpress as functions for logged in users and functions for anonymous users.
/* Action Hook for pw_live_feed() - Logged in users */
add_action("wp_ajax_pw_live_feed", "ajl_pw_live_feed");
/* Action Hook for pw_live_feed() - Anonymous users */
add_action("wp_ajax_nopriv_pw_live_feed", "ajn_pw_live_feed");
I assume that all ajax functions that we have documented so far can be accessed by any website visitor, is that assumption correct?
It is easy to change or update that in the future without much effort, but i wanted to confirm for the current design if that is the case.
Previously I had done a duplicate function name (by accident) and you intelligently renamed the second function to get_user_votes_by_post(). What I'd like to do is rename the functions/classes to fit an updated naming scheme. Here is the updated names.
get_user_votes() >> RENAME TO >> get_user_votes_report()
get_user_votes_by_post() >> RENAME TO >> get_user_votes()
Hi Haidy,
I added documentation for a wrapper function for pw_get_templates()
, which gets just the single string path for a single post template.
You can view the documentation here:
https://github.com/phongmedia/postworld/tree/master/php#pw_get_post_template--post_id-post_view-
That is ready for creation.
Hi Michel,
This is low priority -
I'm trying to use o_embed() JS function - I'm wondering how it can be used at the basic level. I tried this, although it's not working how I thought.
JAVASCRIPT
var embed = o_embed("http://www.youtube.com/watch?v=38peWm76l-U");
document.write(embed);
Hi Haidy,
When doing queries, if certain parameter values aren't defined, we get errors :
Defaults:
'orderby' => 'date',
'offset' => 0,
'post_format' => null, // return any post format
'post_class' => null // return any post class
Hi Haidy,
I noticed this line in postworld.php, which causes my development environment to crash :
//TO get user id from wordpress
require_once('/wp-config.php');
require_once('/wp-includes/wp-db.php');
require_once('/wp-includes/pluggable.php');
The best practice to use in this case is to create a page template 'sandbox' and attribute it to an empty page, where you can experiment within the Wordpress environment.
http://codex.wordpress.org/Page_Templates
You could copy another existing page template and just modify it with a new name, and then attribute it to an empty page.
Now anything you do is in the WP environment. You can also add header and footer php tags to wrap it in your theme.
Did that work for you?
Hi Michel,
I added a small directive to be created, called load-post. This will be used to load single posts via AJAX.
You can see the documentation here:
https://github.com/phongmedia/postworld/tree/master/js#load-post--directive-
There is one dependency which I just filed to be created by Haidy, which is a pw_post_template()
PHP method which you'll be able to access by AJAX.
Phong,
while reviewing my tasks, i think i am a bit confused about load-panel directive.
The term panel to me was linked to the search widgets that contain different text fields, selects, checkboxes, etc.. to be used with filtering the feed.
And this is how i implemented the panel directive, to be a child of the live-feed directive. and i am sure this is something that is needed anyway.
Now re-reading the description, i think you might be referring to another functionality, and i am a bit confused on what it really does. Need your help here.
Hi Haidy,
The PHP method cache_shares ( )
is now ready for your production.
https://github.com/phongmedia/postworld/tree/master/php#cache_shares--cache_all-
Let me know if you have any questions or if anything is unclear.
Thanks,
Phong
Hi Michel,
Here is some details on an initial implementation of the 'live-feed' Angular directive, in the context of a real-time queryable search interface.
This is how the live-feed directive is activated.
feed_init['search_results'] = {
preload : 10,
load_increment : 10,
view : {
current : 'detail',
options : ['list','detail','grid']
},
order_by : 'rank_score',
panel : 'search_results',
feed_query : 'url'
};
<div live-feed="search_results"></div>
You will notice that the query_args field is a string 'url' instead of an object of actual query args. This will indicate that the query args are coming from the URL. Details can be seen in the latest documentation (see link below).
ie. realitysandwich.com/search/#/post-type=link&tax-topic=psyche&s=philosophy&orderby=rank_score
Taxonomy Query
The 'tax-topic' query var can be used to generate a tax_query field object for pw_query to match value to 'slug' within the custom taxonomy 'tax-{{taxonomy_name}}'. So this would also apply tax-category to the 'category' taxonomy, and tax-section to 'section' taxonomy, etc. Let me know if you have any questions about this, or Haidy should also know. See this for more info : http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters
Basically :
array(
'taxonomy' => 'topic',
'field' => 'slug',
'terms' => 'psyche'
)
Work Plan
We can begin by implementing a prototype of the below 'design concept', which feeds query args into pw_query and returns the results real-time. When the feed is loading it can just have a simple 'loading' template which we can customize.
If you have any questions, don't hesitate to ask me. So far I've been impressed by the self-sustainability of the Innuva team, although if anything critical is unclear in the documentation, just let me know.
Thanks!
I suggest making a Wordpress page template called 'Search Results' and set it on a new page called 'Search' with the permalink /search, and then invoking 'live-feed' in there.
ngInfiniteScroll
http://binarymuse.github.io/ngInfiniteScroll/
POSTWORLD // Angular / JS Functions
https://github.com/phongmedia/postworld/tree/master/js
Hi Haidy,
There is a custom query function called pw_query() which is in the documentation. This function is required for most of the feed functions to operate, so it is important to work on it soon.
Do you have any questions about how the function operates? If so, please ask me.
You can find here it under pw_query()
https://www.evernote.com/shard/s275/sh/7fd5bb62-0902-4050-9889-338f847d044c/5fe6f3da3510557663e8693251ac8557
We should prioritize this function over all other work this week until it's finished, so that the rest of the production can make use the function.
Thanks.
Hi Michel,
I'm trying to implement load-feed directive, and everything seems to be working quite well with the PHP so far in registering the feed, and the Angular is initializing the app correctly with all the JS files included, and following your examples of implimentation, although at initialization it gives this JS error.
pwData() Registering feed_settings
[front_page_features: Object]
angular.js:7861
pwData.pw_get_templates null angular.js:7861
pwData.wp_ajax pw_get_templates args: Object {templates_object: null} angular.js:7861
pwApp RUN getTemplates= undefined app.js?ver=3.6.1:66
TypeError: Cannot read property 'posts' of undefined
at getTemplate (http://localhost:8888/wp-content/plugins/postworld/js/services/pwData.js?ver=3.6.1:38:40)
at Object.pw_get_template (http://localhost:8888/wp-content/plugins/postworld/js/services/pwData.js?ver=3.6.1:164:19)
at http://localhost:8888/wp-content/plugins/postworld/js/components/liveFeed.js?ver=3.6.1:63:43
at r (http://localhost:8888/wp-content/plugins/postworld/lib/angular/angular.min.js?ver=3.6.1:96:280)
at http://localhost:8888/wp-content/plugins/postworld/lib/angular/angular.min.js?ver=3.6.1:97:417
at h.$eval (http://localhost:8888/wp-content/plugins/postworld/lib/angular/angular.min.js?ver=3.6.1:105:313)
at h.$digest (http://localhost:8888/wp-content/plugins/postworld/lib/angular/angular.min.js?ver=3.6.1:103:190)
at h.$apply (http://localhost:8888/wp-content/plugins/postworld/lib/angular/angular.min.js?ver=3.6.1:106:100)
at k (http://localhost:8888/wp-content/plugins/postworld/lib/angular/angular.min.js?ver=3.6.1:63:281)
at x (http://localhost:8888/wp-content/plugins/postworld/lib/angular/angular.min.js?ver=3.6.1:67:171)
Is there something that I'm not doing here to make it work?
This is the implementation here:
PHP : (working fine)
$args = array (
'feed_id' => 'front_page_features',
'write_cache' => false,
'feed_query' => array(
'post_count' => 200,
'fields' => 'all',
'post_type' => 'post',
'orderby' => 'date',
'offset' => 3,
'post_format' => null,
'post_class' => null,
'posts_per_page' => 200
)
);
pw_register_feed ($args);
Javascript: (throwing an error)
feed_settings['front_page_features'] = {
preload : 10,
load_increment : 5,
offset: 0,
max_posts:200,
view : {
current : 'detail',
options : ['list','detail']
},
};
HTML:
<div load-feed="front_page_features" ></div>
Let me know what might be wrong here, as it's currently holding back implementation.
Hi Haidy,
I added a line in the documentation for:
set_post_relationship()
https://github.com/phongmedia/postworld/tree/master/php#set_post_relationship-relationship-post_id-user_id-switch-
Under Favorites :
$relationship == favorite
: Add / remove a row to Favorites tableSo here we will be able to make use of the Favorites table. There is no usage of the favorites table yet, it is un-used, although this will allow us to collect data which will allow recommendations based on favorites.
Up to this point we had a Favorites table which was previously un-used:
https://github.com/phongmedia/postworld/blob/master/dev/DATABASE-STRUCTURE.md#favorites
Are we planning to support IE 8 and Earlier?
This article shows some restrictions in the way we write AngularJS code.
http://docs.angularjs.org/guide/ie
If yes[likely], I will develop and test the front end part keeping the above in mind.
Thanks,
Michel.
Hi Haidy,
I have updated the documentation for the pw_get_templates() function. The function is ready to be created.
Hi Haidy,
I was just working with pw_get_templates(), and it doesn't seem to be scanning the over-ride paths for files, always returning only what is in the plugins path.
I had success by changing the paths in postworld_options.php from double backslash to forward slash and that made it work.
OLD
'default_posts_template_abs_path' => ABSPATH . "wp-content/plugins/postworld/templates/posts/" ,
'override_posts_template_abs_path' => get_template_directory()."\\postworld\\templates\\posts\\",
'default_panel_template_abs_path' => ABSPATH . "wp-content/plugins/postworld/templates/panels/" ,
'override_panel_template_abs_path' => get_template_directory()."\\postworld\\templates\\panels\\",
NEW
'default_posts_template_abs_path' => ABSPATH . "wp-content/plugins/postworld/templates/posts/" ,
'override_posts_template_abs_path' => get_template_directory()."/postworld/templates/posts/",
'default_panel_template_abs_path' => ABSPATH . "wp-content/plugins/postworld/templates/panels/" ,
'override_panel_template_abs_path' => get_template_directory()."/postworld/templates/panels/",
Are there any foreseeable issues that may be caused by this change?
Hi Michel,
I have added a directive called load-comments which basically does what the name says. It loads comments. Here is the documentation for that.
load-comments [ directive ]
https://github.com/phongmedia/postworld/tree/master/js#load-comments--directive-
Two things I have done to get the process going:
pw_get_comments()
: https://github.com/phongmedia/postworld/tree/master/php#pw_get_comments--query-fields-tree-templates/comments/comments-header.html
templates/comments/comment-single.html
Mind you, whatever is in the templates is very rough right now, and it is structurally incomplete, although it's a starting point which you can work from - please feel free to re-arrange the templates in any way you see fit.
The comments are meant to work in the same way as the comments on Reddit.
Let me know if you have any questions, and we can talk on Skype this week if you like to clarify any issues.
Recently added was a 'region' field in the database, so we can add this to be returned, from 'location_region' column, same pattern as other fields.
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.