1
Zjerre
xcgal scrolling thumbs
  • 2004/12/14 14:18

  • Zjerre

  • Just popping in

  • Posts: 69

  • Since: 2003/9/6 1


Hi,
If you check my site http://www.moeder-oilsjterse.be/gent you can see that the scrolling thumbs in their block are NOT centered as they shoul be. I tried modifying the code but I did not had any succes. This is the code:

<script src="<{$xoops_url}>/modules/xcgal/js/dw_core.js" type="text/javascript"></script>
<
script src="<{$xoops_url}>/modules/xcgal/js/dw_scroller.js" type="text/javascript"></script>
<
script type="text/javascript">
<!--
/*
This code is from Dynamic Web Coding
at http://www.dyn-web.com/
Copyright 2001-3 by Sharon Paine
See Terms of Use at http://www.dyn-web.com/bus/terms.html
Permission granted to use this code
as long as this entire notice is included.
*/
function initScrollerObjs() {
 
scroller1 = new scrollerObj(0,0,125,<{$block.wh}>,"center","holder");
 <{foreach 
item=pic from=$block.pics}>
 
scroller1.addItem('<a href="<{$xoops_url}>/modules/xcgal/<{$pic.link_tgt}>"><{$pic.image}><br/></a><{$pic.caption}>');
 <{/foreach}>
scroller1.create();

  
setMouseEvents(); // set up pause/restart onmouseover/out
}

window.onload initScrollerObjs;
//-->
</script>

<
div style="height: <{$block.wh}>px; width: 100%;">
<
div id="holder"></div>
</
div>


I had this problem before but I forgot the solution and since this board restyled I can't find it no more.
Btw: I use the CyberGlass theme.

Cheers, Z.

2
BEARsaysPLAY
Re: xcgal scrolling thumbs

I'm having the same problem.

Any help here?

3
tripmon
Re: xcgal scrolling thumbs
  • 2005/1/11 23:19

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


Not that I know what I'm talking about, but the first thing I would do is increase / decrease (aka. Monkey around with) the 0,0,125 value:

scroller1 = new scrollerObj(0,0,125

Hope that does it.

4
BEARsaysPLAY
Re: xcgal scrolling thumbs

Quote:

tripmon wrote:
Not that I know what I'm talking about, but the first thing I would do is increase / decrease (aka. Monkey around with) the 0,0,125 value:

scroller1 = new scrollerObj(0,0,125

Hope that does it.


Where would I find this piece of code?

5
Tabasco
Re: xcgal scrolling thumbs
  • 2005/1/12 0:46

  • Tabasco

  • Quite a regular

  • Posts: 203

  • Since: 2003/12/26


Just add <center> before the start of the script, and <center> after the script.

6
tripmon
Re: xcgal scrolling thumbs
  • 2005/1/12 14:55

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


Bear, the code can be found in the original code block posted above...

BTW I think <center> is depricated, and the closing tag should be </center> if your going that route.

7
BEARsaysPLAY
Re: xcgal scrolling thumbs

Okay.

I tried using < center > (without the spaces and the proper close tag ) and when I updated the module and went to the page the block was there but no images.

I tried puting < center > in various places in the code and it either had no effect or, once again the block would appear but no images.

Adjusting the 0,0,125 values resulted in the images appearing outside of the block in various places around the page depending upon which value was changed - the first 0 moves the images horizontally, the second 0 moves the images vertically, and changing the 125 value had 2 effects - increasing the value pushed the images to the right outside of the block and decreasing the value would "cut" the right side of the images off leaving them aligned as they normally would be.

I thought I was on to something when I was playing with the first 0 value but changing screen resolutions still resulted in the images appearing outside of the block.

I tried putting the script in a table and setting the cell's value to center but this had no effect on the positioning of the images in the cell. I added text to the cell above and below and it centered in the table but the images still appeared as if aligned right.

I aslo checked the code in the other block's respective .html files for clues but came up empty.

There has to be something either missing from, or in the javascript that is preventing adjustments to the alignment but I don't have enough code skills to know what it might be or what the fix is.

Any more ideas?

8
gary711
Re: xcgal scrolling thumbs
  • 2005/1/12 19:30

  • gary711

  • Just popping in

  • Posts: 13

  • Since: 2004/8/3 6


modify the following line
<div style="height: <{$block.wh}>px; width: 100%;">


like this
<div style="text-align: left; margin-top: [color=FF3300]5[/color]px; margin-left: [color=FF3300]-9[/color]px;
height: <
{$block.wh}>px; width: 100%;">


change the number of margin-left and margin-top

9
Rhomal
Re: xcgal scrolling thumbs
  • 2005/1/12 19:45

  • Rhomal

  • Quite a regular

  • Posts: 274

  • Since: 2004/10/5


I have discovered this issue is limited to the IE browser. Once again it not being W3 compliant is the cause. Use a better/compliant browser such as netscape or firefox and it will display centered fine.

10
BEARsaysPLAY
Re: xcgal scrolling thumbs

gary - I used your suggestion and after updating the module the images failed to appear much as they did when I tried to use < center >.

Rhomal - That is a good suggestion however, over 90% of the visitors to my site and one of the other sites I manage that has the same problem with this block use IE and obviously, we can't control that. I believe in catering to my end users. Leaving them out in the cold rather than trying to find a fix would be much like designing the layout of the site to fit my 21" monitor at 1280x1024 if the vast majority of my users were running 800x600. Even though it may look great on my end, the end result is the site wouldn't look professional to the users and they'd move on. The better way to go is to solve the problem.

If it can't be solved, I'll just write a custom block using some readily available javascript out there and use it in place of xcgal's scrolling thumbs block. It will be more cumbersome to manage from an admin standpoint but the end user won't know the difference and at least it will work with all browsers equally.

Login

Who's Online

190 user(s) are online (118 user(s) are browsing Support Forums)


Members: 0


Guests: 190


more...

Donat-O-Meter

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

Latest GitHub Commits