montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1282
|
Posted:
Mon Aug 29, 2005 9:35 am |
|
| Guardian wrote: |
Oops, I should read the readme!
The unassigned newsletters are only displayed in the block if you are logged in as an admin. |
Yes, that is correct. The thought there is that as admin, you would possibly want to see that there are newsletters which have been set to "**Unassigned**", which can happen when Categories are deleted.
However, if you would like to keep the two what I would call "System Newsletters", you could do so as follows:
** Find within block-HTML_Newsletter.php Script this code:
| Code: |
/* Get Newsletter List and build the block content */
if ($showcategories == 1) { //Build SQL for displaying categories
$sql = "SELECT nid, nl.cid, topic, sender, datesent, view, groups, hits, ctitle, cblocklimit FROM ".$prefix."_hnl_newsletters as nl, ".$prefix."_hnl_categories nc WHERE nl.cid = nc.cid ORDER BY ctitle ASC, datesent DESC";
} else { //Build SQL for displaying just date sorted list of newsletters
$sql = "SELECT nid, nl.cid, topic, sender, datesent, view, groups, hits, ctitle, cblocklimit FROM ".$prefix."_hnl_newsletters as nl, ".$prefix."_hnl_categories nc WHERE nl.cid = nc.cid ORDER BY datesent DESC";
}
|
And change it to:
| Code: |
/* Get Newsletter List and build the block content */
if ($showcategories == 1) { //Build SQL for displaying categories
$sql = "SELECT nid, nl.cid, topic, sender, datesent, view, groups, hits, ctitle, cblocklimit FROM ".$prefix."_hnl_newsletters as nl, ".$prefix."_hnl_categories nc WHERE nl.cid = nc.cid AND nid > 2 ORDER BY ctitle ASC, datesent DESC";
} else { //Build SQL for displaying just date sorted list of newsletters
$sql = "SELECT nid, nl.cid, topic, sender, datesent, view, groups, hits, ctitle, cblocklimit FROM ".$prefix."_hnl_newsletters as nl, ".$prefix."_hnl_categories nc WHERE nl.cid = nc.cid AND nid > 2 ORDER BY datesent DESC";
}
|
This will just exclude the first to nid's from the returned list of newsletters in the block. This will NOT change the module display of newsletters. You could find the corresponding query within index.php if you are interested.
Regards,
montego |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|