[Plugin: NewsTweet] Script Hanging After Changing Template
-
Hi – LOVE this plugin. One problem though – I don’t much fancy the output. I prefer to style it similarly to Twitter’s homepage and popular Twitter clients.
I’ve delved into the news-tweet-utils.js file and moved things around to display the way that I want to. The problem is that after I’ve made these changes, Newstweet causes my entire site to hang and kick out 500 and 503 errors. I’ve spoken to the host, and they’ve confirmed that the problem is an unruly script that’s consuming all of my allocated CPU cycles.
When I install the module Vanilla (without changing the output template) it seems to work fine. However, once I modify the output, it works for a few minutes, and then begins to hang.
Here’s what I’ve changed the code to:
html += '<div id="'+myObj.results[i].id+'" class="tweet x">'; html += '<img class="twitteravatar" src="'+myObj.results[i].profile_image_url+'" alt="'+myObj.results[i].from_user+'" />'; html += '<div class="tweetbody"><span class="posted"><em><a href="https://www.twitter.com/'+myObj.results[i].from_user+'" target="_blank">'+myObj.results[i].from_user+'</a> </em></span>'; html += '<span class="posttext">'+myObj.results[i].text.linkify().linkuser()+'</span>'; html += '<div class="date">'+thedatestr+'</div></div>'; html += '</div>'; } else { html += '<div id="'+myObj.results[i].id+'" class="tweet '+i+'">'; html += '<img class="twitteravatar" src="'+myObj.results[i].profile_image_url+'" alt="'+myObj.results[i].from_user+'" />'; html += '<div class="tweetbody"><span class="posted"><em><a href="https://www.twitter.com/'+myObj.results[i].from_user+'" target="_blank">'+myObj.results[i].from_user+'</a> </em></span>'; html += '<span class="posttext">'+myObj.results[i].text.linkify().linkuser()+'</span>'; html += '<div class="date">'+thedatestr+'</div></div>'; html += '</div>'; }
Any thoughts on what might be going wrong? I’ve started from scratch a couple of times and always end up with the same problem. Any advice?
- The topic ‘[Plugin: NewsTweet] Script Hanging After Changing Template’ is closed to new replies.