欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

drupal

shiping1 的头像

Adding Custom Rules Conditions in Drupal 7 增加自定义规则条件

普通分类: 
shiping1 的头像

Commerce Checkout Progress 购买产品一步步的步骤

Commerce Checkout Progress
它实现了 购买产品一步步的步骤
https://drupal.org/project/commerce_checkout_progress
普通分类: 
shiping1 的头像

平忠判断用户今天第一次登录的方法 通过 accesslog 表 有大用

本来是想通过 $user->login(判断是否第一次登录,
但是假如用户昨天并没有退出,换句话说,今天不需要重
新登录的话 那么 $user->login 的数据----也就是登录时间
就没有变化,所以用 $user->login 是不对的)
只好用rules中的 user is going to view a page 事件
而不是使用 用户已登录 事件 



//这是判断用户的每天的第一次登录 的 rule 条件
function judge_first_login_everyday()
{
    global $user;
    $todayStart = strtotime(date('Y-m-d'));
    //假如是未登录用户的话 就返回假
    if($user->uid<=0)
    {
        return false;
    }
普通分类: 
shiping1 的头像

drupal quicktabs mouseover instead of click quicktabs 鼠标放上去事件代替鼠标点击发生的事件

普通分类: 
shiping1 的头像

Chrome打开https站点提示”您与 www.google.com 之间的安全连接目前正受到干扰”

普通分类: 
shiping1 的头像

登录后 返回登录前的页面 通过 url中 destination来实现

登录后 返回登录前的页面 通过 url中 destination来实现
可是 当登录前的页面是 首页时 destination的值为空
可以通过 destination=<front> 来实现

Note that ?destination=<front> is 一个完全有效 and working parameter (destination goes through url()).

普通分类: 
shiping1 的头像

how to save temporary session variables 保存到session

how to save temporary session variables

How to I define and use session variables in drupal so that I can store temporary information while browsin

普通分类: 
shiping1 的头像

平忠自定义规则 rules rule 有大用

shipingzhongcustomrules.info文件
; $Id$
name = Shipingzhong custom rules
description = Shipingzhong Custom rules
core = 6.x
package = custom
project = "shipingzhongcustomrules"



shipingzhongcustomrules.module文件
//它里面没有内容


shipingzhongcustomrules.rules.inc文件

<?php

function shipingzhongcustomrules_rules_action_info() {
  $actions = array(
    'add_sort_value_action' => array(
      'label' => '给课程和教程的排序字段赋初始值',
普通分类: 
shiping1 的头像

drupal 中 rules 每天登录签到

普通分类: 
shiping1 的头像

Drupal 8 即将到来

普通分类: 
shiping1 的头像

使用钩子hook_user_login响应Drupal用户登录事件

使用钩子hook_user_

普通分类: 
shiping1 的头像

如何给drupal7添加51.la和cnzz.com的统计代码?

普通分类: 
shiping1 的头像

怎样让用户不要自动登录?

普通分类: 
shiping1 的头像

drupal session timeout

普通分类: 
shiping1 的头像

如何判断 每天都登录呢



感觉 login 是非要 登出后 然后 再登入
就是login




access, 基本上每打开一个页面就更新一次,login只是登录的时候才更新一次
兄弟 
这里我有个问题 
我如果 今天登录 的话 第二天 第三天  以后 永远也不会登录了
我如何判断 每天都登录呢


是因为你没有设置session timeout吧?
不然你就手工logout啊
普通分类: 
shiping1 的头像

drupal 浏览历史记录

追踪Drupal用户的浏览历

普通分类: 
shiping1 的头像

格式化时间

格式化时间
function phptemplate_comment_submitted($comment) {
    return t('!datetime — !username', array (
        '!username' => theme('username', $comment),
        '!datetime' => format_date($comment->timestamp)
    ));
}

/**
 * Returns the themed submitted-by string for the node.
 */
function phptemplate_node_submitted($node) {
    return t('!datetime — !username', array (
        '!username' => theme('username', $node),
        '!datetime' => format_date($node->created),
        
    ));
}
普通分类: 
shiping1 的头像

drupal 批量添加用户

如果想批量添加用户 用节点导入功能()吧!!
用 user_import (user import ) 模块  好像不太好,因为它对中文不友好
普通分类: 
shiping1 的头像

drupal 恶梦的开始 在中国请不要再学习 drupal [复制链接]

普通分类: 
shiping1 的头像

Multiple Node Add 模块 这是批量增加节点 添加节点 node 有大用 有大大用


见它的 readme.txt

普通分类: 
shiping1 的头像

html过滤 如果a 标签里没有空格&nbsp;&nbsp;&nbsp;&nbsp; a标签就会被过滤掉

<a onclick="doyoo.util.openChat();doyoo.util.accept();;return false;" href="javascript:void(0);"  style="width:100%;height:100%;display:block;">&nbsp;&nbsp;&nbsp;&nbsp;</a>
普通分类: 
shiping1 的头像

Drupal WordPress 区别 QQ聊天工具

[苏州]泪痕_元怜(958186957)  9:58:56

这种抽奖程序 有兄弟 有drupal做过吗
没有的话 我就只好用php+jquery来实现了
[杭州]百事伯乐(5968562)  9:59:52
@[大连]小齐 这篇博客上有关于域名的信息http://blog.bestbole.com/tool-set/free-company-mail
 大臭虫(15893969)  9:59:59
你都有PHP源码了,用MODULE封装一下就可以
[大连]小齐(83432767)  10:00:11
谢谢
[苏州]泪痕_元怜(958186957)  10:00:21
源码 没有 还得自己写
普通分类: 
shiping1 的头像

Drupal WordPress 区别 QQ聊天工具

普通分类: 
shiping1 的头像

drupal 各种路径

  • $base_path: Drupal安装路径,相当于“/”。
  • global $base_url; $base_url  此时 $base_url 等于 http://my.wangruoban.com
  • $front_page(站点首页的路径)相当于“/”。
  • $directory(您的主题的路径)相当于 sites/all/themes/shipingzhong
普通分类: 
shiping1 的头像

drupal Taxonomy menu

Taxonomy menu

模块地址: http://drupal.org/project/taxonomy_menu
模块版本: Drupal 7.xDrupal 6.x
用户数: 34 937
依赖:
普通分类: 
shiping1 的头像

在 WYSIWYG 编辑器中 imce 上传文件报错 上传的文件总量超过限制大小


我到 admin/settings/imce  目录下 看 几种配置属性
普通分类: 
shiping1 的头像

userpoints 用户积分模块

1)当然是安装启用它
2)进  admin/settings/userpoints  积分设置
a) 设置积分的名称

普通分类: 
shiping1 的头像

node_save 函数里有个 清空缓存的方法 cache_clear_all

普通分类: 
shiping1 的头像

清空表格 删除表格

se {
    if ($wildcard) {
      if ($cid == '*') {
        db_query("TRUNCATE TABLE {". $table ."}");
      }
      else {
        db_query("DELETE FROM {". $table ."} WHERE cid LIKE '%s%%'", $cid);
      }
    }
    else {
      db_query("DELETE FROM {".
普通分类: 
shiping1 的头像

url 函数 drupal_goto 跳转函数

url 函数 <?php print url('node/'. $node->nid);?>
 drupal_goto 跳转函数 drupal_goto('node/345');
普通分类: 

页面

Subscribe to RSS - drupal