Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 01:49 am EST
Geeklog Forums
How do I call a phpblock_function in an external page?
Status: offline
inspiremin
Forum User
Regular Poster
Registered: 01/07/04
Posts: 111
I am writing an external.php page and would like to use a function in my lib_custom.php file.
Being a newbie at php coding, I am not sure exactly how to use the function. The page has already included lib-custom. I need help from there.
Thanks,
inSPIREmin
www.Scripturetoolkit.com www.inSPIREministries.com
Being a newbie at php coding, I am not sure exactly how to use the function. The page has already included lib-custom. I need help from there.
Thanks,
inSPIREmin
www.Scripturetoolkit.com www.inSPIREministries.com
4
5
Quote
Status: offline
inspiremin
Forum User
Regular Poster
Registered: 01/07/04
Posts: 111
OK! I figured it out! I copied the code from the function definition, pasted it in my external.php and told it to echo the retval (DANG! I WISH I KNEW WHAT I WAS SAYING!)
Anyway, I rewrote the phpLinks page to incorporate the Top Links block content. Check it out and let me know if it works as good as I think it does:
inSPIREministries.com
Click on the "e-Ministry Links" to see the new page. (There aren't a whole lot of links yet. I just now finished coding the page).
Thanks!
inSPIREmin
www.Scripturetoolkit.com www.inSPIREministries.com
Anyway, I rewrote the phpLinks page to incorporate the Top Links block content. Check it out and let me know if it works as good as I think it does:
inSPIREministries.com
Click on the "e-Ministry Links" to see the new page. (There aren't a whole lot of links yet. I just now finished coding the page).
Thanks!
inSPIREmin
www.Scripturetoolkit.com www.inSPIREministries.com
5
7
Quote
Status: offline
vinny
Site Admin
Admin
Registered: 06/24/02
Posts: 352
Location:Colorado, USA
You could also do:
This has a couple advantages. You have access to all the Geeklog functions and global variables (including security, database, etc).
-Vinny
Text Formatted Code
require_once('/path/to/lib-common.php');This has a couple advantages. You have access to all the Geeklog functions and global variables (including security, database, etc).
-Vinny
4
4
Quote
Status: offline
inspiremin
Forum User
Regular Poster
Registered: 01/07/04
Posts: 111
Vinny,
Thanks. I already have that line in the standard external page template. I am so new at this that I don't even know how to implement the function in the code where I want it to run.
I stumbled on my solution after dozens of mistakes. It works well since I can adapt the hard coded function to the specific needs of the external page.
Needing all the help I can get,
inSPIREmin
www.Scripturetoolkit.com www.inSPIREministries.com
Thanks. I already have that line in the standard external page template. I am so new at this that I don't even know how to implement the function in the code where I want it to run.
I stumbled on my solution after dozens of mistakes. It works well since I can adapt the hard coded function to the specific needs of the external page.
Needing all the help I can get,
inSPIREmin
www.Scripturetoolkit.com www.inSPIREministries.com
7
5
Quote
All times are EST. The time is now 01:49 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