Mediabistro Blogs Configuration: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (9 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
* Live blog admin: http://www.mediabistro.com/wp-admin/ l/p admin/devx2 | * Live blog admin: http://www.mediabistro.com/wp-admin/ l/p admin/devx2 | ||
==sandbox settings | ==sandbox settings== | ||
* http://dbarchowsky.blogs.mediabistro.com/ | * http://dbarchowsky.blogs.mediabistro.com/ | ||
* http://dbarchowsky.blogs.mediabistro.com/alltwitter (etc.) | * http://dbarchowsky.blogs.mediabistro.com/alltwitter (etc.) | ||
* admin | * '''admin''' > http://dbarchowsky.blogs.mediabistro.com/wp-admin/<br />l/p: regular dev credentials | ||
==network settings== | ==network settings== | ||
* access to shared | * access to settings shared across blogs & sandboxes | ||
* log in to sandbox > upper right link: "Network Admin" | * log in to sandbox dashboard > upper right link: "Network Admin" | ||
==mobile== | ==mobile== | ||
===configuration=== | |||
* plugin: WordPress Mobile Edition | * plugin: WordPress Mobile Edition | ||
* accessed through network admin > plugins | * accessed through network admin > plugins | ||
* theme: "carrington-mobile-X.X.X", where "X.X.X" is the version of the plugin | |||
===files and structure=== | |||
* base directory: <code>/wp-content/themes/carrington-mobile-[x.x.x]/</code><br />Where <code>x.x.x</code> is the version number of the carrington mobile theme | |||
* <code>index.php</code> landing page, which in turn includes <code>loop/loop-default.php</code>. | |||
* <code>loop/loop-default.asp</code> | |||
:* Page display logic employed on landing page. | |||
:* Add custom content here by calling a custom routine, as defined in <code>plugins/mbFunctions.php</code> | |||
:* Custom function naming convention: <code>[USER_PREFIX]_[CONTENT_DIRECTORY]</code> | |||
* <code>plugins/mbFunctions.php</code> | |||
:* Custom functions are defined here. These functions in turn pull include template files to display content. | |||
<syntaxhighlight lang="php"> | |||
/** | |||
* featured post content include | |||
*/ | |||
function mbcfct_featured_post() { | |||
$file = cfct_choose_general_template('featured_post'); | |||
cfct_template_file('featured_post', $file); | |||
} | |||
</syntaxhighlight> | |||
:* In the sample above, the argument to <code>cfct_choose_general_template()</code> is the name of the directory containing the content template file. | |||
:* The first argument to <code>cfct_template_file()</code> is the base name of the content template file. The file will be named <code>"[BASE_NAME]-default.php"</code>. | |||
[[File:mobile-wordpress-theme.png|border]] | |||
==sidebar content== | |||
* <code>/wp-content/themes/[THEME]/sidebar.php</code><br/>e.g. for the "base" theme: <code>/wp-content/themes/base/sidebar.php</code> | |||
* The sidebar modules are set in the blog's config file. | |||
:* <code>/wp-content/themes/[THEME]/inc/config/[BLOG-SLUG]-config.php</code><br />e.g. for the "AllTwitter" blog: <code>/wp-content/themes/base/inc/config/alltwitter-config.php</code> | |||
:<syntaxhighlight lang="php"> | |||
$MB->sidebarModules = array(); /* << array contains list of module content include paths */ | |||
</syntaxhighlight> | |||
:* e.g. The featured jobs module: <code>$moduleDir.'jobs.php'</code> | |||
:* sidebar module content includes are located in <code>/wp-content/themes/[THEME]/modules/</code> | |||
[[Category:Mediabistro]] | [[Category:Mediabistro]] | ||
Latest revision as of 21:32, 28 February 2013
- Live blog admin: http://www.mediabistro.com/wp-admin/ l/p admin/devx2
sandbox settings[edit]
- http://dbarchowsky.blogs.mediabistro.com/
- http://dbarchowsky.blogs.mediabistro.com/alltwitter (etc.)
- admin > http://dbarchowsky.blogs.mediabistro.com/wp-admin/
l/p: regular dev credentials
network settings[edit]
- access to settings shared across blogs & sandboxes
- log in to sandbox dashboard > upper right link: "Network Admin"
mobile[edit]
configuration[edit]
- plugin: WordPress Mobile Edition
- accessed through network admin > plugins
- theme: "carrington-mobile-X.X.X", where "X.X.X" is the version of the plugin
files and structure[edit]
- base directory:
/wp-content/themes/carrington-mobile-[x.x.x]/
Wherex.x.xis the version number of the carrington mobile theme index.phplanding page, which in turn includesloop/loop-default.php.loop/loop-default.asp
- Page display logic employed on landing page.
- Add custom content here by calling a custom routine, as defined in
plugins/mbFunctions.php - Custom function naming convention:
[USER_PREFIX]_[CONTENT_DIRECTORY]
plugins/mbFunctions.php
- Custom functions are defined here. These functions in turn pull include template files to display content.
/**
* featured post content include
*/
function mbcfct_featured_post() {
$file = cfct_choose_general_template('featured_post');
cfct_template_file('featured_post', $file);
}
- In the sample above, the argument to
cfct_choose_general_template()is the name of the directory containing the content template file. - The first argument to
cfct_template_file()is the base name of the content template file. The file will be named"[BASE_NAME]-default.php".
- In the sample above, the argument to
sidebar content[edit]
/wp-content/themes/[THEME]/sidebar.php
e.g. for the "base" theme:/wp-content/themes/base/sidebar.php- The sidebar modules are set in the blog's config file.
/wp-content/themes/[THEME]/inc/config/[BLOG-SLUG]-config.php
e.g. for the "AllTwitter" blog:/wp-content/themes/base/inc/config/alltwitter-config.php
$MB->sidebarModules = array(); /* << array contains list of module content include paths */
- e.g. The featured jobs module:
$moduleDir.'jobs.php' - sidebar module content includes are located in
/wp-content/themes/[THEME]/modules/
- e.g. The featured jobs module:
