Vasiliy
Posts: 378
|
| Posted: 05/11/2005, 9:18 AM |
|
I need to make changes in in Common.asp: CCLoginUser/CCLogoutUser.
Actually, what I need is to add some code into login to verify the ClientID and store it in session var., and into logout to clean session var.
It would be nice to have embed points in Common.asp:
- before login code
- after login code (where I need to add my code)
- before logout code
- after logout code (where I need to add my code)
Does anybody know how to make this trick?
Thanks,
Vasiliy[at]softcreator[dot]com
_________________
Vasiliy |
 |
 |
Joe
|
| Posted: 05/11/2005, 10:43 AM |
|
Try looking at the code between lines 2058 & 2078 on the common.asp file. That is where I did what you are trying to do.
|
|
|
 |
Vasiliy
Posts: 378
|
| Posted: 05/11/2005, 11:26 AM |
|
Quote Joe:
Try looking at the code between lines 2058 & 2078 on the common.asp file. That is where I did what you are trying to do.
If I modify the Common.asp, will it be auto-updated if I let's say change the DB connection?
The whole idea of my question is to let CCS update Common.asp and that the same time be able to insert custom code in Common.asp embed points.
My next question, related to above one:
If I want to set the DB connection at a run time, depending on some condition, how can I do this?
Again, I'd like to keep Common.asp updatable by CCS.
_________________
Vasiliy |
 |
 |
peterr
Posts: 5971
|
| Posted: 05/11/2005, 12:53 PM |
|
The Common.asp file is divided into many sections (gray blocks). If you change only one block then it will be locked, but all other blocks will continue to be updaateable by CCS. Thus it is failry safe to edit the CCLoginUser function.
Although what you described can usually be done without changing the common functions. You can just copy those functions to the end of Common.asp and rename and modify them there. Then modify the Login and Logout code on your Login page to call those customized functions instead of original ones.
I usually wouldn't recommend changing the connection section of Common.asp, but I guess in your case you may need to do this since there may not be any other way to modify it dynamically.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
marcwolf
Posts: 361
|
| Posted: 05/11/2005, 5:43 PM |
|
We have done something silimat as we wanted the user to enter thier company ID as well..
So we took copies of the existing CCSLogin routies and duplicated them at the bottom of the common.aso, gace them a new name and then called them from out pages.
Works very well and following Peterr's instructions you should not have any issues
Take care
Dave
_________________
' Coding Coding Coding
Keep Those Keyboards Coding.
Raw Code!!!!!!!
|
 |
 |
Vasiliy
Posts: 378
|
| Posted: 05/11/2005, 7:38 PM |
|
Quote :The Common.asp file is divided into many sections (gray blocks). If you change only one block then it will be locked, but all other blocks will continue to be updaateable by CCS. Thus it is failry safe to edit the CCLoginUser function.
Thanks Peter, I did not know about only changed section will be locked.
Quote :So we took copies of the existing CCSLogin routies and duplicated them at the bottom of the common.aso, gace them a new name and then called them from out pages.
Thanks, Dave, in my case I'll make changes directly in CCSLogin so that entire application will use the same CCSLogin.
_________________
Vasiliy |
 |
 |
Oper
Posts: 1195
|
| Posted: 05/14/2005, 11:58 PM |
|
We did something similiar (liek marwolf) in our case we are recording the user password encrypted so we need to change the some CC function.
Usually try to avoid changing grey text, but if you know what you are doing you could change everthing.
Note: Change teh COmmon.asp using CCS UI, do not change the common.asp after been generated
________________________ http://www.GlobalDevelop.com
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
|