Below is a great example on creating custom post types and also not using the edit_posts capability.
Blog: http://www.jsterup.com/dev/wordpress/custom-post_type-without-edit_post-capability
A Log of Coding Solutions
by Webhead
Below is a great example on creating custom post types and also not using the edit_posts capability.
Blog: http://www.jsterup.com/dev/wordpress/custom-post_type-without-edit_post-capability
by Webhead
This post is here to remind me how to create a Web application using the Yii framework. It will be updated from time to time. This is assuming the yii framework is inside WebRoot
Here is how to create a new webapp named “sampleApp”.
Open your command prompt or Terminal
cd WebRoot
php YiiRoot/framework/yiic.php webapp sampleApp
configure the config files located at:
sampleApp/protected/config/main.php
sampleApp/protected/config/test.php
Now edit test.php and override your test database connection by entering info into the ‘db’ array item.
by Webhead
On shared hosts, overriding the php.ini file can be frustrating. Sometimes it works, sometimes it doesn’t. It’s up to the host provider. This post will keep a record of what hosts need what type of requirements and will be updated from time to time. This overriding php.ini file can be a partial override like so:
[PHP]
; Maximum size of POST data that PHP will accept.
post_max_size = 20M
; Maximum allowed size for uploaded files.
upload_max_filesize = 20M
The php.ini file needs to be named php5.ini if you are using PHP version 5.x. Sometimes you’ll need to restart the web process in the control panel. It is located under the “System Processes” icon. Once in System Processes click on “End Web”.
by Webhead
Just wanted to post this because of a great pagination solution I found for WordPress blog posts. It is beautiful and robust. It should be in wordpress itself.
http://www.ericmmartin.com/pagination-function-for-wordpress/
keywords: next_posts_link wordpress pagination
by Webhead
In WordPress, the default theme, twenty_eleven, has a function called twentyeleven_continue_reading_link. This method is supposed to return the permalink for the current excerpt. However if you use setup_postdata() and call the_excerpt() the permalink will return the current page’s permalink, not the excerpt’s permalink.
The reason it returns the current page’s permalink is because get_permalink() gets the permalink for $post which is the current page. To resolve this, I looked in setup_postdata to see what it is doing. setup_postdata is setting a global $id variable each time you call it. This means that same $id variable is the excerpts id. Which means in the twentyeleven_continue_reading_link method, instead of calling get_permalink(), you can declare the global $id variable and call get_permalink($id). See the updated method below.
function twentyeleven_continue_reading_link() {
global $id;
return ' ' . __( 'Continue reading →', 'twentyeleven' ) . '';
}
by Webhead
Lemonstand is an eCommerce solution that lets you try before you buy. It is very simple to use and virtually no learning curve to develop for. It uses PHP and mySQL. Check it out for yourself here.
Below are just a bunch of notes I jotted down while using and developing for Lemonstand.
Docs are located here: http://lemonstandapp.com/docs/api_function_and_class_reference/
http://lemonstandapp.com/docs/developer_s_guide/
System/Settings/HTML Editor Settings
http://forum.lemonstandapp.com/topic/2392-global-editable-region-how-to/page__p__11010__hl__%2Bpartial+%2Bcontent_block__fromsearch__1#entry11010