This topic is locked

Formatting Questions

8/12/2006 9:08:54 AM
ASPRunnerPro General questions
W
waynem author

I would like to set the page width for 80%. I thought maybe the master table would do it, but that didn't seem to work.
I also need to add some java code for my menu system. It is supposed to go after the Body statement on every page. I can add this manually to each template page, or is there a better way to handle this?
This is a bit off my subject, but is there a simple way to make guest access the default (no edit or add rights) and have a link that logs in someone with admin rights, then shows the edit and add icons?
Great product, btw!

Sergey Kornilov admin 8/14/2006

You can set table width and add some Javascript code to every page using header.asp file that needs to be placed to include directory. More info: http://www.xlinesoft.com/phprunner/articles/supertop.htm
To implement "autologin as Guest" feature add the folloiwng in the beginning of the list page:
If Session("UserID")="" then

Session("UserID")="Guest"

Session("AccessLevel")=ACCESS_LEVEL_GUEST

End If
Point your users directly to the list page and provide a link to the login page for admin users.

W
waynem author 8/14/2006

You can set table width and add some Javascript code to every page using header.asp file that needs to be placed to include directory. More info: http://www.xlinesoft.com/phprunner/articles/supertop.htm

To implement "autologin as Guest" feature add the folloiwng in the beginning of the list page:
If Session("UserID")="" then

Session("UserID")="Guest"

Session("AccessLevel")=ACCESS_LEVEL_GUEST

End If
Point your users directly to the list page and provide a link to the login page for admin users.


Thanks, Sergey, I am getting there!
I have 3 questions:
If I select not to show data on the first page, where in the list code can I insert some instructions text that will appear instead of the data table? I want to let people know how to use the search rather than display a page of data.
Second, where in the list code can I modify the table that is above the data table? I want to align the data table left, and add a column of google adwords on the right hand side.
Third, I applied table background color changes that seem to have affected the data table alternating row. Where in the list code can I alter the alternating row color back to the template default?
You can see what I mean here: http://commuterclub.org/directories/wineri...neries_list.asp
I greatly appreciate your assistance, this is an awesome product and I can see how it will save us many hours of programming time!

W
waynem author 8/14/2006

Sorry to be a pest, this was working at work, but when I came home and tried to access the link I receive this:
"You don't have permissions to access this tableBack to login page"
I can click back to login page and login as guest, but what did I do wrong?

J
Jane 8/15/2006

Hi,
see my answers below:

  1. you can open ..._list.asp file, find following line:
    Response.Write "</table><p>&nbsp;</p><p align=center><b>" & "No records found" & "</b></p>"



and replace "No records found" wiht your text.
2. find looprs function in the ..._list.asp file and add align=left in the <td> tags. Add another links, google adwords in the header.asp file:

Article about header and footer
3. edit background color and other style issue in the include/style.css file.
4. also check access permissions on the User group permissions dialog on the Advanced security settings dialog on the Formatting tab.

W
waynem author 8/15/2006

Hi,

see my answers below:

  1. you can open ..._list.asp file, find following line:
    and replace "No records found" wiht your text.
  2. find looprs function in the ..._list.asp file and add align=left in the <td> tags. Add another links, google adwords in the header.asp file:

    Article about header and footer
  3. edit background color and other style issue in the include/style.css file.
  4. also check access permissions on the User group permissions dialog on the Advanced security settings dialog on the Formatting tab.


Thanks for your help, Jane!
Regarding # 1, while I can certainly do this it would be overwritten the next time I build the page. If you look at the template I think this is the actual line I would need to modify:
Response.Write "</table><p>&nbsp;</p><p align=center><b>" & ##SCRIPTMESSAGE(NO_RECORDS)## & "</b></p>"
but I cannot find the file that defines NO_RECORDS with text. I would rather make the changes to the variable definition than replace the variable itself.
Regarding #2, I did try this but it did not move the table over to the left.
Regarding #3, I can't find anything in the style sheet that would affect the alternating row in the table. Headers, yes. Considering my addition of a table background color changing the alternating row color, I'm of the belief that it was defaulting to the old background color.
Regarding #4, I had added a default group with no access, I've changed that to allow the same as guest access, and will test to see if this resolves the problem. So far so good!
Best,
Wayne

W
waynem author 8/15/2006

Hee hee, I am getting there.
To change the alternating row from taking the table default, change this code in list.asp:

' To insure that every other one is shaded

If iShadeTheDetail = 0 then

sShadeClass = "class=shade"

iShadeTheDetail = 1

Else

sShadeClass = "class=altshade"

iShadeTheDetail = 0

End If


I changed the Else sShadeClass from "" to what you see.
I then added to style.css:
.

altshade

{

COLOR: #333333;

BACKGROUND-COLOR: ghostwhite;

}


This works, but when I highlight the rows they revert back, so I am off to find the code that controls highlighting!

J
Jane 8/16/2006

Hi,

  1. you can change "No records found" message in the c:/Program Files/ASPRunnerPro/lang/English.lng file and then rebuild your pages.
  2. to add some adwords use header.asp and footer.asp files or edit ..._list.asp file manually.
  3. to edit background color of selected row modify rowselected class in the include/style.css file.