View Full Version : scrolling affiliate module
StuntFactoryX
04-13-2007, 07:34 PM
i was bored and researched and came up w/ this scrolling affiliates module. there are several modules out there that marquee. the problem i was having w/ other modules is they didnt work correctly in both firefox and IE. so i used java.
apparently after my reasearch i found that the marquee tag was designed by IE and wasnt correct html creating problems in other browsers like FF. i guess they started to allow the tag but if they were used w/ div tags they really started screwing up. maybee im way off. that im not sure of but thats my understanding.
i played w/ the code till it looked good on my computer. it works in both IE and FF on my computer. im not a coder. i just found some java and tweaked it a bit to do what i wanted it to do in a module.
other modules i came across using the marquee tag wouldnt allow me to adjust the height in FF. this one you can set the paramiters you want including size of module and speed. you will see these options in the top of template. im not sure if my coding is 100% corect but its working for me.
you can see it here
http://www.nystunter.com
http://www.getatattoo.com
install
upload the module in to your cmps. name it. choose a column position. on upload in a drop down box it will ask you to choose a style. tick the box yes for use module shell. if you are running multiable styles you will need to go to style manager and copy the module template for adv_portal_affiliate and add the template to other styles.
inside this template at the bottom you will see where you edit the the link and image paths.
i will try to help.
goodluck.
LatinPrince
04-13-2007, 07:47 PM
The file you have uploaded is not a valid .module file.
Could you just explain and give us the code itself?
vbulletin version 3.6.5
Would love something like this thought the fade + scrolling working on both browsers = amazing!
EDIT: Nevermind I made the template from the module but at least you know. Thanks for this.
StuntFactoryX
04-13-2007, 08:42 PM
<style type="text/css">
#marqueecontainer{
position: relative;
width: 100%; /*marquee width */
height: 600px; /*marquee height */
overflow: hidden;
}
.imgfade{filter:alpha(opacity=30); -moz-opacity:0.5}
.imgfull{filter:alpha(opacity=100); -moz-opacity:1}
</style>
<script type="text/javascript">
var delayb4scroll=0 //Specify initial delay before marquee starts to scroll on page (2000=1 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''
function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8)) //if scroller hasn't reached the end of its height
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px" //move scroller upwards
else //else, reset to original position
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}
function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight //height of marquee content (much of which is hidden from view)
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}
if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee
</script>
<tr>
<td class="$getbgrow">
<div id="marqueecontainer" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" align="center" style="position: absolute; width: 100%;">
<!--YOUR SCROLL CONTENT HERE-->
<a href="http://www.yourlink.com" target="_blank"><img class="imgfade" onmouseover="this.className='imgfull'" onmouseout="this.className='imgfade'" alt="" src="http://www.domain.com/yourimage.jpg" width="125" height="125" alt="yourmouseovertext" border="0"/></a>
<br /><br />
<a href="http://www.yourlink.com" target="_blank"><img class="imgfade" onmouseover="this.className='imgfull'" onmouseout="this.className='imgfade'" alt="" src="http://www.domain.com/yourimage.jpg" width="125" height="125" alt="yourmouseovertext" border="0"/></a>
<br /><br />
<a href="http://www.yourlink.com" target="_blank"><img class="imgfade" onmouseover="this.className='imgfull'" onmouseout="this.className='imgfade'" alt="" src="http://www.domain.com/yourimage.jpg" width="125" height="125" alt="yourmouseovertext" border="0"/></a>
<br /><br />
<a href="http://www.yourlink.com" target="_blank"><img class="imgfade" onmouseover="this.className='imgfull'" onmouseout="this.className='imgfade'" alt="" src="http://www.domain.com/yourimage.jpg" width="125" height="125" alt="yourmouseovertext" border="0"/></a>
<br /><br />
<a href="http://www.yourlink.com" target="_blank"><img class="imgfade" onmouseover="this.className='imgfull'" onmouseout="this.className='imgfade'" alt="" src="http://www.domain.com/yourimage.jpg" width="125" height="125" alt="yourmouseovertext" border="0"/></a>
<br /><br />
<a href="http://www.yourlink.com" target="_blank"><img class="imgfade" onmouseover="this.className='imgfull'" onmouseout="this.className='imgfade'" alt="" src="http://www.domain.com/yourimage.jpg" width="125" height="125" alt="yourmouseovertext" border="0"/></a>
<br /><br />
<a href="http://www.yourlink.com" target="_blank"><img class="imgfade" onmouseover="this.className='imgfull'" onmouseout="this.className='imgfade'" alt="" src="http://www.domain.com/yourimage.jpg" width="125" height="125" alt="yourmouseovertext" border="0"/></a>
<br /><br />
<a href="http://www.yourlink.com" target="_blank"><img class="imgfade" onmouseover="this.className='imgfull'" onmouseout="this.className='imgfade'" alt="" src="http://www.domain.com/yourimage.jpg" width="125" height="125" alt="yourmouseovertext" border="0"/></a>
<!--YOUR SCROLL CONTENT HERE-->
</div>
</div>
</td>
<tr>
<td class="thead">
<div class="smallfont" align="center">Want your website here?<br /><a href="$vboptions[contactuslink]">Contact us!</a></div>
</td>
</tr>
</tr>
hmm that module wouldnt upload? well heres the code.
instructions
go to admincp > vba cmps > add module > template
fill in
module title > whatever you like
columm > wherever you want it
active > tick yes
update all pages > up to you. but if you choose no you might have to go to edit pages to make sure its ticked in the page you want.
tempate to include > affiliate
style > pick from drop down menu. thats the style it will add the template to. you will need to add this templete content to other styles in the syle manager with the title adv_portal_affiliate if you want them to work on other styles
template code > copy and paste above code in there edited w/ your images
Use Module Shell Template > tick yes
and save. if all goes well it should work :)
Majest
06-15-2007, 06:50 AM
Great module, though I have to add it in manual as well.
Is there a way to have the affiliates roll continuously instead of having the blank at the end.
IE, after the last one on the list is shown the first one is right under it again thus restarting the loop without the large space?
StuntFactoryX
06-15-2007, 07:08 AM
i have yet to find a way. this was designed to be used for text not images. i just tried to find somthing to avoid a scroll tag because of browser compatabilty. i have tried to accomplish the very same thing and have not found a solution. however i have also ran into the same issue w/ another scrolling module on here and it did the same thing w/ the gap between end and begining. this one i was able to control window hieght and it works in firefox. i couldnt get the other 1 too... if i run across a solution or a way in the future i will post it :)
Majest
06-15-2007, 07:52 AM
Thanks for the quick reply, have I have a little tweaking to make it suit my site better.
I hope you can find a way to remove the blank area, it would look better and be more practical. :)
StuntFactoryX
06-15-2007, 08:09 AM
as a temp fix you could change the size of the module... i think its 5-6 lines down i have it set at 600px... your ads are small so if you reduced it down a bit i think it would help... looks good w/ that skin :)
Greek76
06-15-2007, 09:12 PM
Great module but how and where do I change the size of the block for the right column? Its is bigger than the rest of the boxes. Thanks
Majest
06-15-2007, 09:14 PM
as a temp fix you could change the size of the module... i think its 5-6 lines down i have it set at 600px... your ads are small so if you reduced it down a bit i think it would help... looks good w/ that skin :)
Thanks, I originally had it at 300 and I have now got it at 150. :)
StuntFactoryX
06-15-2007, 11:18 PM
Great module but how and where do I change the size of the block for the right column? Its is bigger than the rest of the boxes. Thanks
you will find this in admin cp > styles and templates > edit templates (in drop down) then open adv_portal_affiliate (this is also where you would edit your image/links)
5th line down u will see 600px for hiegth.... just change that to desired height.. as far as width i have that at 100% so it will expand on it own to allowed column width.
ahmednadir
06-30-2007, 08:36 PM
thanks for the module, unfortunatly the link for the demo is'nt working
can someone please post a demo link thats working
thanks
princeedward
07-01-2007, 04:57 PM
same here...need a demo please on this...thanks anyway... ;)
forumnerds
07-02-2007, 06:03 PM
Database error in vBulletin 3.6.7: Invalid SQL: ### INSERT QUERY GENERATED BY fetch_query_sql() ###INSERT INTO adv_modules (`0`, `active`, `userperms`)VALUES ('', '1', '4,6,8,7,2,5,1,3,9');
thats the error i get
Loco Macheen
07-03-2007, 05:25 PM
Database error in vBulletin 3.6.7: Invalid SQL: ### INSERT QUERY GENERATED BY fetch_query_sql() ###INSERT INTO adv_modules (`0`, `active`, `userperms`)VALUES ('', '1', '4,6,8,7,2,5,1,3,9');
thats the error i get
same here :(
Database error in vBulletin 3.6.7:
Invalid SQL:
### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO adv_modules
(`0`, `active`, `userperms`)
VALUES
('', '1', '4,8,7,6,2,5,13,1,3,11');
MySQL Error : Unknown column '0' in 'field list'
StuntFactoryX
07-08-2007, 10:22 PM
hmmm i have no ideas on the error...
here it is on 3.6.7 and 3.0
www.nystunter.com lower left corner
again he has it very large here...
www.getatattoo.com
Sauron
07-15-2007, 06:28 PM
here it is on 3.6.7 and 3.0
www.nystunter.com lower left corner
[/url]
Nice style on this forum...
Anyone how is that? :confused:
powerful_rogue
07-30-2007, 05:16 AM
This is fantastic!
Also, How would I used this if I just wanted it to be for text without any images?
Link One
Link Two
Link Three
TommyGun96
07-30-2007, 08:49 PM
Thanks a lot... / Muchas gracias!!! :D
powerful_rogue
07-31-2007, 02:20 PM
This is fantastic!
Also, How would I used this if I just wanted it to be for text without any images?
Link One
Link Two
Link Three
Anyone? :)
StuntFactoryX
08-06-2007, 10:05 PM
<!--YOUR SCROLL CONTENT HERE-->
link1<br/>
link2<br/>
link3
<!--YOUR SCROLL CONTENT HERE-->
i think u can use whatever content or html that you would like between those
omegared
08-11-2007, 02:26 AM
Can someone who got this to work, re upload it as a module so that those of us that can't get it to work will be able to use it. Please. I tried to get it to work using the code but nothing appears.
Tygerwoody
08-11-2007, 02:45 PM
Great Mod! It works perfectly for me(putting in the manual way). http://www.guildclan.com to see it in action. Still adding more sites to the list. Right now I only have 3 :o
omegared
08-15-2007, 01:28 AM
Okay I put it in the manual way and it doesn't show up on my homepage? Any ideas?
butterflykisses
08-19-2007, 08:23 AM
brilliant is perfect thanks!
rollinjunk
10-03-2007, 03:58 PM
great mod went right in
lowboost
10-05-2007, 01:53 PM
any way to make this fixed instead of scrolling?
princeedward
10-07-2007, 06:02 AM
any way to make this fixed instead of scrolling?why don't you just create a new ordinary template module and insert your affiliates site link inside...so simple is that...well., if you know how to create a module then...let me know if i can help you more on this...;)
StuntFactoryX
10-07-2007, 08:38 AM
any way to make this fixed instead of scrolling?
im assuming you want the mouse over effect... try this i think it will work
<style type="text/css">
.imgfade{filter:alpha(opacity=30); -moz-opacity:0.5}
.imgfull{filter:alpha(opacity=100); -moz-opacity:1}
</style>
<tr>
<td class="$bgclass" align="center">
<a href="http://www.yourlink.com" target="_blank"><img class="imgfade" onmouseover="this.className='imgfull'" onmouseout="this.className='imgfade'" alt="" src="http://www.domain.com/yourimage.jpg" width="125" height="125" alt="yourmouseovertext" border="0"/></a>
<br /><br />
<a href="http://www.yourlink.com" target="_blank"><img class="imgfade" onmouseover="this.className='imgfull'" onmouseout="this.className='imgfade'" alt="" src="http://www.domain.com/yourimage.jpg" width="125" height="125" alt="yourmouseovertext" border="0"/></a>
<br /><br />
</td>
</tr>
Possum
10-07-2007, 04:43 PM
Nice mod. I just wish I could get it to work in 2 sections (left and right), but that won't fly the way it is currently written, and the fact there would be 2 java instantiations of the same name. Also, when I tried to muck with it, and use a different name for the template, if didn't act quite right (no scroll) in IE....
Just a thought, but a great mod none the less. Using it now.
Importer
10-11-2007, 04:28 PM
I did what you said to do, but nothing came up...at all
rammbs
10-15-2007, 05:39 PM
Thanks for this!!! worked great for our weather module.
check it out.
MTNBIKERS.NET (http://www.mtnbikers.net/)
running on 3.6.8 and vmps 3.0 RC1
blkdrgn
10-19-2007, 12:57 PM
This is just cool.
I was looking for something like this and it looks much better than my java one that i threw together...
Cookie for you sir....
Artes_Marciales
11-07-2007, 10:18 AM
Database error in vBulletin 3.6.7: Invalid SQL: ### INSERT QUERY GENERATED BY fetch_query_sql() ###INSERT INTO adv_modules (`0`, `active`, `userperms`)VALUES ('', '1', '4,6,8,7,2,5,1,3,9');
thats the error i get
Same Error here... 3.6.8
Importer
12-04-2007, 10:35 PM
Hello again I have made it to work, however, I did two on one page which looks fine however one stopped scrolling after saving the other one, and when I move my mouse over the one that doesn't scroll the other one on the other side stops like it would if I moved the mouse over it. wow that was a tongue twister
Here check it out:
www.speedjunkyz.info/cmps_index.php
Importer
12-04-2007, 11:31 PM
Also how do I get it to go from side to side instead of up and down? Plus the questions above this one^
basilrath
12-09-2007, 01:57 PM
Looks good with youtubes in too.......HERE (http://www.tabletennistalk.co.uk)..................nice idea
Importer
12-10-2007, 10:22 PM
why can I not get support for this? Where can I get it then? lol You develope it but can not support it........ Can someone please answer me?
christian8a
12-11-2007, 07:04 PM
How did you get it to loop it? as in this site www.getatattoo.com (http://www.getatattoo.com)
Edit*
Nevermind, I just saw that you put repeated links. Well if anybody finds a loop fix for it, appreciated ;) and thanx for this great hack brother.
Chris___
StuntFactoryX
12-12-2007, 02:11 AM
sorry i cannot support this because im not a coder (refer to my first post)... i found some java in a google search and tossed it in a cmps module... its confirmed and working on my site...
my guess is this will only work once on each page... muliable instances will conflict.. i still have not found a way to make it loop w/o the blank space.
Importer
12-12-2007, 10:35 PM
lol ok whatever
denman
12-25-2007, 02:53 PM
great mod works like a charm
Terror
12-27-2007, 01:41 AM
excellent, works great with CMPS v3.0 RC2 and 3.6.8 :)
CNY750Rider
12-30-2007, 01:33 PM
lol ok whatever
make your own...and support it. LMAO
Nice job Johnny!! I'm going to give it a try!!
Danoz
01-16-2008, 10:43 AM
Sweet module. Thanks for this much appreciated :)
steven72555
01-20-2008, 10:35 AM
same here :(
Database error in vBulletin 3.6.7:
Invalid SQL:
### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO adv_modules
(`0`, `active`, `userperms`)
VALUES
('', '1', '4,8,7,6,2,5,13,1,3,11');
MySQL Error : Unknown column '0' in 'field list'
I got that very same error.. YAY I wasn't the only one!
StuntFactoryX
01-20-2008, 12:32 PM
are you trying to manauly add it per instructions in post #3? uploading the module hasnt been working for many.. not sure why. post 3 works.
i have it working on vb3.7 beta3 and vba 3.0 rc2
here is new demo (http://www.rochesterhotspot.com)
here is downloaded module from vba3.0 rc2 (not sure if it will upload but u can try it)
Bostton1@gmail.
02-17-2008, 12:25 PM
this is a great module. is there anyway to keep the marquee constantly going instead of pausing when it starts over?
http://www.circlex-gaming.com/
doogie1775
04-21-2008, 03:12 PM
this is a great module. is there anyway to keep the marquee constantly going instead of pausing when it starts over?
http://www.circlex-gaming.com/
Great Mod, thank you!
I would like the gap removed as well, anyone have any idea how to do that?
Chief Thunder
05-18-2008, 09:13 AM
Hi;
I installed this scrolling module without a hitch, so now my next choir is adding the links for the affiliates.
My question is.
I just tried to resize it horizontally down to 300 and when I do I cannot save the code on my edit template page?
Below is the error message that I receive, I am now wondering if this is a one shot deal?
The template 'adv_portal_Bullpup Affiliates' already exists in this style.
You can no longer edit the template once it is installed on your page?
Do we need to delete and re-install the module whenever we need to edit the code in the template, IE add more affiliates?
Thanks!!
Jill
Importer
06-14-2008, 01:03 AM
Great Mod, thank you!
I would like the gap removed as well, anyone have any idea how to do that?
I don't believe there is a way yet, I have been searching forever now lol
My question is:
I want to put one on each side, however when i do one stops scrolling and when I try to change the speed on it the only one that changes is the newer one that was installed. How do I have more than one and be able to adjust them individually?
PLease any help would be great!
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.