Welcome Guest, Not a member yet? Register   Sign In
  Decision
Posted by: El Forum - 06-10-2008, 02:41 PM - Replies (4)

[eluser]Jamie Rumbelow[/eluser]
I've got a big decision to make:

Should I use ExpressionEngine, Wordpress, InkType or a Custom CI solution?

I need simple blog functionality, but I can't make up my mind.


  Should I use CodeIgniter to build a B2B?
Posted by: El Forum - 06-10-2008, 01:28 PM - Replies (5)

[eluser]davidz[/eluser]
Hi. My name is David, a new CI user and I'd like to ask to you all if I should use CodeIgniter as my framework for a b2b project.

I have to accomplish a lot of requirements about manageable user interfaces, membership stuffs, publicity and, of course, fast and logically correct search in mysql....

In example: a search like www.mydomain.com/some_enterprice should be valid, but some_enterprice is not a Controller (in CodeIgniter, and I guess I'll have to deal with .htaccess file)...

So, that's a little about my project. So, should I use CI for this... thanks.

PD: Sorry if my english is not correct.


  three doubts, about read_file, htmlentities and tiny mce
Posted by: El Forum - 06-10-2008, 01:09 PM - Replies (3)

[eluser]jozeunico[/eluser]
Well, hello everyboady again, sorry about my english and thanks.

And here's my task list Sad
1.-I have a problem when I try to read a file if the file is empty, CI return "false"
for example I did it this:

$string=read_file('./system/application/views/info/some_view.php');
if ($string==false){
echo 'ERROR al abrir el archivo carnal';
}
else{
echo $string;
}

some_view.php exists and the rute is correct (I tested with other files in the same path)
But THE PROBLEM is when the file is empty. Somebody have any idea to solve the problem when the file is empty? I mean I want to "show" the file content even if it's empty. It's because i use a tinymce 2.x to edit the file content, but sometimes the file can be empty.

And a couple of doubts,I mean questions:
2.- Somebody know a plugin to embed a flash mp3 player that works with tinymce
3.- Can I use htmlentities to save strings with html tags into DB?


  Upload Library - No error, but no file uploaded and no data returned
Posted by: El Forum - 06-10-2008, 12:21 PM - Replies (2)

[eluser]Unknown[/eluser]
I am having trouble with the CI upload library. My issue:

I have a form to create a new database entry creating data for categories. I have named the upload field everything from userfile (default) to "terrorists" and passed the value to do_upload() if it wasn't userfile. All other data is entered into the database appropriately, and no error message is displayed by the uploader, but the file is not uploaded, and $this->upload->data() returns nothing of value. I have tried forcing it to break by uploading an executable (should require image), and that won't even throw an error.

Things I have tried:
- Name the field differently (including "userfile")
- Check CHMOD on upload directory
- Uploading a file which does not fit allowed file types
- Uploading before or after validation (I know, why upload before ensuring valid data...)
- Checking view output (valid form, multipart, etc.)
- Checking consistency of other data submitted with form

Does anyone have any suggestions?

Note: I am using the form helper functions and passing the field information to the view to build the form.


  best way to deploy sites with Subversion (SVN)?
Posted by: El Forum - 06-10-2008, 12:05 PM - Replies (3)

[eluser]nanda[/eluser]
Hi, I'm developing an custom CMS that will need to be deployed for a couple of different projects. I want to be able to work on the core code and push the changes out to the installations. of course the installations will have some custom theming etc., so I don't want to affect that either.

I figure I could do this with subversion but have never used it before. I've done a lot of searching/googling but haven't found any clear instructions on how to do this, does anyone have any tips or advice?

I was planning on using beanstalkapp.com as it seems a simple way to get into svn.


  two different queries returning same data
Posted by: El Forum - 06-10-2008, 11:38 AM - Replies (3)

[eluser]tjmthome[/eluser]
Hi, I need some help, with a strange behavior of CI or maybe im too novice.
Im working with Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi

Code:
//in a MODEL i have some funcions with queries
function getUsers(){
  $qryUsrs = $this->db>query('select * from users');
  return $qryUsrs->result_array();
}
function getDocs(){
  $qryDocs = $this->db>query('select * from documents');
  return $qryDocs->result_array();
}

//in my CONTROLLER i call both
$this->load->model('qry_model');
$data['users'] = $this->qry_model->getUsers();

// Here im trying to clean the array
$this->db->result_array = array();

$data['docs'] = $this->qry_model->getDocs();
$this->load->view('my_view',$data);

//in my VIEW I display both queries each in a table
echo $this->table->generate($users);
if($users === $docs) echo 'THE ARRAYS HAVE THE SAME DATA....'; //This always print
echo $this->table->generate($docs);

The problem is that in both tables I get exactly the same data, i suppose i need to ‘clear’ the info in the array before getting another, someone knows how i must to proceed to get the correct data in each table?

Thanks in advance


  Fatal error -> base_url() - what am I doing wrong?
Posted by: El Forum - 06-10-2008, 10:35 AM - Replies (11)

[eluser]ICEcoffee[/eluser]
I get this error when loading a simple view file from my default controller:

Quote:Fatal error: Call to undefined function base_url() in H:\xampp\htdocs\ci2\application\views\home_view.php on line 6

Line from 'home_view.php'
Code:
<link rel='stylesheet' href='<?php echo site_url(’styles/style.css’) ?>' type='text/css' media='screen' charset='utf-8' />

my config file:
Code:
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
|    http://www.your-site.com/
|
*/
$config['base_url']    = "http://localhost/ci2/";


  SOLVED: Default Controller always loads instead of everything else
Posted by: El Forum - 06-10-2008, 09:44 AM - Replies (4)

[eluser]MCrittenden[/eluser]
I've been running a site under CI for a couple weeks now with no problems. I guess I must have screwed something up on the last couple days.

No matter which page you try to load, the default_controller loads. If I change the default_controller, then the new one will load in place of all of the other controllers.

For example, I have a "photo" controller. If I go to mywebsite.com/photo (I have index.php taken out via .htaccess), the URL stays at /photo, but the home page loads because "home" is the default controller.

I'll be happy to post any code that might help you guys. The routes.php and config.php files all look right to me. I rechecked .htaccess and it's still the same.

Thanks a lot in advance.


  Problem With XML File Accessing
Posted by: El Forum - 06-10-2008, 09:39 AM - No Replies

[eluser]WoOzY KinG[/eluser]
So the little application I want to make is to be able to add new entries into and delete from an xml file in a form of such:

Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<audio>
    <file>
        <track>http://127.0.0.1/test/cocoweb/1.mp3</track>
        <caption>Coco Music</caption>
        <record>High DJ</record>
    </file>
    <file>
        <track>someother.mp3</track>
        <caption>woot</caption>
        <record>Low DJ</record>
    </file>
</audio>

Entries would be "file" tags. After some docs reading, I had this quick and dirty code working for adding new entries:
Code:
// add
if ( isset($_POST['add']) && isset($_POST['track']) && isset($_POST['caption']) && isset($_POST['record']) ) {
    $file = $xml_src->addChild( 'file' ); // add a new node "file"
    $file->addChild( 'track', $_POST['track'] );
    $file->addChild( 'caption', $_POST['caption'] );
    $file->addChild( 'record', $_POST['record'] );

    if ( $file ) { // if added propery
        $fp = fopen( $source, 'w' );
        fwrite( $fp, $xml_src->asXML() );
        fclose( $fp );
    }
}

And also I've come up with some code to perform the delete job, but it fails:
Code:
// remove - using DOM lib, not finished
if ( $_GET['action'] == 'del' && isset($_GET['del_track']) && isset($_GET['del_caption']) && isset($_GET['del_record']) ) {
    // import from the existing SimpleXML object instead of loading the xml file again
    $node = dom_import_simplexml( $xml_src );
    $dom = new DomDocument();
    $dom->importNode( $node, true );
    $dom->appendChild( $node );

    $del_file = $dom->documentElement;
    $count = 0; // initialize counter

    foreach ( $xml_src as $file ) {
        if ( ($file->track == $_GET['del_track']) && ($file->caption == $_GET['del_caption']) && ($file->record == $_GET['del_record']) ) {
            $del_track = $del_file->getElementsByTagName( 'track' )->item( $count );
            $del_file->removeChild( $del_track );

            $del_caption = $del_file->getElementsByTagName( 'caption' )->item( $count );
            $del_file->removeChild( $del_caption );

            $del_record = $del_file->getElementsByTagName( 'record' )->item( $count );
            $del_file->removeChild( $del_record );

            break; // since we need to delete only one file
        }

        $count++;
    }
    
    //$fp = fopen( $source, 'w' );
    //fwrite( $fp, $dom->DOMNode->saveXML() );
    //fclose( $fp );
}

I hope the code is readable, and just to make it clear, my actual situation here is the delete part. Please gimme a hand Big Grin


  Rambo-scaffolding
Posted by: El Forum - 06-10-2008, 09:30 AM - Replies (4)

[eluser]recoilme[/eluser]
Rambo scaffolding
Rambo-scaffolding its tiny codeigniter plugin.

Install:

unpack Rambo-scaffolding.zip and replace scaffolding folder in codeigniter.

How to use:

as usual scaffolding.

1. type

Code:
$route[’scaffolding_trigger’] = “rambo”;  in application/config/routes.php

2. type

Code:
$this->load->scaffolding(’table_name’);

and in url www.your-site.com/your-controller/rambo - you will see admin panel for this table.

Advanced usage:

Code:
if ($this->logged_in == FALSE) redirect('register/login');// some login check
// fields what we want see on rambo-panel
$fields = array (
'0'         => 'id',//1'st field must be primary key!
'1'         => 'timecreate',
'2'         => 'userlogin',
'3'         => 'msgbody',
'4'         => 'comments_cnt'
);

$table = array (
‘table’     => ‘msg’,
‘fields’    => $fields
);

if ($this->userid == 1 or $this->userid == 3)//some auth check

$this->load->scaffolding($table);

What its will do?

1. some admin interface for your moderators

2. Sortable grid

3. Filters on anyfield

What its use?

mootools, sortablegrid and codeigniter off corse

its all included in arhive, except codeigniter

Will standart scaffolding work?

Yes. Its backward compatible (oOo, my dirty english is rulezz!)

How its look?

see screenshort

Download


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

Username
  

Password
  





Latest Threads
CodeIgniter v4.5.0 Releas...
by eelisland
2 minutes ago
Cache best practice?
by BhambriRohunu
1 hour ago
CI 4.5.1 CSRF - The actio...
by BhambriRohunu
1 hour ago
Bug with sessions CI 4.5....
by InsiteFX
1 hour ago
Codeigniter Shield Bannin...
by kenjis
6 hours ago
SQL server connection not...
by kenjis
6 hours ago
Best way to create micros...
by kenjis
8 hours ago
How to use Codeigniter wi...
by kenjis
8 hours ago
Getting supportedLocales ...
by kcs
Yesterday, 09:30 AM
Component help
by FlashMaster
Yesterday, 01:41 AM

Forum Statistics
» Members: 85,278
» Latest member: buyhydrocodoneonlineinfewclick
» Forum threads: 77,577
» Forum posts: 375,981

Full Statistics

Search Forums

(Advanced Search)


Theme © iAndrew 2016 - Forum software by © MyBB