Welcome Guest, Not a member yet? Register   Sign In
  Porting ExpressionEngine to CI
Posted by: El Forum - 08-23-2007, 07:37 AM - No Replies

[eluser]zdknudsen[/eluser]
Okay so I needed a system similar to ExpressionEngine, when making sites for clients.

Currently I'm developing a community-driven website and I would like to use a CMS.

But since I do not need that many of EE's features and I had some additional needs I thought I would make it with CodeIgniter instead. Now I have a few questions regarding a port of EE to CI.

Am I allowed to create a templating system that parses like EE? (Modules = classes that can be used on templates, and modules similar to that of EE).

Can I use EE's database structure?

And basicly to what extend one can copy EE's features, seeing as EE is a commercial system.


  Image lib error
Posted by: El Forum - 08-23-2007, 07:07 AM - No Replies

[eluser]emperius[/eluser]
In the settings i have
$config['maintain_ratio'] = TRUE;

however on resize just width changes. How to change the height in proportion to width

the code follows

Code:
$imgpath = realpath("public/logo/".$resarr['file_name']);
$config['image_library'] = 'GD2';
$config['source_image'] = $imgpath;
$config['maintain_ratio'] = TRUE;
$config['width'] = 200;            
$this->load->library('image_lib', $config);
$this->image_lib->resize();


  Calendar question
Posted by: El Forum - 08-23-2007, 06:54 AM - No Replies

[eluser]postlogic[/eluser]
Hi, just wondering if it's possible to specify other names for days (e.g., another language) in the calendar library.

Something like

Code:
$prefs = array(
    'day_names' = array("man", "tirs", "ons", "tors", "fre", "lør", "søn")
);

if you catch my drift.

kthx.


  Use of periodically_call_remote
Posted by: El Forum - 08-23-2007, 06:30 AM - No Replies

[eluser]Unknown[/eluser]
Hi.
I'm using the Ajax library with Code Igniter and I'm doing almost all the Ajax calls using the Ajax.Updater method. I want to make a periodic Ajax call and I think that prototype's periodically_call_remote method should be the solution, but I can't get it working...
Anybody could tell me what should I do to get it working?
I'm doing the Ajax calls from javascript and all the posts I've been reading about periodically_call_remote talk about a type of calls (ruby on rails, I think) that I' ve never used.
I'm a little lost right now... anybody have used it? Could you explain me a little about periodically_call_remote?

Thanks!
subiroff


  Problem with inheritance
Posted by: El Forum - 08-23-2007, 05:06 AM - No Replies

[eluser]masterix[/eluser]
I haven't found it so I post here.

I have following dependence hierarchy in my project:

Code:
class Admin extends Controller
class NewsAdmin extends Admin
class ArtAdmin extends Admin
class ConfigAdmin extends Admin

The problem occurs when I invoke NewsAdmin controller. CI doesn't know anything about Admin class. It can be solved by adding:
Code:
require_once('admin.php');
but this solution isn't nice for me. Is there any other ?

Thanks in advance for help.


  help!how to use 'redirect' to retrun a url like 'listview/index/' not "listview/index"
Posted by: El Forum - 08-23-2007, 03:27 AM - No Replies

[eluser]Unknown[/eluser]

Code:
function update(){
        $this->get_result->doupdate();
        //echo "sucess";
        redirect('listview/index/');
    }


it returns a url "index.php/listview/index"
But, that I want is "index.php/listview/index/"

I am so sorry my English is very poor!!
Have you known my doctrine's?
thank you


  validation : return formatted rule fields
Posted by: El Forum - 08-23-2007, 02:28 AM - No Replies

[eluser]xwero[/eluser]
I don't know if it's possible so i want to ask it first.

The idea behind it is simple. You have all those rules to validate the input and when the validation succeeds you can use the rules instead of doing the same thing over again with the post variables.

In code this would be something like this

Code:
$this->load->library('validation');
        
$rules['username'] = "trim|required|min_length[5]|max_length[12]|xss_clean";
$rules['password'] = "trim|required|matches[passconf]|md5";
$rules['passconf'] = "trim|required";
$rules['email'] = "trim|required|valid_email";
    
$this->validation->set_rules($rules);
    
$fields['username']    = 'Username';
$fields['password']    = 'Password';
$fields['passconf']    = 'Password Confirmation';
$fields['email']    = 'Email Address';

$this->validation->set_fields($fields);
        
if ($this->validation->run() == FALSE)
{
    $this->load->view('myform');
}
else
{
    $this->model->add($this->validation->username,$this->validation->password,$this->validation->passconf,$this->validation->email);
    $this->load->view('formsuccess');
}

I tested this example but the $this->validation->username returned the post variable.


  url routing to dynamic file name
Posted by: El Forum - 08-22-2007, 11:19 PM - No Replies

[eluser]RaZoR LeGaCy[/eluser]
I need

Code:
http://www.hellhorror.com/demon-names-16.html
to go to
Code:
http://www.hellhorror.com/demons/demonology/16/DYNAMIC-NAME.html
with a header of 301 permanent redirect

How may I do it??
In routing, a seperate file that checks the segment then checks the DB and inserts the file-name?

Best optimized solution please.


  Question about web blog tutorial.
Posted by: El Forum - 08-22-2007, 09:36 PM - No Replies

[eluser]Unknown[/eluser]
Hello all,
I have been using CodeIgniter for about an hour now so I am pretty new. And only recently started getting interested in php. This problem i'm having might be simple, but my experience is lacking...

This is from the video tutorial.

I have my entire blog working up to this point. In the tutorial I am told to add this line in order to add a comment link to correspond to each record.

<p>&lt;?=anchor('blog/comments/'.$row->id, 'Comments');?&gt;</p>

The code runs without any problems if I remove the ".$row->id".
But when I run this code as show above, I receive this error on every record:

A PHP Error was encountered

Severity: Notice

Message: Undefined property: stdClass::$id

Filename: views/blog_view.php

Line Number: 13



My guess is that something needs to be activated somewhere, but i'm just a newbie! =P
Looking forward to rockin' some more php tutorials! Please Help! =)


  Editing a form - CI strategy
Posted by: El Forum - 08-22-2007, 09:09 PM - No Replies

[eluser]stevefink[/eluser]
Hi all,

So I have a form where a user inputs their stuff, etc. Later on, this data gets populated into a table with zebra stripes, nothing out of the ordinary there.

Now I have the issue, where I need to have the user be able to edit the form and update the db, versus insert data. Inputs that would normally get validated as FALSE in the insert form, might not be false in this particular mode. For instance, if a key that requires to be unique needs to be changed in the Edit mode, it should be allowed to get changed. In insert mode, it would give the user an error that the key has already been added.

I've been searching the threads without much luck on how folks tackle this problem using CI. Would anyone be able to suggest anything? Should I use a completely separate controller for modifying the information versus adding the information? Use the same view by the different controllers so everything visually and input wise stays the same?

Thanks so much, could really use a helping hand here.

- sf


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

Username
  

Password
  





Latest Threads
Changing Session cookie -...
by paulbalandan
3 hours ago
hot-reload side effects s...
by PaulC
8 hours ago
using app/Config/App.php ...
by sam547
Yesterday, 03:04 PM
Setting baseURL in Regist...
by grimpirate
05-15-2025, 02:20 PM
CRUD Code Generator
by DeanE10
05-15-2025, 05:31 AM
CodeIgniter.com - Report ...
by Harry Lyre
05-14-2025, 04:26 AM
Missing closing bracket w...
by abf
05-13-2025, 07:27 PM
Update from 4.6.0 to 4.6....
by FlavioSuar
05-13-2025, 04:17 AM
Sessions old files are de...
by InsiteFX
05-12-2025, 10:30 PM
Ajax post failing with Ty...
by PaulC
05-12-2025, 12:23 AM

Forum Statistics
» Members: 146,553
» Latest member: Targayenss2009
» Forum threads: 78,392
» Forum posts: 379,464

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB