NP_Ordered 1.0 Set order of items and categories

Post your new plugins here!
shunter
Posts: 2
Joined: Mon Jan 29, 2007 5:04 pm

Postby shunter » Mon Jan 29, 2007 10:36 pm

That's all correct, ftruscot.
I'll email you the screenshot and code.

Thanks for your help.
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Wed Feb 21, 2007 10:42 pm

released version 1.21 today. Fixes the bug that shunter was having above. If updating from 1.2, just replace the old files. If updating from a pre-1.2 version, you must uninstall the old version, then install the new version.

download here: http://www.iai.com/sandbox/item/48#ordered

* 1.21 - 02/21/2007 -
* fix in ordered/index.php, to be explicit about action parameter location (use $thispage). Was failing in certain environments.
doktorrr
Posts: 70
Joined: Fri Nov 24, 2006 7:00 pm
Contact:

Postby doktorrr » Sun Mar 18, 2007 6:46 pm

I have installed NP_ordered in my blog and everything work perfect,until today.I have to make another one category in my settings,but new category isnt show in list of categories in my blog and I cant open admin section in plugin ordered.
Other things like ordered items work fine.
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Sun Mar 18, 2007 9:27 pm

If you are using the <%Ordered(categorylist,ordered,templatename)%> tag to display your category list, you will need to assign an order to each new category before they will be displayed. To do this you will need to open the admin page for NP_Ordered (either linked in the left navigation bar, near the bottom, or from the Plugins Management page, click the admin link in the row for NP_Ordered).

Once you open the NP_Ordered admin page, you will need to select a blog from the dropdown list then click the Go button. Now select the Category tab and set the order for the category you just added.

I'm not sure what you mean by "I can't open admin section in plugin ordered". Do you get an error? Can you not find the link to the admin section? More details please.
doktorrr
Posts: 70
Joined: Fri Nov 24, 2006 7:00 pm
Contact:

Postby doktorrr » Fri Mar 23, 2007 8:35 pm

When I click on admin in NP_Ordered plugin in left navigation bar,I have open main page on my bolg,but only half with some error in latestposts.
doktorrr
Posts: 70
Joined: Fri Nov 24, 2006 7:00 pm
Contact:

Postby doktorrr » Fri Mar 23, 2007 8:39 pm

Today I find everything is OK.I am not touch enything.Its look like problem solved by itself:)
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Thu May 10, 2007 10:54 pm

Released v 1.22 today. Some minor bug fixes. Mostly to implement ticket system in preparation for NucleusCMS v 3.3.

download
User avatar
Leng
Nucleus Guru
Nucleus Guru
Posts: 2827
Joined: Sun Sep 19, 2004 2:34 am
Location: Australia
Contact:

Request: general sort methods

Postby Leng » Sun May 20, 2007 11:33 am

Was updating the Skin Translations section of the skins site today and tried to find an option to get NP_Ordered to sort items in a given category alphabetically by title...and couldn't. :(

I settled for assigning an order number to each letter of the alphabet (e.g. A=1, ..., Z=26) but within each item with an order number, it seems to default to post time as the sort order, e.g. "Andreas 06", "Astuff" and "Andreas 01" (in order of item date) instead of "Andreas 01", "Andreas 06" and "Astuff".

Any chance of general sort methods (ascending/descending, by title, by date, etc) being added in the future?
Image
deborahlau.com | To-Do List
Questions? See the FAQ, read the docs, or browse our plugins!!
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Sun May 20, 2007 12:53 pm

You're right, Leng, that it only sorts the items by the designated numerical orders and then by time. I basically wrote this for some nearly 100% static sites where I wanted the items and categories to show in a specific order. I'll take a look to see if I can bend the special queries to allow for other ordering (title/date, etc...)
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Mon May 21, 2007 9:23 pm

Leng, it wasn't that hard to set something up for sorting as you suggested. I've emailed you a test version of the plugin (version 1.23.a01). If you could try it and give any feedback or suggestions before I publish, that would be great. Thanks. Instructions are included in the email.
User avatar
Leng
Nucleus Guru
Nucleus Guru
Posts: 2827
Joined: Sun Sep 19, 2004 2:34 am
Location: Australia
Contact:

Postby Leng » Tue May 22, 2007 3:15 pm

ftruscot wrote:Leng, it wasn't that hard to set something up for sorting as you suggested. I've emailed you a test version of the plugin (version 1.23.a01). If you could try it and give any feedback or suggestions before I publish, that would be great. Thanks. Instructions are included in the email.

Thanks for the quick update! Email was received and the test version was tried out. Please see my reply for the results! :D
Image

deborahlau.com | To-Do List
Questions? See the FAQ, read the docs, or browse our plugins!!
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Tue May 22, 2007 10:25 pm

Update to version 1.23. Incorporates Leng's suggestion to allow sorting of items by time (ascending or descending) or by title (ascending or descending). See the help file for details. Also can list your categories by name or description.

Download at http://www.iai.com/sandbox/item/48#ordered
Jattto
Posts: 7
Joined: Wed May 09, 2007 8:55 pm
Location: Brazil

Problems...

Postby Jattto » Mon May 28, 2007 2:07 am

Hi!

Well... I've used this plug-in to order the items on the categories list of the way I'd like and I've got it. But there is a problem: I'd like just one category be showed in the main page, so I've used this plug-in to do it - then excluding the others (setting "No" to all categories but the only one I want to be in the main page of the blog - in the plug-in option that allows it). But it doesn't work!!! I don't know what is happening... does somebody know?

Thank you in advance.
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Mon May 28, 2007 2:46 am

Could you post a link, please.

I assume you want the items from just one category to appear on the main page. You have done the right thing in setting the "appear on the main page" option for each category. Now though you need to replace the <%blog(templatename,amount)%> skin variable in the Main Index part of your skin with <%Ordered(blog,all,templatename,amount)%>. So for instance, if you are using the default skin, replace <%blog(default/index,10)%> with <%Ordered(blog,all,default/index,10)%>.

This is more useful when you want to exclude just one, or a few, category's items from the main page. If you simply want to show a single category on the main page, replace

Code: Select all

<%blog(default/index,10)%>
with

Code: Select all

<%if(category)%>
   <%blog(default/index,10)%>
<%else%>
   <%blog(default/index,10,SpecialCat)%>
<%endif%>
where SpecialCat is the name of the category you want to display on the main page.
Jattto
Posts: 7
Joined: Wed May 09, 2007 8:55 pm
Location: Brazil

Postby Jattto » Mon May 28, 2007 3:11 am

ftruscot wrote:Could you post a link, please.

Of course, I've forgotten...
http://pet.inf.ufsm.br/nuc_teste/nucleus3.24/

ftruscot wrote:I assume you want the items from just one category to appear on the main page.

Yes! Exactly!!! \o/

ftruscot wrote:You have done the right thing in setting the "appear on the main page" option for each category. Now though you need to replace the <%blog(templatename,amount)%> skin variable in the Main Index part of your skin with <%Ordered(blog,all,templatename,amount)%>. So for instance, if you are using the default skin, replace <%blog(default/index,10)%> with <%Ordered(blog,all,default/index,10)%>.

I think so that's the problem! :O

ftruscot wrote:This is more useful when you want to exclude just one, or a few, category's items from the main page. If you simply want to show a single category on the main page, replace

Code: Select all

<%blog(default/index,10)%>
with

Code: Select all

<%if(category)%>
   <%blog(default/index,10)%>
<%else%>
   <%blog(default/index,10,SpecialCat)%>
<%endif%>
where SpecialCat is the name of the category you want to display on the main page.

Wowwwwww! Thank you so much... I've ended to apply this code and it's fixed my problem!!! I have no words to thank you! :D:D:D

By what I can realize, you are a Nucleus' expert! It's great to have your help. So thanks again! ;)
Jattto
Posts: 7
Joined: Wed May 09, 2007 8:55 pm
Location: Brazil

Postby Jattto » Fri Jun 22, 2007 8:26 pm

Hi again!

So now I have another problem to fix. I've got to order the categories list, changing code on the sidebar.inc. Now I need know which code to change to order the items (posts) and where (what file? another inc file? what of them?). Might you help me? Thanks in advance.
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Fri Jun 22, 2007 9:47 pm

To order the items you need to use the blog form of the Ordered skinvar in place of the blog skinvar in the Main Index part of your skin. If you have the following in your Main Index skin part (from the previous post):

Code: Select all

<%if(category)%>
   <%blog(default/index,10)%>
<%else%>
   <%blog(default/index,10,SpecialCat)%>
<%endif%>
replace it with:

Code: Select all

<%if(category)%>
   <%Ordered(blog,all,default/index,10)%>
<%else%>
   <%Ordered(blog,all,default/index,10,SpecialCat)%>
<%endif%>

Now it will order the items according to the orders you set for each item.
Jattto
Posts: 7
Joined: Wed May 09, 2007 8:55 pm
Location: Brazil

Postby Jattto » Fri Jun 22, 2007 10:40 pm

Ow... thank you again! I've fixed the problem. ;)
I'm still confused about how to use the Nucleus' features and its available plug-ins, but time by time I'm learning. ;)

Really thank you!
ftruscot
Nucleus Guru
Nucleus Guru
Posts: 7430
Joined: Wed Feb 22, 2006 6:19 pm
Location: Massachusetts
Contact:

Postby ftruscot » Wed Nov 21, 2007 10:42 pm

Released v 1.25 today. Download here: http://www.iai.com/sandbox/item/48/#ordered

Basically, it adds random sorting to the types of custom sorting options. Also, can display just one single item, by itemid, anywhere in your blog. See the supplied help file for more details on using the new options.
Yo-gourt
Posts: 30
Joined: Thu Jan 18, 2007 11:15 pm
Location: Paris

Postby Yo-gourt » Sun Dec 16, 2007 2:46 pm

I have a problem with the plugin...
I run a 3.24 nucleus with 1.25 ordered. Ahen a want to enter in the admin interface, i have an error "You are not logged in". I must log into the main site page, then go to administration. Direct log in adminitration page doesn't work.
It's a little bit annoying... Multiple catégories do the same thing, therefore others plugins work very well.

thanks a lot :)

Return to “Plugin Development”