Jump to content

Nakor

Members
  • Posts

    127
  • Joined

  • Last visited

Everything posted by Nakor

  1. That depends on your intent. Are you only wanting to change where that one link goes or every link that call HTTP_SERVER? If you want to change them all then go ahead and change it. Also change HTTP_COOKIE_DOMAIN, HTTPS_SERVER, and HTTPS_COOKIE_DOMAIN.If you only want to change that one link then do something like this define('HTTP_SERVER', 'http://store.mydomain.com'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', 'https://mydomain.com'); // eg, https://localhost - should not be empty for productive serversdefine('NEWHTTP_LINK', 'http://domain.com'); // this will become your new link define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'store.mydomian.com'); define('HTTPS_COOKIE_DOMAIN', 'mydomain.com'); Then go back to your first page and change $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); to $breadcrumb->add(HEADER_TITLE_TOP, NEWHTTP_LINK); and everything should be fine.
  2. <script type="text/javascript">function getDocHeight(doc) { var docHt = 0, sh, oh; if (doc.height) docHt = doc.height; else if (doc.body) { if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight; if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight; if (sh && oh) docHt = Math.max(sh, oh); } return docHt;}function setIframeHeight(iframeName) { var iframeWin = window.frames[iframeName]; var iframeEl = document.getElementById? document.getElementById(iframeName): document.all? document.all[iframeName]: null; if ( iframeEl && iframeWin ) { // helps resize (for some) if new doc shorter than previous iframeEl.style.height = "auto"; var docHt = getDocHeight(iframeWin.document); // need to add to height to be sure it will all show if (docHt) iframeEl.style.height = docHt - 150 + "px"; }}function loadIframe(iframeName, url) { if ( window.frames[iframeName] ) { window.frames[iframeName].location = url; return false; } else return true;}</script> That goes in the head of the doc, then this is put in every link, like this example: <a href="doc.html" onclick="return loadIframe('main', this.href)"> The onclick reloads the document and tells it what name of iframe to use, but I have found out this onclick is not necesary, just use the normal target="framename", now in each document that you want to load inside the iframe: <script type="text/javascript">function goSetHeight() { if (parent == window) return; // arg: id of iframe element this doc is to be loaded into else parent.setIframeHeight('main');}</script> That's inside the head of the document then this is added to the body like this: <body onload="goSetHeight()">
  3. What you do you mean you are getting all records other than what you have entered? If you are trying to search 2 database tables as one they should have the same structure, which they appear to, and then you should utelize the MySQL merge type so that you can then just create one simply query.
  4. $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); This line is referencing HTTP_SERVER, and it appears you wish to change where this goes to. You should open catalog/includes/configure.php and around lines 14-15 change the HTTP_SERVER and most likely HTTP_CATALOG_SERVER to the domain you want the link to go to.
  5. What are you using to place the flash on the page? If you post your code and the css, you are guaranteed to get more reply's. For now, I am going to assume you used the object tag, since most people do. I believe you can have it not display if you do this in the CSS @media handheld {object .flash {display:none;}} Edit: Thanks to boen_robot
  6. Installing PHP and MySQL are both a breeze. PHP can be a bit harder because you have to do a little bit of configuration, but there is quite a bit of documentation on each one so it's not too bad.I've had Apache, MySQL, and PHP on my computer for quite some time now, and I have never noticed any sort of slowdown. I don't know how it would perform on any type of older computer, but if you have anything even close to new you should be fine.
  7. Nakor

    DIV + Overflow

    I will take a guess as to what they meant by using div's and overflow. Perhaps something like this <div style="height:200px; width:500px; overflow:auto;">Content here</div> What that will do is set the limits for the height and width of the page. If it goes over those limits, it will not expand the page, as it would normally, but instead it will create a scrollbar and keep the page at the max dimension.
  8. The Sun website describes the applet tag as such <applet code="MyApplet.class" width=100 height=140></applet> where you have <APPLET CODE="lake" width="350" height="356"><param name="image" value="lake.jpg"></applet> I would suggest changing it to <applet code="lake.class" width=100 height=140></applet> However I cannot guarantee that will work.
  9. Decide what languages you want to learn first off. Check out http://www.w3schools.com. They have great tutorials on a wide range of languages. If you find one you like consider buying a book on it.
  10. Nope. The syntax is setTimetou(function(), 200)
  11. I attempted to reverse some of the javascript functions that the file is calling. Try and make these changes to the js file and see what happens. ...disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseoutappeardelay: 400, // set delay in milliseconds before menu apears onmousein...dropit:function(obj, e, dropmenuID){if (this.dropmenuobj!=null) //hide previous menuthis.dropmenuobj.style.visibility="hidden"this.clearhidemenu()if (this.ie||this.firefox){obj.onmouseout=function(){cssdropdown.delayhidemenu()}this.dropmenuobj=document.getElementById(dropmenuID)this.dropmenuobj.onmouseover=function(){cssdropdown.dynamicshow(e)}this.dropmenuobj.onmouseout=function(){cssdropdown.dynamichide(e)}this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}this.showhide(this.dropmenuobj.style, e, "visible", "hidden")this.dropmenuobj.x=this.getposOffset(obj, "left")this.dropmenuobj.y=this.getposOffset(obj, "top")this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"}},...dynamicshow:function(e){var evtobj=window.event? window.event : eif (this.ie&&!this.dropmenuobj.contains(evtobj.toElement))this.delayshowmenu()else if (this.firefox&&e.currentTarget!= evtobj.relatedTarget&& !this.contains_firefox(evtobj.currentTarget, evtobj.relatedTarget))this.delayshowmenu()},...delayshowmenu:function(){this.delayshow=setTimeout("cssdropdown.dropmenuobj.style.visibility='visible'",this.appeardelay)},
  12. If you use Mozilla or Firefox you can check this out http://passwordmaker.org/
  13. This is a bad coding practice but I feel I must suggest it anyways, to see if this is the problem.Try removing all the quotes on the dropmenuArt and see what happens. Most likely it will not be able to find the object either, I think it might be worth a try. Also, I think that Chocolate570 is correct. Just because you have seen it done before doesn't mean that it will work here. Try to open the .js file and perhaps use the delayhidemenu() function they use to delay showing it as well. dropit:function(obj, e, dropmenuID){if (this.dropmenuobj!=null) //hide previous menuthis.dropmenuobj.style.visibility="hidden"this.clearhidemenu()if (this.ie||this.firefox){obj.onmouseout=function(){cssdropdown.delayhidemenu()}this.dropmenuobj=document.getElementById(dropmenuID)this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}this.dropmenuobj.onmouseout=function(){cssdropdown.dynamichide(e)}this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}this.showhide(this.dropmenuobj.style, e, "visible", "hidden")this.dropmenuobj.x=this.getposOffset(obj, "left")this.dropmenuobj.y=this.getposOffset(obj, "top")this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"}
  14. Could you further elaborate on what you want to happen? You want to random images to come up at once?
  15. Nakor

    slice

    There are quite a bit of programs that will allow you to do this. I would recommend Adobe Image Ready CS2.
  16. I'm not sure if I'm completely understanding you however when you are setting percentages you can't also specify a pixel amount. You would position it and then set the height to something like 75% and it would resize the height when you changed the height of the page, but you can't ever make it look exactly how you want because the size will be unique based off of how big each person sets their browser window. If you want them to enter your site and have it look a certain way you can change the size of their browser window and then they can resize it if they want and the percentages will take over.
  17. On your page change <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="11" height="14"></td> <td width="100%" height="14" class="infoBoxHeading">Categories</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td> to <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="11" height="14"></td> <td width="100%" height="14" class="infoBoxHeading">Products</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td> and change <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt="" width="11" height="14"></td> <td width="100%" height="14" class="infoBoxHeading">Manufacturers</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td> to <td height="14" class="infoBoxHeading"><img src="images/infobox/corner_right_left.gif" border="0" alt="" width="11" height="14"></td> <td width="100%" height="14" class="infoBoxHeading">Quick Links</td> <td height="14" class="infoBoxHeading" nowrap><img src="images/pixel_trans.gif" border="0" alt="" width="11" height="14"></td>
  18. If you use percentages it will change the size based off the size of the browser window. This is actually on quite a bit of sites, and you can see objects changing size and trying to move to stay in the browser. Give it a try but if you do you may have to expect that at some point your content will become distorted because it has been resized.
  19. I would not recommend continuous looping it over and over again, as it may cause slowdown on some systems. You could it re-execute the script every so often, however this may cause some ruccus on your site if someone is browsing, resizes their browser window, and then seemingly randomly has the iframe they are looking at resize. I don't know if there is currently any way to detect a browser resize, but some of the threads I have read on other forums make it seem as if there isn't. Another option would be to add code to keep the page certain dimensions, however most people don't like this, and so I don't recommend that either.
  20. Get the frame size with this // This for non-IEmyWidth = window.innerWidth;myHeight = window.innerHeight;// This for IE6myWidth = document.documentElement.clientWidth;myHeight = document.documentElement.clientHeight;// This for IE4myWidth = document.body.clientWidth;myHeight = document.body.clientHeight; And then you can use those variables to resize the iframe. Resize it with something like this. document.getElementById('iframe').height=myHeight-400;document.getElementById('iframe').width=myWidth-400;
  21. Nakor

    from in mailform

    Do something like this <?$to = "you@youremailaddress.com";$subject = "Mail From Website";$msg = "Whatever you want in the body of the mail";$mailheaders = "From: My Web Site <genericaddress@yourdomain.com>\n";// This line is where it will appear to come from for your reply function$mailheaders .= "Reply-To: Sender's Email"\n";mail($to, $subject, $msg, $mailheaders);?> If that doesn't work, try looking through the settings on your SMTP server, because there might be some sort of field that allows you to specify where it should appear to come from.
  22. You could set a cookie when they log in , destroy it when they log out, and dynamically display text based upon existance of that cookie. <? if (!$_COOKIE[login] == "loggedin") { echo "Log in"; // the page you would log in to would be where you set the cookie}if ($_COOKIE[login] == "loggedin") { echo "Log out"; setcookie("login", time()-3600) // this sets the cookie to have expired an hour ago, deleting it and displaying the log in text when they visit the page again}?>
  23. Nakor

    special string problem

    Well to insert it into MySQL you need to do something like the following. $connection = @mysql_connect("localhost", "username", "password") or die(mysql_error());$db_name = "name of database";$db = @mysql_select_db($db_name, $connection) or die(mysql_error());$sql = ' INSERT INTO `tablename` `fieldname` VALUES `input` $query = mysql_query($sql, $connection); You can make the box into a form and send it to a file with that code. Send it with addslashes() and display it with stripslashes() if you want to allow them to put in special characters. I hope this answers your question
  24. Nakor

    Login Script & Security

    With something like this the first thing you have to do is make a .htpasswd file. In this file you put the username and encryped password of the users you want to be able to look at the file. The use this tool http://www.tools.dynamicdrive.com/password/ to make the usernames and passwords. Then in your .htaccess file do the following AuthUserFile /usr/local/you/safedir/.htpasswdAuthGroupFile /dev/nullAuthName EnterPasswordAuthType Basicrequire user Username you specified in .htpasswd file The first line is the full server path to your htpasswd file. If you have installed scripts on your server, you should be familiar with this. Please note that this is not a URL, this is a server path. Also note that if you place this htaccess file in your root directory, it will password protect your entire site, which you don't want to do.Require user is where you enter the username of those who you want to have access to that portion of your site. Note that using this will allow only that specific user to be able to access that directory. This applies if you had an htpasswd file that had multiple users setup in it and you wanted each one to have access to an individual directory. If you wanted the entire list of users to have access to that directory, you would replace Require user xxx with require valid-user.AuthName is the name of the area you want to access.I hope this answered your question
  25. Ah, yes that would work as well. I just ended up settling with exec("rm -f *.*"); but now that I think about it, your solution would end up being better, as it is probably more platform independent.
×
×
  • Create New...