MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    1. Home
    2. J_Joe
    MagicMirror² v2.20.0 is available! For more information about this release, check out this topic.
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 3
    • Best 1
    • Controversial 0
    • Groups 0

    J_Joe

    @J_Joe

    1
    Reputation
    1
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    J_Joe Unfollow Follow

    Best posts made by J_Joe

    • RE: Character set for news fed text '

      @sdetweil

      Got it - thank you. Done.
      I hope my solution works for people. It’s been great for me and my needs! And it’s simple. How ever many items are in the array - it will look for them and replace them as dictated by the array…

      posted in Troubleshooting
      J
      J_Joe

    Latest posts made by J_Joe

    • RE: Character set for news fed text '

      @sdetweil

      Got it - thank you. Done.
      I hope my solution works for people. It’s been great for me and my needs! And it’s simple. How ever many items are in the array - it will look for them and replace them as dictated by the array…

      posted in Troubleshooting
      J
      J_Joe
    • RE: Character set for news fed text '

      @sdetweil
      Not sure how to do that (:

      posted in Troubleshooting
      J
      J_Joe
    • RE: Character set for news fed text '

      @huskernut0878
      I had the same frustrating issue - here’s my solution -

      I actually made a fix for this that works fine for me - Not sure how to present it - but in the newsfeed.js make the following changes

      1. At the end of the defaults of the newsfeed.js add the line replaceMe: [] as shown below -

        logFeedWarnings: false,
        replaceMe: []       
        

        },

      2. In the getTemplateData: function () { add the following before the return { loaded: true,

        basically everything in the jep section all between the //*******
        return item;

         });
         //*******
         //jep  to fix title for various translations such as
         // a simple ' instead of showing '
         // also replace things like Seattle with Seattle, WA
         var tempTitle = item.title; 
        
         for(let i = 0; i <  this.config.replaceMe.length; i+= 2)
         {
             tempTitle = tempTitle.toString().replaceAll(this.config.replaceMe[i], this.config.replaceMe[i+1]);
         }
         //**********************
        
         return {
             loaded: true,
        

      2A. In the return section -add the jep line as shown below
      publishDate: moment(new Date(item.pubdate)).fromNow(),
      title: tempTitle, //jep see above
      description: item.description,

      1. Finally - in your config.js - the area for the newsfeed - at the end add this and edit it for the items you want changed…
      replaceMe: [ "&apos;", "'", "Seattle", "Seattle, WA", "Biden", "(Pres) Biden",  "Zuckerberg", "Zuckerberg [DATA]"]
      

      (sam, edited to add code block, which preserves the style of the quotes, else u get word processing style, which breaks config.js))

      This will replace the 1st item with the 2nd item, etc… Add whatever translations you want (: I’ve had some fun with the replacements…

      posted in Troubleshooting
      J
      J_Joe