Welcome Guest, Not a member yet? Register   Sign In
CodeExtinguisher 2.0 Release Candidate 14.2

[eluser]gusa[/eluser]
[quote author="abmcr" date="1212957147"][quote author="gusa" date="1212786046"] i made something similar by creating a plugin called LinkTo. in your example linkto would be the plugin for 'related2'......[/quote]
I have a very interest for this feature, gusa.... tell me if you want to share with us your plugin.. ciao[/quote]

i'd love to. the problem is that when i try to associate linkto with a field not present in the db i'm getting an error.

i tried to overwrite the getFieldName method but it seems that codex doesn't execute it. help, please!

[eluser]daulex[/eluser]
jtaby, dude, im begging u, plz fix this
Code:
<select name="view_mode">
                    index.htmltable.php<option value="table.php"<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message:  Undefined index:  filename</p>
<p>Filename: clean_blue/codex_choosers.php</p>
<p>Line Number: 16</p>

</div><div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message:  Undefined index:  filename</p>

<p>Filename: clean_blue/codex_choosers.php</p>
<p>Line Number: 17</p>

</div>></option>                </select>

I'm making a new site and I think I will have to base it on the 1.4 version if u cant fix this. Sad

[eluser]abmcr[/eluser]
[quote author="gusa" date="1213048876"][quote author="abmcr" date="1212957147"][quote author="gusa" date="1212786046"] i made something similar by creating a plugin called LinkTo. in your example linkto would be the plugin for 'related2'......[/quote]
I have a very interest for this feature, gusa.... tell me if you want to share with us your plugin.. ciao[/quote]

i'd love to. the problem is that when i try to associate linkto with a field not present in the db i'm getting an error.

i tried to overwrite the getFieldName method but it seems that codex doesn't execute it. help, please![/quote]
I have no time this days for trying........ i tell you when a have free time for test. Ciao

[eluser]abmcr[/eluser]
[quote author="jTaby" date="1212758338"]i had this functionality built into CodeExtinguisher. It was called 'extra_uri_segments' and they would be carried around the system until they were replaced. However, I deprecated that when query_strings were introduced since query_strings are a more robust solution.

But to answer your question. Don't forget that all the links that codex uses are set in codexcontroller:ConfusedetConfig() so if you want to modify them so that they always maintain the extra uri segments, it's very easy to do so. Here's what you would have to do:

1) Add $this->extra_uri_segment = implode('/',$this->uri->uri_to_assoc(3)); in codexcontroller:ConfusedetConfig()
2) Append .'/'.$this->extra_uri_segments to all the links and form actions in codexcontroller:ConfusedetConfig[/quote]
I have made this change as you suggest to setConfig
Code:
function setConfig($config){
         $this->table                    = (isset($config['db_table']))? $config['db_table'] : show_error($this->lang->line('codex_table_not_defined'));
         $this->form_setup               = (isset($config['form_setup']))? $config['form_setup'] : show_error($this->lang->line('codex_form_not_defined'));
         $this->controller_name          = (isset($config['controller_name']))? $config['controller_name'] : show_error($this->lang->line('codex_controller_not_defined'));

         $this->table_access_restriction = (isset($config['table_access_restriction']))? $config['table_access_restriction'] : array();

         $this->order_by                 = (isset($config['order_by']))? $config['order_by'] : "";
         $this->order_type               = (isset($config['order_type']))? $config['order_type'] : "";

         $this->page_header              = (array_key_exists('page_header',$config))? $config['page_header'] : $config['controller_name'];
         $this->template                 = (isset($_COOKIE['codex_template']))? $_COOKIE['codex_template'] : $this->config->item("codex_template");
         $this->view_mode                 = (isset($_COOKIE['codex_view_mode']))? $_COOKIE['codex_view_mode'] : $this->config->item("codex_view_mode");
         $this->rules                    = isset($config['rules']) ? $config['rules'] : array();

         $this->on_one_page              = isset($config['on_one_page']) ? $config['on_one_page'] : $this->config->item('codex_items_per_page');
         $this->first_item               = $this->getFirstItem();
$this->extra_uri_segment = implode('/',$this->uri->uri_to_assoc(3));
         $this->add_link                 = (isset($config['add_link']))? $config['add_link'] : strtolower($this->controller_name).'/add'.'/'.$this->extra_uri_segments;
         $this->edit_link                = (isset($config['edit_link']))? $config['edit_link'] : strtolower($this->controller_name).'/manage/edit/{num}'.'/'.$this->extra_uri_segments;
         $this->add_action               = (isset($config['add_action']))? $config['add_action'] : strtolower($this->controller_name).'/execute_add'.'/'.$this->extra_uri_segments;
         $this->edit_action              = (isset($config['edit_action']))? $config['edit_action'] : strtolower($this->controller_name).'/execute_edit'.'/'.$this->extra_uri_segments;
         $this->delete_action            = (isset($config['delete_action']))? $config['delete_action'] : strtolower($this->controller_name).'/manage'.'/'.$this->extra_uri_segments;
         $this->search_action            = (isset($config['search_action']))? $config['search_action'] : strtolower($this->controller_name).'/search'.'/'.$this->extra_uri_segments;

         $this->theme_chooser_action     = (isset($config['template_chooser_action']))? $config['template_chooser_action'] : strtolower($this->controller_name).'/changeTemplate';
         $this->view_mode_chooser_action = (isset($config['view_mode_chooser_action']))? $config['view_mode_chooser_action'] : strtolower($this->controller_name).'/changeViewMode';
         $this->controller_link          = (isset($config['controller_link']))? $config['controller_link'] : strtolower($this->controller_name);

         $this->codexcrumbs->add($this->lang->line('codex_crumbs_home'));
         $this->codexcrumbs->add($this->controller_link,$this->page_header);
         $this->codexcrumbs->setSelected($this->page_header);
         $this->codexadmin->_initialize($config);

         $this->codextemplates->css('template-css',$this->config->item('codex_asset_folder').$this->template.'/css/codex_'.$this->template.'.css');

        $this->codextemplates->jsFromAssets('js-framework','jquery.js');
        $this->codextemplates->jsFromAssets('js-livequery','jquery.livequery.min.js');
    }
but if a set this url http://localhost:8888/lastcodex/backend.php/example/3 i get an error:
Code:
Fatal error: Call to undefined method Example::3() in /Applications/MAMP/htdocs/lastcodex/codex/application/controllers/codexcontroller.php on line 36
I have also try to use a get request as http://localhost:8888/lastcodex/backend....ample?id=3 but i get a 404 error page.... Where is my error... :red:

[eluser]Thoer[/eluser]
I finally had the time to try out the newest version and I've got to say it's awesome, but upgrading from an earlier version failed as I couldn't log in. (No error message.)

I tried to fix it and found out the problem was that I'd created a new table for sessions and changed the name in the config file. Tracking it back, I got stuck at 'controllers/login.php' line 61:
Code:
$this->event->trigger('userLoginSuccess',array($this->input->post('username'),$this->input->post('username')));
Looks like there is no method with the name userLoginSuccess in the objects the Trigger function loops through, I don't know why. Could you fix this?

Question: is it okay to send the username twice?

[eluser]Thoer[/eluser]
I found a few things I'd suggest you to look at, but seeing that the unoptimised queries run for seconds, I'll probably go back to my version.

1. In codextemplates.php @ line 97 the code should be '$head = $this->content['head'];'
2. In codexforms the function 'callFuncOnObject' is probably out of use. Please doublecheck it, but I think it uses undefined variables and the second foreach loop seems to be outdated too.

[eluser]cu3edweb[/eluser]
Jtaby just wondering if you have got the fckeditor plugin working?

[eluser]Majd Taby[/eluser]
hey guys, sorry i haven't replied lately, i've been taking a break from web development, but i'll answer your question soon Smile

[eluser]abmcr[/eluser]
[quote author="cu3edweb" date="1213311675"]Jtaby just wondering if you have got the fckeditor plugin working?[/quote]
If you as interest, i have created a tinyMCE plugin.... search in the previous post or download it at http://www.andreabersi.com/Saibal/AutoIndex/ (TinyMCE plugin.zip)

[eluser]cu3edweb[/eluser]
[quote author="abmcr" date="1213357748"]If you as interest, i have created a tinyMCE plugin.... search in the previous post or download it at http://www.andreabersi.com/Saibal/AutoIndex/ (TinyMCE plugin.zip)[/quote]
I tried that plugin but it isn't working. I just get a big textarea? Not sure what I did wrong?




Theme © iAndrew 2016 - Forum software by © MyBB