function get_partial_content($name)
 {
     ob_start();
     render_partial($name);
     $partial_content = ob_get_contents();
     ob_end_clean();
     return $partial_content;
 }
示例#2
0
 function get_partial_content($name, $locals = array())
 {
     ob_start();
     render_partial($name, $locals);
     $partial_content = ob_get_contents();
     ob_end_clean();
     return $partial_content;
 }
示例#3
0
function render($template, $data, $layout = 'layout')
{
    global $title, $FLASH;
    $flash = $FLASH;
    $content = render_partial($template, $data);
    foreach ($data as $k => $v) {
        ${$k} = $v;
    }
    include "templates/{$layout}.inc.php";
}
示例#4
0
  </script>
<?php 
}
?>



<div class="sleeve_main">
<?php 
global $request;
if (!isset($request->params['nickname'])) {
    if (current_user_can('publish_posts')) {
        require_once dirname(__FILE__) . '/post-form.php';
    }
} else {
    render_partial('profile');
}
?>
<div id="main">
		<?php 
global $paged;
?>
	<h2><?php 
echo $txt['index_recent_updates'];
if ($paged > 1) {
    echo '(Page ' . $paged . ') ';
}
?>
<a class="rss" href="<?php 
bloginfo('rss2_url');
?>
示例#5
0
<?php

render(false);
if (!empty(Request::$params->forum_post)) {
    $preview = true;
    $forum_post = ForumPost::blank(array_merge(request::$params->forum_post, array('creator_id' => User::$current->id)));
    $forum_post->created_at = gmd();
    render_partial("post", array('post' => $forum_post));
}
示例#6
0
文件: index.php 项目: Jonic/Rotors
<?php

	if (!$post_values['contact_submit']) :

		render_partial('contact_form');

	else :

		if ($errors == FALSE) {
			$alert_title = _('Thank you');
			$alert_intro = _('Your message is on its way to us. We will be in touch shortly!');
			alert('done', $alert_title, $alert_intro);
		}
		else {
			render_partial('contact_form', compact('post_values', 'errors'));
		}

	endif;
示例#7
0
?>


<?php 
global $request;
?>

<?php 
if (get_app_id()) {
    ?>

  <?php 
    $profile = get_profile(get_app_id());
    if ($profile->id == get_profile_id()) {
        if (in_array('settings', $request->activeroute->patterns)) {
            render_partial('admin');
        }
    }
    //  echo '<script type="text/javascript" src="'.$request->url_for(array('resource'=>'pages','action'=>'block.js')).'"></script>';   }
    ?>

  <?php 
    if (!in_array('settings', $request->activeroute->patterns)) {
        ?>

  <?php 
        if (isset($request->params['nickname'])) {
            ?>

    <?php 
            if (!empty($profile->fullname)) {
示例#8
0
			<h3>Suppression abonnement</h3>
			<p>
				<dl class="dl-horizontal">
					<dt>Ordre</dt>
					<dd>delete_abonnement</dd>
					<dt>Description<dt>
					<dd>Suppression d'un abonnement</dd>
					<dt>Paramètre POST</dt>
					<dd><em>flux_id</em></dd>
				</dl>
			</p>

			<h3>Export OPML</h3>
			<p>
				<dl class="dl-horizontal">
					<dt>Ordre</dt>
					<dd>opml</dd>
					<dt>Description<dt>
					<dd>Export au format OPML des abonnements de l'utilisateur courant. L'organisation en dossiers est conservée.</dd>
					<dt>Paramètre</dt>
					<dd>Aucun</dd>
				</dl>
			</p>
		</div>
	</div>
</div>

<?php 
render_partial("includes_js", null);
render_partial("footer", null);
示例#9
0
文件: register.php 项目: Jonic/Rotors
<?php

	if (!$post_values['register']) :

		render_partial('register_form');

	else :

		if ($errors == FALSE) {
			$alert_title = '';
			$alert_intro = '';
			alert('done', $alert_title, $alert_intro);
		}
		else {
			render_partial('register_form', compact('post_values', 'errors'));
		}

	endif;
示例#10
0
<?php

render_partial("layout/header");
yield_view();
render_partial("layout/footer");
示例#11
0
function dynamic_sidebar()
{
    global $request;
    global $sidebar_done;
    if (isset($request->params['nickname'])) {
        if ($request->action == 'index' && $request->byid == get_profile_id()) {
            render_partial('apps');
        }
        echo '<script type="text/javascript" src="' . $request->url_for(array('resource' => 'pages', 'action' => 'block.js')) . '"></script>';
        $sidebar_done = true;
        return true;
    }
    if (!$sidebar_done && get_profile_id() && $request->resource == 'identities' && in_array($request->action, array('edit', 'entry'))) {
        if ($request->id == get_profile_id()) {
            render_partial('admin');
        }
        $sidebar_done = true;
        return true;
    }
    $blocks = environment('blocks');
    if (environment('categories') && !empty($blocks) && !$sidebar_done && $request->resource == 'posts') {
        foreach ($blocks as $b) {
            // if it's the prologue theme, don't show PAGES in sidebar
            if (!($b == 'pages' && is_microblog_theme())) {
                //$renderpartial = true;
                if (isset($renderpartial)) {
                    // this would be better/faster, but not working yet
                    echo '<script type="text/javascript">';
                    render_partial(array('resource' => $b, 'action' => 'block.js'));
                    echo '</script>';
                } else {
                    // doing a call back to the server for each block. not cool XXX
                    echo '<script type="text/javascript" src="' . $request->url_for(array('resource' => $b, 'action' => 'block.js')) . '"></script>';
                }
            }
        }
        $sidebar_done = true;
    }
    if (environment('theme') == 'prologue-theme') {
        echo '<a href="http://openmicroblogger.org"><img src="http://openmicroblogger.org/omb.gif" style="border:none;" alt="openmicroblogger.org" /></a>' . "\n";
    }
    return true;
}
示例#12
0
文件: default.php 项目: jimeh/Cheezy
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>Example<?php 
if (isset($title)) {
    echo ' - ' . $title;
}
?>
</title>
</head>

<body>
<?php 
render_partial('header');
?>

<?php 
echo $content_for_layout;
?>

<?php 
if (Timer::$started) {
    ?>
<div id="timer">
  <?php 
    echo Timer::end(5);
    ?>
  <?php 
    echo " - " . round(memory_get_usage(true) / (1024 * 1024), 3) . " MB";
示例#13
0
<div id="forum" class="response-list">
  <?php 
if (Request::$params->page <= 1) {
    ?>
    <?php 
    render_partial("post", array('post' => $forum_post));
    ?>
  <?php 
}
?>

  <?php 
foreach ($children as $c) {
    ?>
    <?php 
    render_partial("post", array('post' => $c));
    ?>
  <?php 
}
?>
</div>

<?php 
if (!$forum_post->is_locked) {
    ?>
  <div style="clear: both;">
    
    <div id="preview" class="response-list" style="display: none; margin: 1em 0;">
    </div>

    <div id="reply" style="display: none; clear: both;">
示例#14
0
文件: login.php 项目: Jonic/Rotors
<?php

	if (!$post_values['login']) :

		render_partial('login_form');

	else :

		if ($errors == FALSE) {
			$alert_title = '';
			$alert_intro = '';
			alert('done', $alert_title, $alert_intro);
		}
		else {
			render_partial('login_form', compact('post_values', 'errors'));
		}

	endif;
示例#15
0
    var css = ".javascript-hide { display: none !important; }";
    var style = document.createElement("style"); style.type = "text/css";
    if(style.styleSheet) // IE
      style.styleSheet.cssText = css;
    else
      style.appendChild(document.createTextNode(css));
    document.getElementsByTagName("head")[0].appendChild(style);
  </script>
  
  <link href="/stylesheets/default.css" media="screen" rel="stylesheet" type="text/css">
  <script src="/javascripts/application.js" type="text/javascript"></script>

  <?php 
content_for('html_header');
?>
</head>
<body>
  <?php 
render_partial("layouts/notice");
?>
  <div id="content">
    <?php 
content_for("layout");
?>
  </div>
  <?php 
content_for('post_cookie_javascripts');
?>
</body>
</html>
示例#16
0
文件: index.php 项目: laiello/msgr
<?php

render_partial("plop", $params);
?>

<p>Hello world!</p>
<p>
    Current directory: 
    <?php 
echo $params["current_dir"];
?>
</p>
render_partial('menu');
?>
    </div>
    <div id="content">
      <?php 
echo $content_for_layout;
?>
    </div>
    <?php 
if (Timer::$started) {
    ?>
    <div id="footer">
      A Prototype App &copy; 2010 
      <div id="timer">
        <?php 
    echo Timer::end(5);
    ?>
        <?php 
    echo " - " . round(memory_get_usage(true) / (1024 * 1024), 3) . " MB";
    ?>
      </div>
    </div>
    <?php 
}
?>
  </div>
  <?php 
render_partial('google_analytics');
?>
</body>
</html>
示例#18
0
/**
 * content_for_layout
 * 
 * render a _template using content-negotiation
 * 
 * @access public
 * @param string $template
 */
function content_for_layout()
{
    global $request;
    render_partial($request->action);
}
示例#19
0
        <td><?php 
echo text_field_tag("tag_alias->alias", array('size' => 40));
?>
</td>
      </tr>
      <tr>
        <th><label for="tag_alias_reason">Reason</label></th>
        <td><?php 
echo text_area("tag_alias->reason", array('size' => "40x2"));
?>
</td>
      </tr>
      <tr>
        <td colspan="2"><?php 
echo submit_tag("Submit");
?>
</td>
      </tr>
    </table>
  </form>
</div>

<div id="paginator">
  <?php 
paginator();
?>
</div>

<?php 
render_partial("/tag/footer");
示例#20
0
        ?>
"><?php 
        the_title();
        ?>
</a></h3>
      <small>by <?php 
        the_author();
        ?>
</small>
			<div class="entry">
				<?php 
        the_content('Continue');
        ?>
			</div>
			<p class="meta"><?php 
        render_partial('meta');
        ?>
</a>
		</div>

	<?php 
    }
    ?>

<?php 
} else {
    if (is_category()) {
        // If this is a category archive
        printf("<h2 class='center'>Sorry, but there aren't any posts in the %s category yet.</h2>", single_cat_title('', false));
    } else {
        if (is_date()) {
示例#21
0
<?php

// Template Name: Standard
render_view("pages/standard");
render_partial("tools/debug");
//debug data
示例#22
0
<div id="footerclear"></div>
</div> <!-- // wrapper -->

	<div id="footer">
		<p><a href="http://openmicroblogger.org/">OpenMicroblogger <?php 
global $ombversion;
echo $ombversion;
?>
</a> | P2 theme by <a href="http://automattic.com/">Automattic</a><?php 
global $request;
if ($request->resource == 'posts') {
    render_partial('pagespan');
}
?>
</p>
	</div>
	
<?php 
wp_footer();
?>

</body>
</html>
示例#23
0
            echo print_preview($post_parent, array('hide_directlink' => true));
            ?>
 </ul>
  <?php 
        } else {
            ?>
    (parent post hidden due to access restrictions)
  <?php 
        }
        ?>

  <?php 
    } else {
        ?>
    This post has no parent.  If this post has been replaced, reparent this post before deleting, and votes will be transferred.<br />
  <?php 
    }
} else {
    ?>
  This post is already deleted.  Destroying it will remove it permanently.
<?php 
}
?>
</div>

<?php 
render_partial("footer");
?>

<script type="text/javascript">$("reason").focus();</script>
示例#24
0
<div class="response-list">
  <?php 
foreach ($comments as $c) {
    ?>
    <?php 
    render_partial("comment/comment", array('comment' => $c, 'comments_avatar_posts'));
    ?>
  <?php 
}
?>
</div>

<div style="clear: both;">
  <?php 
if (!empty($hide)) {
    ?>
    <h6 id="respond-link-<?php 
    echo $post_id;
    ?>
">
      <a href="#" onclick="Comment.show_reply_form(<?php 
    echo $post_id;
    ?>
); return false;">Reply &raquo;</a>
    </h6>
  <?php 
}
?>

  
  <div id="reply-<?php 
示例#25
0
        ?>
</li>
      <li><?php 
        echo link_to("Transfer&nbsp;post&nbsp;data", array("#transfer_metadata", 'to' => Request::$params->id));
        ?>
</li>
    <?php 
    }
    ?>
  <?php 
}
?>
  <li><?php 
echo link_to("History", array('history#index', 'search' => 'pool:' . Request::$params->id));
?>
</li>
  <?php 
if (User::$current->can_change($pool, 'posts')) {
    ?>
  <li class="advanced-editing del-mode">
    <input type="checkbox" id="del-mode" onclick="Element.toggle('info')">
    <label for="del-mode">Delete&nbsp;mode</label>
  </li>
  <?php 
}
end_content_for();
?>

<?php 
render_partial('footer');
示例#26
0
    }
    jsdie("questionSaved", $question->id, $is_new);
}
if ($is_new) {
    $title = "Новый вопрос";
    $question = new Question();
    $question->id = 'new';
    $question->test_id = $_REQUEST['test_id'];
    $question->wakeup();
    $answers = array();
} else {
    if (!($question = Question::get("WHERE id = %s", $id))) {
        redirect("/", "Извините, этот вопрос уже удален.");
    }
    $title = "{$question->text}";
    $answers = Answer::query("WHERE question_id = %s ORDER BY `order`", $question->id);
}
$max_answer_order = 0;
foreach ($answers as $answer) {
    $max_answer_order = max($max_answer_order, $answer->order);
}
$to_add = max(3, 5 - count($answers));
for ($i = 1; $i <= $to_add; $i++) {
    $answer = new Answer();
    $answer->order = $max_answer_order + $i;
    $answer->id = "new" . $i;
    $answer->wakeup();
    $answers[] = $answer;
}
echo render_partial('question_editor.haml', array('question' => $question, 'answers' => $answers));
示例#27
0
    Please consider upgrading to a more recent web browser:
    <a href="http://www.mozilla.com/firefox/">Firefox</a>,
    <a href="http://www.opera.com/">Opera</a>,
    <a href="http://www.microsoft.com/windows/internet-explorer/download-ie.aspx">Internet Explorer</a>.
    <div style="text-align: right;" id="old-browser-hide">
      <a href="#" onclick='$("old-browser").hide(); Cookie.put("hide-ie-nag", "1");'>(hide this message)</a>
    </div>
  </div>
  <![endif]-->

<?php 
// }
?>
  
<?php 
render_partial('layouts/notice');
if (!isset($browse_mode)) {
    ?>
  <div class="blocked" id="block-reason" style="display: none;"></div>
<?php 
}
?>

  <div id="content">
<?php 
content_for('layout');
?>
    <?php 
if (check_content_for('subnavbar')) {
    ?>
      <div class="footer">
<?php

require_once '/Users/effel/Development/rosedaleonbloor/wp-content/plugins/wordless/vendor/phamlp/haml/HamlHelpers.php';
?>
<!DOCTYPE html>
<html>
<head>
  <?php 
echo render_partial("layouts/head");
?>

</head><body>
<div class="page-wrapper">
<header class="site-header">
  <?php 
echo render_partial("layouts/header");
?>

</header><section class="site-content">
  <?php 
echo wl_yield();
?>

</section></div>  <?php 
wp_footer();
?>
</body></html>
            } else {
                if ($page_title == 'Views') {
                    ?>

  <?php 
                    echo render_partial('pages/views');
                    ?>

<?php 
                }
            }
        }
    }
    ?>
  <?php 
} else {
    if (is_single()) {
        ?>

  # - $cat = get_the_category()[0]->slug
<!--- $feature_post = $ID  -->  # - $page_id = get_page_by_path($cat)->ID
<?php 
    }
}
?>
<footer class="site-footer">
  <?php 
echo render_partial("layouts/footer");
?>

</footer>
示例#30
0
<?php

render_partial("comment/comments", array('comments' => array($comment), 'post_id' => $comment->post_id, 'hide' => false));
?>

<div style="clear: both;">
  <p><?php 
echo link_to("Return to post", array('post#show', 'id' => $comment->post_id));
?>
</p>
</div>