Page 1 of 1

PostPosted: Wed Jul 26, 2006 12:14 pm
by Aoirthoir
Right now my title always says "Dataface Application"

Is there a way I can change that?

Thanks

PostPosted: Wed Jul 26, 2006 12:54 pm
by roginald
hello,

I attempted to do this after reading your post. I was successful on a per table basis using a delegate class and defining
a block__html_title() method for each table. Inside I just used echo, which is probably not the best way to go, but I am a newbie
and therefore must be forgiven.

PostPosted: Wed Jul 26, 2006 1:08 pm
by shannah
Thanks for posting this roginald. This sounds like an appropriate way to go - in fact, it currently may be the only way. If you don't want to do this on a per-table basis you can do the same thing in the application delegate class (this is scantily documented thus far, but...).

create a folder in your application's directory named "conf".

Create a file in this folder called "ApplicationDelegate.php" with the following contents:

Code: Select all
class conf_ApplicationDelegate {
    function block__html_title(){ ...}
}
?>


That way the title will appear on every table. If you want to override this for a particular table, you can use that table's delegate class.

Perhaps I'll add the ability to set a title in the conf.ini file for future versions to save you from having to delve into PHP for this simple thing.

Best regards

Steve

PostPosted: Thu Jul 27, 2006 5:53 am
by Aoirthoir
Thanks to both of yall for responding so quickly. I will work on this later...trying a couple other things right now. Then I will do that...thank you again

PostPosted: Thu Jul 27, 2006 10:57 am
by Aoirthoir
OK I tried it. I am not too familiar with PHP yet either. After I have some basics set up through dataface for this project, so they can actually start using it, I will start delving into PHP. (Currently I am trying to learn SQL..so I can do as much in SQL as possible...)

Anyhow I was like ok echo..but where do I put the echo... what is {...} ...

Then I was like DUH..you dummy..(not yall me...) Anyhow I realized what goes where after lookin at my current applicationdelegate.php file (which i copied earlier to set up permissions....so thanks for the tips again.

Based on that..I am assuming with the permissions, if I want different permissions for each table, I just set up a delegate class on a table? (And of course records in the users table specifying what users have what access to what tables?)

Thanks

PostPosted: Thu Jul 27, 2006 2:08 pm
by shannah
> if I want different permissions for each table, I just set up a delegate class on a table?

Yes. The individual table delegate classes will take precedence over the application delegate class if they are implemented. So you can just create getPermissions() methods in the tables that you want to have different permissions.

PostPosted: Thu Jul 27, 2006 2:27 pm
by Aoirthoir
Cool, thanks bro.