小编Has*_*zad的帖子

找不到变量:_AutofillCallbackHandler

在 Instagram 浏览器上遇到错误(在 Instagram 中打开网站进行浏览时)。特别是在 iPhone 设备上。

javascript mobile-safari ios

8
推荐指数
0
解决办法
4796
查看次数

CodeIgniter Image缩略图问题

我想用两个函数创建两个不同大小的缩略图.uploadImage()生成大缩略图而uploadIhumb($ name){它在第一个函数内调用}创建小缩略图.第一个功能创建缩略图但第二个不起作用.请解决问题,并突出问题发生的地方?

enter code here:
function uploadImage()
        {
                                    $imageName2=$_FILES['file']['tmp_name'];


                $config['image_library'] = 'gd2';
                //$config['source_image']   = $imageName2;// this is temporary folder where image place on uploading time
                $config['create_thumb'] = TRUE;
                $config['maintain_ratio'] = false;
                $config['width']     = 696;
                $config['height']   = 241;
                $config['new_image'] = 'images/uploads';
                $this->load->library('image_lib', $config); 
                $this->image_lib->resize();
                $file_name= basename( $imageName2, ".tmp");
                $filename=$file_name.'_thumb.tmp'; 


        ////////////////////Rename code///////////////////////////
                $name= $this->rand_string( 6 );

                $dir=$_SERVER['DOCUMENT_ROOT'].'/images/uploads/';

                rename($dir . $filename, $dir . $name);
                echo $name;
                $this->uploadIhumb($name); //FUNCTION CALL
}

function uploadIhumb($name)
    {

                $config['image_library'] = 'gd2';
                $config['source_image'] = $_SERVER['DOCUMENT_ROOT'].'/images/uploads/'.$name;
                $config['create_thumb'] = TRUE;

                $config['width'] …
Run Code Online (Sandbox Code Playgroud)

codeigniter

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

为Newsletter Subscriber添加'subscription_date'和'user_ip_address'字段,并在Magento的管理面板中显示

我想为新闻订阅者添加两个自定义字段,客户订阅的日期及其IP地址:1)我在'newsletter_subscriber'表中添加了两列.如何实现这一目标?

在文件app/code/core/Mage/Newsletter/Model/Subscriber.php中,我发现了以下功能:

$this->setSubscriberEmail($email);
$this->setStoreId(Mage::app()->getStore()->getId());
$this->setCustomerId(0); 
Run Code Online (Sandbox Code Playgroud)

但我没有找到它的代码.我想我也保存这样的数据但是如何可能?我必须为函数定义和声明代码,如$ this-> seSubscriptionDate();

以及如何在"通讯" - >"新闻稿订阅者"下的"管理"面板中显示?

magento-1.7

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