vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   News Ticker Needed (https://vborg.vbsupport.ru/showthread.php?t=326199)

CAG CheechDogg 03-14-2018 01:39 AM

Yes links to threads and external RSS feeds ..

Similar to this here ...https://vborg.vbsupport.ru/showthrea...=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 ..

Code:

    <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

Quote:

Originally Posted by CAG CheechDogg (Post 2593510)
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

1 Attachment(s)
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

Quote:

Originally Posted by CAG CheechDogg (Post 2593525)
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/showthrea...ghlight=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 !


All times are GMT. The time now is 06:58 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01329 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete