help with design

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

Postby shannah » Thu Sep 21, 2006 10:21 am

I was curious so I just had to test this out on my MySQL 5 box. It works.
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby compudude86 » Mon Sep 25, 2006 8:07 am

ok, yes, my field is named 'ID'. i tried the key=PRI under my fields.ini, and it still doesnt work for some odd reason once i get onto my linuix machine ill give you my fields.ini
compudude86
 
Posts: 59
Joined: Wed Dec 31, 1969 5:00 pm

Postby compudude86 » Mon Sep 25, 2006 8:16 am

ok, it isnt working. its only one field that is the primary key, and its named ID. here is my fields.ini:

[ID]
Key = PRI
widget:type = hidden
visibility:list = hidden

maybe this helps
compudude86
 
Posts: 59
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Mon Sep 25, 2006 10:22 am

Some answers to the following will help me to know where your app is going wrong:

1. What is the name of the view?
2. What is the vew definition? (i.e. the SQL query)
3. What is the path (relative to your application root) to your fields.ini file for the view.
4. If the name of your view is 'myview', run the following query in mysql and provide the output:
show columns from `myview`

I should be able to detect the problem given the results of the above questions.

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby compudude86 » Mon Oct 09, 2006 11:07 am

ok, the name of the view is simply "view", im unsure about the query at this time, the directories go
|--- <---dataface folder
|--- <---application
|---------fields.ini
compudude86
 
Posts: 59
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Oct 10, 2006 12:16 pm

Perhaps give 0.6.9 (the latest) a try... Joseph (Aoirthoir) has played around with views a little bit with this version and they seem to work for most things...

-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby compudude86 » Mon Oct 16, 2006 8:20 am

ok, i installed 0.6.9 and still no luck.
compudude86
 
Posts: 59
Joined: Wed Dec 31, 1969 5:00 pm

Postby compudude86 » Mon Oct 16, 2006 8:58 am

nevermind, i figured out i didnt have a fields.ini for the view, named "view", only for the table called "products", so i guess i was experiencing an ID-10t error lol. all fixed now!! thank you very much
compudude86
 
Posts: 59
Joined: Wed Dec 31, 1969 5:00 pm

Postby Aoirthoir » Mon Oct 16, 2006 1:24 pm

Joe, I solve this by doing a soft link to my fields.ini which I store in the main directory of my app. This way I have one single fields.ini file.
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm

Postby compudude86 » Tue Oct 17, 2006 9:14 am

ok thanks, i didnt think about that. now, i dont want to start threadjacking, but i figured this was an appropriate question to "help with design", ive read over the docs on templates, but im lost. i want to change the color scheme from blue grey and green to a red, grey, and white. ive looked through the templates, but i cannot figure out how to change any of this...help?
compudude86
 
Posts: 59
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Tue Oct 17, 2006 9:38 am

This change would be made using CSS. All of this is defined in the plone.css file.
You can override these styles by adding your own style sheet in the custom_stylesheets slot as follows:

1. Create a stylesheet for your application. You can call it anything, but let's call it styles.css and place it in the top level of your application's directory.

2. Override the custom_stylesheets slot of the MainTemplate by defining the block__custom_stylesheets() method in your application's delegate class as follows:

Code: Select all
function block__custom_stylesheets(){
     $styles_path = DATAFACE_SITE_URL;
     if ( $styles_path{strlen($styles_path)-1} != '/' ) $styles_path .= '/';
         // If there was no trailing slash to the styles path, we add one.
     $styles_path .= 'styles.css';
     echo <<
END;
     return true;
}


3. Finally, define the appropriate styles in your styles.css file.

Hope this helps a little.

Best regards

Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby compudude86 » Tue Oct 17, 2006 9:49 am

yes, it helps, except i cannot find plone.css
compudude86
 
Posts: 59
Joined: Wed Dec 31, 1969 5:00 pm

Postby compudude86 » Tue Oct 17, 2006 11:08 am

duh, found it. thank you very much
compudude86
 
Posts: 59
Joined: Wed Dec 31, 1969 5:00 pm

Postby Aoirthoir » Tue Oct 17, 2006 5:05 pm

I do the same thing but right within the plone.css itself. Simply add the following code:

@import url(filename.css);

Do this for each of the CSS files you want to add. Then within the CSS file change whatever you want.

However, the method Mr. Steve directed above works if you want different styles for each of your apps. Since I am storing my Dataface in a central location and using soft links to point to that one DF install from each of my domains, then all of them would use the modifications in my method. In Mr. Steve? method, each app could have its own additional CSS styles.
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm

Previous

Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 34 guests

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