PDA

View Full Version : News Ticker Needed


CAG CheechDogg
03-13-2018, 04:29 PM
I would like to see if someone would be able to put together a news ticker similar to this one here ...https://vborg.vbsupport.ru/showthread.php?t=264742&highlight=ticker

This one is ok but I want to be able to add more to it on the fly instead of having to open the template and adding it from there ...So maybe something like the RSS feed menu where you can just keep adding news or other info?

MarkFL you think you can cook something up for me?

MarkFL
03-13-2018, 04:46 PM
Not too long ago, I developed a "Forum Marquee" product for another user, that allows you to display scrolling messages, specific to individual forums, and/or globally. It uses StyleVars to control the appearance.

I have attached it, give it a try and let me know what changes you would like. :)

CAG CheechDogg
03-13-2018, 05:26 PM
Lol ...I am having troubles getting it to work ... I can get the text message to show up but nothing else ... :eek:

MarkFL
03-13-2018, 05:29 PM
Lol ...I am having troubles getting it to work ... I can get the text message to show up but nothing else ... :eek:

Can you post a screenshot of how you've got the settings defined?

CAG CheechDogg
03-13-2018, 05:35 PM
Here you go ....

MarkFL
03-13-2018, 05:43 PM
Okay, in the "Marquee Messages" setting, try:

107,253,70|TEST,TEST 2

You want for each line a comma-delimited forumid list, a pipe, and then a comma delimited list of messages for those forums.

CAG CheechDogg
03-13-2018, 05:53 PM
Nope still nothing ... so 3 forum ids the pip and the 3 messages

107,253,70 | TEST,TEST 2,TEST 3

I have it just like that in one line ...right?

MarkFL
03-13-2018, 05:55 PM
What you should get with that is the 3 messages, all showing up in those 3 forums.

CAG CheechDogg
03-13-2018, 05:57 PM
Nope nothing ... lol I feel "S" stoopet !

CAG CheechDogg
03-13-2018, 05:59 PM
This is what I get ....

MarkFL
03-13-2018, 05:59 PM
Try the default style?

--------------- Added 1520967650 at 1520967650 ---------------

This is what I get ....

And it's scrolling from right to left, right?

CAG CheechDogg
03-13-2018, 06:02 PM
Same thing in default from right to left ....

--------------- Added 1520968011 at 1520968011 ---------------

So weird ..i went back to my custom style and it no longer shows there or in the default lol ...

MarkFL
03-13-2018, 06:08 PM
I'm confused at this point.

scottkoz20
03-13-2018, 06:10 PM
installing on SCF

CAG CheechDogg
03-13-2018, 06:11 PM
Me too lol ...

So it should show the 3 messages , test ... test 1 and test 2 right ... I think I am the one who is confused

The messages are getting pulled from those 3 forums ... or do I have to create a new thread or new reply for it to show up from any of those 3 forums? .

scottkoz20
03-13-2018, 06:17 PM
I used the following

0|THIS IS A TEST
0|This is a 2nd message
166|Hockey

on my FORUMHOME it shows the 1st 2 messages, with a marquee scroll starting on the right side, going to the left on the header

in my hockey forum 166, it shows all 3 messages, going from right to left.

this appears to be working

https://www.sportscardforum.com/forums/166-Hockey-Card-Forum

CAG CheechDogg
03-13-2018, 06:18 PM
Ok maybe this is why ... what js version does it use if it uses js? ... I think the last marquee I had didn't work because of a version of js I had which conflicts with this ...

MarkFL
03-13-2018, 06:22 PM
Me too lol ...

So it should show the 3 messages , test ... test 1 and test 2 right ... I think I am the one who is confused

The messages are getting pulled from those 3 forums ... or do I have to create a new thread or new reply for it to show up from any of those 3 forums? .

When viewing the thread list, or viewing any thread (and using the advanced editor) within any of those 3 forums, you should see the 3 messages scrolling, associated with those forums.

CAG CheechDogg
03-13-2018, 06:23 PM
I am leaving something out or I just don't understand how this is supposed to work lol ... "head bump on table" ...

--------------- Added 1520969302 at 1520969302 ---------------

LOL OMG !!! dude I "AM" "S" toopet! lol

So the forums which I add will have that specific message !!! lol ..MUAHAHAH !!!!

If I want it on forum home I added 0 and it shows that particular message ... it looks like its working correctly now lol ..

MarkFL
03-13-2018, 06:31 PM
Yes, using a forumid of "0" will show it in all of the designated scripts.

The person who originally asked me for this wanted different messages for different forums, so that's why it is set up that way. :)

--------------- Added 1520969512 at 1520969512 ---------------

By the way, you can use HTML in your messages as well.

CAG CheechDogg
03-13-2018, 06:32 PM
Nice nice !! lol

How can I set it to be at the very top like ESPN has it's ticker at the bottom of the screen without it disappearing when you scroll down ...

MarkFL
03-13-2018, 07:34 PM
Nice nice !! lol

How can I set it to be at the very top like ESPN has it's ticker at the bottom of the screen without it disappearing when you scroll down ...

Okay, give this a try...you'll see a new setting that allows you to choose between above the header (fixed) and below the header (as it was before).

CAG CheechDogg
03-13-2018, 07:39 PM
Ok its above header but it still moves/disappears when you scroll down

MarkFL
03-13-2018, 07:43 PM
Ok its above header but it still moves/disappears when you scroll down

Of course...I mean why would it behave for you the same way it behaves for me? LOL!

CAG CheechDogg
03-13-2018, 07:59 PM
Yeah I don't know but it still does it lol ...

--------------- Added 1520975924 at 1520975924 ---------------

I got it to work now ... I had to add the following to the markfl_forummarquee.css


.marquee {
white-space: nowrap;
overflow: hidden;
border: {vb:stylevar markfl_forummarquee_border};
border-radius: {vb:stylevar markfl_forummarquee_borderradius};
margin: -69px 0px;
padding: 13px;
background: {vb:stylevar markfl_forummarquee_background};
color: {vb:stylevar markfl_forummarquee_color};
font: {vb:stylevar markfl_forummarquee_font};
position: fixed;
width:1021px;
z-index: 500;
}


I also had to change the margin and padding and then the margin from the top of the bsb div to 70px from the top ...

MarkFL
03-13-2018, 10:08 PM
Some of those lines in red are redundant, as they are included in the class selector:

.fmarq_fixed {
position: fixed;
top: 0px;
left: 0px;
z-index: 100;
}

The others are likely particular to your custom style, which of course I can't possibly account for ahead of time.

And you now have no choice but to have the thing fixed.

It worked perfectly for me, but if I had a nickel for every time things work for me, and not for others, I'd be a very rich man.

CAG CheechDogg
03-14-2018, 12:08 AM
Oh that's crazy ..the new css file didn't get overwritten which is why it didn't work ..it only did it on the default and 2 other styles I have ... crazy !

MarkFL
03-14-2018, 12:41 AM
Oh that's crazy ..the new css file didn't get overwritten which is why it didn't work ..it only did it on the default and 2 other styles I have ... crazy !

Did you make any edits to the .css template? That's the only reason I know of that it wouldn't get overwritten when updating a product. :)

CAG CheechDogg
03-14-2018, 01:12 AM
Not that I remember lol ... but it's working now so thank you Mark ...

One thing I wouldn't mind having is being able to pull tittles with links from certain forums ... what do'ya think?

I remember there being one like that but for some reason it didn't work on my site ... don't remember why ... It was able to get links from forums and also from RSS feeds

MarkFL
03-14-2018, 01:16 AM
You can put links in there manually, using anchor tags.

What kind of links are you wanting to auto-grab, links to threads? Based on what criteria?

CAG CheechDogg
03-14-2018, 01:39 AM
Yes links to threads and external RSS feeds ..

Similar to this here ...https://vborg.vbsupport.ru/showthread.php?t=232518&page=6

I am messing with it now but still can't make it work ... but yes the threads would be added either per usergroup or certain forums ...

MarkFL
03-14-2018, 01:48 AM
Okay, so you would like to be able to decide which usergroups have permission to see it, which forums threads are selected from, and how many newest threads to select?

Would you want just the most recently created threads, or the threads with the most recent last posts?

It sounds very similar to the "Recent Posts Block" I just published last night.

I have no idea off the top of my head how this would be done without querying the database though.

Also, I have no idea about RSS feeds...I've never worked with those.

CAG CheechDogg
03-14-2018, 01:55 AM
Both options would be nice, recently created threads and most recent last posts ...

Yes very similar to the recent posts block except this is a marquee .. your Recent Posts Block is what made me remember that mod by MARCO1 which I never made it work for me ...

For the RSS feeds you use external.php ... the code below is what I think is used ..


<h2 align="center" class="blockhead">{vb:raw vboptions.MARCO1_latesttablename}</h2>
<div class="blockbody">
<div class="blockrow">
<!--Messages-->
<marquee dir="rtl" direction="left" OnMouseOut="this.setAttribute('scrollamount', 4, 0);" onMouseOver="this.setAttribute('scrollamount', 0, 0);" scrollamount="4" height=30>
<script type="text/javascript" src="{vb:raw vboptions.bburl}/external.php?&type=js"></script>
<script type="text/javascript">


for (var i = 0; i < threads.length; i++)
{
document.write('<a href="{vb:raw vboptions.bburl}/showthread.php?t=' + threads[i]['threadid'] + '">' + threads[i]['title'] + '</a>' + '&nbsp;&nbsp;&nbsp;&nbsp;' + 'By :' + threads[i]['poster'] + '&nbsp;&nbsp;&nbsp;&nbsp;');
}

//
</script></marquee>
<!--/Messages-->
</div>
</div>

MarkFL
03-14-2018, 02:04 AM
I read through that product thread, and it appears the claim of no queries was a bit misleading. I would rather write my own query, so I have more control over exactly what is fetched, rather than relying on the query used in "external.php". Also, I can use friendly urls, and username markup, etc.

It would be some time before I could make all these changes. :)

CAG CheechDogg
03-14-2018, 02:10 AM
Nice ... hey im in no hurry at all ... thanks Mark ...

MarkFL
03-14-2018, 02:55 AM
Nice ... hey im in no hurry at all ... thanks Mark ...

I'm thinking that for each new post put in the marquee, to only show the post author, the post timestamp and the link to the thread, for the sake of brevity. For more detailed information the Recent Posts Block would be the way to go.

Like the Recent Posts Block, forum permissions would be respected so that no user sees a link to a post they don't have permission to view.

The admin can select the active forums, and how many posts to select and display (as well as which usergroups can see the marquee).

I'm thinking these post links will be shown globally, in addition to any other manually added marquee messages, and the links will come after the manually added messages.

Sound good so far?

MarkFL
03-14-2018, 07:22 AM
I have attached what I have so far. One change to take note of, is the speed of the marquee is now in characters per second rather than the number of seconds for the complete message. This way the speed remains consistent regardless of the total length of the message.

I added a couple more StyleVars, one for the left/right margins of the fixed marquee and another for the color of the thread links.

Let me know of any issues or changes you'd like. :)

CAG CheechDogg
03-15-2018, 02:19 AM
Good stuff Mark ... working very nicely ..

One thing ... the way it displays the thread info ..

...Being a Dad Posted By: CAG CheechDogg On 7 Hours Ago at 01:12 PM

the "CAG CheechDogg On 7 Hours Ago" ...

Just doesn't look right ... is it supposed to say

Posted By: CAG CheechDogg On "some forum" 7 Hours Ago at 01:12 PM ....

is it missing the forum where it's coming from ... or just a bad selection of a phrase ...

MarkFL
03-15-2018, 02:30 AM
Good stuff Mark ... working very nicely ..

One thing ... the way it displays the thread info ..

...Being a Dad Posted By: CAG CheechDogg On 7 Hours Ago at 01:12 PM

the "CAG CheechDogg On 7 Hours Ago" ...

Just doesn't look right ... is it supposed to say

Posted By: CAG CheechDogg On "some forum" 7 Hours Ago at 01:12 PM ....

is it missing the forum where it's coming from ... or just a bad selection of a phrase ...

Okay, I can add the forum name in there if you want, and I am using phrases so you can set those however you want. I just use dates, so "On" made sense for me. I see something like:

Testing "Automated Reporter" Posted By: MarkFL On 03-11-2018 at 05:04 AM

So, I can make forum names optional, along with any other thread information you want. :)

CAG CheechDogg
03-15-2018, 02:42 AM
Ok ... so because it was only posted 6 hours ago it says "On 6 hours ago" ? ... if that's what it's doing ... can it leave out "On" when its only hours ago and just say "Hours Ago" ... so that would be an "If" i think ?

And yes, the option for forum names to be optional would be "FANTASTICO" ... what ever other thread information you think would look good I would appreciate it all ...

Would the option to show the latest person to give thanks to someone be hard to add to this marquee ... ?

On my forum I have thanks but I changed the phrase to something else "bad words" ...then the opposite of it which is actually the "Groan" mod here ...https://vborg.vbsupport.ru/showthread.php?t=193489&highlight=groans


I would just like the latests thanks to show up up on the marquee and I can make the changes to add the groan as well ...

But this is really awesome stuff Mark .. thank you !

MarkFL
03-15-2018, 02:49 AM
I went with a small amount of thread information (brevity) so that the ticker wouldn't be extremely long, but I can add in the forum name, and all the other options offered in the Recent Posts Block.

As for the latest thanks/groan, can you tell me the table/column names where that information can be retrieved?

CAG CheechDogg
03-15-2018, 02:56 AM
Yes I like the brevity myself too ... I just like the marquee instead of the big block for recent posts and other news ...

The latest thanks is retrieved from the default thanks system I would guess .... this might help you out .. this is the mod for it ...

https://vborg.vbsupport.ru/showthread.php?t=280109

MarkFL
03-15-2018, 03:59 AM
Those mods have likely added either new tables or columns to existing tables, or both. I would need to know what's been added to the database, because I don't have those installed on my dev site, and I'd rather not have to do download and inspect them if possible.

CAG CheechDogg
03-15-2018, 04:08 AM
Hmm... I know just a bit about tables, columns and I would need some guidance as to what I would be looking for ...

MarkFL
03-15-2018, 04:16 AM
Hmm... I know just a bit about tables, columns and I would need some guidance as to what I would be looking for ...

I'll just download the products and take a look at the install code in the .XML files, it will show what tables/columns are added. :)

CAG CheechDogg
03-15-2018, 04:31 AM
:erm: ... sorry my Man that's why I am not doing this myself ...just know a bit of what is going on

MarkFL
03-15-2018, 05:19 AM
No worries...I'll get it worked out, and I'll attempt to offer support for DBTech's post thanks product as well. :)

CAG CheechDogg
03-15-2018, 05:22 AM
The post thanks product is not the one I have though .. but that will be good for others ...

MarkFL
03-16-2018, 01:24 AM
Here is the update with the other thread options added. I decided trying to support multiple post thanks products is just more time and effort than I can afford right now. I've got a lot of other things I have to stay on top of.

RichieBoy67
03-16-2018, 11:18 AM
Good stuff! Going to try this! Currently I have the Dragonbyte shoutbox showing latest threads under the navbar but it takes a little too much space above the page fold and it doesn't show thread titles for threads that have content marked private.

I am going to try this!

Hey Mark, will this just pull latest thread/posts from all forums?

Thank you Mark!

In Omnibus
03-16-2018, 12:29 PM
No worries...I'll get it worked out, and I'll attempt to offer support for DBTech's post thanks product as well. :)

It'd be nice if someone supported their products because they certainly don't.

RichieBoy67
03-16-2018, 03:00 PM
It'd be nice if someone supported their products because they certainly don't.They are pretty good if you fill out a ticket at their site.

carmine3838
03-07-2021, 08:16 AM
hello I was trying and it works on vb 4.2.5 I wanted advice on how to show it in the footer instead in navbar thank you