Пример #1
0
<h2>save_option</h2>
<p>save_option — saves option in the database</p>
<h3>Summary</h3>
<pre class="prettyprint"><code class="language-php">save_option($data);
</code></pre>
 
<h3>Usage</h3>
<pre class="prettyprint"><code class="language-php">
$option = array();
$option['option_value'] = 'my value';
$option['option_key'] = 'my_option';
$option['option_group'] = 'my_option_group';
save_option($option)
</code></pre>

<h4>See also</h4>
<?php 
print page_content('functions/_nav/options');
Пример #2
0
?>
        </div>
        <div class="page-container" style="background-color: white;">
          <div class="mw-ui-row">
            <div class="mw-ui-col sidebar-col" style="width: 280px;">
              <div class="sidebar">
                <div class="sidebar-content"><?php 
print page_nav();
?>
</div>
              </div>
            </div>
            <div class="mw-ui-col">
              <div class="container">
                <div class="content"><?php 
print page_content();
?>
</div>
              </div>
            </div>
          </div>
        </div>
        <div class="not-ready">The documentation is under development. <a style="" href="https://github.com/microweber/microweber-docs/edit/master/<?php 
print url_path();
?>
">Help us by editing this page</a>.</div>
        <script src="<?php 
print site_url();
?>
assets/jquery.min.js"></script> 
        <script src="<?php 
Пример #3
0
</a></p>
		</fieldset>
	</form>
<?php 
}
?>
</div>
<!-- END frontend login -->
	<div id="frontedit">[[editthispage]]</div>
</div>    <!-- END left column -->   

	<!-- Content -->
	
	<div id="cont">
	<?php 
page_content(1);
?>
	
	</div>
	<br style="clear: both;" />
	<div id="foot">
	<?php 
show_menu2(2, SM2_ROOT, SM2_ALL, SM2_TRIM | SM2_PRETTY | SM2_XHTML_STRICT);
?>
	</div>

<!-- Block Bottom -->
	<div id="basic">
	<div id="links"><?php 
page_footer();
?>
Пример #4
0
<h2>next_content</h2>
<p>next_content — Gets next content item</p>
<h3>Summary</h3>
<pre><code>next_content()
</code></pre>
<h3>Description</h3>
<p>This function will get the next page or post. If the post is in a category it will return the next post from the same category.</p>
<h3>Return Values</h3>
<p> <code>Array</code> with the next content or <code>false</code> if the content is not found</p>
<h3>Usage</h3>
<h4>Get next content of the current page or post </h4>
<pre class="prettyprint"><code class="language-php">
$next =  next_content();  
if($next != false){
print $next['title'];
print content_link($next['id']);
}
 </code></pre>
<h4>Get next content of another post </h4>
<pre class="prettyprint"><code class="language-php">
$next =  next_content($content_id=5);  
if($next != false){
print $next['title'];
print content_link($next['id']);
}
 </code></pre>
<h4>See also</h4>
<?php 
print page_content('functions/_nav/content');
Пример #5
0
<h2>get_order_by_id</h2>
<p class="description">get_order_by_id — get single order placed in the online shop</p>
<h3>Summary</h3>
<pre class="prettyprint"><code class="language-php">get_order_by_id($id);
</code></pre>
<h3>Usage</h3>
<pre class="prettyprint"><code class="language-php">//get an order  
$order_id = 3;
$order = get_order_by_id($order_id);
 
if($order != false){
	print $order['id'];  
	print $order['amount'];
	print $order['total_items'];
	print $order['email'];
	print $order['created_at']; 
	// and more... print_r($order);
}
</code></pre>
<h3>Field names</h3>
<?php 
print page_content('params/cart_orders');
?>
<h4>See also</h4>
<?php 
print page_content('functions/_nav/shop');
Пример #6
0
<div class="full-width-white">
    <div class="mod mod-sliderhuge">
        <?php 
include $_SERVER['DOCUMENT_ROOT'] . '/templates/massaging/modules-terrific/sliderhuge/sliderhuge.php';
?>
    </div>
</div>

<div class="full-width-white">
    <div class="container">
        <div class="row content">
            <div class="col-md-12">
                <div class="mod mod-textcontent">
                    <?php 
echo page_content(2);
?>
                </div>
            </div>
        </div>
        <div class="row teasers">
            <div class="col-md-12">
                <h2>Unsere Services</h2>
            </div>
            <div class="col-md-4">
                <div class="mod mod-teaser">
                    <?php 
include $_SERVER['DOCUMENT_ROOT'] . '/templates/massaging/modules-terrific/teaser/teaser.php';
?>
                </div>
            </div>
            <div class="col-md-4">
Пример #7
0
	<meta name="description" content="<?php 
page_description();
?>
" />
	<meta name="keywords" content="<?php 
page_keywords();
?>
" />
	<?php 
get_page_headers();
?>
	<link rel="stylesheet" type="text/css" href="<?php 
echo TEMPLATE_DIR;
?>
/template.css" media="screen,projection" />
	<title><?php 
page_title('', '[WEBSITE_TITLE]');
?>
</title>
</head>
<body>
<?php 
/**
 *	TEMPLATE CODE STARTS BELOW
 *	output only the page content, nothing else
 */
page_content();
?>
  
</body>
</html>
Пример #8
0
<div class="container">
    <div class="slider-holder">
        <?php 
echo page_content(1);
?>
    </div>
</div>
Пример #9
0
<?php

defined('IN_CMS') or die('No direct access allowed.');
$title = page_title();
$content = page_content();
$url = page_url();
$time = false;
$page = true;
include 'includes/template.php';
Пример #10
0
function page_nav($path = false)
{
    if ($path == false) {
        $locate_file_content = url_path();
        if ($locate_file_content == '') {
            $locate_file_content = 'README';
        }
    } else {
        $locate_file_content = $path;
    }
    $basename = basename($locate_file_content);
    $locate_file_content = str_replace('..', '', $locate_file_content);
    $folder = __DIR__ . DIRECTORY_SEPARATOR . $locate_file_content;
    if (is_file($folder)) {
        $ext = get_file_extension($folder);
        $folder = dirname($folder) . DIRECTORY_SEPARATOR;
    }
    $cont = false;
    $folder = normalize_path($folder, true);
    if (!is_dir($folder)) {
        $folder = dirname($folder) . DIRECTORY_SEPARATOR;
    }
    if (is_dir($folder)) {
        $nav = $folder . '_Sidebar.md';
        if (is_file($nav)) {
            $cont = page_content($nav);
        }
        $nav = $folder . '_nav.md';
        if (is_file($nav)) {
            $cont = page_content($nav);
        }
        $nav = $folder . '_nav.php';
        if (is_file($nav)) {
            $cont = page_content($nav);
        }
    }
    //    if ($cont == false) {
    //        $folder = dirname($folder) . DIRECTORY_SEPARATOR;
    //        print $folder;
    //        $nav = $folder . '_Sidebar.md';
    //        if (is_file($nav)) {
    //            $cont = page_content($nav);
    //        }
    //    }
    if ($cont != false) {
        $s = '<a href="' . $basename;
        $r = '<a class="active" href="' . $basename;
        $cont = str_replace($s, $r, $cont);
        return $cont;
    }
}
Пример #11
0
$fulltop = ob_get_contents();
ob_end_clean();
ob_start();
page_content(3);
$left = ob_get_contents();
ob_end_clean();
ob_start();
page_content(4);
$right = ob_get_contents();
ob_end_clean();
ob_start();
page_content(5);
$fullbottom = ob_get_contents();
ob_end_clean();
ob_start();
page_content(6);
$hero = ob_get_contents();
ob_end_clean();
$contentheadline = "";
if ($hero) {
    ?>
<div class="hero">
<?php 
} else {
    $contentheadline = "<h1>" . PAGE_TITLE . "</h1>";
}
?>
	<div class="navbg">
	<div class="center">
		<div class="row">
			<div class="fg12 nav">
Пример #12
0
<?php

if (!defined('ONE')) {
    header("Location: index");
}
?>


<h2>Microweber functions</h2>
<p>Microweber comes with a lot of functions to help you get and save things in your website. In most cases those functions are simple wrappers to the more complex OOP core. </p>
<p>You can use them while you develop your site. The functions are defined into the system on load and they are globally available in the core, the site templates and modules. </p>
<h3>Writing custom functions</h3> 
<p>There the few ways to write custom functions.</p>
<ol>
  <li>To add functions with a module, create <code>functions.php</code> file inside your module folder</li>
  <li>To add function when certain site template is active, create <code>functions.php</code> file inside the site template folder</li>
  <li>To make custom functions available only on your application create a file at <code>/src/Microweber/functions/my_functions.php</code></li>
</ol>
<p>&nbsp;</p>




<h3>Explore the  functions bellow</h3>
<p>You can call them inside your templates and modules.</p>

<?php 
print page_content('functions/_nav/index');
Пример #13
0
    <tr>
      <td><code class="language-php">link</code></td>
      <td>Customize the <code>&lt;a&gt;</code> element</td>
    </tr>
  </tbody>
</table>
<h3>Usage</h3>
<h4>Print the header menu</h4>
<pre class="prettyprint"><code class="language-php runner">$menu = menu_tree('menu_id=1');
print $menu;
</code></pre>
<h4>Print menu with custom CSS classes</h4>
<pre class="prettyprint"><code class="language-php runner">$params = array();
$params['menu_id'] = 1;
$params['ul_class'] = 'nav-holder';
$params['li_class'] = 'nav-item';
$menu = menu_tree($params);
print $menu;
</code></pre>
<h4>Print menu with custom tags</h4>
<pre class="prettyprint"><code class="language-php runner">$params = array();
$params['menu_id'] = 1;
$params['ul_tag'] = 'div';
$params['li_tag'] = 'span';
$menu = menu_tree($params);
print $menu;
</code></pre>
<h4>See also</h4>
<?php 
print page_content('functions/_nav/menus');
Пример #14
0
<div class="container">
    <?php 
echo page_content(3);
?>
</div>
Пример #15
0
      <td>id</td>
      <td>the id of the user</td>
      <td>If you want to update user, set this to existing user id</td>
    </tr>
    <tr>
      <td>username</td>
      <td>the username for login</td>
      <td></td>
    </tr>
    <tr>
      <td>email</td>
      <td>the email for login</td>
      <td></td>
    </tr>
    <tr>
      <td>password</td>
      <td>the password for login</td>
      <td></td>
    </tr>
   <tr>
      <td>is_active</td>
      <td>flag if users can login</td>
      <td>&quot;y&quot; or &quot;n&quot;</td>
    </tr>
   
  </tbody>
</table>
<h4>See also</h4>
<?php 
print page_content('functions/_nav/users');
Пример #16
0
<div class="full-width-white">
    <div class="container">
        <div class="row content">
            <div class="col-md-12">
                <div class="mod mod-textcontent">
                    <div class="container">
                        <?php 
$commentPage = strpos($_SERVER['PHP_SELF'], "comment.php");
if ($commentPage == true) {
    page_content();
} else {
    page_content(2);
}
?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
Пример #17
0
<h2>thumbnail</h2>
<p>thumbnail - Resizes an image and returns the url of the resized thumbnail</p>
<h3>Summary</h3>
<pre class="prettyprint"><code class="language-php">thumbnail($src, $width = 200, $height = 200);
</code></pre>
<h3>Usage</h3>
<p>Get the picture of a post</p>
<pre class="prettyprint"><code class="language-php runner"> 
$content_id = 1;
$picture_link = get_picture($content_id);

$thumbnail = thumbnail($picture_link,150,150);

print &quot;&lt;img src='&quot;.$thumbnail.&quot;' /&gt;&quot;;
 
</code></pre>
<h4>See also</h4>
<?php 
print page_content('functions/_nav/media');
Пример #18
0
<div class="container">
    <?php 
echo page_content(5);
?>
</div>
Пример #19
0
<?php

theme_include('header');
?>

			<div id="main">
				<section id="one">
					<header class="major">
						<h1><?php 
echo page_title();
?>
</h1>
					</header>
					<p><?php 
echo page_content();
?>
</p>
				</section>
			</div>

<?php 
theme_include('footer');
 function show_content($block = 1)
 {
     page_content($block);
 }
<h2>get_custom_field_by_id</h2>
<p class="description">get_custom_field_by_id — returns single custom field as array or false</p>
<h3>Summary</h3>
<pre class="prettyprint"><code class="language-php">get_custom_field_by_id($id);
</code></pre>
<h3>Usage</h3>
<pre class="prettyprint"><code class="language-php">
//get a category  
$custom_field = get_custom_field_by_id(2);
 </code></pre>
<h4>See also</h4>
<?php 
print page_content('functions/_nav/custom_fields');
Пример #22
0
<h2>url_path</h2>
<p>url_path — returns the relative URL path</p>
<h3>Summary</h3>
<pre class="prettyprint"><code class="language-php">url_path($skip_ajax = false);
</code></pre>
<h3>Return Values</h3>
<p> <code>String</code> with the url path relative to the site URL</p>
<h3>Usage</h3>
<pre class="prettyprint"><code class="language-php">// if you are on URL http://localhost/blog/post-title
 
$url_string = url_path();
print $url_string;

//prints "blog/post-title"
</code></pre>
<h4>See also</h4>
<?php 
print page_content('functions/_nav/url');
Пример #23
0
<h2>template_name</h2>
<p>template_name — returns the dirname of the curent template</p>
<h3>Summary</h3>
<pre class="prettyprint"><code class="language-php">template_name();
</code></pre>
<h3>Usage</h3>
<pre class="prettyprint"><code class="language-php">
//get the current template directory name
$template_name = template_name();
var_dump($template_name);

//prints my_template
</code></pre>
<h4>See also</h4>
<?php 
print page_content('functions/_nav/template');
?>
 
Пример #24
0
<h2>session_get</h2>
<p>session_get — get a session variable</p>
<h3>Summary</h3>
<pre class="prettyprint"><code class="language-php">session_get($key);
</code></pre>
<h3>Usage</h3>
<pre class="prettyprint"><code class="language-php">// get a session variable 
 
$session_var = session_get('my_var');
var_dump($session_var);

// prints your varuable or false
</code></pre>
<h4>See also</h4>
<?php 
print page_content('functions/_nav/session');
Пример #25
0
<h2>delete_category</h2>
<p class="description">delete_category — deletes a category</p>
<h3>Summary</h3>
<pre class="prettyprint"><code class="language-php">delete_category($category_id);
</code></pre>

<h3>Return Values</h3> 
 <p>
<code>Integer</code> with the deleted category id or <code>false</code> if the category is not deleted</p>




<h3>Usage</h3>
<pre class="prettyprint"><code class="language-php">
$category_id = 5;
 
$delete = delete_category($category_id);
</code></pre>
 
<h4>See also</h4>
<?php 
print page_content('functions/_nav/categories');
Пример #26
0
<div class="container">
    <?php 
echo page_content(4);
?>
</div>