Jump to content

music_lp90

Members
  • Posts

    227
  • Joined

  • Last visited

Everything posted by music_lp90

  1. boen_robot, when I am asking about what ISP they use, would that mean who their Internet Service Provider is, such as Verizon or Earth Link or someone else? If so I think they are their own ISP because they offer broadband and dial-up services and on their website they say "Power Shift offers Co-Located and dedicated server solutions to fit your business needs. Our Server Room is temperature controlled, 24x7 Monitored, with state of the art Generator and Battery Back up ensuring your Web Sites and/or Server are always accessible. Being tied directly into our Network Backbone ensures you will get plenty of Bandwidth. While being behind our Firewall will keep your server secure from the outside."Does that sound like they would be their own ISP?Thanks!
  2. Thanks! That helps me understand better what you were saying before too.
  3. I've had really good luck with godaddy. Anytime I've used customer support I've gotten through quickly and had my questions answered and I haven't had any problems with their hosting. But I'm not necessarily suggesting to switch to godaddy, I'm just trying to find out if there's an issue with powershift. I've also had experience with Bluehost and I've liked them.
  4. Thank you both for your help. I'm going to ask them what you suggested, but I'm not sure if I understood everything, so I don't know if I'm wording it properly. Does this make sense to write them and say "Can you tell me how many servers you have around the world, where those servers are located, what is your ISP or where do you buy your IPs and traffic and how much bandwidth do you have available?" I wasn't sure about the "what is your ISP or where do you buy your IPs and traffic " and I wasn't sure if the bandwidth was how much they have available to themselves or how much bandwidth they've allotted to us.Thanks for your help!
  5. Hi, I just performed a test between two hosts. The test was between godaddy and a local hosting company called powershift. I use godaddy for my portfolio site and a couple of other sites I've done, but the company I work for uses powershift.To test the two hosts, I placed a large image onto the servers in an html page. The file size was 6.55 mb.On powershift these are the times it took to completely download the page:1 min 38 sec2 min 08 sec31 sec (possibly I did not clear the cache in my browser on this one)2 min 9 sec1 min 53 secOn godaddy these are the times:13 sec28 sec35 sec17 sec13 secClearly there's a huge difference in the download times, but could there be other factors that would justify powershift taking so much longer? For instance, I have very few if any visitors to my site, but the company I work for might have 10-20 people online at a time, usually 500-600 visitors a day. Could the number of visitors make that much of a difference?Thanks for your help!
  6. Do you mean in the address bar where you type the URL? I don't know If I've actually seen it in the title bar.
  7. PHP is server side code, so it must be run on a server or a virtual server like WAMP.
  8. is the <?= tag a dangerous one to use as well? or is that not a short tag?
  9. These forums are one great way. Also, if you're willing to spend $30 a month for one or two months, Lynda.com has some really good video tutorials for php/mysql and other languages as well such as Ruby on Rails, ASP, javascript... They also have tutorials for Photoshop and other software programs if you're interested in those. I found Lynda.com extremely helpful as a beginner, but it doesn't go too far into advanced php. No object oriented stuff, just procedural programming, but a good foundation.
  10. Yeah, I personally love the way this forum is. I have not found any other forum to be even close to as helpful as this one. What I like about this forum is:It is very active in my opinion. You can pretty much always expect to get a responseThreads very rarely, if ever, turn into pointless arguments. I've been part of forums where people seem to search threads to point out any fault they can find on things as little as spelling.And the greatest thing about the forum is the people that are a part of it. There are a few people on here that I personally owe a lot of thanks to for helping me to get to where I am at in developing for the web. I have a college degree and took a good number of web classes, but I've learned as much and probably more from people like justsomeguy, Boen Robot, and Synook. So, thanks you guys. I like your suggestions, but what I wouldn't want to happen is for this forum to start attracting people that aren't really interested in primarily the sharing of knowledge. You make some smart marketing points about awarding people for top poster of the month or whatever, because that could really encourage people to start trying more to contribute to the forum and answer as many questions as they can, making it more active, but it also could turn into the type of thing that leads to competitiveness and pointless arguments where people are trying to one up each other and prove their superiority. Colors, sure, thats fine. Smileys, I personally don't really like them. For some reason I like them better when they just show up as text.Those are just my thoughts.
  11. That's strange, it should work. It works for me.
  12. Hey, I don't know what I did, but it works now. I couldn't believe it. I went right back to what I thought I had before but now it works. Praise God!
  13. Thanks for all of the help. justsomeguy, it does just display the javascript code instead of running it and yes, it is a third-party content management system (Joomla). The source code doesn't contain any of the html tags that I'm trying to insert it just inserts startTiming();Time as text printed to the screen. and they get placed into a <span> tag. So I guess I probably need to look into if it is stripping HTML tags and how to get around that.
  14. I actually don't know what the question mark is for. I'm borrowing that expression from another component that was already part of Joomla. The phrase that component was triggered by was {mosImage} so I figured I could use their same expression except change it to {mosCountdown}. It seems to find the triggers without any problem, it's just that I can't get it to replace exactly how I want. I either get it to replace with almost exactly what I want, except for the extra number (1) or I get it to print parts of the code literally to the screen.Here's how I've tried using split() just trying to first replace it with "Hello World" just to see if I can properly split it.$row->text = list($before, $replace, $after) = split('/{mosCountdown\s*.*?}/i', " HELLO WORLD ", 3);doing it like this I get this error Warning: split() [function.split]: REG_BADRPT in C:\wamp\www\mambots\content\mosCountdown.php on line 22or I tried$row->text = list($before, $replace, $after) = split('{mosCountdown}', " HELLO WORLD ", 3);which gives me this error Warning: preg_match() expects parameter 2 to be string, array given in C:\wamp\www\components\com_magazine\magazine.html.php on line 1308I haven't used split before, so I'm not sure what I'm doing wrong.
  15. Hey justsomeguy, thanks for the help. I see what you're saying. Is there another way to do it, though? haha. I think I've done what you suggested. Here's what I did:instead of $row->text = preg_replace( $find, include($mosConfig_absolute_path . '/includes/counter.php'), $row->text ); I did $row->text = preg_replace( $find, html(), $row->text );So instead of including the file I just made a function that returns the html and a call to a javascript function. But it just prints "startTiming();Time is Running Out" to the screen instead of treating the "startTiming()" as code. I think this is probably because I'm trying to get the code to work with Joomla. I've tried playing around with output buffering a little, but I don't really understand outputbuffering all that well.Here's the html() function that I've tried instead of using include: <?php html();function html(){ $code = "<script type=\"text/javascript\" language=\"javascript\">startTiming();</script><div id=\"show\"><div id=\"containCount\">" ."<div id=\"containCountBody\" style=\"color: #333300;\"><p style=\"font-size:12px; text-align:center; color:#993300;\">" ."<a href=\"http://coventryloghomes.com/content/view/172/1/\" id=\"showLink\">Time is Running Out</a></p></div></div></div>"; return $code;} ?> I also tried using include, but stuck this line into the included file return "";I also tried placing the html() function into the include file but that didn't work either.Please tell me if I'm doing anything wrong or if there's something else I can try or if I'm not being clear on anything.
  16. Thanks for the reply Dan. I tried this $find = '/\{mosCountdown\s*.*?\}/i'; but that did not work. Am I properly escaping it now? It still has a 1 doing it this way. Thanks for your help!
  17. Hi, I'm working on a script that checks for a trigger word, in this case it is {mosCountdown} and whenever it sees that, it replaces it with include($mosConfig_absolute_path . '/includes/counter.php'); The file gets included without a problem, but for some reason the trigger word {mosCountdown} gets replaced with the number "1". Can anyone tell me where this might be coming from?Here's the php that replaces the trigger: <?phpdefined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );$_MAMBOTS->registerFunction( 'onPrepareContent', 'countdownBot' );function countdownBot( $published, &$row, &$params, $page=0 ) {global $mosConfig_absolute_path; // Do not proceed further if the trigger is not contained in the content if ( strpos( $row->text, 'mosCountdown' ) === false ) { return true; } // expression to search for $find = '/{mosCountdown\s*.*?}/i'; // replace text $row->text = preg_replace( $find, include($mosConfig_absolute_path . '/includes/counter.php'), $row->text ); }?> I've tried including a couple different files and they both insert the number 1. If I just replace the trigger word with text it does not insert a 1, its only when I try to replace it with an include that it also inserts the number 1.Thanks for any help!
  18. Hi, I'm trying to modify a component in Joomla, could someone tell me what the & symbol means when it is placed in a function's parameters?Like this: function botMosImage( $published, &$row, &$params, $page=0 )So $row and $params have the & symbol before them.Thanks!
  19. Hi, I am working on a Joomla site and I am trying to create a custom Mambot that counts down to the end of a sale. I have the mambot so that it will display on the page, but only in the first position, I cannot figure out how to make the mambot display only when the trigger {mosCountdown} has been entered into the content text editor of Joomla. I am working on Joomla version 1.0.14.Here's the code I have: <?phpdefined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); $option = trim( mosGetParam( $_REQUEST, 'option', null ) );$task = trim( mosGetParam( $_REQUEST, 'task', null ) );$id = intval( mosGetParam( $_REQUEST, 'id', null ) ); $_MAMBOTS->registerFunction( 'onPrepareContent', 'countdownBot' ); function countdownBot( $published, &$row, &$params, $page=0 ) { // simple performance check to determine whether bot should process further if ( strpos( $row->text, 'mosCountdown' ) === false ) { return true; } // expression to search for $find ="{mosCountdown}"; if (!$published) { return true; } // replace text preg_replace( $find, countDown(), $row->text ); return true; }?> <?php function showCounter(){ echo "var int=self.setInterval(\"countDown()\", 50);";}?><script type="text/javascript" language="javascript"><!--function countDown(){ var months = new Array("January", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") var rightNow = new Date(); var hours = rightNow.getHours(); var mins = rightNow.getMinutes(); var sec = rightNow.getSeconds(); var year = rightNow.getFullYear(); var month = rightNow.getMonth() + 1; var day = rightNow.getDate(); var daysInMonth = 32 - new Date(year, month -1, 32).getDate(); var daysLeftinMonth = daysInMonth - day; var targetDate = new Date("March 31, 2008 23:59:59"); var targetMonth = targetDate.getMonth() + 1; var am_pm = "AM"; var variableMonth = new Date(); var variabledaysInMonth=0; var daysUntilExpire; //Calculated below counts how many days from now until the expiration date var hoursUntilExpire; var secondsInADay = 24*60*60; for (var i = month; i < targetMonth-1; i++){ if (i < 10){ i = "0" + i; } variabledaysInMonth += 32 - new Date(year, i, 32).getDate(); } //EXPIRATION CALCULATIONS daysUntilExpire = variabledaysInMonth + daysLeftinMonth + targetDate.getDate(); var secondsInFullDays = daysUntilExpire*24*60*60; var secondsToday = (hours*60*60) + mins*60 + sec; var secondsLeft = secondsInADay - secondsToday + secondsInFullDays; var countDays = Math.floor(secondsLeft/60/60/24); var countHours = Math.floor((secondsLeft - countDays*secondsInADay)/60/60); var countMins = Math.floor((secondsLeft - (countDays*secondsInADay + countHours*60*60))/60); var countSeconds = secondsLeft - (countDays*secondsInADay + countHours*60*60 + countMins*60); //Time conversions if (hours > 12){ hours-=12; am_pm = "PM"; } if (mins < 10){ mins = "0" + mins; } if (countSeconds < 10){ countSeconds = "0" + countSeconds; } document.getElementById("displayClock").innerHTML = countDays + " days " + countHours + " hours " + countMins + " minutes and " + countSeconds + " seconds ";}<?php if ($option == "com_magazine") { showCounter(); } else { echo "closeCountdown()"; }?>//--></script><script language="javascript" type="text/javascript"><!--function closeCountdown(){ document.getElementById("show").innerHTML = ""; clearInterval(int); }//--></script><?php if ($option == "com_magazine") {?><!--Hide or show Div --><div id="show"> <!-- CONTAIN AND POSITION --> <div id="containCount"> <div id="containCountBody" style="color: #333300;"> <p style="font-size:12px; text-align:center; color:#993300;"><a href="http://localhost/index.php?option=com_content&task=view&id=172&Itemid=1"><b>Only <span id="displayClock"> </span> <!--<a href="java script:closeCountdown()"><img src="http://localhost/images/stories/PresSaleAd.jpg" border="0" style="padding: 0px 0px 2px 2px; "></a>--> Left on the President's Deal!</b></a></p> </div> </div></div><?php } else { echo ""; }?> Thanks for any help!
  20. Thanks, I just made a quick test page and that seems to work, but I can't test it out on the project until monday. I read up a little on it and it seems that the browser support for position:fixed is not that good, though. If the support isn't good for it, I was thinking that maybe javascript could position it using x,y coordinates or something, but I'm not sure if thats possible or how to do it.Thanks again!
  21. Hi, I have a <div> that I would like to be positioned in the bottom right corner of the screen. I've tried using css position:absolute, but that only keeps it positioned there when someone resizes the window. I would like it to stay in the corner even when the user scrolls down the page.Here's the code if it helps at all: <script type="text/javascript" language="javascript">function countDown(){ var months = new Array("January", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") var rightNow = new Date(); var hours = rightNow.getHours(); var mins = rightNow.getMinutes(); var sec = rightNow.getSeconds(); var year = rightNow.getFullYear(); var month = rightNow.getMonth() + 1; var day = rightNow.getDate(); var daysInMonth = 32 - new Date(year, month -1, 32).getDate(); var daysLeftinMonth = daysInMonth - day; var targetDate = new Date("March 31, 2008 23:59:59"); var targetMonth = targetDate.getMonth() + 1; var am_pm = "AM"; var variableMonth = new Date(); var variabledaysInMonth=0; var daysUntilExpire; //Calculated below counts how many days from now until the expiration date var hoursUntilExpire; var secondsInADay = 24*60*60; for (var i = month; i < targetMonth-1; i++){ if (i < 10){ i = "0" + i; } variabledaysInMonth += 32 - new Date(year, i, 32).getDate(); } //EXPIRATION CALCULATIONS daysUntilExpire = variabledaysInMonth + daysLeftinMonth + targetDate.getDate() - 2; var secondsInFullDays = daysUntilExpire*24*60*60; var secondsToday = (hours*60*60) + mins*60 + sec; var secondsLeft = secondsInADay - secondsToday + secondsInFullDays; var countDays = Math.floor(secondsLeft/60/60/24); var countHours = Math.floor((secondsLeft - countDays*secondsInADay)/60/60); var countMins = Math.floor((secondsLeft - (countDays*secondsInADay + countHours*60*60))/60); var countSeconds = secondsLeft - (countDays*secondsInADay + countHours*60*60 + countMins*60); //Time conversions if (hours > 12){ hours-=12; am_pm = "PM"; } if (mins < 10){ mins = "0" + mins; } if (countSeconds < 10){ countSeconds = "0" + countSeconds; } document.getElementById("displayClock").innerHTML = countDays + " days " + countHours + " hours " + countMins + " minutes " + countSeconds + " seconds";}var int=self.setInterval("countDown()", 50);</script><script language="javascript" type="text/javascript">function closeCountdown(){ document.getElementById("show").innerHTML = "";}</script><!--Hide or show Div --><div id="show"> <!-- CONTAIN AND POSITION --> <div id="containCount" style="width: 254px; position:absolute; bottom: 10px; right: 10px; font-size:10px; "> <div style=" width: 254px; text-align:center;"><a href="java script:closeCountdown()" style="color:#000000; font-size: 12px; padding: 0px; margin: 0px; text-decoration:underline;">Close</a></div> <div id="containCountBody" style="width: 254px; background-color: #333300;"> <div id="displayClock" style="width:250px; text-align: center; background-color: #333300;"> </div> <a href="java script:closeCountdown()"><img src="http://localhost/images/stories/PresSaleAd.jpg" border="0" style="padding: 0px 0px 2px 2px; "></a> </div> </div></div> Thanks!
  22. Great, that works. Thanks so much!
  23. music_lp90

    Installed WAMP

    Hi, I've just installed WAMP and I am trying to set up my MySQL database. Can anyone tell me where I find my username and password? Thanks!
×
×
  • Create New...