1 martha Jan 21, 2009 22:06
3 afwas Mar 11, 2009 14:24
This isn't as easy as you make it seem. Think of a multiuser multiblog. If two completely unrelated bloggers have the same tag or a tag can have multiple connotations you are aggregating unrelated stuff. That's less likely to happen if the tags are confined to one single blog.
Sure there's an easy hack. Give me a couple of hours.
Good luck
4 laibcoms Mar 11, 2009 14:54
Afwas wrote:
This isn't as easy as you make it seem. Think of a multiuser multiblog. If two completely unrelated bloggers have the same tag or a tag can have multiple connotations you are aggregating unrelated stuff. That's less likely to happen if the tags are confined to one single blog.
Sure there's an easy hack. Give me a couple of hours.Good luck
Yes true, if the tags system is simply "opened" to search across all blogs in a multi-blog + multi-user environment.
But if the tags will be restricted based on the Aggregate Field under the Advance Tab, then we won't have a problem even in a multi-blog + multi-user environment.
An aggregate blog is basically a either a collection of related blogs, or unrelated blogs (aggregate 'all'). So either way, if the aggregate blog is 'all', then there'll be tags with different unrelated topics - hence aggregating 'all' blogs.
^_^
5 martha Mar 11, 2009 15:23
Laibcoms--I'm looking at the blog settings > advanced page, and I see where I have limited the blogs to aggregate (specifying their numbers), but I don't see how to limit tags. Or maybe this was not what you meant?
Afwas--I don't see the possibility of pulling up unrelated material as a killer for this feature--surely anybody who has done a web search is used to this.
More importantly, I'm looking at different use cases than what you seem to imagine (are you imagining many users with one personal blog each??). I've got two installations. One is multi-blog but I am the only user: the separate blogs serve as the first level of organization of my topic. The other one also uses separate blogs as the first level organizing tool, but I intend to involve multiple users each with freedom to post across that whole installation. Probably they will be given levels of permission that don't let them change categories, and probably I will review and revise any tagging they do.
I've "solved" my Jan 21 problem by hiding the tags--they are there as an seo aid, but not displayed and not offered as a navigational tool. (So the organization is by blog and then by category.) But if b2evo wants to grow up into a useful cms, attention to a variety of use cases seems in order...
Neither installation ready to go fully public, but http://www.healthygreenpaint.com (single-user multi-blog), and http://www.mcgmquakers.org (multi-user multi-blog but blogs for different subtopics not for different users--this last moving toward http://manual.b2evolution.net/B2evolution_vision "Hierarchic CMS").
6 afwas Mar 11, 2009 15:44
I'm currently working on B2evo v3.
In the aggregate blog the tags are aggregated as well. That's about what I expect from the source code that I am looking at.
martha wrote:
But if b2evo wants to grow up into a useful cms, attention to a variety of use cases seems in order...
Please don't go that way. We have an impossible task keeping everybody happy. We're doing a great job at that. However at times decisions have to be made. I have explained what decision was made and why. You may not agree with that but it's unfair to claim that Bevolution is not paying attention to usercases. From all blogsystems I know 2evolution is the most versatile. I do not count modular cms systems, that is another cup of tea.
Currently there seams to be consensus among the developers to simplify the Dashboard. That will inadvertently lead to less settings.
Good luck
7 yabba Mar 11, 2009 15:51
In fairness, the consensus of the developers seems to be "simplify what we can whilst retaining the flexibility/settings for the power users" ;)
¥
8 martha Mar 11, 2009 17:03
Well, I DO COMPLETELY GET IT that you can't please everybody!!!! And, as I said, I have already (mostly) side-stepped the cross-blog tagging idea, so that's no biggie for me. I apologize if my comments seemed guilt-trip-y or manipulative or demanding--I intended no such thing.
BUT I am using "installation" and "blog" in a way roughly approximating the "book" and "chapters" use case envisioned on the b2evo site (and I have another project, temporarily becalmed, that would be even closer to that use case), so I am of course very interested in exploring the features of b2evo that support or could be used to support such uses. And in other users' ideas about best or good approaches to same.
9 afwas Mar 11, 2009 18:22
Hi martha,
In /inc/widgets/widgets/_coll_tag_cloud.widget.php line 195/196 change to
echo '<a href="'.$baseurl . 'index.php/' . $row->tag_name .'?skin=asevo" style="font-size: '.$size.'pt;" title="'
.sprintf( T_('%d posts'), $row->tag_count ).'">'.$tag_name_disp.'</a>';
According to the setup of the URL of your blog you may want to alter this a little. In my setup it gives:
https://localhost/blogs/index.php/tag3?skin=asevo
Here tag3 is a tag that is used in two blogs.
I added the '?skin=asevo' as an example. You may want to change that according to your preferences or leave it out and see what skin it defaults to.
Good luck
10 afwas Mar 11, 2009 18:27
Laibcoms wrote:
But if the tags will be restricted based on the Aggregate Field under the Advance Tab, then we won't have a problem even in a multi-blog + multi-user environment.
^_^
In my B2evo 3.1 test environment the tags are already aggregated in an aggregation blog. Please correct me if I'm wrong.
--F
11 martha Mar 11, 2009 20:07
Thanks, Afwas! I can't try it till late tonight (Chicago time), but I'll let you know what happens when I do.
12 edb Mar 11, 2009 23:38
This is somewhat related to how aggregating posts also aggregates pages ... but not tags. That's the relationship eh?
So how does this sound? At the point where we have a text field to include blogs to aggregate add a text field for pages to aggregate and another for tags to aggregate. Give the ability to use the keyword "same" to mean "aggregate the same string of blogs as was added to the post aggregator". That way pages can be unaggregated and tags could be aggregated.
13 laibcoms Mar 13, 2009 05:08
martha wrote:
Laibcoms--I'm looking at the blog settings > advanced page, and I see where I have limited the blogs to aggregate (specifying their numbers), but I don't see how to limit tags. Or maybe this was not what you meant?
It could be expanded that way ;)
martha wrote:
But if b2evo wants to grow up into a useful cms, attention to a variety of use cases seems in order...
Hmm, personally, b2evolution "by default" should stay as a blog platform only. Turning it into a full-blown CMS will require more time and bigger planning (not to mention more developers).
There are ways to turn your blog into a CMS however. I remember encountering those topics before here in the forums.
Afwas wrote:
In my B2evo 3.1 test environment the tags are already aggregated in an aggregation blog. Please correct me if I'm wrong.--F
Hmm, from my end, 3.1-alpha Head, the tags that shows up (usually) under each post in an aggregate blog still links to the blog of the post.
Here's my new blog using 3.1-alpha Head: http://laibcoms.asia/blog/ The main page is an aggregate blog only, aggregating blogs 1,2,3,7
EdB wrote:
This is somewhat related to how aggregating posts also aggregates pages ... but not tags. That's the relationship eh?
So how does this sound? At the point where we have a text field to include blogs to aggregate add a text field for pages to aggregate and another for tags to aggregate. Give the ability to use the keyword "same" to mean "aggregate the same string of blogs as was added to the post aggregator". That way pages can be unaggregated and tags could be aggregated.
That can be implemented that way ;) Although I can't think of a reason why someone will want to aggregate-tags from non-aggregated-blogs. However, if we're going to the path of customization, that will be a plus.
----
Hmm... I just thought of something.. could be useful for multi-blogs and/or multi-user environment where a user doesn't want to aggregate-blogs but want to aggregate-tags, say from a blog with a related topic.
So say, our blogs share the same topic but we do not want to make our respective blogs populated by each other's blog (we should just merge if we're going to aggregate each other). But we can share via tags.
It can also help the Tag widget and Related Posts plugin I think.
14 edb Mar 13, 2009 05:41
Laibcoms wrote:
...
That can be implemented that way ;) Although I can't think of a reason why someone will want to aggregate-tags from non-aggregated-blogs. However, if we're going to the path of customization, that will be a plus.
...
I know I snipped out a 'hmmm' but hey what can I say?
Here's a reasonable scenario: blog #1 is default on index and is crafted to not look like a blog (no date stamps, no comments). For all practical purposes it is an entry page for the installation. In the sidebar or some such you want "what are our bloggers talking about", which would be tags. So now I would want to aggregate tags to a blog with no post aggregation.
* never even thought of using categories for structuring. How that would work with multiple subcats, cross blog posting via multiple subcats, and the ability to have this post use cat88 as a main cat and that post use cat88 as a subcat is beyond me though. Perhaps wordpress doesn't do multiple cats?
But really I should butt out. IMHO b2evolution has tags because everyone else has tags so tags must be good. Even though they ain't when you can categorize till the cows come home. And I want cats worked on more than something I'll just hack out anyway. And the incorrect way images are resized (landscape assumed ... upload a portrait and see what you get). And the totally wrong "name becomes path and size becomes name" thing. Then tags ;)
15 sam2kb May 19, 2009 04:13
Here's a quick hack if you need cross-blog tags. Good for b2evo 2.x and 3.x ;)
Open inc/items/model/_item.funcs.php and change the following (approx 67)
// pre_dump( $MainList->default_filters );
$MainList->load_from_Request( false );
// pre_dump( $MainList->filters );
// echo '<br/>'.( $MainList->is_filtered() ? 'filtered' : 'NOT filtered' );
//$MainList->dump_active_filters();
// Run the query:
$MainList->query();
// Old style globals for category.funcs:
$postIDlist = $MainList->get_page_ID_list();
$postIDarray = $MainList->get_page_ID_array();
to
// pre_dump( $MainList->default_filters );
$MainList->load_from_Request( false );
// pre_dump( $MainList->filters );
// echo '<br/>'.( $MainList->is_filtered() ? 'filtered' : 'NOT filtered' );
//$MainList->dump_active_filters();
// hack start
$saved_aggregate_state = $Blog->get_setting( 'aggregate_coll_IDs' );
$active_filters = $MainList->get_active_filters();
if( $disp == 'posts' && !empty($active_filters) )
{
if( array_diff( $active_filters, array( 'tags', 'posts', 'page' ) ) == array() )
{ // All public blogs
$BlogCache = & get_Cache( 'BlogCache' );
$Blog->set_setting( 'aggregate_coll_IDs', implode( ',', $BlogCache->load_public() ) );
}
}
// Run the query:
$MainList->query();
$Blog->set_setting( 'aggregate_coll_IDs', $saved_aggregate_state );
// hack end
// Old style globals for category.funcs:
$postIDlist = $MainList->get_page_ID_list();
$postIDarray = $MainList->get_page_ID_array();
16 laibcoms Sep 05, 2009 17:46
sam2kb wrote:
Here's a quick hack if you need cross-blog tags. Good for b2evo 2.x and 3.x ;)
Open inc/items/model/_item.funcs.php and change the following (approx 67)
// pre_dump( $MainList->default_filters ); $MainList->load_from_Request( false ); // pre_dump( $MainList->filters ); // echo '<br/>'.( $MainList->is_filtered() ? 'filtered' : 'NOT filtered' ); //$MainList->dump_active_filters(); // Run the query: $MainList->query(); // Old style globals for category.funcs: $postIDlist = $MainList->get_page_ID_list(); $postIDarray = $MainList->get_page_ID_array();
to
// pre_dump( $MainList->default_filters ); $MainList->load_from_Request( false ); // pre_dump( $MainList->filters ); // echo '<br/>'.( $MainList->is_filtered() ? 'filtered' : 'NOT filtered' ); //$MainList->dump_active_filters(); // hack start $saved_aggregate_state = $Blog->get_setting( 'aggregate_coll_IDs' ); $active_filters = $MainList->get_active_filters(); if( $disp == 'posts' && !empty($active_filters) ) { if( array_diff( $active_filters, array( 'tags', 'posts', 'page' ) ) == array() ) { // All public blogs $BlogCache = & get_Cache( 'BlogCache' ); $Blog->set_setting( 'aggregate_coll_IDs', implode( ',', $BlogCache->load_public() ) ); } } // Run the query: $MainList->query(); $Blog->set_setting( 'aggregate_coll_IDs', $saved_aggregate_state ); // hack end // Old style globals for category.funcs: $postIDlist = $MainList->get_page_ID_list(); $postIDarray = $MainList->get_page_ID_array();
Cool. Works (yeah I only used it now :p I forgot about this).
Thanks thanks. Although it only works for "public blogs". And if I understood the approach, it is similar to making the tag links to defaulting to the installation's base url - /blog/tag/ right?
By any chance, is there a way to hard-code the blogID?
I'll just use this for my personal use since the original idea seems to be more tedious as mentioned earlier/above.
Tnx tnx.
17 sam2kb Sep 05, 2009 17:53
// pre_dump( $MainList->default_filters );
$MainList->load_from_Request( false );
// pre_dump( $MainList->filters );
// echo '<br/>'.( $MainList->is_filtered() ? 'filtered' : 'NOT filtered' );
//$MainList->dump_active_filters();
// hack start
$saved_aggregate_state = $Blog->get_setting( 'aggregate_coll_IDs' );
$active_filters = $MainList->get_active_filters();
if( $disp == 'posts' && !empty($active_filters) )
{
if( array_diff( $active_filters, array( 'tags', 'posts', 'page' ) ) == array() )
{ // Custom blogs
$Blog->set_setting( 'aggregate_coll_IDs', '1,2,3,4,99,77' );
}
}
// Run the query:
$MainList->query();
$Blog->set_setting( 'aggregate_coll_IDs', $saved_aggregate_state );
// hack end
// Old style globals for category.funcs:
$postIDlist = $MainList->get_page_ID_list();
$postIDarray = $MainList->get_page_ID_array();
The hack makes your blog aggregated for a short time. All tags a linked to the current blog.
18 laibcoms Sep 05, 2009 18:02
sam2kb wrote:
// pre_dump( $MainList->default_filters ); $MainList->load_from_Request( false ); // pre_dump( $MainList->filters ); // echo '<br/>'.( $MainList->is_filtered() ? 'filtered' : 'NOT filtered' ); //$MainList->dump_active_filters(); // hack start $saved_aggregate_state = $Blog->get_setting( 'aggregate_coll_IDs' ); $active_filters = $MainList->get_active_filters(); if( $disp == 'posts' && !empty($active_filters) ) { if( array_diff( $active_filters, array( 'tags', 'posts', 'page' ) ) == array() ) { // Custom blogs $Blog->set_setting( 'aggregate_coll_IDs', '1,2,3,4,99,77' ); } } // Run the query: $MainList->query(); $Blog->set_setting( 'aggregate_coll_IDs', $saved_aggregate_state ); // hack end // Old style globals for category.funcs: $postIDlist = $MainList->get_page_ID_list(); $postIDarray = $MainList->get_page_ID_array();
The hack makes your blog aggregated for a short time. All tags a linked to the current blog.
Yep, I noticed. Much preferred that way than the /blog/tag/ method.
And thanks for the hard-code format. I'll play around with it so I can set the hack for the non-public blogs as well.
I have non-public blogs that are in archive mode now, but still generating SEO hehe... And I don't want to re-post all of it on the other blog domain, then edit each post to redirect....
19 sam2kb Sep 05, 2009 18:07
If you need to aggregate all blogs try
$Blog->set_setting( 'aggregate_coll_IDs', '*' );
20 laibcoms Sep 06, 2009 06:42
Hi again.
I'm trying to do something like this:
aggregate the tags for Blogs 1,2,5,7,8,13
aggregate the tags for Blogs 3,10,12
But I don't know which to use, since it looks like $BlogCache and $Blog->ID all end up as "true"
// hack start - tags shows all posts from all public blogs
$saved_aggregate_state = $Blog->get_setting( 'aggregate_coll_IDs' );
$active_filters = $MainList->get_active_filters();
if( $disp == 'posts' && !empty($active_filters) )
{
if( array_diff( $active_filters, array( 'tags', 'posts', 'page' ) ) == array() )
{ // Custom blogs
$BlogCache = & get_Cache( 'BlogCache' );
if( $Blog->ID == ('1' || '2' || '5' || '7' || '8' || '13') )
{
$Blog->set_setting( 'aggregate_coll_IDs', '1,2,5,7,8,13' );
}
else
{
$Blog->set_setting( 'aggregate_coll_IDs', '3,10,12' );
}
}
}
// Run the query:
$MainList->query();
$Blog->set_setting( 'aggregate_coll_IDs', $saved_aggregate_state );
// hack end
21 sam2kb Sep 06, 2009 07:06
if( array_diff( $active_filters, array( 'tags', 'posts', 'page' ) ) == array() )
{ // Custom blogs
$ids = array( 1,2,5,7,8,13 );
if( in_array( $Blog->ID, $ids ) )
{
$Blog->set_setting( 'aggregate_coll_IDs', implode( ',', $ids ) );
}
else
{
$Blog->set_setting( 'aggregate_coll_IDs', '3,10,12' );
}
}
22 laibcoms Sep 06, 2009 07:17
OOh thanks thanks!! That did it :D
Plenty of stuff to learn ^^
23 sam2kb Sep 06, 2009 07:29
No worries :)
24 laibcoms Sep 06, 2009 10:35
sam2kb wrote:
No worries :)
Hi again ^^ I noticed something just now. The pagination links were also affected by the hack.
Here's an example: http://gameshogun.ws/libregame
If you click on the pagination links other than page 1, it shows all posts from the aggregated blogs.
:D
tnx tnx again
25 sam2kb Sep 11, 2009 03:43
replace this
if( array_diff( $active_filters, array( 'tags', 'posts', 'page' ) ) == array() )
with this
if( !empty($MainList->filters['tags']) )
Just fixed it on my client's blog and remembered about this thread :)
26 laibcoms Sep 11, 2009 04:40
sam2kb wrote:
replace this
if( array_diff( $active_filters, array( 'tags', 'posts', 'page' ) ) == array() )
with this
if( !empty($MainList->filters['tags']) )
Just fixed it on my client's blog and remembered about this thread :)
awesome! thanks a bunch! :D
*hands over some Monopoly $*
27 sam2kb Sep 11, 2009 04:58
:D
Should be possible, but will require hacking the files which I do not know.
I remember the Related Posts plugin was modified a bit to make the tags access all of the blogs when the tag is clicked. But that plugin only shows the tags that shows up in the Related Post list.
Maybe this should be a feature part of v3.x?
The Tags when clicked, will check all other blogs that is included in the "Aggregate" field.
So for example, if Blog D is aggregating Blog E (a sub-blog of Blog D), then if one clicks a Tag in Blog D, it also searches posts with that tag in Blog E.
Making the tags aggregate-aware.
;)
Anyway, I hope someone will share a hack :p
Update: Posted a suggestion to make Tags Aggregate-aware -> http://forums.b2evolution.net/viewtopic.php?p=88766