Recent Topics

[Solved 2.4] Category selector presented w/out submit button

Started by on Feb 23, 2008 – Contents updated: Feb 23, 2008

Feb 23, 2008 20:44    

This bug lived all the way from 1.6 through 2.4.
First appearance: http://forums.b2evolution.net/viewtopic.php?t=9750
Second appearance: http://forums.b2evolution.net//viewtopic.php?t=14539

Description:
It is possible to select multiple categories for view. In the 1.x.x system it needed an extra line in the skin ($params array for Categories)

'form' => true,


in 2.4 it is a setting in the Categories widget. It generates selection boxes before the categories and radiobuttons for ANY ANY BUT and ALL selection. What is omittesd is the start of the <form> tag and the submit button plus the closing </form> tag.

Solution :
For both the 1.10 series as the 2.4 series I made a hack which consists of this code before the category list:

/blog/inc/widgets/widgets/_coll_category_list.widget.php
*edit*
This piece is edited from the previous entry here.
changed $bblogUrl = $Blog->dget( 'blogurl', 'raw' ); in $bblogUrl = $Blog->gen_blogurl(); and changed method="get" in method="post"

		// start First part of Add Missing SubmitButton hack by Afwas
		if( $this->disp_params['use_form'] )
		{	// We want to add form fields:
			$bblogUrl = $Blog->gen_blogurl();
			echo'<form action="'.$bblogUrl.'" method="post">'; 
			
		}
		// end first part of hack


and this codepiece after the category list:

			<!-- Second part of Add Missing SubmitButton hack by Afwas -->
      		<br /><br />
      		<input name="submit" class="submit" value="Get selection" type="submit">
      		</form>
			<!-- End hack by Afwas -->


(This is taken from the 2.4 version, In 1.10 the $param is called 'form' and the global $Blog variable must be included.)

Also reported on Launchpad: https://bugs.edge.launchpad.net/b2evolution/+bug/194849


Form is loading...

Free CMS – This forum is powered by b2evolution CMS, a complete engine for your website.