zoukankan      html  css  js  c++  java
  • Phpwind 8.5相关知识点

    <1>  关于phpwind的推送

    最近在学习phpwind,挺不错的一个开源系统,因为刚开始接触,很多东西都不太熟悉。这是网上看到的一个关于首页推送的东西,感觉写的挺不错的,就移植到这里来了。

    http://www.zzbaike.com/wiki/Phpwind_8.5/%E5%86%85%E5%AE%B9%E6%8E%A8%E9%80%81

    <2> 关于phpwind数据表

    pw_threads:  该表记录帖子的标题,点击次数,回复次数等主要信息

    pw_elements:该表主要记录了网站的排行,比如会员的积分、威望、在线时间、帖子点击等。数据字段如下:

        eid(表主键),type(排行类型,包括usersort、hitsort),id(会员id,活着是帖子id),value(值)。

    <3>关于phpwind URL解析模式的说明,以http://localhost:8080/phpwind/wind/upload/index.php?m=bbs&c=post&a=reply&tid=2为例

    $this->_m = $handlerAdapter->getModule();//m=bbs,bbs是一个模块,以文件夹的形式存在,m默认为bbs
    $this->_c = $handlerAdapter->getController();//c=forumlist,forumlistController.php是一个控制器
    $this->_a = $handlerAdapter->getAction();//a=XXX,xxx即为控制器中的一个方法
    $this->_mc = $this->_m . '/' . $this->_c;
    $this->_mca = $this->_mc . '/' . $this->_a;

    <4>phpWind简单的说也是基于MVC的简单描述如下:

    ACtion:

    public function replyAction() {

    //获取数据
    $pid = $this->getInput('pid');
    $this->runHook('c_post_reply', $this->post);
    $info = $this->post->getInfo();

    //将获得的信息压入模板
    $this->setOutput('', 'atc_title');
    $this->setOutput('Re:' . $info['subject'], 'default_title');
    $this->setOutput('doreply', 'do');
    $this->setOutput($info['tid'], 'tid');
    $this->setOutput($pid, 'pid');
    $this->setOutput('checked', 'reply_notice');

    //调用模板,模板路径为template/bbs/post_run.htm

    $this->setTemplate('post_run');

     }

    View代码:

    ...........<ul id="tabTypeHead">
    <!--# if ($action == 'reply') { #-->
    <li class="current"><a href="{@url:bbs/post/reply?tid=$tid}">发表回复</a></li>
    <!--# } elseif ($action == 'modify') { #-->
    <li class="current"><a href="{@url:bbs/post/modify?tid=$tid&pid=$pid}">编辑帖子</a></li>..........

  • 相关阅读:
    Oracle、Microsoft SQL Server、Mysql
    判断窗口是否最大化或者最小化
    获得桌面长宽
    Cmap的使用
    获取本地IP,并设置到IP控件
    定时器
    %
    ThinkPHP3.2.3 的异常和错误屏蔽处理
    大数据助银行提高征信水平和风险监控能力
    大数据助银行提高征信水平和风险监控能力
  • 原文地址:https://www.cnblogs.com/php321/p/3170900.html
Copyright © 2011-2022 走看看