MyBB Community Forums

Full Version: Setting the forum banner to change
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello again!

I have been presented with 3 new impressive banners for my forum that I wish to use. What I want to do is when ever the page reloads that it comes up with one of the other banners, so basically it would cycle through the 3 with 3 reloads of the page.

Can anyone advise how to do this?
http://community.mybboard.net/thread-457...#pid316732

Upload that as you would a normal image, edit the file as per the instructions, and then give the URL to it like you normally would in the settings for the theme.

That might not guarantee it going through the 3 in an exact cycle, but I don't think that'd be possible when multiple people are using it.
Cheers Matt - great advice as always.

I am having a bit of a problem though. I have done the following.

Created new folder (banners) inside the images folder.
Uploaded 2 of the banners.
Amended the rotateavatar.php with the following:$folder = '.';
Saved file as rotate.php
Uploaded to banner folder
Gone to Header Template found the following code:

<div class="logo"><center><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></center></div><br /><br />

I am not sure where to input the image source code? I have tried a couple of different ways but they don't show the banners. Any ideas?
The path in the file has to be the full file path, for example, this is mine:

$folder = '/var/www/html/avatar/';

It need to go back to that sort of level.
I changed it to the following:

$folder = "http://vampirecounts.net/test/images/banners/';

The template to:

<div class="logo"><center><a href="{$mybb->settings['bburl']}/index.php"><img src="http://vampirecounts.net/test/images/banners/rotate.php" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></center></div><br /><br />


Still nothing?
(2009-12-03, 12:37 PM)MattRogowski Wrote: [ -> ]The path in the file has to be the full file path, for example, this is mine:

$folder = '/var/www/html/avatar/';

It need to go back to that sort of level.

I am unsure what it means by that, do you mean for example:

$folder = /http://vampirecounts.net/test/images/banners/';

I did actually place the file into the same folder and then followed these instructions:

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 = '.';

I then went to my main theme and changed the logo location to the correct location ending in /banners/rotate.php but that didn't work either. I know the location is right as I tested it to see if it could fine one of the banners which it did, but either it can't use the rotate.php file, or I have done something wrong in the file itself. I can't see what I have done wrong through, as you only have to change that one line!
Edit:

Just to note I ran the address line and it came up with this error:

The server encountered an unexpected condition which prevented it from fulfilling the request.
The script had an error or it did not produce any output. If there was an error, you should be able to see it in the error log.
I don't think you're getting the right file path. Can you go to wherever you manage your files and just printscreen it??
OK, here are 3 printscreens:

One of the directory, in which I have put the rotate.php which is set for $folder = '.'; as per the instructions.

One showing the location set in the template to locate set rotate.php

One showing the forum with missing logo.

[attachment=16351]

[attachment=16350]

[attachment=16349]

Does that help any?
OK, in the 3rd one, can you keep clicking the up arrow, then where it says /testsite/images/banners, that'll change as you go up folders, keep clicking it until it won't allow you any higher, then that should be the path you need.
I am unsure what you mean?

The path to the banners is root (my main directory)>testsite>images>banners

For example if you type in:

http://vampirecounts.net/testsite/images...Banner.png

That works but typing in:

http://vampirecounts.net/testsite/images...rotate.php

Does not work?

Does it have anything to do with htaccess that it mentions in the tutorial linked in the other thread?
Pages: 1 2