Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author AndrewUlrich

    (@andrewulrich)

    For the category widget, you’d have to cut and paste the checkbox html from lines 578 and 582 to lines 565 and 569, respectively. For the tag widget, you’d have to cut and paste the checkbox html near the end of line 686 to before the label html near the beginning of line 686, and do the same for line 691. This requires a basic knowledge of html and if you don’t know php, be careful and good luck. The line numbers I’m referring to are according to version 3.2 of the plugin, so keep that in mind too if you’re using a different version.

    scb161

    (@scb161)

    Hi. Could you list what the lines of code say? I’m using the current version (3.4.1) and would also like to put the check boxes in front of the categories. Thanks.

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Basically cut everything within the <input type=”checkbox” …> tag and paste it between the <li class=”facetedsearch”> tag and the <label for=”strm[]” …> tag. This same thing appears on several lines so do it for those several lines.

    scb161

    (@scb161)

    Thanks! I’ll give it a try. Thanks for the quick response too.

    Hello Andrew,

    this

    Basically cut everything within the <input type=”checkbox” …> tag and paste it between the <li class=”facetedsearch”> tag and the <label for=”strm[]” …> tag. This same thing appears on several lines so do it for those several lines.

    seems all hocus pocus to me. I am using the latest version of Faceted Search. Would you be so kind to repost the code with the changes mentioned above? I just don’t understand ?? But hey, it’s my first website I’m trying to make…

    Kind regards!

    Plugin Author AndrewUlrich

    (@andrewulrich)

    Ok, I’ve just committed a new version of the plugin. It should be easier to put the checkboxes before the labels now.

    For the tag widget, search for this:

    $returnstring .= '<li '.$selected.'><label for="strm2[]">'.$tag['name'].'</label>';
    		if(!in_array($tag['name'],$disable_array))
    		{
    			$returnstring .= '<input type="checkbox" name="strm2[]" value="'.$tag['term_id'].'" />';
    		}

    and replace it with this:

    if(!in_array($tag['name'],$disable_array))
    		{
    			$returnstring .= '<input type="checkbox" name="strm2[]" value="'.$tag['term_id'].'" />';
    		}
    		$returnstring .= '<li '.$selected.'><label for="strm2[]">'.$tag['name'].'</label>';

    For the category widget, search for this:

    $returnstring .= $element['name'];
            $returnstring .= '</label>';
    	$returnstring .= $checkboxstring;
            $returnstring .= '</li>';

    and replace it with this:

    $returnstring .= $checkboxstring;
    	$returnstring .= $element['name'];
            $returnstring .= '</label>';
            $returnstring .= '</li>';

    Hello Andrew,

    thanks for posting. I will apply the changes.

    Thank you!

    Hi Andrew,

    I forgot to thank you ?? It works, so again thank you for this great plugin.

    I have managed to put the checkbox before the category name, but it would be perfect if the should be a blank space between the checkbox and the categorie name…

    Can you help me with this?

    Regards

    answering my own question..

    i have found a way – not sure this is the proper way to do it…

    I just added : $returnstring .= " ";

    $returnstring .= $checkboxstring;
    $returnstring .= "  ";
    $returnstring .= $element['name'];
    $returnstring .= '</label>';
    $returnstring .= '</li>';
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Faceted Search] Widget Styling, checkbox before category?’ is closed to new replies.