News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Marquee Speed

Started by HRM, April 26, 2004, 03:47:09 PM

Previous topic - Next topic

HRM

Hello,

I was wondering if there's a way to control the speed of items you make scroll in the newsbar.

I think it's doing the same speed as it did in Yabbse but because the newsnar is now in one of the nice little boxes at the top it goes pretty fast.

I had another layout  ( converted from yabb) before but decided to start all over from the original SMf layout on. My forum is at : www.muziekforum.com 

Tnx in advance,
Ed

[edit]subject title[/edit]
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

[Unknown]

Admin -> Current Theme's Settings -> News Fader Speed. (or something similar to that.)

-[Unknown]

HRM

Hm...i'm checking that sextion but still don't see.... You don't mean in the code do you?
???
Ed
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

HRM

I see something like it....


Quote
-Show news fader on board index 
-Time in milliseconds to display each item in the news fader


But doesn't that one say the time in between the items? I really mean the scrolling speed?
Im gonna try it anyway right away.  :D
ed
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

HRM

that one seems only fix the time in betweens the items.. I dont see speed difference of the scrolling.

Tnx anyway.
Ed
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

[Unknown]

Wait, scrolling?  By what do you mean?  That controls the fade speed.... if you're using the move tag, that cannot be as easily controlled.

-[Unknown]

HRM

#6
Hi,

yes indeed, the scroll tag like the one below.

Scrolling like this I mean  ;)


But now I thinking about it (a day later) I realize this might not be the apropiate Topic to ask this as its no Functionality but more about the tags.  :o  Any advise is welcome though!

Thanks, 
Ed
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

Oldiesmann

You can adjust the speed of the move tag by going into Subs.php and searching for <marquee>\\1</marquee> or something like that and changing it to <marquee scrollamount=x>\\1</marquee> (put some number in there instead of x. I think 60 is the default scroll speed, so play around with it a bit and see what you come up with). If you want, I can tell you how to change the move tag so you can do something like [move=speed]text[/move]...
Michael Eshom
Christian Metal Fans

HRM

Thank you very much. It works perfectly!  :D :D

And I would apreciate the [move=speed tag as well very much.

Thanks in advance.
Ed
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

Oldiesmann

Ok... To add the capability to specify speed for the move tag:

In Sources/Subs.php

Find:
'/\[move\](.+?)\[\/move\]/is',

Add after:
'/\[move=(.+?)\](.+?)\[\/move\]/is',

Find:
'<marquee>$1</marquee>',

Add after:
'<marquee scrollamount="$1">$2</marquee>',

This will basically add another bbcode tag to your board - this way if you don't specify a speed, it will still move at the default speed.
Michael Eshom
Christian Metal Fans

HRM

#10
Thanks a lot for this codes Oldiesmann,

And my apologies for not having replied on your post before. All came because I changed from network provider for my dsl connection and that meant being without broadband for weeks. :'(

But finally  I did all the copy-paste stuff, used the bbc code You mentioned and it works FANTASTIC!!!!

Thanks you very much oldiesmann!

Ed
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

Acf

#11
isn't possible to add HTML to your news? if you could easily add the <marquee></marquee> tags with there flags in it.
Sigh...

Owdy

Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

HRM

You could do a lot with BBC too! ;)
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

Owdy

Quote from: Homerecording man on May 23, 2004, 05:10:08 PM
You could do a lot with BBC too! ;)
Point was why hack sources if you can do it without it ;)
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

HRM

Quote from: Owdy on May 23, 2004, 05:16:30 PM
Quote from: Homerecording man on May 23, 2004, 05:10:08 PM
You could do a lot with BBC too! ;)
Point was why hack sources if you can do it without it ;)

Thats true absolutely true. Didn't thought about it that way.
But what are the FLags? Didnt' knew the marquee stuff anyway. 

But now I can make it scroll anywhere at different speeds.

Ed.
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

HRM

#16
For some reason the moving tag doesnt work any more the way it was. I had made some adaptations like written before in this topic and it's not necessarely about the newsbar but about the move tag in general. .

$codefromcache[] = '~\[move\](.+?)\[/move\]~is';
  and in de original sub from the upgrade the S of is is missing.

$codetocache[] = '<marquee>$1</marquee>';
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

[Unknown]

For RC1... in Sources/Subs.php, find:

$codefromcache[] = '~\[move\](.+?)\[/move\]~i';
$codetocache[] = '<marquee>$1</marquee>';


Replace:

$codefromcache[] = '/\[move=(\d+)\](.+?)\[\/move\]/is';
$codetocache[] = '<marquee scrollamount="$1">$2</marquee>';


-[Unknown]

HRM

#18
Thanks a lot Unknown!

But if I use that code the normal
tag doesn't work any more. I mean if i don't give a value.


Any other options.?
Thanks in advance.

Ed
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

[Unknown]

Then add below instead of replace.

-[Unknown]

Advertisement: