Welcome to Geeklog, Anonymous Saturday, January 04 2025 @ 05:10 am EST
Geeklog Forums
rookie lib-custom question
Status: offline
tstockma
Forum User
Full Member
Registered: 07/22/03
Posts: 169
OK, I'm about to start my first real hack of the PHP code.
I'm not clear on how the lib-custom stuff works. I'm clear WHY to do that! Not how.
If I'm changing a procedure that's in lib-common, do I just copy the proc I want, paste it into lib-custom & make my changes? And if so, then when Apache's executing my pages, does it work because PHP has been told to look in php-custom first, then search in php-common, to resolve proc calls?
Sorry to be such a newbie at so much of GL, love the product & I'm learning one h*lluvalot as I'm working my site.
Thanks for any help!
Tom
www.southparkcity.com
I'm not clear on how the lib-custom stuff works. I'm clear WHY to do that! Not how.
If I'm changing a procedure that's in lib-common, do I just copy the proc I want, paste it into lib-custom & make my changes? And if so, then when Apache's executing my pages, does it work because PHP has been told to look in php-custom first, then search in php-common, to resolve proc calls?
Sorry to be such a newbie at so much of GL, love the product & I'm learning one h*lluvalot as I'm working my site.
Thanks for any help!
Tom
www.southparkcity.com
7
5
Quote
Status: offline
knuff
Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
Correct me if I am wrong, but I guess it will be some kind of cosmetic "hack" and not really a full blown change to the core.
Ifso I suggest you just modify directly lib-common.php in order to not get any coding conflicts later on when you upgrade.
If you want to strip it out of lib-common.php and move it altogether to lib-custom.php
Lib-custom.php is there to add additional features so you won´t have to change lib-common when you upgrade.
If you hack the core you could comment out the core and refer to a seperate include or make it directly in the code.
PHP will not resolve any conflicts for you, unfortunatly it needs to be correct.
Greetz,
Boris
PS Don´t forget the backup of your files
Vanrillaer.com - our Family Portal
Ifso I suggest you just modify directly lib-common.php in order to not get any coding conflicts later on when you upgrade.
If you want to strip it out of lib-common.php and move it altogether to lib-custom.php
Lib-custom.php is there to add additional features so you won´t have to change lib-common when you upgrade.
If you hack the core you could comment out the core and refer to a seperate include or make it directly in the code.
PHP will not resolve any conflicts for you, unfortunatly it needs to be correct.
Greetz,
Boris
PS Don´t forget the backup of your files
Vanrillaer.com - our Family Portal
5
10
Quote
Status: offline
tstockma
Forum User
Full Member
Registered: 07/22/03
Posts: 169
Thank you, Boris, this tells me what I wanted to know!
You're right, the changes are small, so I may as well keep it in lib-common. If I'm meticulous enough with my ongoing document of my changes, I might even remember to re-apply them on upgrade!
And thanks for the reminder to backup...yep, that's critical!
Tom
Tom
www.southparkcity.com
You're right, the changes are small, so I may as well keep it in lib-common. If I'm meticulous enough with my ongoing document of my changes, I might even remember to re-apply them on upgrade!
And thanks for the reminder to backup...yep, that's critical!
Tom
Tom
www.southparkcity.com
7
7
Quote
All times are EST. The time is now 05:10 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content