Plugin:  Entries List (was Category Posts)
Posted: 06 June 2008 04:02 PM   [ Ignore ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
Joined  02-02-2007

Hi,

I would like to present to your attention a new plugin: Entries List.

This plugin allows you to find titles, url_titles, weblog names, weblog short names, weblog urls and category names of all entries posted to certain weblogs and/or to certain categories.

PARAMETERS:

1) category - Optional. Allows you to specify category id number
(the id number of each category is displayed in the Control Panel).
You can stack categories using pipe character to get entries
with any of those categories, e.g. category=“3|6|8”. Or use “not”
(with a space after it) to exclude categories, e.g. category=“not 4|5|7”.

2) weblog - Optional. Allows you to specify weblog name.
You can use the pipe character to get entries from any of those
weblogs, e.g. weblog=“weblog1|weblog2|weblog3”.
Or you can add the word “not” (with a space after it) to exclude weblogs,
e.g. weblog=“not weblog1|weblog2|weblog3”.

At least one out of “category” and “weblog” parameters must be defined.

3) sort - Optional. Allows you to specify sort order. Entries are sorted by date.
Sort order can be ascending (sort=“asc”) or descending (sort=“desc”).
If this parameter is not defined, then entries are sorted ascendingly
for each weblog separately, if defined, then all entries are sorted
together.

4) site - Optional. Allows you to specify site id number.
You can stack site id numbers using pipe character to get entries
from any of those sites, e.g. site=“1|3”. Or use “not”
(with a space after it) to exclude sites, e.g. site=“not 1|2”.

5) limit - Optional. Allows you to specify number of entries to be displayed.

6) invalid_input - Optional. Accepts two values: “alert” and “silence”.
Default value is “silence”. If the value is “alert”, then in cases when some
parameter’s value is invalid plugin exits and PHP alert is being shown;
if the value is “silence”, then in cases when some parameter’s value
is invalid plugin finishes its work without any alert being shown.
Set this parameter to “alert” for development, and to “silence” - for deployment.

7) aliases_only - Optional. Accepts two values: “yes” and “no”. Default value is “no”.
If the value is “yes”, then variables {title}, {url_title} and {category_name} will not be parsed by the plugin; only their aliases will be parsed. If the value is “no”, then
both variables {title}, {url_title} and {category_name} and their aliases will be parsed. Set this parameter to “yes” and use only aliases if you include {exp:entries_list} tag inside some other tag (e.g exp:weblog:entries) which parses these variables.

8) on_failure - Optional. Allows you to specify what exp:entries_list tag
should output in case no entry was found. By default the tag in such case
will output nothing. If you set some string as the value of this parameter,
then that string will be outputted. If you set “tagdata” as the value of
this parameter, then the tag will output unmodified tagdata.

VARIABLES:

1) {weblog_name} - outputs the name of the weblog into which an entry was
posted.

2) weblog_short_name - outputs short name of the weblog into which an entry was
posted.

3) {weblog_url} - outputs weblog url as specified in weblog preferences.

4) {url_title} - outputs url title of the entry. Alias of this variable is {entries_list_url_title}.

5) {category_name} - outputs category name into which entry was posted.
(Only those category names will be displayed which satisfy condition
set in “category” parameter.) Alias of this variable is {entries_list_category_name}.

6) {title} - outputs title of entry. Alias of this variable is {entries_list_title}.

7) {entry_id} - outputs entry id number of the entry. Alias of this variable
is {entries_list_entry_id}

EXAMPLE OF USAGE:

{exp:entries_list category="6" weblog="not weblog1|weblog4" sort="asc" site="1"}
{if weblog_short_name
=="weblog3"}
<a href="{weblog_url}{url_title}">{title}</a><br>
{if:else}
<a href="{weblog_url}{url_title}">{category_name}: {title}</a><br>
{/if}
{
/exp:entries_list}

Place this tag in any of your templates.

You may ask: if there is a need to find titles, url_titles etc. of entries posted into certain categories or into certain weblogs, why not use {exp:weblog:entries} tag or {exp:weblog:category_archive} tag?

Here is why:

1) using {exp:weblog:entries} you can easily exhaust PHP memory limit if you need to display titles, url_titles etc. of many entries.

2) {exp:weblog:category_archive} tag consumes less PHP memory, but it allows only to search for entries through one weblog.

3) {exp:weblog:entries} tag does not allow to pull weblog url which is specified in weblog preferences. Instead you must use {path=template_group/template} variable. This is very constricting if you need to pull entries from several weblogs and display them using different templates.

Entries list plugin deals with these shortcommings of {exp:weblog:entries} and {exp:weblog:category_archive} tags and allows you to build easily menus and tables of contents displaying entries belonging to certain weblogs and posted into certain categories.

Changelog:

-1.7 // Added on_failure parameter.
-1.6 // Bug fixed - uncategorized entries not being shown. Added variable {entry_id} and its alias {entries_list_entry_id}.
-1.5 // Added support for conditionals and variable “weblog_short_name”.
-1.4 // Added “aliases_only” parameter and aliases to {title}, {url_title} and {category_name} variables.
-1.3 // Added invalid_input parameter.
-1.2 // Added limit parameter.
-1.1 // Bug fixed - weblog_name variable displying weblog short name instead of full weblog name. Added “site” parameter. “Category” parameter made optional. Plugin’s name changed from “Category posts” to “Entries list”.
-1.0 // Initial release.

File Attachments
pi.entries_list_v1.7.zip  (File Size: 5KB - Downloads: 57)
 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 06 June 2008 04:20 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  247
Joined  04-12-2008

Nice work!

 Signature 

Designchuchi | Twitter

URL Field Extension
Required Category Extension
DC FreeForm GeoIP Extension

Profile
 
 
Posted: 06 June 2008 05:56 PM   [ Ignore ]   [ # 2 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  719
Joined  07-02-2007

Just a quick question..

Whats the difference between this plugin and:
{exp:weblog:entries weblog=“something” category=“16” disable=“all_the_useless_stuff”}

Except that your plugin “maybe” faster.

And btw.. maybe add site=””
I have seen a lot of clients jumping on the MSM feature..and i hope all the developers try and make their plugin MSM compatible.

Anyway, love to see more plugins from you.
Welcome to the developers guild smile

 Signature 

Truly ExpressionEngine


Fielder Module ( Mass Custom Fields )
Super Cache (Cache heavy tag output)
reCAPTCHA Extension
Rewrite Module


See all my EE Addons (8)

Profile
 
 
Posted: 07 June 2008 01:10 AM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
Joined  02-02-2007

Hi Victor,

Whats the difference between this plugin and:
{exp:weblog:entries weblog=“something” category=“16” disable=“all_the_useless_stuff”}

Except that your plugin “maybe” faster.

There are two differences:

1) using {exp:weblog:entries} even with disable=“all_the_useless_stuff” I was never able to pull more than about 250 entries. Using Category Posts plugin I’m successfully pulling more than 500 and this does not seems to be a limit. (My PHP memory amount is 64MB)

2) using {exp:weblog:entries} you cannot pull weblog path which is set in weblog preferences. To set href attribute for links you must use {path=template_group/template} variable. This is very constricting if you need to pull entries from several weblogs and display them using different templates. Using Category Posts plugin you can use {weblog_url} variable which pulls weblog path from weblog preferences.

And btw.. maybe add site=””
I have seen a lot of clients jumping on the MSM feature..and i hope all the developers try and make their plugin MSM compatible.

A good suggestion. I will add this feature in the next version of the plugin.

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 08 June 2008 08:06 AM   [ Ignore ]   [ # 4 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
Joined  02-02-2007

I have updated the plugin Entries List. You can download version 1.1 using the link in the first post in this thread.

In this release the bug - weblog_name variable displaying weblog short name instead of full weblog name - was fixed.

Also the new parameter - ‘site’ - was added. This parameter allows you to specify site id number. You can stack site id numbers using pipe character to get entries
from any of those sites, e.g. site=“1|3”. Or use “not” (with a space after it) to exclude sites, e.g. site=“not 1|2”.

“Category” parameter was made optional. Now at least one out of “category” and “weblog” parameters must be defined.

Plugin’s name changed from “Category posts” to “Entries list”. Older name and “category” parameter being made required reflected more how I was initially intending to use this plugin, not what really could be done using the function wrapped in this plugin. Now the functionality and name are more in sync.

You can use updated plugin to make various lists of entries - such as lists of contents or menus.

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 22 August 2008 04:14 AM   [ Ignore ]   [ # 5 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
Joined  02-02-2007

I have updated the plugin Entries List. You can download version 1.2 using the link in the first post in this thread.

In this release a new parameter - limit - was added. Using this parameter you can specify how many entries you want to be displayed. Without this parameter all entries posted into weblogs and categories as specified by “weblog” and “category” parameters will be displayed.

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 26 August 2008 09:44 AM   [ Ignore ]   [ # 6 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
Joined  02-02-2007

Hi,

I have released a version 1.3 of Entries List plugin.

In this release parameter “invalid_input” was added. This parameter accepts two values: “alert” and “silence”. Default value is “silence”. If the value is “alert”, then in cases when some parameter’s value is invalid plugin exits and PHP alert is being shown;
if the value is “silence”, then in cases when some parameter’s value
is invalid the plugin finishes its work without any alert being shown.
Set this parameter to “alert” for development, and to “silence” - for deployment.

Since the plugin does not do comprehensive validation of parameters’ values, you cannot be absolutely sure that in cases no alert was thrown the input was really valid.

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 04 September 2008 02:48 PM   [ Ignore ]   [ # 7 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
Joined  02-02-2007

I have released a version 1.4 of Entries List plugin.

New features are “aliases_only” parameter and aliases to {title}, {url_title} and {category_name} variables.

These features were introduced to get Entries List plugin working correctly when it is used inside some tag (e.g exp:weblog:entries) which also parses these variables.

Now in order to avoid parsing of {title}, {url_title} and {category_name} variables by some ExpressionEngine’s tag it is possible to use aliases of these variables - {entries_list_title}, {entries_list_url_title} and {entries_list_category_name}.

To avoid parsing of {title}, {url_title} and {category_name} variables by Entries List plugin, “aliases_only” parameter shoul be used. This parameter accepts two values: “yes” and “no”. Default value is “no”.
If the value is “yes”, then variables {title}, {url_title} and {category_name} will not be parsed by the plugin; only their aliases will be parsed. If the value is “no”, then
both variables {title}, {url_title} and {category_name} and their aliases will be parsed.

Set “aliases_only” parameter to “no” and use only aliases of {title}, {url_title} and {category_name} variables if you include {exp:entries_list} tag inside some other tag which parses these variables.

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 11 September 2008 05:54 AM   [ Ignore ]   [ # 8 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
Joined  02-02-2007

I have released a version 1.5 of Entries List plugin.

New features are support for conditionals and a new variable - {weblog_short_name}.

Now it is possible to write the code as this:

{exp:entries_list category="6" weblog="not weblog1|weblog4" sort="asc" site="1"}
{if weblog_short_name
=="weblog3"}
<a href="{weblog_url}{url_title}">{title}</a><br>
{if:else}
<a href="{weblog_url}{url_title}">{category_name}: {title}</a><br>
{/if}
{
/exp:entries_list}

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 26 September 2008 06:15 AM   [ Ignore ]   [ # 9 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
Joined  02-02-2007

Hi,

I have released version 1.6 of Entries List plugin.

In this version a bug was fixed - uncategorized entries not being shown when “weblog” parameter is being used without “category” parameter.

Thanks   jguip for reporting this bug.

Also a new variable - {entry_id} was added together with its alias {entries_list_entry_id}.

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
Posted: 03 October 2008 04:31 AM   [ Ignore ]   [ # 10 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  290
Joined  02-02-2007

Hi,

I have released version 1.7 of Entries List plugin.

In this version a new parameter - on_failure - was added.

This optional parameter allows you to specify what exp:entries_list tag
should output in case no entry was found. By default the tag in such case
will output nothing. If you set some string as the value of this parameter,
then that string will be outputted. If you set “tagdata” as the value of
this parameter, then the tag will output unmodified tagdata. You may need to set this parameter to “tagdata” in cases when exp:entries_list tag wraps some other tags.

 Signature 

Full list of plugins here

Child Categories
Browser Sniff
Category Id
Entries List

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65102 Total Logged-in Users: 60
Total Topics: 82263 Total Anonymous Users: 26
Total Replies: 442104 Total Guests: 277
Total Posts: 524367    
Members ( View Memberlist )