Welcome Guest, Not a member yet? Register   Sign In
  [Request] Music Site Coding
Posted by: El Forum - 08-19-2008, 07:56 PM - No Replies

[eluser]Unknown[/eluser]
can you please tell me which plugins/applications

Code:
http://www.sparkshell.com
using??? and which script??

can you please help me out

thanks in advance


  Opting for a domain-specific approach versus data-driven design with code igniter
Posted by: El Forum - 08-19-2008, 07:00 PM - Replies (12)

[eluser]Jay Callicott[/eluser]
I am in the midst of reading "foundations of programming ebook" here: http://codebetter.com/blogs/karlseguin/a...ebook.aspx by a .NET guy and wondering if I should be using a domain-specific approach.

I build a lot of applications, in 2 years I've built 30+ live state government (many big) applications using code igniter. We're moving to .NET but thus far it's been all CI.

I use the MVC approach and I have to say it's not bad. But it does get me into trouble sometimes. I built my own "poor man's rails-esque active record" tho much simpler that i use which kind of binds a model to a database table but of course I cheat bc often it will do operations across other tables, sometimes other databases and other models which can really muddle things up. It's bc often I can't make up my mind as to whether the model is a representation of that table or a more abstract model of a domain like this book talks ab. Like for example you could have a table called "users" but usually the user model involves alot more than just the interaction with that table.

I am sure there are some projects out there that do object-relational mapping in CI - I'm not really interested in that unless it's really good. I haven't been impressed by the CI 'plugin' contributions.

My thought is maybe I need to map out objects in the 'domain' space using my libraries folder and then initiate models through those libraries and in the controller only interact with the libraries instead of directly with the models which is what I do now. So instead of a user model I would have a user library and initiate the user model and any other model that dealt with that problem space. My user model would be much cleaner bc I would probably only include functions there that interacted with the database. Often there are other things you're doing such as login/session management, validation, interacting with files, etc that have always felt 'awkward' in the user model.

What do you think? Am I missing something really obvious? Are other ppl doing this?


  Template system problem
Posted by: El Forum - 08-19-2008, 05:42 PM - Replies (4)

[eluser]wdcci[/eluser]
I have just tried using this template library:

http://williamsconcepts.com/ci/codeignit...index.html

and I am getting this error:

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Page::$template

Filename: controllers/page.php

Line Number: 12

I have gone through the tutorial, but it's not working for me. Does anyone have ideas?


  file uploader class issues
Posted by: El Forum - 08-19-2008, 04:58 PM - Replies (11)

[eluser]llbbl[/eluser]
having trouble uploading files. it is not allowing odt or xls or ods files even thou this is in my config file settings before I initialize the class.

$config['allowed_types'] = 'doc|pdf|txt|ppt|odt|xls|ods';

the only other config thing is max size and all the documents are all under the max size.

When I

$data = array('error' => $this->upload->display_errors());
var_dump($data)

it says:
array(1) { ["error"]=> string(64) "

The filetype you are attempting to upload is not allowed.
" }

doc, pdf and txt work


  Database lookup tables and models
Posted by: El Forum - 08-19-2008, 04:19 PM - Replies (3)

[eluser]jleequeen[/eluser]
I have quite a few lookup tables in a database for a current project and really have two questions.

First, is it good practice to create a model for each lookup table even if the table would only be used to make a dropdown? Maybe that is overkill, but I'm not sure.

Second, I've read articles that talk about "keeping your data in the database" as opposed to a bunch of static lists for creating dropdown menus, but obviously for some lists (especially with only 5 or 6 options) it's hard to justify creating a table just for them. In my project I have lookup tables for states, counties, river basins, river sub-basins, etc. Is there a best practice when it comes deciding on when it is time to create a lookup table, vs a static list? Or should basically all data be in the database without any static lists or arrays hardcoded? I know this also may be personal preference.


  View loading problem
Posted by: El Forum - 08-19-2008, 04:16 PM - Replies (5)

[eluser]CoolGoose[/eluser]
I was trying to load a view from another view and for some reason it breaks the application.
The controller is:

Code:
class Frontpage extends Controller
{
    function __construct()
    {
        parent::Controller();
    }



    function index()
    {
        $this->load->view('partials/header');
        $this->load->view('frontpage', $data);
        $this->load->view('partials/footer');
    }  

}
And in the partials/footer file I've tried to load another view
Code:
$this->load->view('partials/login');

Any ideas ?


  What can happen if i use a loose URL chars restriction?
Posted by: El Forum - 08-19-2008, 03:55 PM - Replies (3)

[eluser]plainas[/eluser]
Lets say I allow every char and escape them whenever i put userdata in an SQL query, etc. What can possibly happen?

Can anybody give me an example to illustrate this?


  [SOLVED] Character Encoding
Posted by: El Forum - 08-19-2008, 03:39 PM - Replies (2)

[eluser]julien.1486[/eluser]
Hello guys !

I'm using CI since few days. I'm trying to rebuild a website with CI and I have a small problem. I want to use iso-8859-1 encoding, and it works except if I use the html helpers.

In my view, I write directly a small text with special chars (é, è..etc.. yes, french is a boring language :-p) and at the end I use the ul() function.
When I load it with my browser I can see that the ul() function returns a text with a bad encoding (If a switch to UTF-8 with my browser then the text displayed by ul() is correct, not the one I've written directly).

In my application/config/config.php I've written :

Code:
$config['charset'] = "ISO-8859-1";

I use Eclipse PDT and it's configured to use iso-8859-1 encoding.

So, what's wrong ?

Thanks for your help :-)


  MVC Best Practices
Posted by: El Forum - 08-19-2008, 01:40 PM - Replies (5)

[eluser]darkhouse[/eluser]
I'm just trying to find out how the best way to do things are. For instance, I have a site that's almost done, and I need to add an "alerts" area into the header of all pages if a user is logged in. If they have at least 1 new alert, the link will say "You have 1 new alert". The HTML for the area is in just one view file, but the view is loaded from every controller, so it seems like I need to add the functionality to get the number of alerts into every controller wherever the view is loaded, but it seems redundant to me.

Can somebody enlighten me on some best practices for this sort of thing, or any other tips, I'm still fairly new to the concept of MVC, though I love it.


  Xampp?
Posted by: El Forum - 08-19-2008, 01:34 PM - Replies (10)

[eluser]Bl4cKWid0w[/eluser]
Does CodeIgniter work with Xampp? The reason I'm asking this is that up until recently, I had been developing my projects with CodeIgniter on my web hosting, but the host went down for a while and decided to develop it on my PC with Xampp. It was working fine on the web and the config files are the same, but only my main page is working.

Any ideas?


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

Username
  

Password
  





Latest Threads
Trying to remove index.ph...
by kabeza
32 minutes ago
Reading a session variabl...
by LP_bnss
41 minutes ago
CI NEEDS A PROPER DOCUMEN...
by codestellar
47 minutes ago
Gateway time out CI 4.4.1
by adleon73
2 hours ago
CodeIgniter 3 to 4 migrat...
by kenjis
2 hours ago
Background image does not...
by ozornick
3 hours ago
Implement DDD in Codeigni...
by InsiteFX
6 hours ago
Issue with Model Validati...
by kenjis
8 hours ago
What should I do to show ...
by kenjis
9 hours ago
error is logged. but it d...
by kenjis
11 hours ago

Forum Statistics
» Members: 86,808
» Latest member: nhacai8kbettoday
» Forum threads: 77,625
» Forum posts: 376,225

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB