EllisLab text mark
Advanced Search
1 of 32
1
   
[Deprecated] DMZ 1.6.2 (DataMapper OverZealous Edition)
Posted: 01 December 2009 01:09 PM   [ # 11 ]   [ Rating: 0 ]
Joined: 2009-04-05
11 posts

I am really enjoying the DMZ library thus far. There is a bit of a learning curve, but it’s really worth it.

There’s a pretty solid library in CI already for dealing with file uploads, but it’s not clear to me if it’s possible to use it with DMZ’s built-in form generation and handling, which I’d like to use to handle all the metadata associated with an uploaded file.

Would I call the do_upload method as a validation function? If anybody could provide an example of how it might be used or comment on if it’s possible or advisable, that would be great.

 
Posted: 01 December 2009 11:20 PM   [ # 12 ]   [ Rating: 0 ]
Joined: 2009-11-15
4 posts

For Subquery function

Does it support multi time subquery for same data object?

 
Posted: 02 December 2009 03:02 AM   [ # 13 ]   [ Rating: 0 ]
Avatar
Joined: 2008-10-08
1039 posts
SH Chung - 02 December 2009 04:20 AM

For Subquery function

Does it support multi time subquery for same data object?

I’m not sure if this is what you are asking, so correct me if I’m wrong.

The subquery functionality allows you to create multiple subqueries on different Objects.  It doesn’t matter if they have the same Class.

For example, this would work:

// You can now interleave multiple queries
$user1 = new User();
$user2 = new User();

$user1->where('name''Fred');
$user2->where('name''Bob');

$user1->get();
$user2->get(); 

This, however, will not work, because there is only one query object:

// WILL NOT RETURN ANYTHING!!!
$user1 = new User();

$user1->where('name''Fred');
$user1->where('name''Bob');

$user1->get(); 

(I know those aren’t subqueries.)

And, of course, you can use different Classes without an issue.  What this means is that you should be able to perform subqueries with self-related objects.

 Signature 

Phil DeJarnett
  OverZealous Creations, LLC

 
Posted: 04 December 2009 08:01 AM   [ # 14 ]   [ Rating: 0 ]
Avatar
Joined: 2008-06-23
252 posts

Hi Phil, what do you think of an RSS feed to subscribe for the changelog / version updates? That’d be cool! (or did I miss an existing one?)

 Signature 

Tired of forms? Check out Form Generation Library

 
Posted: 04 December 2009 12:36 PM   [ # 15 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-10
778 posts

Hiya Phil, just came up with something useful to suggest. I would like, and think other people might find it useful, to have a more full _template.php provided with some of the other configuration options available. I just happened upon the part of the manual that explains the custom error wrappers for forms, and at the bottom of Validation page I noticed you could over-ride them on a per-object basis. Just as an example, but if this were provided in commented fashion like with other features shown in the template, I’d have noticed them much sooner smile

Would be nice to have any other interesting configuration variables shown in template too, if there should happen to be any. I’m getting to the point that I prefer reading code over reading manuals smile

 Signature 

CreativeHalls Web Design and Printing
A few of my projects:
OurGulfCoast Property Management and Vacation Rental (ASP/.NET)
BukuBux - Money Saving Coupons and Gift Certificates (CodeIgniter, LAMP/MySQL)
Rentals800.com - Find a place to rent (CodeIgniter, LAMP/MySQL)
bdh (dot) hall (at) gmail (dotcom)

 
Posted: 04 December 2009 02:08 PM   [ # 16 ]   [ Rating: 0 ]
Avatar
Joined: 2008-10-08
1039 posts
macigniter - 04 December 2009 01:01 PM

Hi Phil, what do you think of an RSS feed to subscribe for the changelog / version updates?

Hmmm.  I could look into this.  As it is every time I make an update, though, I have to:
• Update the manual (and put it on the website)
• Deprecate the existing forum
• Create a new forum
• Re-update the manual with the new forum’s link
• Update my signature
• Update the CI wiki

An RSS feed would just be one more thing to update… wink

 Signature 

Phil DeJarnett
  OverZealous Creations, LLC

 
Posted: 04 December 2009 02:11 PM   [ # 17 ]   [ Rating: 0 ]
Avatar
Joined: 2008-10-08
1039 posts
BrianDHall - 04 December 2009 05:36 PM

I would like, and think other people might find it useful, to have a more full _template.php provided with some of the other configuration options available.

I don’t have the time to flesh it out right now, but if you wanted to add anything you’ve come across and PM or email the update _template.php to me, I’ll include the changes with the next release.

 Signature 

Phil DeJarnett
  OverZealous Creations, LLC

 
Posted: 06 December 2009 01:49 PM   [ # 18 ]   [ Rating: 0 ]
Joined: 2009-04-05
11 posts
Michael Ditto - 01 December 2009 06:09 PM

I am really enjoying the DMZ library thus far. There is a bit of a learning curve, but it’s really worth it.

There’s a pretty solid library in CI already for dealing with file uploads, but it’s not clear to me if it’s possible to use it with DMZ’s built-in form generation and handling, which I’d like to use to handle all the metadata associated with an uploaded file.

Would I call the do_upload method as a validation function? If anybody could provide an example of how it might be used or comment on if it’s possible or advisable, that would be great.

To answer my own question, or at least put it out of its misery, there’s not as much brilliance in the CI file upload class as it seemed, at least for my purposes. I just used PHP’s built-in functionality to handle that part.

 

As a (tangentially related) side note, this is my first foray into file uploading in a web application, and it’s a user interface nightmare. In the world of desktop applications from which I come, we spend all kinds of effort customizing and hooking into OS file open dialogs to make them do wondrous things like display metadata about our files to the user to help them make an informed decision about what to open. In the web world I can’t even tell the browser’s file open dialog to filter by file type. I know there are some Flash options, but really… why should that be necessary? </rant>

 
Posted: 07 December 2009 02:06 AM   [ # 19 ]   [ Rating: 0 ]
Avatar
Joined: 2008-08-29
344 posts

Another great release Pill!

Now I have to go read the docs again… O well, it’s all worth it in the end right?

Will update if I notice any problems.

 Signature 

421 Entertainment :: YAAS - Yet Another Authentication System :: Error Logger :: DB Configs

 
Posted: 07 December 2009 02:39 AM   [ # 20 ]   [ Rating: 0 ]
Avatar
Joined: 2008-10-08
1039 posts
tdktank59 - 07 December 2009 07:06 AM

Now I have to go read the docs again… O well, it’s all worth it in the end right?

FYI: you should really only need to read two pages: the Change Log and Upgrading Instructions.

wink

1.6.0 -> 1.6.1 is mostly a bugfix.  1.5.x -> 1.6.0 is a major upgrade!

 Signature 

Phil DeJarnett
  OverZealous Creations, LLC

 
Posted: 07 December 2009 02:47 AM   [ # 21 ]   [ Rating: 0 ]
Avatar
Joined: 2008-08-29
344 posts

yeah im still at the 1.5.3 so im reading the 1.6.0 update lol

I know but its still the processes of learning and using the new functionality (when needed)

edit: btw I normaly do read the change log to see what you did lol

 Signature 

421 Entertainment :: YAAS - Yet Another Authentication System :: Error Logger :: DB Configs

 
Posted: 07 December 2009 02:50 AM   [ # 22 ]   [ Rating: 0 ]
Avatar
Joined: 2008-10-08
1039 posts

I figured you did.  I just like to ... um ... reinforce the existence of certain aspects of the docs. grin

 Signature 

Phil DeJarnett
  OverZealous Creations, LLC

 
Posted: 07 December 2009 02:58 AM   [ # 23 ]   [ Rating: 0 ]
Avatar
Joined: 2008-08-29
344 posts
OverZealous - 07 December 2009 07:50 AM

I figured you did.  I just like to ... um ... reinforce the existence of certain aspects of the docs. grin

Yeah I think after the second time you “um ... reinforced the existence” of them I’ve started going there first to find my answers then coming here!

But yeah I agree, I’ve noticed a lot of well documented/repetitive questions that are easily answered in the technical issues, or some main page of the docs. So reinforcement is good!

NOTE: I am not saying anyone is lazy/dumb/stupid etc… for asking questions even if they are answered in the docs. I know we all at some points just space and don’t see something right in front of us. Or just need more clarification. (in the later instance provide the knowledge that you know whats going on tho. It helps us save time in helping you.)

 Signature 

421 Entertainment :: YAAS - Yet Another Authentication System :: Error Logger :: DB Configs

 
Posted: 07 December 2009 10:01 AM   [ # 24 ]   [ Rating: 0 ]
Joined: 2009-11-06
7 posts

Hello
I have been using this Datamapper for a few weeks and its works perfect. Thank you very much.

But i come up with a problem.

I have a loginform in the right sidebar.
And in the main area i have a registerform.

When I fill in wrong data in the registerform I get two “There was an error saving the form.” Both in the main area and in the sidebar.

Both forms are rendered from a user model. Is this the problem ?
I tried using custom templates, like this

echo $user->render_form(array('username' 'password' => 'password'),'login/check_login',array('save_button' => 'Log in'),'dmz_htmlform/login_form','dmz_htmlform/login_row','dmz_htmlform/login_section'); 

But I have no luck,

 
Posted: 07 December 2009 05:54 PM   [ # 25 ]   [ Rating: 0 ]
Avatar
Joined: 2009-06-10
778 posts

Say, what’s a good way of dealing with validation where a field is only used on creating a new object - but is otherwise never used?

I want to use a password_confirm field to control account creation, but obviously beyond account creation it is never used. I’m probably just going to hack a custom validation rule that checks $this->id, or use a bit of controller logic - but is there a better way to handle this that is eluding me?

 Signature 

CreativeHalls Web Design and Printing
A few of my projects:
OurGulfCoast Property Management and Vacation Rental (ASP/.NET)
BukuBux - Money Saving Coupons and Gift Certificates (CodeIgniter, LAMP/MySQL)
Rentals800.com - Find a place to rent (CodeIgniter, LAMP/MySQL)
bdh (dot) hall (at) gmail (dotcom)

 
1 of 32
1