Welcome Guest, Not a member yet? Register   Sign In
  Trouble showing subcategories
Posted by: El Forum - 08-25-2008, 08:21 PM - Replies (3)

[eluser]cyberbuff[/eluser]
hello. I am new to ci and somewhat new to php ( with about 3 months exp). I have a controller: category. I want to show subcategories like somesite.com/category/subcat... how can i do that? I already have a index() function for category controller...what should be the next function?
the category controller looks like this:

Code:
if( !defined('BASEPATH') ) exit("No direct access, please!");
class Categories extends Controller
    {
    function Categories()
        {
        parent::Controller();
        //load stuff
        $this->load->model("categories_model");
        }
    function index()
        {
        $data["categories"] = $this->categories_model->showAllCategories();
        $this->load->view("header");
        $this->load->view("all_categories", $data);
        $this->load->view("footer");
        }
Regards
Abhisek


  Understanding CI and modular development
Posted by: El Forum - 08-25-2008, 07:32 PM - Replies (1)

[eluser]rvent[/eluser]
Hello,

I am trying to understand how the modular development works, i ve seen some projects that allow CI apps to use modules in order to extend the application, but i am trying to understand how it works.. At the moment it seems like it is all about routing...? am i correct...?

Is there any information that i could get or links that would help me understand how it works...?

Any info would be appreciated...

Thanks...


  Email Not Sending (SMTP)
Posted by: El Forum - 08-25-2008, 06:25 PM - Replies (14)

[eluser]Popcorn[/eluser]
Hello Smile

Using ASmallOrange as hosts.

Code:
220-christian.asmallorange.com ESMTP Exim 4.69 #1 Mon, 25 Aug 2008 20:16:45 -0400 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.

hello: 250-christian.asmallorange.com Hello christian.asmallorange.com [64.22.96.74]
250-SIZE 52428800
250-PIPELINING
250-AUTH PLAIN LOGIN
250-STARTTLS
250 HELP

from: 250 OK

to: 550-christian.asmallorange.com (www.leveldesign.info) [64.22.96.74]:41462 is
550-currently not permitted to relay through this server. Perhaps you have not
550-logged into the pop/imap server in the last 30 minutes or do not have SMTP
550 Authentication turned on in your email client.

The following SMTP error was encountered: 550-christian.asmallorange.com (www.leveldesign.info) [64.22.96.74]:41462 is 550-currently not permitted to relay through this server. Perhaps you have not 550-logged into the pop/imap server in the last 30 minutes or do not have SMTP 550 Authentication turned on in your email client.

data: 503-All RCPT commands were rejected with this error:
503-christian.asmallorange.com (www.leveldesign.info) [64.22.96.74]:41462 is
503-currently not permitted to relay through this server. Perhaps you have not
503-logged into the pop/imap server in the last 30 minutes or do not have SMTP
503-Authentication turned on in your email client.
503 Valid RCPT command must precede DATA

The following SMTP error was encountered: 503-All RCPT commands were rejected with this error: 503-christian.asmallorange.com (www.leveldesign.info) [64.22.96.74]:41462 is 503-currently not permitted to relay through this server. Perhaps you have not 503-logged into the pop/imap server in the last 30 minutes or do not have SMTP 503-Authentication turned on in your email client. 503 Valid RCPT command must precede DATA
500 unrecognized command
The following SMTP error was encountered: 500 unrecognized command
Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.

User-Agent: CodeIgniter
Date: Mon, 25 Aug 2008 20:16:45 -0400
From: "Mathew"
Return-Path:
To: [email protected]
Subject: http://www.favourbank.com/ Forgotten Password Request
Reply-To: "[email protected]"
X-Sender: [email protected]
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0


Content-Type: multipart/alternative; boundary="B_ALT_48b34b6d982f5"
This is a multi-part message in MIME format.
Your email application may not support this format.

--B_ALT_48b34b6d982f5
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Forgotten Password Request
Your verification code is : *************
Please visit the verification page to proceed.


--B_ALT_48b34b6d982f5
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html&gt;
    &lt;head&gt;
    =00
    &lt;/head&gt;
    &lt;body&gt;
        <h2>Forgotten Password Request</h2>
        <p>Your verification code is : *******</=
p>
        <p>Please visit the <a >verification </a>page to proceed.</p>
    &lt;/body&gt;
&lt;/html&gt;

--B_ALT_48b34b6d982f5--

And using these smtp settings

Code:
$config['auth']['mail']['mailtype']        = 'html';
$config['auth']['mail']['protocol']     = 'smtp';
$config['auth']['mail']['smtp_host']     = 'mail.leveldesign.info';
$config['auth']['mail']['smtp_user']     = 'leveldes';
$config['auth']['mail']['smtp_pass']     = '**********';
$config['auth']['mail']['smtp_port']     = '26';

Any help is appreciated.


  CI and Ajax (prototype) validation
Posted by: El Forum - 08-25-2008, 05:19 PM - No Replies

[eluser]Michael;[/eluser]
Greetings all,

I am rather new to Javascript and Ajax, try as I might to hold onto the server side past I am starting to fall to the Dark Side.

What I am attempting to do is write a validation library for a data gathering application, validate as much data on the client side before submission, thus reduce the number of "opps" page loads. Problem is as it got more complicated it stopped working. Here's what I need to do.

1) Once a form is loaded each field will run a validateField() function to validate it's own data for completion and proper format.

2) When the user clicks the submit button the function validateForm() will run and if there are no errors the form will submit itself, otherwise it will return a message that data was not complete ( which should almost, if ever, happen ).

Now, #1 is trickier than it sounds... My intention is to use the class tag to determine the validations that would run on a particular field ( class="required email" etc), thus allowing me to use addClassName to add additional validations for a field on the fly ( e.g. the value of item #1 means that now there must be a value entered for item #5 & #6, I merely addClassName('required') to the respective items ).

Here is the widget I have thusfar:

Code:
function ValidateField(input, container){
    new Ajax.Request('validator.php', {
        parameters: {validation: $F($(input).readAttribute('class')), value: $F(input)},
            onComplete: function(AjaxResult) {
                if(AjaxResult.responseText){
                    $(input).setStyle({border:'1px #C00 solid'});
                    $(container).update(''+AjaxResult.responseText);
                } else {
                    $(input).setStyle({border:'1px #0C0 solid'});
                    $(container).update('');
                }
            }
    });
}

Then, for the html markup:

Code:
&lt;input type="text" class="required" name="coc" maxlength="10"
value="&lt;?=$this-&gt;validation->coc;?&gt;" size="25" onblur="ValidateField(this, 'coc')"/>

At this point in time I think what is not happening is the tag class(es) are not being passed into the validateField function... This was working when I was manually passing in a validation rule for the function, but that prevents me from adding rules on the fly.

Thanks for any help you guys might be able to provide.


  Validation on IE7
Posted by: El Forum - 08-25-2008, 04:34 PM - Replies (6)

[eluser]taewoo[/eluser]
Hi everyone.

I have a form with custom validation. Basically, it makes sure that the name of a group is unique by looking up the name before trying to insert the record (via "callback_XYZ" feature of CI validation). On FF3, it works fine.. but in IE7, it looks like the form is submitting TWICE (with single form submit "click") b/c the record is added on the DB (i made sure the table is empty) and validation comes back saying that the name is taken.

From this my only guess is that IE7 is somehow submitting twice.
IS there a solution to this? It's making me pull my hair out! :/


  Flexigrid help - How to add parameters to the Ajax call
Posted by: El Forum - 08-25-2008, 03:56 PM - Replies (3)

[eluser]Unknown[/eluser]
Hi,

I started with the Flexigrid and so far it is excellent. I do have a question.

I have a json grid based on a Java servlet and it works great. I am planning to have some dropdowns, textboxes that will have search criteria. How can I send them as some [name, value] parameter to my url?

Tried to get the url to modify and reload, can't see how to go about it.

A simple code example would be a great help!


Thanks,
Kal


  Paypal Registration Application
Posted by: El Forum - 08-25-2008, 03:30 PM - Replies (12)

[eluser]Jesse Schutt[/eluser]
Hello all!

Sorry to give a disclaimer right off the bat, but I am still working at getting my feet wet with this CI stuff. So please be patient with me!

I am building an application that will be used to register individuals for a particular event. So far I have the forms built, passing the data to my database, and emailing me the results. What I need to do now is implement a PayPal payment gateway. Ideally the payment would happen prior to sending me the email and posting to the database. I'm sure this will entail IPN...

Can someone please give me some general direction as to how to make this happen?

Thanks in advance.

Jesse

PS - I am fairly active in the ExpressionEngine forums, and hoping that the CI forums will be a positive experience :cheese:


  Launched my first CI based site today
Posted by: El Forum - 08-25-2008, 03:27 PM - Replies (1)

[eluser]Josh Giese[/eluser]
I finally did it, my first CodeIgniter based site, http://www.UnderGroundLyricSearch.com

I want to say thank you to all the people that made posts that contributed to me get this project off the ground. This site is a great resource, and makes CI rock that much harder.

I honestly can't think of writing php code outside of CI now.


  Image resize problems
Posted by: El Forum - 08-25-2008, 02:38 PM - Replies (4)

[eluser]louis w[/eluser]
Having problems with the image lib and resizing images proportionally.

This is my config:

Code:
$config['image_library']     = 'gd2';
$config['source_image']     = $file_path;
$config['new_image']         = $resize_file_path;
$config['maintain_ratio']     = TRUE;
$config['master_dim']         = 'auto';
$config['width']         = $this->input->get('w');
//$config['height']         = $this->input->get('h');


When I do this and resize to 100 width, the width is 100, but the height is the original image size. I thought that maintain_ratio would scale the image proportionally?

I did see this post, but I did not have a image_thumb, so not appropriate.
http://ellislab.com/forums/viewthread/84992/

I almost want to do all the the new with/height logic myself, but feel it really should be built in.


  Autoload For Undefined Controllers
Posted by: El Forum - 08-25-2008, 02:23 PM - No Replies

[eluser]Unknown[/eluser]
I'm having an issue with the autoload.php file not being used when an undefined Controller is given. The same issue has been reported here, but I felt as thought it was better suited for this discussion. Is there a possible workaround for this, or perhaps a way of having a custom controller for our error pages? Thanks.

- dimpared


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

Username
  

Password
  





Latest Threads
Update from 4.6.0 to 4.6....
by FlavioSuar
11 hours ago
Setting baseURL in Regist...
by petewulf1
Today, 03:20 AM
Sessions old files are de...
by InsiteFX
Yesterday, 10:30 PM
Ajax post failing with Ty...
by PaulC
Yesterday, 12:23 AM
intermittent smtp failure...
by InsiteFX
05-11-2025, 11:30 PM
MVC vs MVCS vs CodeIgnite...
by FlavioSuar
05-10-2025, 10:33 AM
CodeIgniter Shield 1.0.0 ...
by timesprayer
05-10-2025, 05:22 AM
Website Traffic Drop Afte...
by InsiteFX
05-10-2025, 04:23 AM
Magic login link not work...
by InsiteFX
05-10-2025, 04:16 AM
Is codeigniter 5 upco...
by InsiteFX
05-10-2025, 04:10 AM

Forum Statistics
» Members: 145,769
» Latest member: ofismobilyalari6
» Forum threads: 78,388
» Forum posts: 379,447

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB