Recent Topics

checkboxes

Started by on Nov 03, 2006 – Contents updated: Nov 03, 2006

1 Nov 03, 2006 14:59    

I'm trying to modify the categories list on this newborn blog http://psicologia.unipd.it/htl...php?blog=5

I'd like to put a checkbox near each category, like in this website
http://skins.b2evolution.net/

With my version of b2evolution (1.8.2), I don't know if there is an option in the editor or I have to change the command lines in some file

thanks folks

2 Nov 03, 2006 17:32

find a piece that looks like this in your skins _main.php :-


	<?php
		// -------------------------- CATEGORIES INCLUDED HERE -----------------------------
		// Call the Categories plugin:
		$Plugins->call_by_code( 'evo_Cats', array(	// Add parameters below:
				'option_all' => 'ALL (Newest->Oldest)',
			) );
		// -------------------------------- END OF CATEGORIES ----------------------------------
	?>

and change it to look like this :-


	<?php
		// -------------------------- CATEGORIES INCLUDED HERE -----------------------------
		// Call the Categories plugin:
		$Plugins->call_by_code( 'evo_Cats', array(	// Add parameters below:
				'option_all' => 'ALL (Newest->Oldest)',
				'form' => true,
			) );
		// -------------------------------- END OF CATEGORIES ----------------------------------
	?>

4 Nov 04, 2006 14:05

THANK YOU VERY MUCH! :D

5 Aug 05, 2007 18:59

In my case it does not work. The checkboxes do appear, but there is no "Get Selection" button. Has something changed in later versions? (I use 1.10.2 Florida)?

7 Aug 05, 2007 20:56

Thanks for your rely. I hope we'll get that fixed. But the "Get Selection" - button does appear on the skin blog http://skins.b2evolution.net/ so there must be a solution

8 Aug 05, 2007 21:58

I have the hack.

This is tested in B2evo 1.10.2. If you haven't got that version already, do [url=http://b2evolution.net/news/2007/08/05/1_10_upgrade_now]upgrade[/url] today.

Open ../blogs/plugins/_categories.plugin.php and add after (line 150):

echo $params['title'];


this:

/* Add Missing SubmitButton hack by Afwas */	
		if ( $params['form'] )
		{
			global $Blog;
			$bblogUrl = $Blog->dget( 'blogurl', 'raw' );
			echo'<form action="'.$bblogUrl.'" method="get">';
		}
/* End start <form> */

Add after (approx line 246):

) echo 'checked="checked" '?> />
				<label for="catALL"><?php echo T_('ALL') ?></label>
			</span>


this:

<!-- 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 -->

or download the zipfile and replace the whole file (do make a backup of the old one).

It works on my blog. Do report any odd behaviour.

Good luck

9 Aug 05, 2007 22:08

Thanks! Now there is a Get Selection button, but it sends me to the wrong URL - the directory name of the chosen skin appears in the URL

10 Aug 05, 2007 22:28

Something is wrong. As soon as I figured it out, I am back at this topic.

*edit*
The version that's up for download should work


Form is loading...

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