1
Xanavieaus
developing a Flash Banner script... need help
  • 2005/10/16 15:56

  • Xanavieaus

  • Just popping in

  • Posts: 22

  • Since: 2005/10/1


I am writing a PHP script that gives the user a choice of a flash banner, image banner, or no banner... it works by reading a profile field I created for it from the database.
I have been working for a while on this script, and had it checked by many experts, and the script itself appears to be valid... however, the real problem I have is I can't seem to find anywhere in the entire XOOPS 2.2 to include this script so that it will show up in the header.

First I tried renaming theme.html to theme.php (and also changing the value for this in /class/theme.php), then
I included the file in place of where the banner was.
It did not work at all, like it wasn't getting included.

Next I tried including the script directly in /header.php,
it either did not show up, or gave me a "Fatal error: call to a member function on a non-object".

I REALLY need to know where and how I can include this script so that it will be placed at the top of the page.

If you need to see my script, it is here.
It is a PHP file, but renamed to .TXT so that you can view it.
If you can point out something wrong in it, please tell me.

2
snow77
Re: developing a Flash Banner script... need help
  • 2005/10/16 16:13

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


I have no programming skills but there's a PHP script I use sometimes for images in the theme.html. I am pasting you here the instructions I use to include it in the theme. It might give you a hint of how to do what you need since it is a PHP script also.

Quote:
INSTRUCTIONS
1. Modify the $folder setting in the configuration section below.
2. Add image types if needed (most users can ignore that part).
3. Upload this file (rotate.php) to your webserver. I recommend
uploading it to the same folder as your images.
4. Link to the file as you would any normal image file, like this:



5. You can also specify the image to display like this:



This would specify that an image named "gorilla.jpg" located
in the image-rotation folder should be displayed.

That's it, you're done.

*/

/* ------------------------- CONFIGURATION -----------------------


Set $folder to the full path to the location of your images.
For example: $folder = '/user/me/example.com/images/';
If the rotate.php file will be in the same folder as your
images then you should leave it set to $folder = '.';

*/


$folder = '.';


3
Xanavieaus
Re: developing a Flash Banner script... need help
  • 2005/10/16 16:21

  • Xanavieaus

  • Just popping in

  • Posts: 22

  • Since: 2005/10/1


What are you talking about? This shows absolutely nothing about how to include my script into the header, these are just instructions how to configure YOUR script. Your script can easily be used because it can be used in an HTML and simply returns an image.

My script is a little more complicated then that.

Login

Who's Online

382 user(s) are online (327 user(s) are browsing Support Forums)


Members: 0


Guests: 382


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits