banner script needed

Started by nomic, May 31, 2012, 02:18:58 PM

Previous topic - Next topic

nomic

i am looking for a banner script i have tried the rotating banner it loads fin the option appears in the admin but the banner bar and banners dont show up

smf 2.0.2
theme = anecdota_20g

has anyone got any suggestions ???

Tony Reid

Are you using bbcode or html for the image tag?
Tony Reid

TheListener

Have you looked at the simple ad rotator mod?

Works perfect on 2.0.2

nomic

this is the mod i have loaded it loads through the package manager

Mod Name:
    Random Forum Banner/Logo
Created By:
    ɔɔɔɔɔɔuɥoɾ
Type:
    New Feature
First Created:
    June 18, 2010, 11:36:55 PM
Last Modified:
    July 28, 2010, 12:26:13 AM
Latest Version:
    0.6
Compatible With:
    2.0 RC3
Total Downloads:
    1708
Notifications:
    Notify me of updates.


TheListener

One forum I belong to had it installed but decided to uninstall the mod due to there being errors with the mod.


nomic

simple add rotator gave me all these errors for my themes

      2ExtremeBlue
*       Execute Modification    ./Themes/2ExtremeBlue/index.template.php    Test failed
      1.    Replace    ./Themes/2ExtremeBlue/index.template.php    Test failed
      2.    Replace    ./Themes/2ExtremeBlue/index.template.php    Test failed
      Anecdota
*       Execute Modification    ./Themes/Anecdota_20g/index.template.php    Test failed
      1.    Replace    ./Themes/Anecdota_20g/index.template.php    Test failed
      2.    Replace    ./Themes/Anecdota_20g/index.template.php    Test failed
      Anecdota
*       Execute Modification    ./Themes/Anecdota_20g/index.template.php    Test failed
      1.    Replace    ./Themes/Anecdota_20g/index.template.php    Test failed
      2.    Replace    ./Themes/Anecdota_20g/index.template.php    Test failed

    SMF 2.0.2 | SMF © 2011, Simple Machines

TheListener

nomic have a look at the mod emulate link in my signature.

As said previously the mod works on a 2.0.2 forum

nomic

Quote from: Tony Reid on May 31, 2012, 02:20:28 PM
Are you using bbcode or html for the image tag?

im just loading through package manager mate direct from zip to site like i say it adds the feature to my admin but doesnt show on my webpage

nomic

ok i changed to emulate mode i installed the ad its in the admin panel ith options but still nothing showing on the site have u got some sample code i can add see if im adding it wrong ?

TheListener

Will have a quick look if ya want to send a temp admin account via pm.

nomic


nomic

ok tried just about everything and its not showing up the settings appear for both installs in the admin panel  but nothing shows on the actual web page

Tony Reid

edit ./Themes/Anecdota_20g/index.template.php

Find...


function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;


And add this straight after it (Check its not already there - I suspect it is not.)

  if (!empty ($modSettings['randombannerlogoOnOff']))       
        echo '
    <div id="random_banner"><a href="'. $scripturl .'"><img src="' . $settings['images_url'] .'/LogoImages/random_logo.php" alt=""/></a></div>';
        else '';


Tony Reid

nomic

it wasn't there the first time round i did add it afterwards but it still isnt showing

Tony Reid

Can you provide a weblink to your forum?
Tony Reid


Tony Reid

It looks like a configuration issue - you actually have two image subdirectories in the path to the random_logo.php file -

http://fishrescueandwelfare.com/Themes/Anecdota_20g/images/images/LogoImages/random_logo.php

The correct url should be

http://fishrescueandwelfare.com/Themes/Anecdota_20g/images/LogoImages/random_logo.php

However, that random_logo.php file has an error and needs to be checked...

QuoteParse error: syntax error, unexpected '<', expecting ')' in /home/www/fishrescueandwelfare.com/Themes/Anecdota_20g/images/LogoImages/random_logo.php on line 96
Tony Reid

nomic


nomic

and where is that path i need to change what file

Tony Reid


Line 96 in that file should be

$extList = array();

Tony Reid

nomic


Tony Reid

Perfect - now its just your path that needs fixing.

As your random_logo.php file is in the same directory as the images - you should change line 95 to


$folder = '.';


Tony Reid

nomic

anything else its still not showing the link u said had images/images where did u find that ?

Tony Reid

Did you change line 95 too?
Tony Reid

nomic


Tony Reid

Ok - your banner script is now working -

http://fishrescueandwelfare.com/Themes/Anecdota_20g/images/LogoImages/random_logo.php

We now need to find that double images/images bit.

Can you upload your index.template.php for me to look at please.
Tony Reid

nomic


Tony Reid

Line 175 is incorrect
if (!empty ($modSettings['randombannerlogoOnOff']))       
        echo '
    <div id="random_banner"><a href="'. $scripturl .'"><img src="' . $settings['images_url'] .'/images/LogoImages/random_logo.php" alt=""/></a></div>';
        else '';


Should be..

if (!empty ($modSettings['randombannerlogoOnOff']))       
        echo '
    <div id="random_banner"><a href="'. $scripturl .'"><img src="' . $settings['images_url'] .'/LogoImages/random_logo.php" alt=""/></a></div>';
        else '';
Tony Reid

nomic


Tony Reid

Its working.. a bit slow - but maybe you need to reduce the size of the images.
Tony Reid

nomic

 i have specific images i want it to use do i just load them to logo images folder now and by the way your a star i cant thank you enough i do this website for the charity in my spare time but im no programmer i just learn as i go so thank you so much

Tony Reid

Your welcome :)

Yes - just upload the images you wish to use as banners into the logoimages folder :)

Tony Reid

nomic

how do i add a link to the individual images ???

Tony Reid

In what way do you mean? so you can lik to them within a post?

like this

http://fishrescueandwelfare.com/Themes/Anecdota_20g/images/LogoImages/foxs%2520aquatics%2520logo.jpg


By the way - you should turn directory indexing off within your websites hosting control panel

Users shouldn't be able to see the directory listings...
http://fishrescueandwelfare.com/Themes/Anecdota_20g/images/LogoImages/
Tony Reid

nomic

i know im being a pain i have a million questions lol

can i place it under the site logo ????
can i add links to the images ???

obviously i would have to keep the images to a specific site to not throw the template out

nomic

ok i didnt know directory indexing was off ill have to find that now lol

and no i mean if you look at the banner foxes aquatics i want to be able to click the foxs aquatics banner and it automaticaly open there web page


Tony Reid

The mod you are using to display the banners is quite simple and would need some significant changes to support links.

To move the banner - you would need to edit index.template.php and move the banner code down to the recommended place which is just above the linktree code

// Show the navigation tree.
theme_linktree();


Directly under the logo would need css changes - and I am no expert on that :)

There are other mods (smf ads) specifically aimed at advertising which might meet your needs better.
Tony Reid

nomic

that means i would have to do all this again lol r u busy lol

Tony Reid

I'm quite busy at the moment.... just working my way through developing my own advertising management system (attached screenshot)..

I might be able to do something on Monday/Tuesday.
Tony Reid

nomic

ok cool thanks for your help ill see if i can catch up with u later at least i get the sponsors banners on the site for now which was the main thing for us

thank you again

Advertisement: