Welcome Guest, Not a member yet? Register   Sign In
  Does Directory Structure Effect SEO ?
Posted by: El Forum - 10-16-2008, 02:16 AM - Replies (3)

[eluser]Unknown[/eluser]
Hello, I'm currently auditing Codeigniter for an upcoming project.

I'd like to keep the maximum amount of code out of public directories. Ideally I'd like only a single index.php file in the public www directory making calls to restricted code in a folder higher in the structure, the root folder (for example).

My question is "how will this affect search engine optimization?"

I suspect that having the "view" files out of public view will hinder web crawlers.

I'm wondering if I will want to cache pages in a public folder so that the crawlers will be able to index the site effectively.

I'd appreciate any feedback.

Thanks.


  File upload not working (no errors even displayed)
Posted by: El Forum - 10-16-2008, 01:00 AM - Replies (9)

[eluser]bhakti.thakkar[/eluser]
hi all,
i am trying to upload file but it isnt working. below in the code in MVC:
view.php

Code:
<?php echo form_open_multipart('ncs/do_upload/' . $row->NonConformity_ID, array('id'=>'private_note_form'));?>

        <h4>Upload evidence document(s) </h4>

        <p>
            &lt;input name="userfile" type="file" id="userfile" /&gt;
        </p>

        <p>
            &lt;input type="submit" name="submit" value="Add files" /&gt;  
        </p>

&lt;?php echo form_close();?&gt;


Code in the controller:
ncs.php:
Code:
function do_upload($id)
    {
        $this->load->model('evidence_upload_model');

        $directory="HTTP://".$_SERVER['SERVER_NAME']."/files/Appl_files/";
        $config['upload_path'] = $directory;
        $config['max_size']    = '16777215';
        $config['max_width']  = '3000';
        $config['max_height']  = '3000';
            
        $this->load->library('upload'); // load if it hasn't already been loaded
        $this->upload->initialize($config); // pass the settings to the library
        $data = array('upload_data' => $this->upload->data());
            print_r($config);
            
            if(!$this->upload->do_upload())
              {
                $error = array('error' => $this->upload->display_errors());

//                return FALSE;
            //    print "not done";
              }
              else
              {
                  print "done";
//                return TRUE;
              }
    

//        $this->session->set_flashdata('message', 'success in file upload');
//        redirect('ncs/view/' . $id);
    }

No error messages also displayed. files also not uplaoded in the specified path. just a blank page. i have checked the directory access also (CHMOD = 777)

Please help me
Thanks


  Header/Footer at Error Message
Posted by: El Forum - 10-16-2008, 12:29 AM - Replies (5)

[eluser]hykoh[/eluser]
Hello,

is it possible to display the error msg with header/footer ?

for example:

Code:
&lt;?php

if(1 != 2) {
show_error('1 is not 2');
}

?&gt;

i want to display the message like:

Code:
$this->load->view('header');

&lt;?=$errMsg;?&gt;

$this->load->view('footer');

I already tried to modify the "error_general.php", but only get error that $this is not a object in this context.

Thanks for help


  Ajax and CodeIgniter
Posted by: El Forum - 10-16-2008, 12:22 AM - Replies (2)

[eluser]lanzce[/eluser]
I am new here and I'm wondering if somebody could help me out with my problem in using ajax. The statement below is one of the problems I have:

echo $this->ajax->link_to_remote("Login", array('url' => '/login', 'update' => 'divblock'));

Please tell me what "Login" is for? The 'url' and 'update' are easy to understand but not "Login". Any help will be appreciated.


This statement is also found int the http://codeigniter.com/wiki/AJAX_for_CodeIgniter/


  json Encoded URL is not supported in CodeIgniter
Posted by: El Forum - 10-15-2008, 10:32 PM - No Replies

[eluser]Joseph1982[/eluser]
Hi,

I have an array and I encoded to create an URL. The array & the URL created is below:

array(10, 12, 13, 45, 1, 2, 5, 78, 111);

http://mysite.com/rest/updatefeeds/[10,12,13,45,1,2,5,78,111]

When I called this URL, I got the following error:

The URI you submitted has disallowed characters


Can someone help me to fix this problem ?

Regards,
Joseph.


  Passing a XML file to REST API
Posted by: El Forum - 10-15-2008, 10:19 PM - No Replies

[eluser]Joseph1982[/eluser]
Hi,

I have created an API as documented in the post (http://ellislab.com/forums/viewthread/73080/). Now I need to pass a XML file to the API.

How is this possible?

Thank You,
Joseph.


  need to display username!
Posted by: El Forum - 10-15-2008, 09:27 PM - Replies (9)

[eluser]newbie boy[/eluser]
hi everyone!!! im new to this matter, hope you can help me with my problem. i'm still continiously learning and practicing the doctrine. how can i display the user's username to all succeding pages after the user successfully logged-in? hope you'll forgive my stupidity! thanks!!!

here's my codes:

for my controller:
&lt;?php
class LoginController extends Controller {

function LoginController(){

parent::Controller();
$this->load->database();
$this->load->helper(array('url', 'form'));
$this->load->library(array('calendar','validation','session'));

}

function index(){

$isValid = true;

$username = $this->input->post('username');
$password = $this->input->post('password');

if (empty($username)) { $isValid = false; }
if (empty($password)) { $isValid = false; }

if ($this->session->userdata('logged_in') == '0') {

if ($isValid) {

$user = new UserModel();
$user = Doctrine_Query::create()
->select('u.*')
->from('UserModel u')
->where('u.user_id = ?', $username)
->fetchone();

$data['newUsername'] = $username;

$this->session->set_userdata('logged_in', '1');
$this->session->userdata('username');
redirect('HomeController', $data);

} else {

$this->load->view('userLoginView','refresh');

}
}
}
?&gt;;

how do I pass the username to the other controller? So I can display them to the succeeding views? Thanks again!


  MSSQL Driver and _protect_identifiers
Posted by: El Forum - 10-15-2008, 09:19 PM - Replies (5)

[eluser]Jackpod[/eluser]
Hi,

I am using CI v1.6.3 and SQL Server 2005 and Active Record is generating errors.

I modified mssql_driver.php at line 465 and this seems to work.

I changed

Code:
return "\"{$item}\"";

to

Code:
return "[{$item}]";

A) Has anyone else experienced this?
B) Is this the correct fix?
C) Can you please explain why I need to change this and why it is not like this by default?

Thanks for your help!


  Live Search Results with Ajax
Posted by: El Forum - 10-15-2008, 09:00 PM - Replies (2)

[eluser]Zac G.[/eluser]
Hi,

I have been looking at doing a live search results features.

Something like this: http://rikrikrik.com/jquery/quicksearch/#examples

I am just not how this fits in with the controller that displays the query. Any suggestions, explanations of how to tie these two together?

Thanks!


  How "much" do you keep under version control?
Posted by: El Forum - 10-15-2008, 07:29 PM - Replies (4)

[eluser]mtbkrdave[/eluser]
Hi Y'all - CI newbie here, making his first post...

I've been poking around with CI under LAMPP for a few days, and I'm ready to start building a practice app. I'd like to keep it under version control, mostly as a best-practice but also because subversion has saved my butt on many an embedded C project, so I'm a big fan.

My question is: Just how "much" of the structure should I keep under version control? The entire CodeIgniter directory, including the framework files as well as my own? Or just the directories containing my project files?

Thanks,
[medic]dave


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

Username
  

Password
  





Latest Threads
How to use Codeigniter wi...
by sr13579
1 hour ago
Getting supportedLocales ...
by kcs
5 hours ago
Codeigniter Shield Bannin...
by xsPurX
7 hours ago
Best way to create micros...
by InsiteFX
11 hours ago
Component help
by FlashMaster
Today, 01:41 AM
Show logo in email inbox
by WiParson
Today, 12:48 AM
Limiting Stack Trace Erro...
by byrallier
Yesterday, 02:21 PM
Bug with sessions CI 4.5....
by ALTITUDE_DEV
Yesterday, 01:36 PM
codeigniter 3.0.1 equiped...
by JustJohnQ
Yesterday, 10:05 AM
Display a custom error if...
by b126
Yesterday, 06:22 AM

Forum Statistics
» Members: 85,223
» Latest member: abdulaziz03421
» Forum threads: 77,575
» Forum posts: 375,965

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB