Title of a dataface application

A place for users and developers of the Xataface to discuss and receive support.

Postby Aoirthoir » Wed Jul 26, 2006 12:14 pm

Right now my title always says "Dataface Application"

Is there a way I can change that?

Thanks
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm

Postby roginald » Wed Jul 26, 2006 12:54 pm

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.
roginald
 
Posts: 24
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Wed Jul 26, 2006 1:08 pm

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
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Aoirthoir » Thu Jul 27, 2006 5:53 am

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
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm

Postby Aoirthoir » Thu Jul 27, 2006 10:57 am

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
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Thu Jul 27, 2006 2:08 pm

> 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.
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Aoirthoir » Thu Jul 27, 2006 2:27 pm

Cool, thanks bro.
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 3 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved