Welcome Guest, Not a member yet? Register   Sign In
  use of array data in views
Posted by: El Forum - 06-27-2007, 12:52 PM - No Replies

[eluser]pmonty[/eluser]
My array looks like this:

Quote:$formdata('sort'=>'perf-desc')
I am loading the view like this:
Quote:$this->load->view('testform',$formdata);
My view code looks like this:
Quote:Sort By: <select name="sorton">
<option value="perf-desc" &lt;?= if ($sort =="perf-desc") ? "selected='selected'" : "selected=''";?&gt; >Perf Desc</option>
</select>
Obviously I am doing something syntactically wrong to get this error:
Quote:Parse error: syntax error, unexpected T_IF in \system\application\views\testform.php on line 10

How should this be coded?

Paul


  Calender Lib for JS Form Input?
Posted by: El Forum - 06-27-2007, 11:07 AM - No Replies

[eluser]Phil Sturgeon[/eluser]
Anyone made a nice little form input GUI for dates in a form?

Would love something similar to phpMyAdmins calender view (that's the first example that came to mind) so instead of having multiple dropdowns or just a text input box i could have a lovely calender view.


  log files
Posted by: El Forum - 06-27-2007, 09:43 AM - No Replies

[eluser]Unknown[/eluser]
Is there something comparable to like an OC4J(java) log for CI? It would be beneficial when developing if I could see what is executing.

Suggestions are greatly appreciated.

Thanks.


  Email library : mail() function issue
Posted by: El Forum - 06-27-2007, 09:21 AM - No Replies

[eluser]metalking[/eluser]
Hi everybody!

I'm just trying to build a mail module for my application (some kind of newsletter), and I'm having some problems with the Email library.

When I try to send a mail using the method described in the user guide, I get a PHP warning, saying that in libraries/Email.php, at line 1232, the mail() function receives a wrong number of parameters.

My CI code :

Code:
$this->load->library('email');

$emailconfig['protocol'] = 'smtp';
$emailconfig['smtp_host'] = 'smtp.gmail.com';
$emailconfig['smtp_user'] = 'username';
$emailconfig['smtp_pass'] = 'password';
$emailconfig['smtp_port'] = '465';

$this->email->initialize($emailconfig);

$this->emails = $this->get_emails($this->validation->destinataires);
foreach($this->emails as $email)
{
$this->email->from('[email protected]', 'The Polygon\'s Battle');
$this->email->reply_to('[email protected]', 'metalking');
$this->email->to($email['email']);

$this->email->subject($this->validation->sujet);
$this->email->message($this->validation->message);

if($this->email->send())
{}
else
$this->mailerror = 1;
                    
$this->email->clear();
}

Don't care about vars names and so on, the only error I get (at the moment) is this PHP error, which says CI sends a wrong number of parameters to the mail() function.

Have you any idea of what the problem is?


Thanks ! Wink


  Invisible mysql row
Posted by: El Forum - 06-27-2007, 08:07 AM - No Replies

[eluser]xwero[/eluser]
When i do an insert with the same code but other values the row doesn't get displayed in the table but the auto_increment has gone up a number and the code igniter affected_rows function displays 1.

I have seen this behaviour before but i never knew what caused this, it disappeared somehow. I'm working with mysql version 3.23 (shared hosting)

I hope someone can explain this and offer a solution, i searched for it but i haven't found one.


  remove index.php
Posted by: El Forum - 06-27-2007, 08:07 AM - No Replies

[eluser]Murilo[/eluser]
hello ,

add in .htaccess

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

http://www.desweb.com.br/app/


  Troubles with HTML email
Posted by: El Forum - 06-27-2007, 07:30 AM - No Replies

[eluser]litzinger[/eluser]
I'm trying to send an HTML email, but it just isn't coming through as HTML in Entourage, although I have it set to show HTML. Below is the CI code I'm using, and below that is my output, sans the actual HTML for client confidentiality. The view I'm loading is just a simple table with some data, and I wrapped the message with the html and body tag b/c the view doesn't have these tags b/c it's an include used somewhere else too. It works fine if I send it to my gmail account, but not my Entourage account. What am I missing?

Code:
$config['mailtype'] = 'html';
$config['charset'] = 'UTF-8';
$this->email->initialize($config);
        
$message .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;head&gt;&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;&lt;/head&gt;';
$message .= '<p>'.$this->input->post('notes').'</p>';
$message .= $this->load->view('reporting/contact_detail_inc.php', $data, TRUE);
$message .= '&lt;/body&gt;&lt;/html&gt;';

$this->email->from('[email protected]', 'Me');
$this->email->to($this->input->post('email'));

$this->email->subject('Email Test');
$this->email->message($message);
$this->email->send();

echo $this->email->print_debugger();


Code:
Your message has been successfully sent using the following protocol: mail

User-Agent: Code Igniter
Date: Wed, 27 Jun 2007 08:17:14 -0500
From: "Me"
Return-Path:
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: Code Igniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_4682635a99c71"
This is a multi-part message in MIME format.
Your email application may not support this format.

--B_ALT_4682635a99c71
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

///// THE RAW TEXT ////


--B_ALT_4682635a99c71
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted/printable
Email Test

///// MY HTML ////

--B_ALT_4682635a99c71--
[/code]


  Extending CI_Config
Posted by: El Forum - 06-27-2007, 07:22 AM - No Replies

[eluser]alexsancho[/eluser]
I'm trying to extende core Config class to merge my application settings before system load, since this settings are stored in a mysql table, the only way i find to do it is creating my own db connector and query methods inside the class.

This works, but i feel more confortable using CI native methods to connect and deal with db.

Any suggestions?

Thanks in advance


  Full Year Layout Using Calendar Class
Posted by: El Forum - 06-27-2007, 06:53 AM - No Replies

[eluser]herbageonion[/eluser]
Hi, I was just wondering if its possible to use the Calendar class in CI to create a full year calendar with each month laid out on the same canvas with previous year and next year links at the top.

Something like this:

Code:
<< Prev Year                                 2007                                  Next Year >>

January                  February                 March                    April
Mo Tu We Th Fr Sa Su     Mo Tu We Th Fr Sa Su     Mo Tu We Th Fr Sa Su     Mo Tu We Th Fr Sa Su
   1  2  3  4  5  6                  1  2  3                  1  2  3      1  2  3  4  5 6  7
7  8  9  10 11 12 13     4  5  6  7  8  9  10     4  5  6  7  8  9  10     8  9  10 11 12 13 14
14 15 16 17 18 19 20     11 12 13 14 15 16 17     11 12 13 14 15 16 17     15 16 17 18 19 20 21
21 22 23 24 25 26 27     18 19 20 21 22 23 24     18 19 20 21 22 23 24     22 23 24 25 26 27 28
28 29 30 31              25 26 27 28              25 26 27 28 29 30 31     29 30


May                      June                     July                     August
Mo Tu We Th Fr Sa Su     Mo Tu We Th Fr Sa Su     Mo Tu We Th Fr Sa Su     Mo Tu We Th Fr Sa Su
      1  2  3  4  5                  1  2  3      1  2  3  4  5  6  7            1  2  3  4  5
6  7  8  9  10 11 12     4  5  6  7  8  9  10     8  9  10 11 12 13 14     6  7  8  9  10 13 14
13 14 15 16 17 18 19     11 12 13 14 15 16 17     15 16 17 18 19 20 21     11 12 13 14 15 16 17
20 21 22 23 24 25 26     18 19 20 21 22 23 24     22 23 24 25 26 27 28     18 19 20 21 22 23 24
27 28 29 30              25 26 27 28 29 30 31     29 30                    25 26 27 28 29 30 31


September                October                  November                 December
Mo Tu We Th Fr Sa Su     Mo Tu We Th Fr Sa Su     Mo Tu We Th Fr Sa Su     Mo Tu We Th Fr Sa Su
1  2  3  4  5  6  7            1  2  3  4  5                     1  2      1  2  3  4  5  6  7
8  9  10 11 12 13 14     6  7  8  9  10 11 12     3  4  5  6  7  8  9      8  9  10 11 12 13 14
15 16 17 18 19 20 21     13 14 15 16 17 18 19     10 11 12 13 14 15 16     15 16 17 18 19 20 21
22 23 24 25 26 27 28     20 21 22 23 24 25 26     17 18 19 20 21 22 23     22 23 24 25 26 27 28
29 30                    27 28 29 30 31           24 25 26 27 28 29 30     27 28 29 30 31


  external programs
Posted by: El Forum - 06-27-2007, 06:48 AM - No Replies

[eluser]emperius[/eluser]
where may I put external programs (for instance phpthumb)? To which directory should I put it to be able to use it from any place?

also it concerns JS and CSS files


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

Username
  

Password
  





Latest Threads
Running Codeigniter Queue
by warcooft
19 minutes ago
CLI Error
by ltarrant
31 minutes ago
Get folder path instead o...
by pippuccio76
3 hours ago
Codeignighter not resondi...
by mikehoague
3 hours ago
Where can I find a reliab...
by InsiteFX
9 hours ago
Myth Auth register a new ...
by InsiteFX
9 hours ago
Does CodeIgniter Shield H...
by tarcisiodev1
11 hours ago
Caching Question
by ozornick
Yesterday, 08:26 AM
Codeigniter and ReactJS
by murugappan
Yesterday, 01:18 AM
C4 Latest version shield ...
by kenjis
05-18-2024, 04:41 PM

Forum Statistics
» Members: 88,277
» Latest member: 68gamebaiac1
» Forum threads: 77,670
» Forum posts: 376,483

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB