Coders Shack why you need to invent vbphrase variables in javascript?
Code in your php
Code:
<script type=\"text/javascript\">
var threadid = $threadinfo[threadid];
var ajax_last_edit = $threadinfo[lastedit];
livetopic.old_topic = ' . $vbulletin->options['livetopic_threadtime'] . ';
livetopic.interval_time = ' . $vbulletin->options['livetopic_requestinterval'] . ';
livetopic.ajax_max_visibleposts = ' . $vbulletin->options['livetopic_maxvisibleposts'] . ';
vbphrase[\"livetopic_maxpostnotice\"] = \"' . addslashes($vbphrase['livetopic_maxpostnotice']) . '\";
vbphrase[\"livetopic_edit_message\"] = \"' . addslashes($vbphrase['livetopic_edit_message']) . '\";
vbphrase[\"livetopic_newresponses\"] = \"' . addslashes($vbphrase['livetopic_newresponses']) . '\";
</script>
Generated this in html source
Quote:
<script type="text/javascript">
var threadid = 12290;
var ajax_last_edit = 1240437167;
livetopic.old_topic = 300;
livetopic.interval_time = 3000;
livetopic.ajax_max_visibleposts = 30;
vbphrase["livetopic_maxpostnotice"] = "The maximum amount of posts on this page can display has been reached. Posts will now start to disappear from oldest to newest.";
vbphrase["livetopic_edit_message"] = "<img alt=\'live topic\' src=\'images/statusicon/thread_livetopic.gif\' title=\'live topic\'/> <span style=\'font-weight: bold;\'>This post has been added by another user.</span> <br /><br />Since this is an active topic, this post has been automatically added to the thread while you were reading it. If you are replying to this thread you might want to read this post before doing so.";
vbphrase["livetopic_newresponses"] = "%1 new responses (<a href=\'showthread.php?t=%2&goto=newpost\'>live topic</a>)";
</script>
|
It is nonsense and useless to have vbphrase variables definition inside HTML source. These all is classified as HTML error from any HTML checker.