private function crop() { if ($_POST) { $testimonial = $this->get_testimonial(); if (1 == $testimonial->lock) { die('This testimonial is locked and can no longer be edited.'); } die($testimonial->save_crop($this->owner->apikey, explode('|', $_POST['params']))); } # display the crop view. die(t_build::crop_view($this->owner->apikey, $this->form_url . "&a=crop")); }
public function index() { $content = new View('admin/testimonials/install'); $content->embed_code = t_build::embed_code($this->owner->apikey, 'fake'); $content->embed_code_lite = t_build::embed_code($this->owner->apikey, 'fake', FALSE); $tstmls = new Testimonials_Controller($this->owner); $content->html = $tstmls->export_html(); $stylesheet = t_paths::css($this->owner->apikey) . '/' . $this->owner->tconfig->theme . '.css'; $content->css = file_exists($stylesheet) ? file_get_contents($stylesheet) : '/* no custom file */'; if (request::is_ajax()) { die($content); } $this->shell->content = $content; $this->shell->child_nav = array(array('main', '/admin/testimonials/install', 'Main Panel', '')); $this->shell->grandchild_nav = array(array('main', '/admin/testimonials/install', 'Main Panel', ''), array('help', '#help-page', '(help)', 'fb-help')); die($this->shell); }
public function index() { $content = new View("admin/testimonials/display"); $content->embed_code = t_build::embed_code($this->owner->apikey, NULL, FALSE); #$tstmls = new Testimonials_Controller($this->owner); #$content->testimonials_html = $tstmls->get_html(); $stylesheet = t_paths::css($this->owner->apikey) . '/' . $this->owner->tconfig->theme . '.css'; $stock = DOCROOT . 'static/css/testimonials/stock/' . $this->owner->tconfig->theme . '.css'; if (file_exists($stock) and !file_exists($stylesheet)) { copy($stock, $stylesheet); } $content->stylesheet = file_exists($stylesheet) ? file_get_contents($stylesheet) : '/* no custom file */'; $content->stock = file_exists(DOCROOT . 'static/css/testimonials/stock/' . $this->owner->tconfig->theme . '.css') ? file_get_contents(DOCROOT . 'static/css/testimonials/stock/' . $this->owner->tconfig->theme . '.css') : '/* no stock file */'; if (request::is_ajax()) { die($content); } $this->shell->content = $content; $this->shell->child_nav = array(array('main', '/admin/testimonials/display', 'Configure Layout', ''), array('tags', '/admin/testimonials/tags', 'Set Categories', '')); $this->shell->grandchild_nav = array(array('main', '/admin/testimonials/display', 'Main Panel', ''), array('css', '#css', 'Edit CSS', 'show-css'), array('help', '#help-page', '(help)', 'fb-help')); die($this->shell); }
echo t_build::embed_code(Kohana::config('core.apikey'), NULL, FALSE); ?> </div> <h2 class="home-header" style="margin-top:20px;">Benefits at a Glance</h2> <div class="demo-text left"> <h6>Installs in One Minute.</h6> <div> PlusPanda works like a widget. Just add a piece of custom code wherever you want your testimonials to appear and that's it! <br/><br/>Sample Code:<br/> <textarea style="width:99%; height:80px; border:1px solid #777; background:#ffffcc;font-size:0.9em"><?php echo t_build::embed_code('abcd', 'fake'); ?> </textarea> </div> <h6>Categorize Your Testimonials.</h6> <div> Specifying categories helps visitors to your website home in on use-cases specific to them. <br/><br/> A mother selling part-time from a yahoo store front would better identify with testimonials tagged "part-time ecommerce sales" as opposed to reading about how your product helped Oracle's internal IT deptartment. </div>
<div class="t-body"> <textarea name="body"><?php echo $testimonial->body; ?> </textarea> </div> <div class="t-date"><?php echo common_build::timeago($testimonial->created); ?> </div> <div class="t-tag"> <?php echo t_build::tag_select_list($tags, $testimonial->tag->id, array('0' => '(Select Category)')); ?> </div> <div class="admin-extra"> Lock Testimonial? <input type="checkbox" name="lock" <?php if (1 == $testimonial->lock) { echo 'CHECKED'; } ?> /> (yes) <div class="t-publish"> Publish? <input type="checkbox" name="publish" value="yes" <?php echo empty($testimonial->publish) ? '' : 'CHECKED';
<th width="60px">Pos</th> <th width="150px">Name</th> <th width="150px">Company</th> <th width="150px">Category</th> <th width="75px">Live</th> <th width="120px">Updated</th> <th width="120px">Created</th> <th width="25px"></th> <th width="60px"></th> <th width="20px"></th> </tr> </thead> <tbody> <?php foreach ($testimonials as $testimonial) { echo t_build::admin_table_row($testimonial, $this->owner->apikey); } ?> </tbody> </table> <!-- <ul class="with-selected"> <li>With Selected:</li> <li>Send Email</li> <li>Publish</li> <li>Unpublish</li> <li>Set Category</li> </ul> --> <div id="share-window" style="display:none">
<div id="plusPandaYes"> <?php echo $tag_list; ?> <div class="panda-tag-scope"> <div class="panda-testimonials-list"> <?php $i = 0; $page = 1; foreach ($get_testimonials as $testimonial) { echo t_build::item_html($testimonial, $this->owner->apikey, ++$i); #if(0 == $i % $limit) # echo "\n".'</span><span id="page-' . ++$page . '" class="page-wrapper">' . "\n"; } ?> </div> </div> <div class="panda-powered"> Testimonials moderated and managed by <a href="#">pluspanda.com</a> </div> </div>
<?php foreach ($testimonials as $testimonial) { echo t_build::item_html($testimonial); } echo $pagination; ?> <script type="text/javascript">$('abbr.timeago').timeago();</script>
public function crop() { if ($_POST) { echo $this->get_testimonial()->save_crop($this->owner->apikey, explode('|', $_POST['params'])); die; } # display the crop view. die(t_build::crop_view($this->owner->apikey)); }
<?php echo t_build::sorters($active_tag, $active_sort); ?> <div class="panda-reviews-list"> <?php echo View::factory('testimonials/display_data', array('testimonials' => $testimonials, 'pagination' => $pagination)); ?> </div>
private function cache_settings($file) { $keys = array("\n", "\r", "\t"); # get the html based on theme. $wrapper = new View("testimonials/themes/{$this->theme}/wrapper"); $wrapper->tag_list = t_build::tag_list($this->tags, $this->active_tag); $item_html = new View("testimonials/themes/{$this->theme}/item"); # create the settings javascript file. $settings = new View('testimonials/widget_settings'); $settings->theme = $this->theme; $settings->apikey = $this->apikey; $settings->asset_url = t_paths::service($this->apikey, 'url'); $settings->panda_structure = str_replace($keys, '', $wrapper->render()); $settings->item_html = str_replace($keys, '', $item_html->render()); file_put_contents($file, $settings->render() . "\n/*" . date('m.d.y g:ia') . "*/"); return; }