CodeIgniter Forums
CodeExtinguisher 2.0 Public Beta (RC10) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: CodeExtinguisher 2.0 Public Beta (RC10) (/showthread.php?tid=6065)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23


CodeExtinguisher 2.0 Public Beta (RC10) - El Forum - 03-25-2008

[eluser]Majd Taby[/eluser]
Answer #1: Ah, you found a bug Sad....Here's what's happening: codex takes the first element in your table, and turns it into a link to edit. However, sometimes the text is too long, and it makes your table look ugly, so if your output is too long, then codex will cut it in the middle and put ... in the middle. The problem is that it's taking html output, encoding it as a link, and truncating it.

I'll fix it soon

Answer #2: As of now, you can only make a thumbnail by resizing, i'll add more Image Manipulation options in the next release.

Answer #3: You would make your own codex_form_view.php in application/view/templates/default/


CodeExtinguisher 2.0 Public Beta (RC10) - El Forum - 03-25-2008

[eluser]Référencement Google[/eluser]
Ok, thanks jTaby for the quick answers, I will try to use Codex on a next project.
Just one more question: now that you are busy a lot, how do you plan the future of Codex ? Do you have also a Roadmap for next releases ?


CodeExtinguisher 2.0 Public Beta (RC10) - El Forum - 03-25-2008

[eluser]Majd Taby[/eluser]
I'm actually looking for people to help me out. I'm drafting a "What's left before 2.0" document, and I already have a couple of people helping me, but I'm just going through a rough patch in school right now (it's the last month of the semester and everything is piling up), but I'll be spending a lot of time on codex again soon.


CodeExtinguisher 2.0 Public Beta (RC10) - El Forum - 03-25-2008

[eluser]Référencement Google[/eluser]
Cool to ear so. If I can help in something you are welcome to ask me, my skills are more on the design side, like Photoshop, xHTML and CSS.


CodeExtinguisher 2.0 Public Beta (RC10) - El Forum - 03-25-2008

[eluser]Andi Eko[/eluser]
Any Idea to make Dependent DbDropDown ?
Basically I already edited the DbDropDown from this Codex and now I can use it if you need a dbdropdown with username session.
Here's the code :
Code:
function prepForDisplay($value){
        $CI = &get;_instance();
        $CI->db->select($this->field);
        $CI->db->where($this->primary_key,$value);
    $CI->db->where($this->user,$CI->codexsession->userdata('user_name'));
        $query = $CI->db->get($this->table);
        $result = $query->result_array();
        if(count($result) == 0)
            return '';
        else
            return $result[0][$this->field];
    }

    function getList(){
        $CI = &get;_instance();
    $value = $this->value;
        if(!isset($CI->db)) $CI->load->database();
    if (isset($this->add_link)) {
    if (!isset($this->user)) $filter='';
    else $filter="  WHERE ".$this->primary_key."=$value and ".$this->user."='".$CI->codexsession->userdata('user_name')."'";
    }
    else $filter="  WHERE ".$this->user."='".$CI->codexsession->userdata('user_name')."'";

        $html = "<option value =\"\"></option>";
        $field = $this->params['field'];
        $table = $this->params['table'];
    
        $result = $CI->db->query("SELECT ".$this->primary_key.",$field FROM $table ".$filter);
        foreach($result->result_array() as $row){
            if($row[$this->primary_key] == $this->value)
                $html .= "<option value=\"".$row[$this->primary_key]."\" selected>".$row[$field]."</option>\n";
            else
                $html .= "<option value=\"".$row[$this->primary_key]."\">".$row[$field]."</option>\n";
        }

        return $html;
    }
}
I've add this Code : $CI->db->where($this->user,$CI->codexsession->userdata('user_name')); in function prepForDisplay to make the dbdropdown support user session.
And this code :
$value = $this->value;
if (isset($this->add_link)) {
if (!isset($this->user)) $filter='';
else $filter=" WHERE ".$this->primary_key."=$value and ".$this->user."='".$CI->codexsession->userdata('user_name')."'";
}
else $filter=" WHERE ".$this->user."='".$CI->codexsession->userdata('user_name')."'";

$result = $CI->db->query("SELECT ".$this->primary_key.",$field FROM $table ".$filter);
in function getList to make list support user session.

Any Idea to make simplify this code ?
I really need Dependent DbDropDown Smile


CodeExtinguisher 2.0 Public Beta (RC10) - El Forum - 03-25-2008

[eluser]Majd Taby[/eluser]
so it's working, and you're looking for tips to simplify the code?


CodeExtinguisher 2.0 Public Beta (RC10) - El Forum - 03-26-2008

[eluser]Andi Eko[/eluser]
Perhaps anyone will make a Project to build a Forum maybe ?


CodeExtinguisher 2.0 Public Beta (RC10) - El Forum - 03-26-2008

[eluser]Majd Taby[/eluser]
i was contemplating that...it wouldn't be hard really.


CodeExtinguisher 2.0 Public Beta (RC10) - El Forum - 03-26-2008

[eluser]got 2 doodle[/eluser]
Hello jtaby, this is my first post on this forum. I am a php noob and I am working on my first CI app. Your CodeExtinguisher app is awesome! congratulations thus far!

I wish I could offer to help, but mostly I am learning. I may be able to comment on what's missing from a noobs point of view ;-)

Anyway just wanted to say thanks,


CodeExtinguisher 2.0 Public Beta (RC10) - El Forum - 03-26-2008

[eluser]matthewr[/eluser]
jTaby, i think we need a trac for Codex. What do you think?