NP_TechnoratiTags (v0.9.x, now a functional tagging system)

Post your new plugins here!
digilee
Posts: 543
Joined: Thu Jan 19, 2006 11:37 am

Postby digilee » Sat May 05, 2007 9:33 pm

Hey!
Works excellently.
Thanks loads.

Now ... If you could produce a plugin that tells me next weeks lottery numbers ...

:D
User avatar
cmyk
Posts: 35
Joined: Wed Jan 31, 2007 7:35 pm
Contact:

Wish list

Postby cmyk » Thu May 17, 2007 1:38 pm

Hello admun,

Great job for thi plug,…

If I may give some suggestion for the futur devellopement on this plug...

add the possibility at the end of the post to select already used tag in the blog like this if in a post you have write like this "Videos" and an other time like this "video" you will have 2 seperate tag in your localcloud...

when you clik in your local cloud a tag youer ach the tags page with the list result can we have directly the entire post not a list ...

and for the end just un newbie question
in your local cloud is it possibil to add the target="_blank" when you click on a tag…?

thank you for your work ... this plug is very useful...!
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Re: Wish list

Postby admun » Thu May 17, 2007 2:42 pm

cmyk wrote:Hello admun,

add the possibility at the end of the post to select already used tag in the blog like this if in a post you have write like this "Videos" and an other time like this "video" you will have 2 seperate tag in your localcloud...

There is already a tag auto complete feature to allow you to see existing tags.... is that what you mean?

when you clik in your local cloud a tag youer ach the tags page with the list result can we have directly the entire post not a list ...

and for the end just un newbie question
in your local cloud is it possibil to add the target="_blank" when you click on a tag…?

You can just remove the tag to see the list, see http://edmondhui.homeip.net/blog/tags/
digilee
Posts: 543
Joined: Thu Jan 19, 2006 11:37 am

Postby digilee » Mon Jul 09, 2007 9:38 pm

Back to this one again!

I've made a fresh instal of the latest:
Nucleus
FancyURL2
Technorati tags

As you know, I have had trouble with these before and I can't seem to get everything working as I want.
What I want is a cloud to show without '+' (yes I have checked the pref) and for the tags skin to display results. Seems I can get either one or the other, just not both.

I can either get the cloud to NOT display the '+' 0.9.5 - but then the results are not shown
OR the results are displayed but the '+' shows in the cloud (0.8.4).

I have tried every 0.9.x iteration that I could find with the same results.

Surely somebody must have this working correctly?

Thanks in advance.
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Mon Jul 09, 2007 9:44 pm

digilee wrote:Back to this one again!

I've made a fresh instal of the latest:
Nucleus
FancyURL2
Technorati tags

As you know, I have had trouble with these before and I can't seem to get everything working as I want.
What I want is a cloud to show without '+' (yes I have checked the pref) and for the tags skin to display results. Seems I can get either one or the other, just not both.

I can either get the cloud to NOT display the '+' 0.9.5 - but then the results are not shown
OR the results are displayed but the '+' shows in the cloud (0.8.4).

I have tried every 0.9.x iteration that I could find with the same results.

Surely somebody must have this working correctly?

Thanks in advance.

yeah... indeed it's still one mystery... I am running FancierURL2 myself now and I do not see this problem on my setup..... all I have to do is change the option and I have both + display as ' ' and FURL2 work for me..... you can check my blog and see it working.....

We can try to do more investigation.
digilee
Posts: 543
Joined: Thu Jan 19, 2006 11:37 am

Postby digilee » Mon Jul 09, 2007 9:52 pm

I want to suggest something to all those that have problems, and I think this works generally in life as well.

You have a problem?
The solution:
1, spend all day trying to solve it (you have to do this first or it won't work)
2, give up
3, post a request for answers on a forum
4, this is the crucial part - within 2 minutes of posting you have to have a brainwave/ bright idea/ surge of thought
5, try the solution that you just thought of and BINGO - it works!

Or in plain English ... I installed 0.9.2 and found that I hadn't changed the file 'tags' to 'tags.php' - changed it back and now it works!

FanierURL2 - 0.3 & Technoratitags - 0.9.2 for me, work together!
The only thing I had to do, besides follow the instructions, was to change this line in techtags:

echo "<a href=\"" . $blog->getURL() . "/tags.php?tag=$curtag\"

to

echo "<a href=\"" . $blog->getURL() . "tags.php?tag=$curtag\" - just remove the / before tags.php
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Mon Jul 09, 2007 9:56 pm

good for you. finally it works.

digilee wrote:I want to suggest something to all those that have problems, and I think this works generally in life as well.

You have a problem?
The solution:
1, spend all day trying to solve it (you have to do this first or it won't work)
2, give up
3, post a request for answers on a forum
4, this is the crucial part - within 2 minutes of posting you have to have a brainwave/ bright idea/ surge of thought
5, try the solution that you just thought of and BINGO - it works!

Or in plain English ... I installed 0.9.2 and found that I hadn't changed the file 'tags' to 'tags.php' - changed it back and now it works!

FanierURL2 - 0.3 & Technoratitags - 0.9.2 for me, work together!
The only thing I had to do, besides follow the instructions, was to change this line in techtags:

echo "<a href="" . $blog->getURL() . "/tags.php?tag=$curtag"

to

echo "<a href="" . $blog->getURL() . "tags.php?tag=$curtag" - just remove the / before tags.php
digilee
Posts: 543
Joined: Thu Jan 19, 2006 11:37 am

Postby digilee » Mon Jul 09, 2007 9:58 pm

Yes! :D

Now I just have to try this on all the other sites where I use them!

One thing, (and I have been through all the past posts but no joy), how do I get the results displayed with latest post first?
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Mon Jul 09, 2007 11:15 pm

digilee wrote:Yes! :D

Now I just have to try this on all the other sites where I use them!

One thing, (and I have been through all the past posts but no joy), how do I get the results displayed with latest post first?

you will have to hack the code a bit... right now it's sort by post id.... see the code in doSkinVar() around line 662
digilee
Posts: 543
Joined: Thu Jan 19, 2006 11:37 am

Postby digilee » Mon Jul 09, 2007 11:20 pm

There isn't a line 662 or doSkinVar()

I'm assuming it's something to do with this:
// **** need better than tags like %% ??? *****
$query = "select t.itemid from " . $this->tablename . " as t, ". sql_table('item')
. " as i where tags like \"%" . $tag . "%\" and t.itemid = i.inumber";
if ($blogid == "current") {
$query .= " and i.iblog = " . $blog->getID();
}
else if (is_numeric($blogid)) {
$query .= " and i.iblog = " . $blogid;
}

and I have tried using idate or itime but this only produces errors.
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Mon Jul 09, 2007 11:56 pm

digilee wrote:There isn't a line 662 or doSkinVar()

I'm assuming it's something to do with this:
// **** need better than tags like %% ??? *****
$query = "select t.itemid from " . $this->tablename . " as t, ". sql_table('item')
. " as i where tags like "%" . $tag . "%" and t.itemid = i.inumber";
if ($blogid == "current") {
$query .= " and i.iblog = " . $blog->getID();
}
else if (is_numeric($blogid)) {
$query .= " and i.iblog = " . $blogid;
}

and I have tried using idate or itime but this only produces errors.

I am looking at this: $query .= " order by i.inumber";

in stead of "i.number", I think it's "i.itime"
digilee
Posts: 543
Joined: Thu Jan 19, 2006 11:37 am

Postby digilee » Tue Jul 10, 2007 12:40 am

Tried that, no joy.

I then looked back at a copy of .8.4 that works to see how that is written and found this:

$query = "select t.itemid, i.ititle, i.itime from " . $this->tablename . " as t, ". sql_table('item') . " as i where tags like \"%" . $tag . "%\" and t.itemid = i.inumber order by i.itime desc";

so I tried that but all I got was an error:

mySQL error with query select t.itemid, i.ititle, i.itime from nucleus_plug_technoratitags as t, nucleus_item as i where tags like "%video%" and t.itemid = i.inumber order by i.itime desc and i.iblog = 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and i.iblog = 1' at line 1

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/me/public_html/domain/nucleus/plugins/NP_TechnoratiTags.php on line 559

line 559 is - while ($row = mysql_fetch_object($res)){
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Tue Jul 10, 2007 12:59 am

digilee wrote:Tried that, no joy.

I then looked back at a copy of .8.4 that works to see how that is written and found this:

$query = "select t.itemid, i.ititle, i.itime from " . $this->tablename . " as t, ". sql_table('item') . " as i where tags like "%" . $tag . "%" and t.itemid = i.inumber order by i.itime desc";

so I tried that but all I got was an error:

mySQL error with query select t.itemid, i.ititle, i.itime from nucleus_plug_technoratitags as t, nucleus_item as i where tags like "%video%" and t.itemid = i.inumber order by i.itime desc and i.iblog = 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and i.iblog = 1' at line 1

Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/me/public_html/domain/nucleus/plugins/NP_TechnoratiTags.php on line 559

line 559 is - while ($row = mysql_fetch_object($res)){


try change
$query .= " order by i.inumber";
to
$query .= " order by i.itime desc";
digilee
Posts: 543
Joined: Thu Jan 19, 2006 11:37 am

Postby digilee » Tue Jul 10, 2007 1:07 am

changing

" as i where tags like \"%" . $tag . "%\" and t.itemid = i.inumber";

to

" as i where tags like \"%" . $tag . "%\" and t.itemid = i.itime";

gets rid of the error, but then we're back to the tags skin showing, but no results.
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Tue Jul 10, 2007 1:15 am

digilee wrote:changing

" as i where tags like "%" . $tag . "%" and t.itemid = i.inumber";

to

" as i where tags like "%" . $tag . "%" and t.itemid = i.itime";

gets rid of the error, but then we're back to the tags skin showing, but no results.

No.. this will not work because it is incorrect.
digilee
Posts: 543
Joined: Thu Jan 19, 2006 11:37 am

Postby digilee » Tue Jul 10, 2007 1:16 am

D'OH!

:lol:

If you want, I can leave this as is for now, it's almost perfect, and wait for the next release.

One other thing that you might want to look at, but don't worry too much ...

If a tag has a +, in the cloud and below the post the + doesn't show (as you want) but in the results title it does show.
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Tue Jul 10, 2007 1:17 am

admun wrote:
digilee wrote:changing

" as i where tags like "%" . $tag . "%" and t.itemid = i.inumber";

to

" as i where tags like "%" . $tag . "%" and t.itemid = i.itime";

gets rid of the error, but then we're back to the tags skin showing, but no results.

No.. this will not work because it is incorrect.

try change line 656 from

$query .= " order by i.inumber";

to
$query .= " order by i.inumber desc";
digilee
Posts: 543
Joined: Thu Jan 19, 2006 11:37 am

Postby digilee » Tue Jul 10, 2007 1:32 am

Ah, wait a minute ... we're at cross versions here. I was using 0.9.3 as this was the only version that I could get working properly (both space instead of + in the cloud and results showing on the results page.

You, I think, are talking about 0.9.5

I reinstalled it but now I am back to + not showing in the cloud (good) but no results showing on the results page/ skin (bad).
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Postby admun » Tue Jul 10, 2007 1:38 am

digilee wrote:Ah, wait a minute ... we're at cross versions here. I was using 0.9.3 as this was the only version that I could get working properly (both space instead of + in the cloud and results showing on the results page.

You, I think, are talking about 0.9.5

I reinstalled it but now I am back to + not showing in the cloud (good) but no results showing on the results page/ skin (bad).

hum.... 0.9.3 is when the FancyURL support changed.....

I think the SQL query is similar in 0.9.3.... you might be able to change it the same way
digilee
Posts: 543
Joined: Thu Jan 19, 2006 11:37 am

Postby digilee » Tue Jul 10, 2007 1:39 am

Much appreciated for all your help.

I'll leave it at 0.9.3 for now and tweak it a bit to what I want.

Return to “Plugin Development”