Home » Forum
  • If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Categories - Spacing

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Categories - Spacing

    Hello,

    I just purchased Zoom Search Engine Professional and am very pleased; thank you.

    I do have a question. I am using Categories with the checkbox. I haven't been able to modify the css to add some spacing between the checkbox and the Category name. I was able to add some spacing by modifying my Category names in the Configuration panel, placing five blank spaces before the actual name. That worked; however, the "All" Category text is still tight against the checkbox.

    As well, I would prefer to add space between the radio buttons above the Categories, Match "any search words" and "all search words".

    I've read through the help documentation and modifying the css for .zoom_categories or the associated ul or li has no effect.

    I've searched through this forum, but wasn't able to find anything to help.

    Can someone please let me know how I can add spaces as outlined above?

    Thank you again!

    Tapestry

  • #2
    You should be able to control the spacing of your category checkboxes by changing the margins for ".zoom_categories li"
    e.g.

    .zoom_categories li { display: inline; margin-left: 35px; list-style-type: none; }

    ... would increase the margin spacing between each checkbox (as well as the first item with the "Categories:" text) by 20px (from the 15px default).

    If that isn't applying, there may be some other CSS which is overriding its effect on the page. Make sure the CSS is the last line of CSS on the page (e.g. you're not linking to a different CSS file afterwards). CSS before it could also have some effect depending on the properties.

    We may be able to see what the problem is if the page is online (unless there's a real mess of CSS stuff going on and it could be a bit of a nightmare digging through some sites).

    Similarly, you can apply spacing to the "Match: any search words" and "all search words" items by setting margins like so:

    .zoom_match input { margin-left: 30px; }
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Hi Ray and thank you for replying.

      Unfortunately, the spacing between "checkbox categories" isn't what is giving me the problem. It is the spacing between the "checkbox" and the "text which follows", the category names, where I am having trouble adding spacing.

      I was able to modify the category names, when I configured them by adding the necessary number of spaces (using the non-breaking space ascii code) and then I changed the settings.php file and the meta tags to match; the initial layout was exactly what I wanted and the search function worked like a charm. The problem then became the ugly spacing in "search results" and "refine your search by category." It, of course, added all the spaces I had entered in my category names and has an unpleasant/undesired effect.

      I am not that strong in php, but I know a little and I can follow directions. If I put everything back to normal, by removing all the spaces I added, how can I modify the search.php file to give me the spaces I want between the checkbox and the category text that follows it? Is there a string replace function I could use or possibly add the non-breaking ascii code for search.php that would give me the desired results?

      search.php lines 1305:1346
      PHP Code:
                  $OutputBuffers[$OUTPUT_FORM_CATEGORIES] = "<span class=\"zoom_categories\">\n";
                  
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= $STR_FORM_CATEGORY " ";
                  if (
      $SearchMultiCats)
                  {
                      
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= "<ul>\n";
                      
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= "<li><input type=\"checkbox\" name=\"zoom_cat[]\" value=\"-1\"";
                      if (
      $cat[0] == -1)
                          
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= " checked=\"checked\"";
                      
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= ">$STR_FORM_CATEGORY_ALL</input></li>\n";
                      for (
      $i 0$i $NumCats$i++)
                      {
                          
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= "<li><input type=\"checkbox\" name=\"zoom_cat[]\" value=\"$i\"";
                          if (
      $cat[0] != -1)
                          {
                              for (
      $catit 0$catit $num_zoom_cats$catit++)
                              {
                                  if (
      $i == $cat[$catit])
                                  {
                                      
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= " checked=\"checked\"";
                                      break;
                                  }
                              }
                          }
                          
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= ">$catnames[$i]</input></li>\n";
                      }
                      
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= "</ul><br /><br />\n";
                  }
                  else
                  {
                      
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= "<select name=\"zoom_cat[]\">";
                      
      // 'all cats option
                      
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= "<option value=\"-1\">" $STR_FORM_CATEGORY_ALL "</option>";
                      for(
      $i 0$i $NumCats$i++) {
                          
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= "<option value=\""$i "\"";
                          if (
      $i == $cat[0])
                              
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= " selected=\"selected\"";
                          
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= ">"$catnames[$i] . "</option>";
                      }
                      
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= "</select>&nbsp;&nbsp;\n";
                  }
                  
      $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= "</span>\n";
              } 
      Thank you again!

      Comment


      • #4
        Accomplished!

        Hello,

        After continuing to study the structure of search.php, I was able to modify it as follows, to achieve the desired effect:

        search.php Line 1313
        PHP Code:
                        $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= "><span style=\"padding-left:10px;\">$STR_FORM_CATEGORY_ALL</span></input></li>\n"
        search.php Line 1328
        PHP Code:
                            $OutputBuffers[$OUTPUT_FORM_CATEGORIES] .= "><span style=\"padding-left:10px;\">$catnames[$i]</span></input></li>\n"
        Additionally, I modified settings.php as follows:

        settings.php Lines 89:90
        PHP Code:
        $STR_FORM_ANY_SEARCH_WORDS "&nbsp;&nbsp;any search words";
        $STR_FORM_ALL_SEARCH_WORDS "&nbsp;&nbsp;all search words"
        The CSS is as follows:
        Code:
        .zoom_categories li { 
        	display: inline; 
        	margin-left: 12px; 
        	list-style-type: none; 
        }
        And, I added the css for zoom_match input as you suggested:
        Code:
        .zoom_match input { 
        	margin-left: 28px; 
        }
        Everything now lines up and there the text isn't flush with the radio button or checkbox.

        Thank you very much for all of your time and help with this!

        Comment


        • #5
          You should not modify the "settings.php" file. That's why it starts with the following words:

          Code:
          // WARNING: DO NOT EDIT THIS FILE.
          // This file is automatically generated by the Zoom Indexer application
          // and will be updated each time you re-index your site. You should make all
          // setting changes directly from the Indexer, via the Configuration window.
          // 
          // If you wish to modify the text messages such as "Search results for...",
          // etc. then look up "Zoom Language Files" or "Translating the search page"
          // in the Users Guide for information.
          The text you wanted to change in STR_FORM_ANY_SEARCH_WORDS can be done so by modifying the ZLANG language file (under "Configure"->"Languages"). As explained above, you should consult the corresponding chapter in the Users Guide for more information.

          Note that the "settings.php" file is overwritten each time you re-index. So your changes in the file will be lost. If you use the ZLANG files, it will use your modified text each time it re-indexes.

          Similarly with modifying the search.php script code. You are free to use a customized version but to prevent it from being overwritten on re-index, you will need to keep a seperate copy of your customized script and point your Indexer configuration to it ("Configure"->"Advanced"->"Custom search script path").

          In the case of $STR_FORM_CATEGORY_ALL you can add your span tags to the string in the ZLANG file without modifying the script.
          --Ray
          Wrensoft Web Software
          Sydney, Australia
          Zoom Search Engine

          Comment


          • #6
            Thank you very much!

            I should have, and will, read the documentation more thoroughly.

            Your patience is appreciate.

            Comment

            Working...
            X