vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Forum Display Enhancements - Sliding Banners or Images on Forum Home or Everywhere (https://vborg.vbsupport.ru/showthread.php?t=252643)

XiTCLUB 10-25-2010 10:00 PM

Sliding Banners or Images on Forum Home or Everywhere
 
1 Attachment(s)
Hi,

Modification : Sliding banners

Method : Jquery

Example : http://www.xitclub.com/forum.php?styleid=29 ( See Top right Banners on Forum home )


Installation:


1. Download the Attached Files and Upload to Your Forum Root

2. Add The Following Code Where you want to Display Adds ( I use "Advertising>Add New Add>Global>Header" in vb 4.0.7)

Code:

<html>
<head>

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="easySlider1.5.js"></script>
<script type="text/javascript" charset="utf-8">
// <![CDATA[
$(document).ready(function(){   
    $("#slider").easySlider({
        controlsBefore:    '<p id="controls">',
        controlsAfter:    '</p>',
        auto: true,
        continuous: true
    });   
});
// ]]>
</script>
<style type="text/css">
#slider { width:468px; height:30px; margin:0 auto; padding:0; }
#slider ul,
#slider li { margin:0; padding:0; list-style:none; }
/*
    define width and height of list item (slide)
    entire slider area will adjust according to the parameters provided here
*/
#slider li { width:468px; height:60px; overflow:hidden; }
body { margin:0; padding:0; width:100%;}


/* slider */
.slider {height:60px;}
.block_header h2 { color:#f3f4f4; font:bold 28px Arial, Helvetica, sans-serif; margin:0; padding:40px 10px 10px 10px; line-height:1.4em;}
.block_header p { color:#f3f4f4; font:normal 12px Arial, Helvetica, sans-serif; margin:0; padding:10px; line-height:1.8em;}



</style>
</head>
<body>
  <div class="block_header">
    <div class="slider">
      <div id="slider">
        <ul>
     
          <li>
            <div style="background-color:#000; color:#FFF; width:468px; height:60px; padding:0px; margin:0px;"> Your Image or Banner Code Goes Here
            </div>
          </li>
          <li>
            <div style="background-color:#000; color:#FFF; width:468px; height:60px;">Your Image or Banner Code Goes Here
            </div>
          </li>
          <li>
            <div style="background-color:#000; color:#FFF; width:468px; height:60px;">Your Image or Banner Code Goes Here
            </div>
          </li>
    <li>
            <div style="background-color:#000; color:#FFF; width:468px; height:60px;">Your Image or Banner Code Goes Here
            </div>
          </li>
        </ul>
      </div>
    </div>
</div>
</body>
</html>

Notice : Replace Red text With Your Image or Banner Code
Edit The CSS According to Your Needs

XiTCLUB 10-26-2010 10:59 AM

If it works Then Please Reply or "Mark as Installed"

synseal 10-26-2010 11:00 AM

Thanks, works a treat!. :up: *Installed.

gokhansancar 10-26-2010 04:18 PM

Thanks it works

synseal 10-26-2010 05:35 PM

Is there a way for it to show just one banner on page load.

When I refresh the page sometimes it shows all four banners one above the other until the page has fully loaded and then it shrinks down to just one, then it starts to rotate.

Thanks.

SeZoNaS 10-26-2010 06:12 PM

Amaaaaaaaaaaizing ,, Download is in progress (d)

XiTCLUB 10-26-2010 09:24 PM

Quote:

Originally Posted by synseal (Post 2114536)
Is there a way for it to show just one banner on page load.

When I refresh the page sometimes it shows all four banners one above the other until the page has fully loaded and then it shrinks down to just one, then it starts to rotate.

Thanks.

You can see it here http://www.techkings.org/forum/

This is not Possible Because we are displaying our contents in an Un-Ordered List and Controlling them with CSS & Jquery when we open our website all the data loads within the form but jquery & slider.js loads some time late as slider.js file controls the loop of banners which loads later

Manoel J?nior 10-26-2010 11:00 PM

LOL

Thanks!!!

Eduardo Leon 10-27-2010 01:41 AM

Quote:

Originally Posted by Manoel J?nior (Post 2114657)
LOL

Thanks!!!

what ?

just say thanks for sharing this . . . !

...

barcena 10-27-2010 11:49 AM

Can this be used to show google ads?

XiTCLUB 10-27-2010 11:54 AM

Quote:

Originally Posted by barcena (Post 2114849)
Can this be used to show google ads?

Yes it will be used to show any adds :) just put your add code within the <div> </div> tgs

BadgerDog 10-27-2010 02:29 PM

Nice mod.... :)

Before I install it, is there a place I control where it appears?

The top right on my web site doesn't work for me ...

Thank you ...

Regards,
Badger

XiTCLUB 10-27-2010 07:34 PM

its appear where you advertisements appear

Ahmad110 10-28-2010 03:14 PM

thanks for sharing . installed
i want to see big picture how can i change it ?

starman? 10-28-2010 04:21 PM

Great stuff, excellent work and thanks. I've put it in a sideblock with my event ads and it looks pretty good.

XiTCLUB 10-28-2010 05:58 PM

Quote:

Originally Posted by Ahmad110 (Post 2115273)
thanks for sharing . installed
i want to see big picture how can i change it ?

Just Change height and width in code
1st one is in
Code:

/* slider */
.slider {height:60px;}

change height in above

Then change in every <div>
Code:

<div style="background-color:#000; color:#FFF; width:468px; height:60px; padding:0px; margin:0px;">
Change height and width of each <div> according to ur needs

Merjawy 10-28-2010 10:46 PM

Beautiful .. Thanks for sharing

bada_bing 11-01-2010 07:27 PM

This would be a more desirable and downloaded hack if you can create a plugin with admin options to add and remove sponsors rather then editing the header file.

XiTCLUB 11-01-2010 08:26 PM

Quote:

Originally Posted by bada_bing (Post 2116879)
This would be a more desirable and downloaded hack if you can create a plugin with admin options to add and remove sponsors rather then editing the header file.

Basically i am a web Designer not a Developer i dnt know to make product sory for that

danyol1706 11-14-2010 05:58 AM

1 Attachment(s)
Noob question here, but how do I get the banner to load where you had yours (xitclub.com) -tucked right under the login info? I used the "Advertising>Add New Add>Global>Header 2" slot in vBulletin 4.08 (see circled area in left image).

As seen in the image to right, my banner is stuck in the middle.

Great mod and thank you.

XiTCLUB 11-14-2010 11:06 AM

Quote:

Originally Posted by danyol1706 (Post 2121650)
Noob question here, but how do I get the banner to load where you had yours (xitclub.com) -tucked right under the login info? I used the "Advertising>Add New Add>Global>Header 2" slot in vBulletin 4.08 (see circled area in left image).

As seen in the image to right, my banner is stuck in the middle.

Great mod and thank you.

On xitclub The Place is Default By Template Try to Use "header1" Place

danyol1706 11-14-2010 04:43 PM

Quote:

Originally Posted by xXxpert (Post 2121718)
On xitclub The Place is Default By Template Try to Use "header1" Place

I have tried both, but get the same result in both Header 1 & Header 2.

XiTCLUB 11-14-2010 06:14 PM

Quote:

Originally Posted by danyol1706 (Post 2121819)
I have tried both, but get the same result in both Header 1 & Header 2.

Then that is an issue of your template

bada_bing 11-15-2010 12:49 PM

Any reason why this wont work on vb version 3.8.x ?

betts02 11-16-2010 07:30 AM

Try this - https://vborg.vbsupport.ru/showthread.php?t=250747
No file uploads to FTP, Just add the code to where you want it

XiTCLUB 11-18-2010 08:14 AM

Quote:

Originally Posted by betts02 (Post 2122348)
Try this - https://vborg.vbsupport.ru/showthread.php?t=250747
No file uploads to FTP, Just add the code to where you want it

Good work but my one is not marquee tag think before where you posting dont bump your post by spreading link in other's threads where it has no meanings

airheadairbrush 11-19-2010 02:30 PM

didn't work 4.0.3 all the banners show up at once they do not slide
upload the js files, added my banner code
tried header1, header 2, below nav bar same results all the banner show up at once

airheadairbrush 11-19-2010 04:32 PM

got it to work thanks

XiTCLUB 11-19-2010 06:43 PM

Quote:

Originally Posted by airheadairbrush (Post 2123600)
got it to work thanks

welcome :)

XiTCLUB 11-19-2010 06:50 PM

Quote:

Originally Posted by bada_bing (Post 2122066)
Any reason why this wont work on vb version 3.8.x ?

no reason bcz it works on all vb versions bcz its not a mode its simple HTML and jquery combination use it any where not only on vb you can use it on any website

betts02 11-28-2010 09:52 AM

Quote:

Originally Posted by xXxpert (Post 2123095)
Good work but my one is not marquee tag think before where you posting dont bump your post by spreading link in other's threads where it has no meanings

just trying to help other out, think about the community an not just your mod

XiTCLUB 11-28-2010 09:32 PM

Quote:

Originally Posted by betts02 (Post 2126660)
just trying to help other out, think about the community an not just your mod

hmm ok, Thanks for suggestion :)

MatiasCandy 12-13-2010 06:41 PM

looks great as soon as I get to advertising I will look at this more

jskoh 03-17-2011 02:52 AM

hi, mine is not showing good. i upload the two js file to the forums root. and add two image but it shown up the image without silde. i place it under the nav bar. any body help?

XiTCLUB 03-17-2011 10:02 AM

Quote:

Originally Posted by jskoh (Post 2174270)
hi, mine is not showing good. i upload the two js file to the forums root. and add two image but it shown up the image without silde. i place it under the nav bar. any body help?

did you replace this red text (Your Image or Banner Code Goes Here)
with your image source?

like <img src="XXX" /> ?

jskoh 03-17-2011 11:41 AM

yep.. i put two image there. it shown two image. one top and one below. it just didnt slide. any advice? i upload the folder "js" to my domain root.

jskoh 03-17-2011 11:53 AM

okok... i got it work now.. thank.. installed

jskoh 03-17-2011 12:01 PM

it look funny after the fourth image and it slide backward. any way to change from scrolling back than jump to image1

Loren34695 12-23-2011 05:55 AM

This is what I wanted. Not a "mod" really, just some code that can be put into the ad block to rotate images. Thanks!

In answer to the question above about fixing the "rewind" after the last image, that's all built into the easySlider JQuery code. The good news is that if you upgrade from version 1.5 to 1.7, it fixes that problem. Instead of "rewinding", it just smoothly scrolls to the first image after the last image.

For the less-code-savvy, it's pretty easy to make that change. Just download version 1.7, place it in the folder where you put version 1.5, and then change the reference to the filename in your code block from "1.5" to "1.7". That's it!

Loren34695 12-23-2011 06:00 AM

Oh, BTW, you can eliminate a lot of the code in this example. The fact that it has styling in place for the body tag could override your theme style (it did mine), so I got rid of it and the rest of the general HTML page stuff.

Here's the less-cluttered code that I used:
Code:

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="easySlider1.7.js"></script>
<script type="text/javascript" charset="utf-8">
// <![CDATA[
$(document).ready(function(){   
    $("#slider").easySlider({
        controlsShow:  false,
        controlsBefore:    '<p id="controls">',
        controlsAfter:    '</p>',
        auto: true,
        continuous: true,
        pause: 10000
    });   
});
// ]]>
</script>
<style type="text/css">
#slider { width:468px; height:30px; margin: 0 auto; padding:0; }
#slider ul,
#slider li { margin:0; padding:0; list-style:none; }
/*
    define width and height of list item (slide)
    entire slider area will adjust according to the parameters provided here
*/
#slider li { width:468px; height:60px; overflow:hidden; }


/* slider */
.slider {height:60px;}
</style>

    <div class="slider">
      <div id="slider">
        <ul>
     
          <li>
            <div style="background-color:#000; color:#FFF; width:468px; height:60px; padding:0px; margin:0px;">
Ad #1 Here
            </div>
          </li>
          <li>
            <div style="background-color:#000; color:#FFF; width:468px; height:60px; padding:0px; margin:0px;">
Ad #2 Here
            </div>
          </li>
          <li>
            <div style="background-color:#000; color:#FFF; width:468px; height:60px; padding:0px; margin:0px;">
Ad #3 Here
            </div>
          </li>
        </ul>
      </div>
    </div>



All times are GMT. The time now is 01:25 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01914 seconds
  • Memory Usage 1,839KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete