Recent Topics

[SOLVED] [HACK] [2.1vgs] make categories expand and contract

Started by on Nov 15, 2007 – Contents updated: Nov 15, 2007

Nov 15, 2007 05:20    

My b2evolution Version: 2.1.0 "Las Vegas"

http://forums.b2evolution.net/viewtopic.php?t=4884&postdays=0&postorder=asc&highlight=expandable&&start=45

i wonder if anyone can adapt this to the latest version of b2evo ?..

any help will be appreciated thank you in advance

Nov 17, 2007 05:07

i ve installed but nothing changed..

but i couldnt find where to add the following instruction

Note: these instructons are tested in B2evo version 1.10.2. If you haven't got that version yet, please upgrade as soon as possible.

1. Download and extract the zipfile attached to this message. Copy the content (five files) to the folder of your skin. In my example the skin is 'custom' so I copy the files to ../blog/skins/custom.

2. In this folder you find the file _main.php. Open it and add somewhere between <head> and </head> (for example after <link rel="stylesheet" href="custom.css" type="text/css" />) these lines:
Code:
   <link rel="stylesheet" href="mktree.css" type="text/css" />
   <script src="mktree.js" language="JavaScript"></script>

which file is this _main.php ?.. i ve inserted the code in the 2nd inst. in the pages that has _main suffix but did no good :-/

Nov 17, 2007 05:17

I said: "don't change anything". The code is in the _html_header.inc.php ptovided in the zip file.

Good luck

Nov 17, 2007 05:47

I know now what went wrong. In a few days I wil post a new version.

Nov 17, 2007 05:50

thnk u for your efforts.. will do a great job for many people

Nov 17, 2007 08:51

This is a patch. I will see what I can do to make it easier.

1) download the zip and upload everything but the _categories.php file to the evoskin folder
2) open style.css and comment out this part of line 387:

.bText ul li:before /*, #sidebar ul ul li:before */{
content: "\00BB \0020";
}


3) open _sidebar.inc.php and change these two lines:
31:

'list_start' => '<ul class="mktree">',


34

'item_start' => '<li class="mktree">',

I have a minor issue, so I appreciate feedback.

Good luck

Nov 17, 2007 09:21

Afwas wrote:

This is a patch. I will see what I can do to make it easier.

1) download the zip and upload everything but the _categories.php file to the evoskin folder
2) open style.css and comment out this part of line 387:

.bText ul li:before /*, #sidebar ul ul li:before */{
content: "\00BB \0020";
}


3) open _sidebar.inc.php and change these two lines:
31:

'list_start' => '<ul class="mktree">',


34

'item_start' => '<li class="mktree">',

I have a minor issue, so I appreciate feedback.

Good luck

i ve downloaded the zip file, uploaded all files inside skins/evopress/, except _categories.php

made the changes u have said at 2 and 3...view has changed but categories are not expanding and collapsing... i guess sth is wrong with the js file..

thanking u again for your valuable efforts, wishing you good luck

to take a look : http://www.tilqi.com/

Nov 17, 2007 09:27

It works on your site.
The issue I have (and you also) is that the icon [-] doesn't show by default. It shows if you click on it. Categories are expanded by default, so you see the complete list.

Did you do rhe hack in the css file? the >> should disappear.

Good luck

Nov 17, 2007 09:30

yes i ve made the 2 changes u have mentioned to change in style.css..

and yes i saw it works, but the minus doesnt show, i ve managed to see it by ctrl+a.. but it works for sure.. great progress you had.. thank you

Nov 17, 2007 13:18

Next change of plan:
*do not* change line 34 in _sidebar.inc.php. It should be (what it was):

'item_start' => '<li>',


That seems to cure the error preventing the image to show at startup.

Good luck

Nov 17, 2007 19:16

that has definitely worked! great job.. B)

the version you have adapted must be placed in extensiions directory as 2.1 vegas version is short of plugins etc..

and i know many people need this hack..

thank you again and again :))

here is a cookie for ya :P :cookie:

Mar 19, 2008 13:19

uhhm.. before upgrading my current installation i wanted to test the hacks modifications etc on a fresh install..

and the reviewed 2.1 edition of this plugin doesnt seem to be working in 2.4 nevada..

i have both tried to copy the working skin to the fresh install
and modifying the default skin of the fresh install result is the same not working.

this plugin includes:

mktree.js
mktree.css
_html_header.inc.php

and the images..

there shouldnt be sth to do with the js and css; 2.4 skins also supports html header afaisee , so i wonder what might cause it to work in 2.1 and not work in 2.4

Mar 26, 2008 15:24

There's no categories plugin in 2.4. Use this code instead.

	// Categories widget
	skin_widget( array(
		'widget'	  =>	'coll_category_list',
		'block_start'	=>	'<div class="bSideItem">',
		'block_end'	=>	'</div>',
		'list_start'	=>	'<ul class="mktree">',
		'list_end'	=>	'</ul>',
		'form'		=>	true,
	) );

BTW this hack works perfect in 2.4.1. Thanks

Mar 26, 2008 18:38

sam2kb wrote:

There's no categories plugin in 2.4. Use this code instead.

	// Categories widget
	skin_widget( array(
		'widget'	  =>	'coll_category_list',
		'block_start'	=>	'<div class="bSideItem">',
		'block_end'	=>	'</div>',
		'list_start'	=>	'<ul class="mktree">',
		'list_end'	=>	'</ul>',
		'form'		=>	true,
	) );

BTW this hack works perfect in 2.4.1. Thanks

uhhm.. actually i dont need just a category list, i need them to be expanding and collapsing, as i have many many categories....

Mar 26, 2008 18:43

In fact you don't need _categories.php at all.

Copy all files in your skin, and put the code I wrote above in _sidebar.inc.php. But don't forget to delete the existing category widget in backoffice.

Mar 26, 2008 23:13

hey sam2kb; could you get this collapsing categories work in 2.4 ?
i did just like u said,
i ve added the code you gave in the sidebar.inc, deleted the categories widget from the backoffice widgets, but i couldnt get it working, i also get these messages:


Warning: load_class() [function.load-class]: Unable to access /home/prosoftwar/domains/prosoftwarez.com/public_html/blog/inc/widgets/widgets/_coll_category_list.widget.php in /home/prosoftwar/domains/prosoftwarez.com/public_html/blog/inc/_core/_class4.funcs.php on line 40

Warning: load_class(/home/prosoftwar/domains/prosoftwarez.com/public_html/blog/inc/widgets/widgets/_coll_category_list.widget.php) [function.load-class]: failed to open stream: No such file or directory in /home/prosoftwar/domains/prosoftwarez.com/public_html/blog/inc/_core/_class4.funcs.php on line 40

Fatal error: load_class() [function.require]: Failed opening required '/home/prosoftwar/domains/prosoftwarez.com/public_html/blog/inc/widgets/widgets/_coll_category_list.widget.php' (include_path='.:/usr/local/lib/php') in /home/prosoftwar/domains/prosoftwarez.com/public_html/blog/inc/_core/_class4.funcs.php

Invalid widget code provided [coll_category_list]!

Mar 26, 2008 23:23

Are you sure that this file exists?
/home/prosoftwar/domains/prosoftwarez.com/public_html/blog/inc/widgets/widgets/_coll_category_list.widget.php

Here is a demo http://www.americangirl.co.uk

Mar 27, 2008 00:01

sam2kb wrote:

Are you sure that this file exists?
/home/prosoftwar/domains/prosoftwarez.com/public_html/blog/inc/widgets/widgets/_coll_category_list.widget.php

Here is a demo http://www.americangirl.co.uk

i dont get those errors anymore, it just didnt refresh completely, ff does it sometimes..

did you actually got it working on 2.4 :)

take a look at mine at : http://www.prosoftwarez.com/blog/

Mar 27, 2008 00:25

What are you trying to collapse/expand? There are no subcats :)

Mar 27, 2008 01:00

oh god..it's actually working, i was bugging Afwas for a week to fix that, besides me, he must also have relieved now :D

thank you very much sam2kb


Form is loading...

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