Welcome to Geeklog, Anonymous Sunday, September 01 2024 @ 01:24 am EDT
Geeklog Forums
Executing PHP script in a Block
Status: offline
johnjr
Forum User
Chatty
Registered: 02/08/04
Posts: 68
I'm trying to set up a banner-rotation script to work within Geeklog. This 'program' is a set of php scripts that use a MySQL database to maintain the ads. It's a simple set of scripts that seems to work pretty well. All I have to do is insert the following line in a web page, and the ads are shown and 'rotated'.
Now, I'm trying to get this to work within a block. I'm not familiar enough with php or Geeklog to figure this out, so far. Can someone give me some 'hints' as to how to do this?
By the way, I inserted the above line into my theme header.thtml file, and it worked fine. So, I know this can work.
John
Text Formatted Code
<?PHP include "DisplayBanners.php"; ?>Now, I'm trying to get this to work within a block. I'm not familiar enough with php or Geeklog to figure this out, so far. Can someone give me some 'hints' as to how to do this?
By the way, I inserted the above line into my theme header.thtml file, and it worked fine. So, I know this can work.
John
7
6
Quote
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
normal blocks wont parse php like what you want for a number of good reasons. You'll need to create a PHP block, call your script using a function placed in your lib-custom.php file.
see this: What are the different block types for?
see this: What are the different block types for?
7
6
Quote
All times are EDT. The time is now 01:24 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