예제 #1
0
 public function save_css()
 {
     if (empty($_POST['css'])) {
         die;
     }
     $stylesheet = t_paths::css($this->owner->apikey) . '/' . $this->owner->tconfig->theme . '.css';
     file_put_contents($stylesheet, $_POST['css']);
     $this->rsp->status = 'success';
     $this->rsp->msg = 'CSS Saved!';
     $this->rsp->send();
 }
예제 #2
0
 /**
  * Overload saving to set the created time and to create a new token
  * when the object is saved.
  */
 public function save()
 {
     if ($this->loaded === FALSE) {
         $this->created = time();
         $this->apikey = text::random('alnum', 8);
         $this->token = $this->create_token();
         parent::save();
         # auto create a new tconfig.
         $new_tconfig = ORM::factory('tconfig');
         $new_tconfig->owner_id = $this->id;
         $new_tconfig->save();
         # add 3 sample testimonials to get the party started.
         $testimonial = ORM::factory('testimonial');
         $testimonial->owner_id = $this->id;
         $testimonial->name = 'Stephanie Lo';
         $testimonial->company = 'World United';
         $testimonial->c_position = 'Founder';
         $testimonial->url = 'worldunited.com';
         $testimonial->location = 'Berkeley, CA';
         $testimonial->rating = 5;
         $testimonial->body = 'The interface is simple and directed. I have a super busy schedule and did not want to waste any time learning yet another website. Pluspanda values my time. Thanks!';
         $testimonial->publish = 1;
         $testimonial->save();
         $testimonial->clear();
         $testimonial->owner_id = $this->id;
         $testimonial->name = 'John Doe';
         $testimonial->company = 'Super Company!';
         $testimonial->c_position = 'President';
         $testimonial->url = 'supercompany.com';
         $testimonial->location = 'Atlanta, Georgia';
         $testimonial->rating = 5;
         $testimonial->body = 'This is a sample testimonial for all to see.';
         $testimonial->publish = 1;
         $testimonial->save();
         $testimonial->clear();
         $testimonial->owner_id = $this->id;
         $testimonial->name = 'Jane Smith';
         $testimonial->company = 'Widgets R Us';
         $testimonial->c_position = 'Sales Manager';
         $testimonial->url = 'widgetsrus.com';
         $testimonial->location = 'Los Angeles, CA';
         $testimonial->rating = 5;
         $testimonial->body = 'Pluspanda makes our testimonials look great! Our widget sales our up 200% Thanks Pluspanda!';
         $testimonial->publish = 1;
         $testimonial->save();
         # copy stock testimonial css to user data folder
         $src = DOCROOT . 'static/css/testimonials/stock';
         $dest = t_paths::css($this->apikey);
         dir::copy($src, $dest);
         return;
     }
     return parent::save();
 }
예제 #3
0
 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);
 }
예제 #4
0
    but you have priorities indeed.
    
    <br/><br/>
    PlusPanda <u>trivializes</u> this one simple marketing strategy so you can
    concentrate on implementing other strategies.
    You <u>know</u> you have better things to do! 
    <br/>So let us handle it, we are good at it. Thanks!
  </div>
</div>

<div style="clear:both; padding-top:30px;text-align:center">
  <a href="/start" id="signup"></a>
</div>


<script type="text/javascript">
 $('div.demo-switcher ul a:first').addClass('active');
  $('div.demo-switcher ul a').click(function(){
    var url = '<?php 
echo t_paths::css(Kohana::config('core.apikey'), 'url');
?>
/';
    var theme = $(this).attr('href').substring(1);
    $('div.demo-switcher ul a').removeClass('active');
    $(this).addClass('active');
    $('head link#pandaTheme').attr('href', url + theme + '.css');
    $('#panda-select-tags ul a:first').click();
  });
</script>