All I know is that the mod uses AJAX and was pinging my host's server repeatedly, and the CPU spiked. As soon as I disabled the mod, the CPU went back to normal.
Yeah the backbone code is PHP.
I don't know enough about PHP/JS to implement this anyway, and as I said, as is, it seems to really...
Okay, gotcha. Honestly tho, when I further tested it, the mod made my web host's CPU spike quite a bit, and it's gonna take a lot of coding to get it working. I may just forget it, and not mess with what already works with all browsers. :)
Why is it a terrible idea? I've already tested the code in my first post and it does exactly what I need: basic detection of IE, Chrome, and Firefox...
In other words, I can do this for example:
if(isFirefox){
{* SHOW MY NOTIFICATIONS POPUP *}
{if $notifys[1] != 0}
<div align="center">
<span class='updatesboxdivider'>-=</span><span class='updatesbox'>Updates & Notifications</span><span class='updatesboxdivider'>=-</span>...
I found this code snippet via a Google search and it is exactly what I need, but I'm not sure how to implement it. I'd like to use it to run specific code depending on browser. For example, if Firefox, then simply use linked Javascript, if IE/Chrome, then I'd like to use alternate code (HTML and...
Got it working with an ingenious bit of code from a support site for the script I'm using. I tinkered with it and what do ya know!. :) Thanks for your time!!
Okay, well I appreciate the help anyway, looks like this one is beyond my ability, and without providing you my entire source code, it doesn't seem like it can be done...
For one more last ditch effort, here is the source PHP for header.tpl:
<?php
// PREVENT MULTIPLE INCLUSION
if(...
Okay, I have some alternative code, that does the same thing, but uses almost pure HTML. Tell me what you think of it, and if it's easier to work with:
{if $notifys[1] != 0}
<table cellpadding='0' cellspacing='0' align='center' width='50%'>
<tr><td class='header'><center>Updates &...
Okay, gotcha. I did post this question on a Smarty forum and a few other places. I can post the PHP source of the template in question for you to check out, but it's full of Smarty tags. Let me know, and thanks a bunch for your help this far!
I'd rather just refresh the notify section div. How do I use an Iframe for that? Here is the HTML portion of the code:
<div style='display: none;' id='newupdates_popup'>
<div style='margin-top: 10px;align:right;'>
{assign var="notifyscount" value=$notifys[0]|@count}...
Okay I added this just after the last "}": setInterval("window.addEvent('domready', function()",15000); But it doesn't seem to work. I'm not exactly sure what part of the main JS fires to show the updates (if any) or even if my syntax of setInterval is correct. :(
This is the complete bit of code from my header.tpl. Currently, it will only display the hidden JS pop up if there are new site updates AND you refresh the page. I'd like it to auto-refresh say every 30 or 45 seconds, perhaps sooner for a more "real time" feel to the site.
I'm still a JS...
My last question should be as simple (hopefully). This is my live code and it works great (note: I changed the form ID to match my modded JS, thanks again!)
<form id="searchForm_newsearch" action="search.php" method="post">
<input type="text" name="search_text" value="">...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.