Austin Matzko | 28 Oct 2005 02:08
Picon
Favicon

RE: Highlight current category...

>From: Amanzimtoti <amanzimtoti@...>
>
>
>I edited the list_cats() function slightly - I found this line (line 340 on
>the current nighltly build):
>
>$link = '<a href="'.get_category_link($category->cat_ID).'" ';
>
>and I changed it to this:
>
>if ( $category->cat_name == single_cat_title('', FALSE)) {
>$link = '<a href="'.get_category_link($category->cat_ID).'"
>class="current-cat" ';
>} else {
>$link = '<a href="'.get_category_link($category->cat_ID).'" ';
>}
>

Good idea!  I turned it into a little plugin that I think does the same 
thing:

function wp_current_category_class_attribute ($thelist) {
	if (!('' == single_cat_title('', FALSE))) {
		$category = single_cat_title('', FALSE);
		$string = '/(<a href.*)(>.*' . $category . ')/';
		return preg_replace("$string"," $1 class=\"current-cat\" $2",$thelist);
	}
	else return $thelist;
}
add_filter('list_cats','wp_current_category_class_attribute');
(Continue reading)

Safirul Alredha M.S | 28 Oct 2005 03:01
Picon

Re: UTW in 1.6

UTW doesn't work with the nightly since 2.8.
Eventhough it's not recommended, the only version that works with the latest nightly is UTW version 2.7.7.


On 10/27/05, Matt Boothby <mboothby <at> gmail.com> wrote:
Ultimate Tag Warrior's post-tagging feature seems to be screwing up. The text field has a value of "<div id='error'>" applied to it. I have to delete that and then add my tags. Tags will display fine until I go back to edit a post. My tags are removed and "<div id='error'>" is put in their place. I will have to re-enter my tags if I go back to edit a post. Is it a bug in 1.6 or is my UTW install borked?


_______________________________________________
wp-testers mailing list
wp-testers-sGP8xfnoDwYkvSXg/V30/FaTQe2KTcn/@public.gmane.org
http://lists.automattic.com/mailman/listinfo/wp-testers



_______________________________________________
wp-testers mailing list
wp-testers@...
http://lists.automattic.com/mailman/listinfo/wp-testers
David House | 28 Oct 2005 11:22
Picon
Gravatar

Re: Highlight current category...

On 28/10/05, Austin Matzko <ajmatzko@...> wrote:
> Good idea!  I turned it into a little plugin that I think does the same
> thing:
>
> function wp_current_category_class_attribute ($thelist) {
>         if (!('' == single_cat_title('', FALSE))) {
>                 $category = single_cat_title('', FALSE);
>                 $string = '/(<a href.*)(>.*' . $category . ')/';
>                 return preg_replace("$string"," $1 class=\"current-cat\" $2",$thelist);
>         }
>         else return $thelist;
> }
> add_filter('list_cats','wp_current_category_class_attribute');

I think it probably existed better as a core patch: as we already do
this for pages, it makes sense to do it for cats as well. Amanzimtoti,
if you submitted the core patch with Ryan's suggestions to Trac, it'd
almost certainly get included.

Great work!

--
-David House, dmhouse@..., http://xmouse.ithium.net
Stuart | 28 Oct 2005 11:43
Picon

Re: Highlight current category...

I think the plugin is a good idea for current users of Wordpress, but
it would be good to commit this into the code for future versions. I
tried Ryan's code but got errors so maybe I did something wrong. If
others can come up with a working solution then I will put it into the
Trac system.

Cheers - Stuart.

p.s. changed my Gmail preferences so my name should show up properly
in the from address.

On 10/28/05, David House <dmhouse@...> wrote:
> On 28/10/05, Austin Matzko <ajmatzko@...> wrote:
> > Good idea!  I turned it into a little plugin that I think does the same
> > thing:
> >
> > function wp_current_category_class_attribute ($thelist) {
> >         if (!('' == single_cat_title('', FALSE))) {
> >                 $category = single_cat_title('', FALSE);
> >                 $string = '/(<a href.*)(>.*' . $category . ')/';
> >                 return preg_replace("$string"," $1 class=\"current-cat\" $2",$thelist);
> >         }
> >         else return $thelist;
> > }
> > add_filter('list_cats','wp_current_category_class_attribute');
>
> I think it probably existed better as a core patch: as we already do
> this for pages, it makes sense to do it for cats as well. Amanzimtoti,
> if you submitted the core patch with Ryan's suggestions to Trac, it'd
> almost certainly get included.
>
> Great work!
>
> --
> -David House, dmhouse@..., http://xmouse.ithium.net
> _______________________________________________
> wp-testers mailing list
> wp-testers@...
> http://lists.automattic.com/mailman/listinfo/wp-testers
>
rich boakes | 28 Oct 2005 12:05

Re: Highlight current category...

Stuart wrote:
> I think the plugin is a good idea for current
>  users of Wordpress, but it would be good to
> commit this into the code for future versions.

May I suggest that when adding this, a
"decorate_category" hook is added so that other
plugins can intercept or  add to the default
decoration.

Rich
--
http://boakes.org
David House | 28 Oct 2005 12:10
Picon
Gravatar

Re: Highlight current category...

On 28/10/05, Stuart <amanzimtoti@...> wrote:
> I think the plugin is a good idea for current users of Wordpress, but
> it would be good to commit this into the code for future versions. I
> tried Ryan's code but got errors so maybe I did something wrong. If
> others can come up with a working solution then I will put it into the
> Trac system.

Patch attached.

--
-David House, dmhouse@..., http://xmouse.ithium.net
Attachment (highlight-current-cat.diff): application/octet-stream, 1340 bytes
_______________________________________________
wp-testers mailing list
wp-testers@...
http://lists.automattic.com/mailman/listinfo/wp-testers
Stuart | 28 Oct 2005 12:42
Picon

Re: Highlight current category...

Thanks David!

I've raised a ticket in the Trac system - number 1800 -
http://trac.wordpress.org/ticket/1800

This is the first time I've used Trac so please have a look at it and
see if it is ok.

Cheers - Stuart.

On 10/28/05, David House <dmhouse@...> wrote:
> On 28/10/05, Stuart <amanzimtoti@...> wrote:
> > I think the plugin is a good idea for current users of Wordpress, but
> > it would be good to commit this into the code for future versions. I
> > tried Ryan's code but got errors so maybe I did something wrong. If
> > others can come up with a working solution then I will put it into the
> > Trac system.
>
> Patch attached.
>
> --
> -David House, dmhouse@..., http://xmouse.ithium.net
>
>
> _______________________________________________
> wp-testers mailing list
> wp-testers@...
> http://lists.automattic.com/mailman/listinfo/wp-testers
>
>
>
>
David House | 28 Oct 2005 13:02
Picon
Gravatar

Re: Highlight current category...

On 28/10/05, Stuart <amanzimtoti@...> wrote:
> This is the first time I've used Trac so please have a look at it and
> see if it is ok.

Looks good. Anyone want to test this? Then we can poke a bug gardener
and get it in line for a commit.

--
-David House, dmhouse@..., http://xmouse.ithium.net
Stuart | 28 Oct 2005 13:08
Picon

Re: Highlight current category...

Needless to say, I've tested it. I removed my original hack and made
the changes in the diff file and it works a treat.

On 10/29/05, David House <dmhouse@...> wrote:
> On 28/10/05, Stuart <amanzimtoti@...> wrote:
> > This is the first time I've used Trac so please have a look at it and
> > see if it is ok.
>
> Looks good. Anyone want to test this? Then we can poke a bug gardener
> and get it in line for a commit.
>
> --
> -David House, dmhouse@..., http://xmouse.ithium.net
> _______________________________________________
> wp-testers mailing list
> wp-testers@...
> http://lists.automattic.com/mailman/listinfo/wp-testers
>
Dave W | 29 Oct 2005 17:31
Picon

Import

I havn't been following the digests lately, has anyone had any problems with the importer. I keep getting this error:
Fatal error: Call to undefined function curl_init() in C:\Program Files\apache group\Apache2\htdocs\wptest\wp-admin\import\blogger.php on line 68

_______________________________________________
wp-testers mailing list
wp-testers@...
http://lists.automattic.com/mailman/listinfo/wp-testers

Gmane