mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
config option for disabling recent pastes
This commit is contained in:
parent
00833cf530
commit
c37b3046f7
@ -63,6 +63,14 @@ $config['backup_pass'] = '';
|
|||||||
**/
|
**/
|
||||||
$config['per_page'] = 10;
|
$config['per_page'] = 10;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disable public pastes
|
||||||
|
*
|
||||||
|
* No recent pastes will be displayed.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
$config['private_only'] = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default language
|
* Default language
|
||||||
*
|
*
|
||||||
|
@ -312,21 +312,29 @@ class Main extends CI_Controller
|
|||||||
|
|
||||||
function lists()
|
function lists()
|
||||||
{
|
{
|
||||||
$this->load->model('pastes');
|
|
||||||
$data = $this->pastes->getLists();
|
|
||||||
|
|
||||||
if ($this->uri->segment(2) == 'rss')
|
if ($this->config->item('private_only'))
|
||||||
{
|
{
|
||||||
$this->load->helper('text');
|
show_404();
|
||||||
$data['page_title'] = $this->config->item('site_name');
|
|
||||||
$data['feed_url'] = site_url('lists/rss');
|
|
||||||
$data['replies'] = $data['pastes'];
|
|
||||||
unset($data['pastes']);
|
|
||||||
$this->load->view('view/rss', $data);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->load->view('list', $data);
|
$this->load->model('pastes');
|
||||||
|
$data = $this->pastes->getLists();
|
||||||
|
|
||||||
|
if ($this->uri->segment(2) == 'rss')
|
||||||
|
{
|
||||||
|
$this->load->helper('text');
|
||||||
|
$data['page_title'] = $this->config->item('site_name');
|
||||||
|
$data['feed_url'] = site_url('lists/rss');
|
||||||
|
$data['replies'] = $data['pastes'];
|
||||||
|
unset($data['pastes']);
|
||||||
|
$this->load->view('view/rss', $data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->load->view('list', $data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ header("HTTP/1.1 404 Not Found");
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="<?php echo site_url(''); ?>">Paste</a></li>
|
<li><a href="<?php echo site_url(''); ?>">Paste</a></li>
|
||||||
<li><a href="<?php echo site_url('lists'); ?>">Recent</a></li>
|
<li><a href="<?php echo site_url('lists'); ?>">Recent</a></li>
|
||||||
|
<li><a href="<?php echo site_url('api'); ?>">API</a></li>
|
||||||
<li><a href="<?php echo site_url('about'); ?>">About</a></li>
|
<li><a href="<?php echo site_url('about'); ?>">About</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,6 +23,7 @@ header("HTTP/1.1 404 Not Found");
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="<?php echo site_url(''); ?>">Paste</a></li>
|
<li><a href="<?php echo site_url(''); ?>">Paste</a></li>
|
||||||
<li><a href="<?php echo site_url('lists'); ?>">Recent</a></li>
|
<li><a href="<?php echo site_url('lists'); ?>">Recent</a></li>
|
||||||
|
<li><a href="<?php echo site_url('api'); ?>">API</a></li>
|
||||||
<li><a href="<?php echo site_url('about'); ?>">About</a></li>
|
<li><a href="<?php echo site_url('about'); ?>">About</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,6 +23,7 @@ header("HTTP/1.1 404 Not Found");
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="<?php echo site_url(''); ?>">Paste</a></li>
|
<li><a href="<?php echo site_url(''); ?>">Paste</a></li>
|
||||||
<li><a href="<?php echo site_url('lists'); ?>">Recent</a></li>
|
<li><a href="<?php echo site_url('lists'); ?>">Recent</a></li>
|
||||||
|
<li><a href="<?php echo site_url('api'); ?>">API</a></li>
|
||||||
<li><a href="<?php echo site_url('about'); ?>">About</a></li>
|
<li><a href="<?php echo site_url('about'); ?>">About</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,7 +48,9 @@ $this->carabiner->display('css');
|
|||||||
<ul class="tabs">
|
<ul class="tabs">
|
||||||
<?php $l = $this->uri->segment(1)?>
|
<?php $l = $this->uri->segment(1)?>
|
||||||
<li><a <?php if($l == ""){ echo 'class="active"'; }?> href="<?php echo base_url()?>" title="Create A New Paste">Create</a></li>
|
<li><a <?php if($l == ""){ echo 'class="active"'; }?> href="<?php echo base_url()?>" title="Create A New Paste">Create</a></li>
|
||||||
|
<?php if(!$this->config->item('private_only')){ ?>
|
||||||
<li><a <?php if($l == "lists" || $l == "view" and $this->uri->segment(2) != "options"){ echo 'class="active"'; }?> href="<?php echo site_url('lists'); ?>" title="Recent Pastes">Recent</a></li>
|
<li><a <?php if($l == "lists" || $l == "view" and $this->uri->segment(2) != "options"){ echo 'class="active"'; }?> href="<?php echo site_url('lists'); ?>" title="Recent Pastes">Recent</a></li>
|
||||||
|
<?php } ?>
|
||||||
<li><a <?php if($l == "api"){ echo 'class="active"'; }?> href="<?php echo site_url('api'); ?>" title="API">API</a></li>
|
<li><a <?php if($l == "api"){ echo 'class="active"'; }?> href="<?php echo site_url('api'); ?>" title="API">API</a></li>
|
||||||
<li><a <?php if($l == "about"){ echo 'class="active"'; }?> href="<?php echo site_url('about'); ?>" title="About">About</a></li>
|
<li><a <?php if($l == "about"){ echo 'class="active"'; }?> href="<?php echo site_url('about'); ?>" title="About">About</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -65,6 +65,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
|
<?php if (!$this->config->item('private_only')){ ?>
|
||||||
<label for="private">Private
|
<label for="private">Private
|
||||||
<span class="instruction">Private paste aren't shown in recent listings.</span>
|
<span class="instruction">Private paste aren't shown in recent listings.</span>
|
||||||
</label>
|
</label>
|
||||||
@ -74,7 +75,8 @@
|
|||||||
echo form_checkbox($set);
|
echo form_checkbox($set);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<label for="expire">Delete After
|
<label for="expire">Delete After
|
||||||
|
Loading…
x
Reference in New Issue
Block a user