Welcome Guest, Not a member yet? Register   Sign In
  Session Size
Posted by: El Forum - 09-04-2007, 02:00 PM - No Replies

[eluser]xernobil[/eluser]
Hi

Exists some form to modify the size of session of 4kb for 10kb for example in the CI?


  Possible to produce a javascript function from PHP?
Posted by: El Forum - 09-04-2007, 12:47 PM - No Replies

[eluser]Robb__[/eluser]
I have a problem I just can't solve. I retrieve a picture from my database that gets loaded as below in getclicklist.


Code:
function getclicklist($id)
    {
    $this->load->model('Load');
    $result = $this->Load->getclicklist($id);
     $resultrow[0] = $result ->row(0);
     $images['Image'] = $resultrow[0] ->Image;
    
     ... something here to produce the outcome below
    
echo $response;
        
        }

The result from this function in the controller should return something to my response function (this is done with AJAX). And in the end produce something that looks like this.

Code:
function show_get_clicklist_response(response) {
    eval(response.responseText)    

YAHOO.example.container.photobox = new YAHOO.widget.PhotoBox("photobox",
                {
                    effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.45},
                    fixedcenter:true,
                    constraintoviewport:true,
                    underlay:"none",
                    close:true,
                    visible:false,
                    draggable:true,
                    modal:true,
                    photos:[{src:"http://static.flickr.com/51/129586913_e78683c466.jpg",caption:"Linus"}, //these image adresses are the core component in the function, and where I would like to put the adress retrieved from getclicklist
                            {src:"http://static.flickr.com/50/129590195_0642f2d96a.jpg",caption:"Linus 2"},
                            {src:"http://static.flickr.com/8/12669712_be928a0d97.jpg",caption:"Dobb's Ferry, NY"},
                           ],
                    width:"500px"
                } );
                YAHOO.example.container.photobox.render();
                
                YAHOO.util.Event.addListener("show", "click", YAHOO.example.container.photobox.show, YAHOO.example.container.photobox, true);
    }

Is this possible? I have not come up with any way to manipulate javascript functions, this is the only way I can see work.


  Problems with compression and ajax
Posted by: El Forum - 09-04-2007, 10:53 AM - No Replies

[eluser]Giacomo[/eluser]
Hi everybody, I have a problem with output compression and ajax (I use prototype). My problem is that ajax creates problems to "ob_start" function because I use "echo" istruction in ajax calls.

Somebody has this problem? How can I solve it?

Bye and thanks


  Ajax Post or get path
Posted by: El Forum - 09-04-2007, 08:16 AM - No Replies

[eluser]abbe01[/eluser]
Below are my file system of CI:

Code:
-assets
   - default
      - css
      - js
         - ajax.js
   - shared
-engine
-system
  - controller
     - admin
       - template.php
  - view
  - model
Now, I put my ajax file under the assets/default/js/ajax.js
From the ajax file, I pass the url as "../admin/template/my_function".
But, it seen unsuccess to open the port.. Anybody know what is the correct path I should passing to? Thanks.


  problem with images :s
Posted by: El Forum - 09-04-2007, 07:37 AM - No Replies

[eluser]Unknown[/eluser]
i want make a thumbnail but is giving mi this error:
Your server does not support the GD function required to process this type of image.
i saw the php.ini configuration and it is like this:

Code:
<h2><a name="module_gd">gd</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">GD Support </td><td class="v">enabled </td></tr>
<tr><td class="e">GD Version </td><td class="v">bundled (2.0.28 compatible) </td></tr>
<tr><td class="e">FreeType Support </td><td class="v">enabled </td></tr>
<tr><td class="e">FreeType Linkage </td><td class="v">with freetype </td></tr>
<tr><td class="e">FreeType Version </td><td class="v">2.1.9 </td></tr>
<tr><td class="e">T1Lib Support </td><td class="v">enabled </td></tr>
<tr><td class="e">GIF Read Support </td><td class="v">enabled </td></tr>
<tr><td class="e">GIF Create Support </td><td class="v">enabled </td></tr>
<tr><td class="e">JPG Support </td><td class="v">enabled </td></tr>
<tr><td class="e">PNG Support </td><td class="v">enabled </td></tr>
<tr><td class="e">WBMP Support </td><td class="v">enabled </td></tr>
<tr><td class="e">XBM Support </td><td class="v">enabled </td></tr>
</table>

could you help mi.
thanks and keep the good work.


  MySQL Database (Multi Database)
Posted by: El Forum - 09-04-2007, 06:23 AM - No Replies

[eluser]Unknown[/eluser]
Hi,
Can any one help in connecting to multi databases??? this my config/database.php file:

Code:
$active_group = "MainDB";

$db['MainDB']['hostname'] = "localhost";
$db['MainDB']['username'] = "Shahabv";
$db['MainDB']['password'] = "123456";
$db['MainDB']['database'] = "Main";
$db['MainDB']['dbdriver'] = "mysql";
$db['MainDB']['dbprefix'] = "";
$db['MainDB']['active_r'] = TRUE;
$db['MainDB']['pconnect'] = TRUE;
$db['MainDB']['db_debug'] = TRUE;
$db['MainDB']['cache_on'] = FALSE;
$db['MainDB']['cachedir'] = "system/cache/";

$db['NewsDB']['hostname'] = "localhost";
$db['NewsDB']['username'] = "Shahabv";
$db['NewsDB']['password'] = "123456";
$db['NewsDB']['database'] = "News";
$db['NewsDB']['dbdriver'] = "mysql";
$db['NewsDB']['dbprefix'] = "";
$db['NewsDB']['active_r'] = TRUE;
$db['NewsDB']['pconnect'] = TRUE;
$db['NewsDB']['db_debug'] = TRUE;
$db['NewsDB']['cache_on'] = FALSE;
$db['NewsDB']['cachedir'] = "system/cache/";

and i use this code in my controller :

Code:
$NewsDB->$this->load->database('NewsDB', TRUE);
        
$sql = "SELECT Title, sKey
        From Site_News";
        
$Query = $NewsDB->query($sql);
        
if($NewsDB->num_rows() > 0) {

       foreach ($Query->result_array() as $row)
       {
           echo $row["Title"];
           echo $row["sKey"];
       }
            
}

Is it Truee??? Thanks Alot


  Calendar
Posted by: El Forum - 09-04-2007, 03:01 AM - No Replies

[eluser]E303[/eluser]
How would I go about selecting the posts from a database then linking them up.

So far I have a model which selects all of the post dates.

In the controller I have called the calendar, but I am not sure how to conver the results into the
$data = array(
$day => 'url/$id',
$day => 'url/$id'
);

required... Do I do tht in a foreach loop with in the controller like:

$this->Blog_Model->Archive();
$data = array( ".
foreach ($archive as $item)
{
$item['day'] => 'url/$item['id'];
}
".);


  File Upload Directory Limit..??
Posted by: El Forum - 09-04-2007, 02:39 AM - No Replies

[eluser]santosh[/eluser]
Hi All,

I just want to upload files & dump them to a server filesystem. I am just trying to understand how many files can u dump to a single directory , is there any limit on the total numbers, if so, how to handle this situation. I think this is very typical in large apps. How do u spread ur files to more than one servers' filesystem. I googled, but i didnt get the info i needed. Any help will be appreciated..!

PS: I am new to PHP/CI. If my question is unlclear, let me know that, i will try to put it
in some easy way.


Thanks,
Santosh.


  question about method chaining
Posted by: El Forum - 09-04-2007, 02:27 AM - No Replies

[eluser]杨帅[/eluser]
i got a "syntax error, unexpected T_OBJECT_OPERATOR" error, and i searched the forum, now i know it's because the php4 not allow method chaining. i shouldn't use the syntax such as

Code:
$this->db->orderby()
in my php4 web server.
instead of the upper one ,i should use
Code:
$db=$this->db;
$db->orderby();
but i searched the source of codeigniter , i found lots of statement such as:
Code:
if ($this->CI->db->cachedir == '')
        return $this->CI->db->cache_off();
    $path = $this->CI->db->cachedir;
    if ($this->CI->db->db_debug)
        return $this->CI->db->display_error('db_invalid_cache_path');
is this method chaining? i donno whecher it can run property in php4 server. anybody know this? great thanks.


  Database Update not work
Posted by: El Forum - 09-04-2007, 02:26 AM - No Replies

[eluser]iniweb[/eluser]
I have this function on Newsmodel:

Code:
function Active_News()
    {
        $this->status      = $_GET['status'];

        $this->db->update('ci_news', $this, array('id', $_GET['id']));

        redirect('/index.php?c=Backoffice&m=News_List', 'refresh');
    }

Status = 1, but not updated.

This news table:

Code:
CREATE TABLE `ci_news` (
  `id` int(11) NOT NULL auto_increment,
  `author` varchar(30) NOT NULL default '',
  `title` varchar(255) NOT NULL default '',
  `alt_name` varchar(255) NOT NULL default '',
  `date` datetime default NULL,
  `category` smallint(5) unsigned NOT NULL default '0',
  `short_story` text,
  `full_story` text,
  `images` varchar(255) NOT NULL default '',
  `news_read` bigint(20) unsigned NOT NULL default '0',
  `allow_main` tinyint(1) NOT NULL default '0',
  `fixed` tinyint(1) NOT NULL default '0',
  `rating` smallint(5) NOT NULL default '0',
  `status` tinyint(1) NOT NULL default '0',
  `_parent_name` varchar(255) default NULL,
  `_ci_scaffolding` varchar(255) default NULL,
  `_ci_scaff_table` varchar(255) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM ;


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Latest Threads
Any user guid or video o...
by msnisha
54 minutes ago
MVC vs MVCS vs CodeIgnite...
by massimiliano1.mancini
5 hours ago
Why PHP is still worth le...
by php_rocs
10 hours ago
Is hiring a digital marke...
by Markhenry123
Today, 02:45 AM
my controller fails to fi...
by PaulC
Today, 01:40 AM
My Library cannot see ses...
by InsiteFX
Yesterday, 08:48 PM
update the framework to t...
by captain-sensible
Yesterday, 12:14 PM
CodeIgniter Shield 1.0.0 ...
by Ayatorvi
Yesterday, 06:06 AM
Update to 4.6.1
by serialkiller
05-07-2025, 11:58 AM
Can't create new database...
by paulbalandan
05-07-2025, 08:49 AM

Forum Statistics
» Members: 144,976
» Latest member: bangalorerussian
» Forum threads: 78,382
» Forum posts: 379,420

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB