NP_LatestComments 1.6

Post your new plugins here!
creativebin
Posts: 3
Joined: Fri Sep 01, 2006 10:57 pm

Postby creativebin » Fri Sep 01, 2006 11:32 pm

Code: Select all

%l == url to comment


When I click on the URLs, they don't take me directly to the comments. Instead, it takes me to the top of the item. It seems that the URLs are not being generated correctly. Is there a way to fix this?
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 Sep 05, 2006 10:31 am

creativebin wrote:

Code: Select all

%l == url to comment


When I click on the URLs, they don't take me directly to the comments. Instead, it takes me to the top of the item. It seems that the URLs are not being generated correctly. Is there a way to fix this?

Hi,

Did you check form the source what code it's generated? I suspect no link is there..... for some reason.
User avatar
Kanguhru
Posts: 114
Joined: Thu Jun 09, 2005 4:31 pm

Postby Kanguhru » Fri Dec 08, 2006 5:37 pm

How do we change the date/time format of this plugin please ?

Thx !
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 Dec 11, 2006 3:40 pm

Kanguhru wrote:How do we change the date/time format of this plugin please ?

Thx !

Quick answer is no, you can't..... It is the date format from MySQL it's using..... but I think you can sort of change that from MySQL??? some code hack needed for sure. :cry:
Last edited by admun on Wed Dec 13, 2006 3:50 pm, edited 1 time in total.
User avatar
Kanguhru
Posts: 114
Joined: Thu Jun 09, 2005 4:31 pm

Postby Kanguhru » Mon Dec 11, 2006 7:20 pm

admun wrote:
Kanguhru wrote:How do we change the date/time format of this plugin please ?

Thx !

Quick answer is no, you can't..... It is the date format from MySQL it's using..... but I think you can sort of chnage that from MySQL??? some code hack needed for sure. :cry:


Thx :(
User avatar
Ma.rkus.nl
Posts: 82
Joined: Thu Aug 31, 2006 4:24 pm
Location: The Netherlands
Contact:

Postby Ma.rkus.nl » Mon Dec 11, 2006 8:52 pm

Try changing line 163 of NP_LatestComments.php:

Code: Select all

$out = str_replace("%t", $ctime, $out);

into

Code: Select all

$out = str_replace("%t", strftime("yourtimeformat", strtotime($ctime)), $out);

using time variables as desired for yourtimeformat.
¯¯¯¸(¤)¸¯¯¯
Shi
Posts: 83
Joined: Thu Jan 18, 2007 3:05 am
Contact:

Postby Shi » Sat Feb 03, 2007 5:17 am

I've modified the plugin so it can change the date format.

If you want to upgrade, uninstall the previous installation first.

Download here.
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 Feb 12, 2007 10:39 pm

Shi wrote:I've modified the plugin so it can change the date format.

If you want to upgrade, uninstall the previous installation first.

Download here.

nice thanks!
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Thu Mar 01, 2007 10:37 pm

Hey, Shi, the link for downloading the latest version doesn't work at your site (in item 104), it should be this: NP_LatestComments v1.71.

I've left a comment at your site as well.
User avatar
Smithers
Posts: 39
Joined: Thu Jun 23, 2005 10:10 am
Location: Zaanstad, Netherlands
Contact:

Variables

Postby Smithers » Fri Mar 16, 2007 11:29 am

Hi There,

since I'm not yet very familiar with writing plugins, your plugin is a great way for me to learn, also since I'm trying to create the same sort of last-comment-functioning for the NP_Gallery plugin.
I'm trying to understand how your plugin is working and I'm a bit confused about the variables.
You say: template formatting: %u (user), %c (comment), %t (time), %p (item)
I've searched documentation but can't find anything about these 'short-hand-one-character' variables. Are these standard Nucleus variables or did I overlook the part where they are defined?
User avatar
Smithers
Posts: 39
Joined: Thu Jun 23, 2005 10:10 am
Location: Zaanstad, Netherlands
Contact:

Variables

Postby Smithers » Fri Mar 16, 2007 11:39 am

oops...never mind, I've got so obsessed by the php script, that I never thought of looking at the options page, where they are defined.
Sorry for that..

I've finished modifying the plugin for use with NP_Gallery. It's an additional plugin and it would be nicer if the two were somehow merged, but since I'm no hardcore coder, I'm fine wth this solution for now..:)
Available here
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 May 07, 2007 3:56 pm

I am reviewing some code, noticed that mysql_query() is used in doSkinVar, I'd recommand to use sql_query() because:
1) there is a benchmark function build in that hook to sql_query()
2) sql_* API might be enhanced to support other SQL engine (ie SQLLite)

cheers,
User avatar
tlucente
Posts: 82
Joined: Wed May 03, 2006 2:30 am
Location: Lima, Ohio, United States
Contact:

How do we download this?

Postby tlucente » Wed Jan 02, 2008 12:34 am

How do we download this? The link to v. 1.83 doesn't appear to work. :(

Thanks
Freedom is a gift from Providence, not a political grant from government.
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Re: How do we download this?

Postby admun » Wed Jan 02, 2008 4:44 pm

tlucente wrote:How do we download this? The link to v. 1.83 doesn't appear to work. :(

Thanks

hum... I only have v1.6 @ http://edmondhui.homeip.net/nudn?file=2 ... s_v1_6.zip
User avatar
admun
Nucleus Guru
Nucleus Guru
Posts: 4088
Joined: Mon Oct 20, 2003 2:57 am
Location: San Francisco, CA, USA
Contact:

Re: How do we download this?

Postby admun » Wed Jan 02, 2008 4:48 pm

admun wrote:
tlucente wrote:How do we download this? The link to v. 1.83 doesn't appear to work. :(

Thanks

hum... I only have v1.6 @ http://edmondhui.homeip.net/nudn?file=2 ... s_v1_6.zip

The latest I can find is v1.71a @ http://nucleus-plugins.googlecode.com/s ... mments.php
User avatar
Red Dalek
Posts: 212
Joined: Sun Dec 12, 2004 10:39 pm
Location: London, UK
Contact:

Postby Red Dalek » Wed Jan 02, 2008 4:48 pm

I'm using v1.83 - is there anywhere I should upload it?

Edit - oh I'll just put it up: http://dominicself.co.uk/downloads/NP_LatestComments.zip
User avatar
tlucente
Posts: 82
Joined: Wed May 03, 2006 2:30 am
Location: Lima, Ohio, United States
Contact:

Postby tlucente » Wed Jan 02, 2008 7:14 pm

Red Dalek wrote:I'm using v1.83 - is there anywhere I should upload it?

Edit - oh I'll just put it up: http://dominicself.co.uk/downloads/NP_LatestComments.zip


Thanks Red Dalek. Just what I was looking for.

I shouldn't have upgraded, though. Now the link is not taking me to that person's comment, just to the comment page. Not sure why. Anyone else having that problem?
Freedom is a gift from Providence, not a political grant from government.
User avatar
Red Dalek
Posts: 212
Joined: Sun Dec 12, 2004 10:39 pm
Location: London, UK
Contact:

Postby Red Dalek » Wed Jan 02, 2008 7:17 pm

Oh, it's because I edited my version (sorry!) to work with my blog:

Code: Select all

         $out = str_replace("%l", $IndexURL.$itemlink."#c".$row->cnumber, $out);


Change that line back to

Code: Select all

         $out = str_replace("%l", $IndexURL.$itemlink."#".$row->cnumber, $out);


and it should be alright.

(I've now made this change in the download... :))
User avatar
tlucente
Posts: 82
Joined: Wed May 03, 2006 2:30 am
Location: Lima, Ohio, United States
Contact:

Postby tlucente » Wed Jan 02, 2008 7:24 pm

Red Dalek wrote:Oh, it's because I edited my version (sorry!) to work with my blog:

Code: Select all

         $out = str_replace("%l", $IndexURL.$itemlink."#c".$row->cnumber, $out);


Change that line back to

Code: Select all

         $out = str_replace("%l", $IndexURL.$itemlink."#".$row->cnumber, $out);


and it should be alright.


Perfect! Thanks! :D
Freedom is a gift from Providence, not a political grant from government.
Runetek
Posts: 2
Joined: Wed Feb 08, 2006 11:06 pm

LatestComments download link

Postby Runetek » Sun Jan 06, 2008 10:59 am

Hi all,
LatestComments download link on http://wakka.xiffy.nl/latestcomments is not working...

Thx for checking!

Return to “Plugin Development”