Skip to content

Display tweets in widget [NodeBB]

Solved Customisation
29 2 12.6k 1
  • wrote on last edited by phenomlab
    #1

    It’s probably a long shot, I did think about posting this in the NodeBB forum, but thought I’d come here first to see if yourself or anyone else knows if this is possible…

    I wonder if there is a way to get the latest tweets say for a category so ‘Wordpress’ for example and display Wordpress tweets or Tweets from the WordPress account if a post is generated in the WordPress category for example.

    I’m looking to do this with my football forum , so for example The club account Tweets next to the ‘Official Club News’ topic etc.

    Academy tweets next to academy news etc…

    Many thanks 👍🏻

  • JAC JAC

    @phenomlab wow! How did you manage that? That’s brilliant!!

    wrote on last edited by
    #28

    @jac Very easily done. You just use the HTML widgets and place them where you want 🙂

  • JAC JAC

    It’s probably a long shot, I did think about posting this in the NodeBB forum, but thought I’d come here first to see if yourself or anyone else knows if this is possible…

    I wonder if there is a way to get the latest tweets say for a category so ‘Wordpress’ for example and display Wordpress tweets or Tweets from the WordPress account if a post is generated in the WordPress category for example.

    I’m looking to do this with my football forum , so for example The club account Tweets next to the ‘Official Club News’ topic etc.

    Academy tweets next to academy news etc…

    Many thanks 👍🏻

    wrote on last edited by
    #2

    @jac something like this ?

  • @jac something like this ?

    wrote on last edited by
    #3

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac something like this ?

    Wow, yes something just like this!

    The only issue is it’s 6 years old that thread but maybe it would still work. Another issue probably could be the width of the tweet/ Twitter profile.

  • JAC JAC

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac something like this ?

    Wow, yes something just like this!

    The only issue is it’s 6 years old that thread but maybe it would still work. Another issue probably could be the width of the tweet/ Twitter profile.

    wrote on last edited by
    #4

    @jac neither of those will be an issue from what I can see.

  • @jac neither of those will be an issue from what I can see.

    wrote on last edited by
    #5

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac neither of those will be an issue from what I can see.

    Brilliant! Unfortunately like the one earlier I’ve only just seen this. 😕

  • JAC JAC

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac neither of those will be an issue from what I can see.

    Brilliant! Unfortunately like the one earlier I’ve only just seen this. 😕

    wrote on last edited by JAC
    #6

    Essentially on desktop / tablet I’m looking to display a widget of the latest tweets but it needs to be categorised so catagory based where it allows you to add a widget, now that is something I’m not quite sure is possible as a feature, but if it could be done it would be a very welcome addition to the forum indeed!

  • JAC JAC

    Essentially on desktop / tablet I’m looking to display a widget of the latest tweets but it needs to be categorised so catagory based where it allows you to add a widget, now that is something I’m not quite sure is possible as a feature, but if it could be done it would be a very welcome addition to the forum indeed!

    wrote on last edited by
    #7

    @jac I think it’s one of those things we’d need to test first to see what the output is. We can then play with the CSS afterwards.

  • @jac I think it’s one of those things we’d need to test first to see what the output is. We can then play with the CSS afterwards.

    wrote on last edited by
    #8

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac I think it’s one of those things we’d need to test first to see what the output is. We can then play with the CSS afterwards.

    Of course, sounds fantastic! 😁.

  • @jac I think it’s one of those things we’d need to test first to see what the output is. We can then play with the CSS afterwards.

    wrote on last edited by
    #9

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac I think it’s one of those things we’d need to test first to see what the output is. We can then play with the CSS afterwards.

    Looking forward to delving deeper into this over the weekend after work 👍🏻.

  • JAC JAC

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac I think it’s one of those things we’d need to test first to see what the output is. We can then play with the CSS afterwards.

    Looking forward to delving deeper into this over the weekend after work 👍🏻.

    wrote on last edited by
    #10

    @jac let me know how you get on. I’m planning something similar in fact.

  • @jac let me know how you get on. I’m planning something similar in fact.

    wrote on last edited by
    #11

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac let me know how you get on. I’m planning something similar in fact.

    Great, it’ll be interesting to see both results. I simply plan to display a Twitter profile of the news / content displayed, I’m hoping it works out although displaying widgets for specific categories could be an issue.

  • JAC JAC

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac let me know how you get on. I’m planning something similar in fact.

    Great, it’ll be interesting to see both results. I simply plan to display a Twitter profile of the news / content displayed, I’m hoping it works out although displaying widgets for specific categories could be an issue.

    wrote on last edited by
    #12

    Still yet to do this. Have you had any success?

    I’m curious to see how it will look.

  • JAC JAC

    Still yet to do this. Have you had any success?

    I’m curious to see how it will look.

    wrote on last edited by
    #13

    @jac not yet.

  • @jac not yet.

    wrote on last edited by
    #14

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac not yet.

    Did you ever get round to this? I still need to test myself, although I do wonder how it can be done specifically for categories.

  • JAC JAC

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac not yet.

    Did you ever get round to this? I still need to test myself, although I do wonder how it can be done specifically for categories.

    wrote on last edited by
    #15

    @jac I haven’t done anything with this since we last briefly discussed it. When you say “tweets” are you referring to content directly from Twitter ?

  • @jac I haven’t done anything with this since we last briefly discussed it. When you say “tweets” are you referring to content directly from Twitter ?

    wrote on last edited by
    #16

    @phenomlab I am indeed mate, so for example the ‘Stockport County’ category content would display a widget that shows the club’s official tweets or Twitter profile. May not be possible but would definitely be good if it could be pulled off. It’s just whether this sort of thing would impact load times etc.

  • JAC JAC

    @phenomlab I am indeed mate, so for example the ‘Stockport County’ category content would display a widget that shows the club’s official tweets or Twitter profile. May not be possible but would definitely be good if it could be pulled off. It’s just whether this sort of thing would impact load times etc.

    wrote on last edited by phenomlab
    #17

    @jac As a quick POC I decided to create a Twitter widget on your Categories page - see below for what it looks like

    6f9f9603-6d23-4a9f-bd8b-36d004dee9de-image.png

    It’s not styled as such yet, but is nothing more than a widget taken from Twitter directly here

    This then gives you the code to place into any widget

    <a class="twitter-timeline" data-height="800" data-dnt="true" data-theme="light" href="https://twitter.com/StockportCounty?ref_src=twsrc%5Etfw">Tweets by StockportCounty</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
    

    The widget code is shown as below

    ad9435df-3b43-4c50-bfee-fba908b8a62d-image.png

    Save the widget, and off you go 🙂

    Clearly, you need to tailor this a little depending on what you actually want to capture, but this is the overall concept.

  • @jac As a quick POC I decided to create a Twitter widget on your Categories page - see below for what it looks like

    6f9f9603-6d23-4a9f-bd8b-36d004dee9de-image.png

    It’s not styled as such yet, but is nothing more than a widget taken from Twitter directly here

    This then gives you the code to place into any widget

    <a class="twitter-timeline" data-height="800" data-dnt="true" data-theme="light" href="https://twitter.com/StockportCounty?ref_src=twsrc%5Etfw">Tweets by StockportCounty</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
    

    The widget code is shown as below

    ad9435df-3b43-4c50-bfee-fba908b8a62d-image.png

    Save the widget, and off you go 🙂

    Clearly, you need to tailor this a little depending on what you actually want to capture, but this is the overall concept.

    wrote on last edited by
    #18

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac As a quick POC I decided to create a Twitter widget on your Categories page - see below for what it looks like

    6f9f9603-6d23-4a9f-bd8b-36d004dee9de-image.png

    It’s not styled as such yet, but is nothing more than a widget taken from Twitter directly here

    This then gives you the code to place into any widget

    <a class="twitter-timeline" data-height="800" data-dnt="true" data-theme="light" href="https://twitter.com/StockportCounty?ref_src=twsrc%5Etfw">Tweets by StockportCounty</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
    

    The widget code is shown as below

    ad9435df-3b43-4c50-bfee-fba908b8a62d-image.png

    Save the widget, and off you go 🙂

    Clearly, you need to tailor this a little depending on what you actually want to capture, but this is the overall concept.

    Wow, looks phenomenal mate, is there any way to limit the amount of tweets shown at all? And more specifically how can they be displayed on each category?

  • JAC JAC

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac As a quick POC I decided to create a Twitter widget on your Categories page - see below for what it looks like

    6f9f9603-6d23-4a9f-bd8b-36d004dee9de-image.png

    It’s not styled as such yet, but is nothing more than a widget taken from Twitter directly here

    This then gives you the code to place into any widget

    <a class="twitter-timeline" data-height="800" data-dnt="true" data-theme="light" href="https://twitter.com/StockportCounty?ref_src=twsrc%5Etfw">Tweets by StockportCounty</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
    

    The widget code is shown as below

    ad9435df-3b43-4c50-bfee-fba908b8a62d-image.png

    Save the widget, and off you go 🙂

    Clearly, you need to tailor this a little depending on what you actually want to capture, but this is the overall concept.

    Wow, looks phenomenal mate, is there any way to limit the amount of tweets shown at all? And more specifically how can they be displayed on each category?

    wrote on last edited by
    #19

    @jac said in Display tweets in widget [NodeBB]:

    is there any way to limit the amount of tweets shown at all?

    Yes, but only by adjusting the height of the widget itself (via Twitter) from what I recall seeing.

    And more specifically how can they be displayed on each category?

    That part I’m not so sure of. I’d say I’m 99% certain it’ll be possible, but I haven’t invested any time yet to determine this.

  • @jac said in Display tweets in widget [NodeBB]:

    is there any way to limit the amount of tweets shown at all?

    Yes, but only by adjusting the height of the widget itself (via Twitter) from what I recall seeing.

    And more specifically how can they be displayed on each category?

    That part I’m not so sure of. I’d say I’m 99% certain it’ll be possible, but I haven’t invested any time yet to determine this.

    wrote on last edited by
    #20

    @phenomlab said in Display tweets in widget [NodeBB]:

    @jac said in Display tweets in widget [NodeBB]:

    is there any way to limit the amount of tweets shown at all?

    Yes, but only by adjusting the height of the widget itself (via Twitter) from what I recall seeing.

    And more specifically how can they be displayed on each category?

    That part I’m not so sure of. I’d say I’m 99% certain it’ll be possible, but I haven’t invested any time yet to determine this.

    Thanks Mark, at least it’s there and can be added on when possible 👍🏻.


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee ☕
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • Custom Page - nodebb

    Solved Customisation custom-pages nodebb
    13
    2
    5 Votes
    13 Posts
    3k Views
    DownPW
    I’m happy to see this
  • Whitespace fixes in Nodebb

    Solved Customisation nodebb
    18
    2
    7 Votes
    18 Posts
    6k Views
    phenomlab
    @Panda Just circling back here with something of an update (which I think you’ll like). I’ve completely restructured the ranking system. There are now less ranks, with a higher point threshold to reach them. More importantly, if you reload the site, you’ll notice that the ranks are now icons. I also removed the “Author” badge, and made this a single icon, which (to me) looks much better.
  • Forum Icons NodeBB

    Solved Customisation icons forum nodebb
    13
    0 Votes
    13 Posts
    5k Views
    phenomlab
    @cagatay That matches what I see [image: 4f0f858d-9812-42b1-9f61-ffb13d31dccd-image.png]
  • [NODEBB] Scroll Button

    Solved Customisation css javascript html scroll button
    7
    1
    0 Votes
    7 Posts
    3k Views
    phenomlab
    @downpw ooops. Forgot that. Thanks for adding.
  • [NODEBB] Stats

    Unsolved Customisation plugin stats script
    20
    1
    2 Votes
    20 Posts
    6k Views
    JAC
    @phenomlab said in [NODEBB] Stats: @jac or I land up fixing it I wouldn’t put it past you
  • [NodeBB] username cards

    Solved Customisation nodebb
    8
    5 Votes
    8 Posts
    3k Views
    Sampo2910
    @phenomlab Aha…nice to know. As always thank you for the reply and information.
  • Social icon (Nodebb)

    Solved Customisation nodebb social
    7
    0 Votes
    7 Posts
    3k Views
    JAC
    @phenomlab said in Social icon (Nodebb): @jac I just tested my theory around using the OG image, and according to the Twitter card validator, it works fine [image: 73e805e1-997b-41bf-9259-51c5052ca8fc-image.png] fixed
  • Customising NodeBB

    Locked Customisation nodebb
    3
    0 Votes
    3 Posts
    3k Views
    phenomlab
    Closing this thread as a duplicate of https://sudonix.com/topic/12/nodebb-customisation