小编spo*_*tlr的帖子

为什么jQPlot dateAxisRenderer无法正常工作?

我想使用jQPlot并将轴渲染为一系列日期值 - jQPlot的原始包可以是这里的字体:

http://www.jqplot.com/

http://www.jqplot.com/docs/files/plugins/jqplot-dateAxisRenderer-js.html

问题是这样的:

a)xaxis不会从左侧开始,也会显示我不想看到的值

b)右边同样的问题,有更多不需要的数字

c)我想在xaxis上进行所有日子1 2 3 4 5 ...不是31 3 6 9 ...

d)是否可以设置一种偏移到底部(只是一点点......)

截图: 来自当前状态的图片

我的代码:

$.jqplot('chartdiv', [
    [
        ['2012-08-01', 0],
        ['2012-08-02', 0],
        ['2012-08-03', 0],
        ['2012-08-04', 0],
        ['2012-08-05', 0],
        ['2012-08-06', 0],
        ['2012-08-07', 1],
        ['2012-08-08', 0],
        ['2012-08-09', 6],
        ['2012-08-10', 0],
        ['2012-08-11', 0],
        ['2012-08-12', 0],
        ['2012-08-13', 0],
        ['2012-08-14', 0],
        ['2012-08-15', 0],
        ['2012-08-16', 0],
        ['2012-08-17', 0],
        ['2012-08-18', 0],
        ['2012-08-19', 0],
        ['2012-08-20', 0],
        ['2012-08-21', 0],
        ['2012-08-22', 0],
        ['2012-08-23', 0],
        ['2012-08-24', 0],
        ['2012-08-25', 0],
        ['2012-08-26', 0],
        ['2012-08-27', 0],
        ['2012-08-28', 0], …
Run Code Online (Sandbox Code Playgroud)

javascript jquery jquery-ui jqplot

5
推荐指数
1
解决办法
7940
查看次数

Jquery UI Widget问题 - 圆角

http://jsbin.com/adojes/edit#preview

我的问题是将"圆角"从jquery ui设置到主容器而不设置总高 - 这可能吗?

html css jquery jquery-ui widget

3
推荐指数
1
解决办法
2382
查看次数

每页WordPress帖子数(存档)

我有一个自定义帖子类型,想更改每页的帖子数量。我使用以下代码显示/限制帖子:

    $args = array(
        'post_type' => 'movie',
        'posts_per_page' => 3,
        'tax_query' => array(
            array(
              'taxonomy' => $wp_query->queried_object->taxonomy,
              'field' => 'slug',
              'terms' => $wp_query->queried_object->slug,
            )
        ),
        'paged' => get_query_var('paged') ? get_query_var('paged') : 1
    );
    query_posts( $args );
Run Code Online (Sandbox Code Playgroud)

这次,我有20种具有这种类型的帖子,wordpress admin中每页的默认帖子(设置/阅读...)设置为10。

如果我在没有页面的情况下调用该网址,则会显示3个帖子;如果在我的页面中使用“ page / 2 /”显示,则显示3个帖子,但如果我在“页面/ 3 /”的页面中显示,则找不到任何内容...

我不会更改管理员中帖子的默认值-有人有想法吗?

注意:为了“调试”,我让我显示“ $ wp_query-> post_count;”的值。-使用每页默认的管理员帖子-10 ...

问候凯

php wordpress custom-post-type

1
推荐指数
1
解决办法
5934
查看次数

CodeIgniter和模型 - 视图 - 控制器 - 您的经验/您的意思?

我对CodeIgniter MVC的原理提出了一个"简单"的问题.如果我查看CI(模型)中的手册,我会看到例如:

function insert_entry()
{
    $this->title   = $_POST['title']; // please read the below note
    $this->content = $_POST['content'];
    $this->date    = time();
    $this->db->insert('entries', $this);
}
Run Code Online (Sandbox Code Playgroud)

好吧,好吧 - 以这种方式输入数据很糟糕我知道:)但是如果我们使用"$ this-> input-> post()"...对我来说它看起来并不好.在使用模型中的函数之前处理控制器中的数据不是更好吗?也许模型部分看起来如此:

function insert_entry($data)
{
    $this->db->insert('entries', $data);
}
Run Code Online (Sandbox Code Playgroud)

在像这样的控制器中:

$this->load->model('Blog');
$data = array();
$data['title'] = $this->input->post('title');
$data['content'] = $this->input->post('content');
$this->Blog->insert_entry($data);
Run Code Online (Sandbox Code Playgroud)

但我在哪里运行验证等...模型或控制器?也许有人明白我想知道什么.也许你有更多的经验,链接或其他什么.谢谢!

oop model-view-controller codeigniter user-experience

0
推荐指数
1
解决办法
1722
查看次数