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

[eluser]minimal design[/eluser]
Is there an easy way to get notified of updates? I was fighting with a m2m relationship form field until I realized it's already fixed even though I downloaded codex a few days ago... Didn't realize an update came out so soon Tongue

Have you thought about incorporating jquery validation plugin? I see you're already using jquery... It's a snap to add pre-submission "ajax" type validation (to minimize user's frustration) with it... (yes, it;s a subliminal feature request Wink

And thanks again for this great app!

[eluser]Majd Taby[/eluser]
minimal design, I don't want to add too much dependance on javascript. You can modify the codex_form_view.php page if you so would like.

[eluser]abmcr[/eluser]
[quote author="jTaby" date="1207937751"]abmcr, no worries Smile

1) If you mean you want to just enter some text, then you can write your own plugin

2) Not now, but it's a bug i'm working on.

p.s. don't forget to translate codex to (italian?) Tongue[/quote]

Thank you... yes italian language ;-) i send you the language pack...

[eluser]minimal design[/eluser]
Is this the way the ManyToMany is supposed to work?

got 3 tables in my DB:

Code:
CREATE TABLE `articles` (
  `id` int(5) unsigned NOT NULL auto_increment,
  `date` date NOT NULL,
  `title` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `excerpt` text NOT NULL,
  PRIMARY KEY  (`id`)
)

CREATE TABLE `tags` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
)

CREATE TABLE `articles_tags` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `articles_id` int(5) NOT NULL,
  `tags_id` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
)


I got that in my articles YAML:

Code:
tags:
        class: ManyToMany
        params:
            display_field: name

Everything works fine, but when I add a tag to an article, with the arrow button to put it from left to right box, next time I open that same entry, the tag is present in both sides so I can add the same tag over and over to the same entry and it will create "duplicates" in my "articles_tags" table. shouldn't the tag be gone from left box if already assigned in right box?

Also, as a side not, those boxes should probably labeled with add/remove out of the box for usability sakes. a detail really...

Thanks!

[eluser]Majd Taby[/eluser]
yes to both...i'm gonna change the manytomany plugin soon.

[eluser]Thoer[/eluser]
[quote author="abmcr" date="1207937936"][quote author="jTaby" date="1207937751"]abmcr, no worries Smile

1) If you mean you want to just enter some text, then you can write your own plugin

2) Not now, but it's a bug i'm working on.

p.s. don't forget to translate codex to (italian?) Tongue[/quote]

Thank you... yes italian language ;-) i send you the language pack...[/quote]

Note that the language pack is about to get a little bit heavier because I'm moving hardcoded stuff to the language pack in the next few hours. Make sure you'll have the new version before you start translating or make sure you update to that before sending jTaby the language pack! Thx!

[eluser]andjules[/eluser]
it's really nice to see this project's momentum. Thanks for all the hard work, guys.

[eluser]abmcr[/eluser]
[quote author="Thoer" date="1207941270"][quote author="abmcr" date="1207937936"][quote author="jTaby" date="1207937751"]abmcr, no worries Smile

1) If you mean you want to just enter some text, then you can write your own plugin

2) Not now, but it's a bug i'm working on.

p.s. don't forget to translate codex to (italian?) Tongue[/quote]

Thank you... yes italian language ;-) i send you the language pack...[/quote]

Note that the language pack is about to get a little bit heavier because I'm moving hardcoded stuff to the language pack in the next few hours. Make sure you'll have the new version before you start translating or make sure you update to that before sending jTaby the language pack! Thx![/quote]

Ok: i attempt in the next days....

[eluser]Référencement Google[/eluser]
Quote:Note that the language pack is about to get a little bit heavier because I’m moving hardcoded stuff to the language pack in the next few hours. Make sure you’ll have the new version before you start translating or make sure you update to that before sending jTaby the language pack! Thx!

Please post a note here when this is on SVN because I will translate it to French (and of course send it to you) It would be cool if you make a SVN access to translators (restricted to 1 directory) then we could commit the changes directly to SVN.

[eluser]GDmac - expocom[/eluser]
i begin to grasp yml, but 4 spaces wrong and and a param has gone one level down
suddenly i feel old, takes me some time to dive into code again.
on a side-note: spyc / yaml needs tab-support drastically
--
jTaby here is a small edit for the OneToMany plugin, where you can now
set which column for the other table that has this table's primary keys.
Local_table.'id' was hardcoded, i added remote_key to yml parsing. YML
Code:
other_table:
    class: OneToMany
    params:
        display_field: name
        table_fields: name, description
        primary_key: primary_from_other_table
        remote_key: other_table_column_pointing_here

in the plugin i replaced all hardcoded $this->local_table.'_id' with $this->remote_key
and added $remote_key to the vars. In the constructor added:
Code:
if(isset($this->params['remote_key'])){
            $this->remote_key = $this->params['remote_key'];
         }else{
            $this->remote_key = $this->local_table.'_id';
         }

Also: currently the constructor checks primary_key as a first-level param. if you want primary_key to be a param for OneToMany (and under params as in the yml-example above) then in the constructor:
Code:
$this->primary_key = (isset($params['primary_key']))? $params['primary_key'] : 'id';
should be:
$this->primary_key = (isset($params['params']['primary_key']))? $params['params']['primary_key'] : 'id';




Theme © iAndrew 2016 - Forum software by © MyBB