Jump to content

Gafaddict

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Posts posted by Gafaddict

  1. I am using the Tool Man script, a script that allows one to "drag and drop" the position of a list of elements. It uses cookies to pass the information from one page to the next.

     

    When I try to use PHP to clear the value of this cookie, it doesn't work.

    I have a suspicion that this has something to do with the fact that the cookie was set in JavaScript, because if I try to clear a cookie which I set in PHP, it clears easily.

     

    The code I am using to clear is: setcookie("list_boxes", "", time() - 3600);

     

    The script that Tool Man uses to set cookies can be found at: http://tool-man.org/source/org/tool-man/cookies.js

     

    Any ideas?

  2. Is there any possible way for this to render properly:

     

    <ul style="display:inline">
    <li>Line1<br>Line2</li>
    <li>Line1<br>Lin2</li>
    </ul>

     

    In Firefox etc. it displays each list item on a different line, but I wonder if the display:inline feature works with line breaks. Is there any way to achieve a similar affect if the two won't combine?

  3. I'm building a photo album script and am coming across a problem here.

     

    I want to redirect users to a certain album based on the criteria they give me:

    RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/? picture.php?year=$1&season=$2&meet=$3&picture=$4

     

    The problem is that the actual "images" folder I'm storing the pictures is also susceptible to this rule.

     

    I tried replacing the above code with this, as the first level is a numerical value (a year):

    RewriteRule ^([1-9+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/? picture.php?year=$1&season=$2&meet=$3&picture=$4

     

    But that just causes the redirect to fail completely.

     

    Is there any way to exclude only the "images" folder from this rule?

  4. Anybody here know how to solve this problem? I've seen it done before on another PHP powered site, in fact I'd ask the fellow who coded that site but he seems to have vanished off the face of the earth... anyway:

     

    I have a series of files in a directory, 491_1.jpg, 491_2.jpg, 491_3.jpg. Now, I'm trying to figure out a way by which if one was to enter "491_1.jpg" into a text box and have that processed, the script would be able to find all three of those images, more if there were additional images following that syntax, in the directory.

     

    Now, if it's impossible to detect that set of files by entering "491_1.jpg," is there something else that could be processed in order to find that set of files? Such as "491_*.jpg" or something?

     

    I appreciate this...

  5. Hey all --

     

    I'm running into a problem with a select box. Its values in PHP are not properly parsed.

     

    <select name="frm_owners" size="10">
        <option value="1">Apples</option>
        <option value="2">Oranges</option>
    </select>

     

    Now, if I were to select both options and then output $_POST[frm_owners] on another page, all I would get is "2." But I'm looking for a comma-seperated value like "1,2." Any ideas?

     

    I thought this would be a fairly common question--funny I haven't found any related threads on the board.

     

    Thanks in advance.

  6. You actually use a function for this:

     

    $aircraft = $_POST[aircraft];
    $similar = strpos($aircraft, '747');
    
    if($similar || $aircraft == "747") {
    $aircraft = "B747";
    }

     

    In strpos, the first argument is the variable to search in and the second is what to search for. It returns a true if it could find it, a false if it couldn't.

  7. Hi guys,

     

    At the moment I'm writing a script which deals with the possibility of analyzing a file that is not on my server -- rather, it is located on another server and a completely different domain. Say the image is http://www.example.com/logo.jpg.

     

    The script needs to find out the dimensions of logo.jpg when a user inputs that string into a textbox. I know how to get the dimensions of an image on the server, but how would I get the dimensions of an external image? Is it even possible?

     

    If that is not possible, how would one go about copying that external image from the URL to their own server? I've seen this done before in phpBB before but they don't seem to have any documentation about it.

     

    Thanks in advance,

  8. Hi,

     

    Thanks. I've got a question for you, though... how exactly would you implement that function? I've looked over the documentation and it doesn't seem to go into much detail about exactly how to do that. Say I wanted to periodically refresh a file called test.php -- how do I specify that file in the function?

  9. Well no, there are less basic implementations of it on the site, I just used this as an example rather than the more descriptive ones, to avoid any confusion.

     

    I guess a more sensical implementation of it would be a shoutbox somewhere on the page. Is there any way to make that page continuously refresh so when a message is posted you don't need to manually refresh it?

  10. Well Dreamweaver; mainly because it's the only designer I can find that works for the Mac. On the PC I have used software like Notepad++, PHP Designer, and PHP Edit; as well as Quanta Plus on Linux, but none of them really have the complete interface Dreamweaver does. No other software I've used has the software tree Dreamweaver does, which is really convenient and necessary to me. Few others highlight the code properly that Dreamweaver does, and the ones that do don't have a file tree.

  11. A better way to work with hovering images is with CSS. First you turn the image into a span, and have the original image load through a CSS attribute. Then you apply the hover image basically the same way you'd apply properties to a link when you make it hover. This would be put in place of your image code:

     

    <span desc="Dedicated Server" class="dedicatedserver"> </span>

     

    Then you'd put this in a CSS document:

     

    .dedicatedserver {
    background-image: "images/2200.png";
    width= 97px;
    height=31px;
    }
    
    .dedicatedserver:hover {
    background-image: "images/2200.png";
    }

     

    That should work on Firefox, IE, Safari... pretty much every browser out there.

  12. Hi,

     

    At the moment I'm trying to make a page using the AJAX component, and I've run into a bit of a snag. What I'm trying to do is have the page is to load a seperate page which displays the current time (down to seconds). The only problem is, I can't seem to make AJAX refresh the page to keep the page up-to-date. It simply displays the time at which the page was first loaded, then stops.

     

    Is there any way to make AJAX continuously refresh? I've seen it before on sites like www.last.fm (their most recent journal list), but how they do it isn't apparent to me.

     

    Thanks!

  13. Put the box and text in a div and create a class for it with the attribute:

     

    border: 1px solid #000000;

     

    1px can be changed depending on how wide you want the border to be; the same goes for the color of course.

  14. Hey,

     

    I've been working on a site design, and in the process, I came across a problem.

     

    The main section of the page has a floating box on the right, and as you can see, that section doesn't expand all the way down to the bottom of that floating box. I tried adding a div at the bottom with the "clear: right;" attribute (tried clear: both as well), but when I did that, all the other text on the website disappeared in I.E. I also tried using min-height, but IE didn't seem to interpret that properly.

     

    Am I doing something wrong? I was under the impression that a div with a floating object in it would expand down to that floating object...

     

    Here's the code, if needed:

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Page</title>
    
    <style type="text/css">
    
    body {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 13px;
    margin: 0;
    padding: 0;
    background-color: #444444;
    color: #FEFCFE;
    }
    h1 {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 36px;
    margin: 0;
    padding: 12px 0;
    font-weight: bold;
    text-align: right;
    
    }
    h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: bold;
    padding: 0 20px;
    line-height: 19px;
    color: #aaaaaa;
    }
    h3 {
    padding: 0 30px;
    }
    p {
    line-height: 17px;
    margin: 12px;
    }
    a, a:link, a:visited {
    color: #9DA4BF;
    text-decoration: none;
    }
    a:hover {
    color: #FFFFFF;
    text-decoration: underline;
    }
    #wrapper {
    width: 90%;
    margin: 0 auto;
    }
    #logo {
    background-color: #6C7079;
    border: 1px solid #000000;
    border-bottom: none;
    padding-right: 20px;
    margin-top: 5px;
    background-repeat: repeat-y;
    }
    #mainmenu {
    font-size: 12px;
    text-align: center;
    margin: 0;
    border: 1px solid #000000;
    border-bottom: none;
    padding: 1px;
    background-color: #424E5B;
    }
    #mainmenu li {
    display: inline;
    margin: 15px;
    
    }
    #content {
    padding-left: 10px;
    border: 1px solid #000000;
    padding-bottom: 5px;
    background-color: #5A6674;
    min-height: 420px;
    }
    #sideboxes {
    float: right;
    margin: 15px;
    width: 150px;
    border: 1px solid #000000;
    margin-top: 20px;
    padding: 3px;
    }
    #footer {
    margin-top: 20px;
    clear: both;
    padding: 5px;
    border: 1px solid #000000;
    text-align: center;
    background-color: #424E5B;
    }
    .sidebox {
    text-align: center;
    }
    .sidebox .head {
    font-weight: bold;
    font-size: 12px;
    line-height: 30px;
    }
    .newsarticle {
    padding: 0 40px;
    }
    </style>
    </head>
    
    <body>
    <div id="wrapper">
    <div id="logo">
    	<h1>Name</h1>
    </div>
    <div id="mainmenu">
    	<ul>
    		<li><a href="#">Home</a></li>
    		<li><a href="#">Forums</a></li>
    		<li><a href="#">F.A.Q.</a></li>
    		<li><a href="#">About Us</a></li>
    	</ul>
    </div>
    <div id="content">
    	<div id="sideboxes">
    		<div class="sidebox">
    			<span class="head">Header 1</span><br />
    			<img src="images/noir_avatar.jpg" />
    		</div>
    		<div class="sidebox">
    			<span class="head">Header 2</span><br/>
    			Item 1<br />
    			Item 2<br />
    			Item 3<br />
    			Item 4<br />
    			Item 5<br /><br />
    		</div>
    		<div class="sidebox">
    			<span class="head">Header 3</span><br />
    			Item 1<br />
    			Item 2<br />
    			Item 3<br />
    			Item 4<br />
    			Item 5
    		</div>
    	</div>
    
    	<div class="newsarticle">
    		<h4>Article Title</h4>
    		<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In laoreet auctor lectus. Morbi ut orci. In diam mi, congue id, convallis ut, vulputate eu, ipsum. Nam id nisl sed sapien venenatis vulputate. In hac habitasse platea dictumst. Sed tempor imperdiet felis. Vestibulum hendrerit, massa tincidunt porta vulputate, nisl justo tincidunt pede, vitae varius ligula mi sit amet magna. Nunc aliquet. Phasellus id turpis sit amet felis iaculis facilisis. Praesent porta pede sit amet augue. Nulla velit tellus, molestie ut, facilisis quis, nonummy at, eros. Donec nec enim ac mauris gravida ultricies. Pellentesque venenatis lobortis sem. Nam et ante at ante dapibus elementum. Donec ante neque, tincidunt ut, euismod a, pellentesque non, est. Pellentesque mauris. Curabitur lacus massa, consectetuer nec, interdum ut, dictum id, pede. Nullam laoreet.</p>
    		<p align="right"><em><a href="#">0 comments</a></em></p>
    	</div>
    
    </div>
    <div id="footer">
    	Footer text
    </div>
    </div>
    </body>
    </html>
    

  15. netstat -ab didn't show anything listening in on Port 80 either. telnet 80 got me no responses.

     

    BUT -- I did change the Apache conf from "Listen 80" to another port number. It starts successfully now and I can access the server. Thanks very much, at least that's working!

  16. Thanks for the suggestion. I ran netstat -b, but in the whole returned log, there were no processes running on port 80. Additionally I ran prcviewer, but I could't find anything I could immediately mark as the problem (e.g. httpd.exe still trying to run).

  17. I recently removed Apache (along with PHP and MySQL -- only extensions to it I had) from my system (Windows XP Home Edition, SP2) as it had simply stopped working and nothing I attempted could get it to work again. I tried to install an older version of it, 1.3, but whenever I try to do so it tells me that a service is still using Port 80. Whenever I try to access localhost, localhost:80, 127.0.0.1, or anything of the like, I simply get a blank page rather than a "address cannot be resolved" error or something similar.

     

    I looked at my services list in Computer Management and it didn't seem to be there... so is there any way to remove this ghost Apache service from my computer?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.