Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: HRM on April 26, 2004, 03:47:09 PM

Title: Marquee Speed
Post by: HRM on April 26, 2004, 03:47:09 PM
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]
Title: Re: Newsbar Speed
Post by: [Unknown] on April 26, 2004, 04:27:18 PM
Admin -> Current Theme's Settings -> News Fader Speed. (or something similar to that.)

-[Unknown]
Title: Re: Newsbar Speed
Post by: HRM on April 26, 2004, 04:48:29 PM
Hm...i'm checking that sextion but still don't see.... You don't mean in the code do you?
???
Ed
Title: Re: Newsbar Speed
Post by: HRM on April 26, 2004, 04:50:53 PM
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
Title: Re: Newsbar Speed
Post by: HRM on April 26, 2004, 04:53:13 PM
that one seems only fix the time in betweens the items.. I dont see speed difference of the scrolling.

Tnx anyway.
Ed
Title: Re: Newsbar Speed
Post by: [Unknown] on April 26, 2004, 05:06:31 PM
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]
Title: Re: Newsbar Speed
Post by: HRM on April 27, 2004, 03:15:45 PM
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
Title: Re: Newsbar Speed
Post by: Oldiesmann on April 27, 2004, 04:18:39 PM
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]...
Title: Re: Newsbar Speed
Post by: HRM on April 27, 2004, 05:08:37 PM
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
Title: Re: Newsbar Speed
Post by: Oldiesmann on April 28, 2004, 10:39:28 AM
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.
Title: Re: Newsbar Speed
Post by: HRM on May 23, 2004, 10:02:20 AM
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
Title: Re: Newsbar Speed
Post by: Acf on May 23, 2004, 02:26:13 PM
isn't possible to add HTML to your news? if you could easily add the <marquee></marquee> tags with there flags in it.
Title: Re: Newsbar Speed
Post by: Owdy on May 23, 2004, 03:13:02 PM
Quote from: ªcF on May 23, 2004, 02:26:13 PM
isn't posible to add html to your news?
Yes it is ;)
Title: Re: Newsbar Speed
Post by: HRM on May 23, 2004, 05:10:08 PM
You could do a lot with BBC too! ;)
Title: Re: Newsbar Speed
Post by: 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 ;)
Title: Re: Newsbar Speed
Post by: HRM on May 23, 2004, 07:10:24 PM
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.(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.muziek4um.nl%2Fforum%2FSmileys%2Fdefault%2Fhuh.gif&hash=313b47fe8ccdf10d9271dadab371a7bd1006a206)
But what are the FLags? Didnt' knew the marquee stuff anyway. (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.muziek4um.nl%2Fforum%2FSmileys%2Fdefault%2Fgrin.gif&hash=08b48a0920f8eb9550b511aebeac632e309ec55e)

But now I can make it scroll anywhere at different speeds. (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.muziek4um.nl%2Fforum%2FSmileys%2Fdefault%2Fokidoki.gif&hash=2a0bead914e311e189fd62fa678952ae13dc9ce4)

Ed.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.muziek4um.nl%2Fforum%2FSmileys%2Fdefault%2Fmuziek4umisthebest.png&hash=191ce66e5905d1f7e41d4b5777763069c5a265c6)
Title: Re: Newsbar Speed
Post by: HRM on September 18, 2004, 09:25:30 AM
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>';
Title: Re: Newsbar Speed
Post by: [Unknown] on September 18, 2004, 04:07:17 PM
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]
Title: Re: Newsbar Speed
Post by: HRM on September 19, 2004, 06:59:07 AM
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
Title: Re: Newsbar Speed
Post by: [Unknown] on September 19, 2004, 04:03:30 PM
Then add below instead of replace.

-[Unknown]
Title: Re: Marquee Speed
Post by: CasTiger on April 06, 2005, 08:44:34 PM
Once you've added the speed code. How do you st the speed when typing your post or reply ?

How do you specify a speed ?

Using the MOVE bbc code ?
Title: Re: Marquee Speed
Post by: LuminaRS on June 09, 2006, 09:50:28 PM
I hate to bump an extremely old topic, but when I did this, it made my forums display a blank page. I'm using 1.0.7. What could have gone wrong for it to do that?
Title: Re: Marquee Speed
Post by: shame_qalander on June 01, 2009, 12:59:05 PM
Hi,

I was wondering if I could change the scrolling direction from right to left to left to right. I want it to move from left to right.

can anybody help?
Title: Re: Newsbar Speed
Post by: taimurkazmi on June 20, 2009, 02:12:04 AM
Quote from: [Unknown] on September 18, 2004, 04:07:17 PM
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]

thanks dear