Jump to content

atholon

Members
  • Posts

    132
  • Joined

  • Last visited

    Never

Posts posted by atholon

  1. Hi there,

     

    So I made this table called categories for my site:

    categoryid int(11)

    title varchar(255)

    description varchar(255)

    parentid int(11)

     

    I want to loop through the categories and display a list of everything...in a hierarchy like this:

    MainCategory

    - SubCat

    ---SubCatOfSubCat

    -----SubCatofSubCat

    AnotherMainCat

    - SubCat

    ----SubCatofSubcat

    etc...

     

    The goal is to to have limitless categories for the website.

     

    How should I go about doing this? My friend told me to use a class but I am not sure how to go about it. Could someone help?

  2. That is what I was thinking :)

     

    Thanks for clarifying it.

     

    There is no flippin` way I am going to go recode everything because I named the variables using the "myVar" convention :)

     

    I decided to name my files as follows as well:

     

    Php files: myphpfile.php

    Php files that contain classes: MyPhpFile.php

    Html files: My_Html_File.html

    JS : crazy_file.js

     

  3. Hi all, I would like to know something about PHP and HTML naming conventions, perhaps JS if anyone knows.

     

    I would like to know how multi word variables should be named.

     

    I was reading o' reilly's php book and they stated you should name them something like my_var or similar.

    Is that the actual standard? What about functions or classes?

     

  4. It wouldn`t be that complicated if I could find a list of words and their synonyms which I doubt can be found for free. I am just checking to make sure :)

     

    It would make the search engine much more accurate.

  5. Hey,

     

    I want to make a search engine that singles out the individual keywords entered into the search and then also uses various synonyms for that word.

     

    Can anyone let me know where I can find a listing for that if there is one for free?

  6. Hi, I am trying to get a few clips from some DVD's to show in one of my classes but I don`t want to copy the whole movie to my hard drive to edit everything but the clip out...

     

    Anyone know of a program that gets clips and not the entire movie?

  7. OK dokey, here is my problem.

     

    I have a script that I am enabling users to use a select box to select a category for a tutorial they will submit. Then they select certain categories certain results are displayed as sub categories then when they choose certain sub categories certain programs are displayed according to the sub category.

     

    Anywho so I have this for the JS to watch for the initial change

    
          var internalCat = document.getElementById('internalCat');
          var externalCat = document.getElementById('externalCat');
    
          if( internalCat )
          {
            internalCat.sbname = "internalSubCatSelect";
            internalCat.result = "internalSubCat";
            internalCat.onchange = ToggleCatText;
          }
          if( externalCat )
          {
            externalCat.sbname="externalSubCatSelect";
            externalCat.result="externalSubCat";
            externalCat.onchange = ToggleCatText;
          }
    

    Then when they are toggled the ToggleCatText function executes which uses an Ajax.Updater() to retrieve the results in the php file.

    new Ajax.Updater(catView, '../tutorials/process/catView.php?view=' + display + '&selectBoxName=' + selectBoxName, {asynchronous:false});

    Then it is supposed to pass back the results like this:

    $parentCategory = $_REQUEST['view'];
    $selectBoxName = $_REQUEST['selectBoxName'];
    $html = '';
    $html .= "<select id=\"$selectBoxName\" name=\"$selectBoxName\">";
    $count = 1;
    $query=mysql_query("SELECT title FROM subcategories WHERE parent = '{$parentCategory}' ORDER BY title ASC");
    
    if( mysql_num_rows($query) > 0 )
    {
    while($result=mysql_fetch_array($query))
    {
    
    	if ($count == 1)
    	{
        $html .= "<option value=\"{$result['title']}\" selected=\"{$result['title']}\">{$result['title']}</option> ";
    	}
    	else
    	{
    	$html .= "<option value=\"{$result['title']}\" >{$result['title']}</option> ";
    	}
    
    }
    
    mysql_free_result($query);
    }
    else
    {
    }
    
    $html .= "</select>";
    
    echo $html;

     

    Thing is for some reason when I try to use the

          var internalSubCatSelect = document.getElementById('internalSubCatSelect');
          var externalSubCatSelect = document.getElementById('externalSubCatSelect');
    

    It won`t trigger anything using onchange.... any ideas?

  8. Hi, I am trying to deal with JavaDoc, for Sun's Java and for some reason the comment tag @author is not working on any of my classes.

    Anyone have a reason why?

     

    /**
    * This class manages an company's payroll
    * @see PayrollTest
    * @since 1/22/08
    * @author John Hinburg
    */

×
×
  • 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.