Recent Topics

1 Jun 24, 2006 23:40    

Hello Crowd,
I'm toying with [url=http://forums.b2evolution.net/viewtopic.php?t=7017]the category-based tag cloud idea posted here[/url], and basic'ly got it to work in addition to the regular _categories.php by creating a new file called _catcloud.php, calling that via

require( dirname(__FILE__).'/_catcloud.php' );

from _main.php, seeing what failed :) and replacing "cat_" by "cat_cloud_" in all function calls that were in conflict with those (already declared) in _categories.php.
So far so good, it all works well. However, there's one thing that I don't understand:

If you take a look at (the bottom of) the source of my blogs at http://www.alexandermaiwald.de/pri you wil see that the "cat cloud" put there is enclosed by <ul> </ul> tags.
I don't comprehend why, since they are defined nowhere in _catcloud.php and can't come from _categories.php (since the uls in there have a class "nobullets" whoch doesn't show at the point of _main.php). Hope I'm making sense in my attempt to explain.

So my question is: (how) can the ul tags issued around the _catcloud.php be mended whithout compromising the layout for the original _categories.php ?!?

I'll attach my _catcloud.php for review.
Thanx for any enlighenment. Best regards, 'lex

2 Jun 25, 2006 08:31

These are the settings in skins/_categories.php :-

if(!isset($cat_group_start)) $cat_group_start = '<ul>';
	if(!isset($cat_group_end)) $cat_group_end = '</ul>';


Which are then used by your code :-

      echo "\n",$cat_group_start,"\n";

      if( !empty( $cat_all ) )
      {   // We want to display a link to all cats:
         echo $cat_cloud_line_start,"\n";
         echo '<a href="',get_bloginfo('blogurl'),'">',$cat_all,'</a>';
         echo $cat_cloud_line_end,"\n";
      }

      cat_children( $cache_categories, $blog, NULL, 'cat_cloud_list_before_first', 'cat_cloud_list_before_each', 'cat_cloud_list_after_each', 'cat_cloud_list_after_last', 0 );

      echo "\n",$cat_group_end,"\n";

;)

¥

3 Jun 25, 2006 11:46

Hey Yabba; thanks for the hint! That did it :) I had to change cat_group and cat blog as well. :) Now it works. :)

5 Jun 25, 2006 13:54

provided I would want to call the catcloud from some page/s _outside_ of b2evolution .. would that be possible? If so, how?

Background of my question is this:
I intend to maintain to b2evos; one for my private stuff, and one for professional resumee. They shall both be accessible from one entry page; let's say alexandermaiwald.de/index.php, (from there links to pri and pro). I think it would be nice to have the cat clouds from both instances on that entry page to dynamically show what's about what :), wouldn't it?

How would I be able to accomplish that? At first thought I assume that, if called from one index.php above the /b2dir/skindir/ ... wouldn't that cause the links in the thus-called catcloud cause to point to somewhere wrong?!

Your input is much appreciated :)
Thanx; best; 'lex

6 Jun 25, 2006 14:21

If you mean two different blogs (as opposed to two different installs) then this might work (don't quote me on that though, cos I just make this stuff up as I go along ;) ).

In your page where you want the tag cloud to appear add :-

require(dirname(__FILE__).'/<path to b2evo>/b2evocore/_main.php');
$blog = ##; // first blogs ID
require(dirname(__FILE__).'/<path to b2evo>/skins/_catcloud.php');

$blog = ##; // second blogs ID
require(dirname(__FILE__).'/<path to b2evo>/skins/_catcloud.php');
?>

¥

7 Jun 25, 2006 15:04

Hey, Yaßßa;
I was indeed referring to diferrent installs, but I'll see how far I can get with your suggestion. If something additional crosses your mind in the meantime, please let me know. :)
L8rs! 'lex

8 Jun 25, 2006 15:38

Ok, once again this is off the top of my head, but, you might be able to do (although I don't think this will work):-

require(dirname(__FILE__).'/<path to 1st b2evo>/b2evocore/_main.php');
$blog = ##; // first blogs ID
require(dirname(__FILE__).'/<path to 1st b2evo>/skins/_catcloud.php');

require(dirname(__FILE__).'/<path to 2ndb2evo>/b2evocore/_main.php');
$blog = ##; // second blogs ID
require(dirname(__FILE__).'/<path to 2nd b2evo>/skins/_catcloud.php');
?> 

¥


Form is loading...