Portal Themes

Modules - Latest Site News

GlueBeard - Aug 27, 2004 - 11:23 AM
Post subject: Latest Site News
What module or block is used for the Latest Site News section of the Portal Themes 2 theme?

Or is it simply the stories block from the default PostNuke software?

The reason that I ask is because I wish to emulate on my web site just having the titles of the stories, instead of the whole story, displayed on the front page of my site, in order to reduce information overload for the site visitor.

Thus, how do I go about doing this?
mars - Aug 27, 2004 - 12:09 PM
Post subject:
If you are using AutoTheme just remove everything from summary.html except <!--[posted-by] --> and <!-- [posted-date] -->

Wink
GlueBeard - Aug 27, 2004 - 12:36 PM
Post subject:
Well, I'm not using AutoThemes.

Do you know if it is possible to do it using a standard PostNuke theme?
mars - Aug 27, 2004 - 01:29 PM
Post subject:
I'm sure it would be but hacking away at theme.php is not something I personally like to do.
You would have to find the summary part of it and remove everything but the above again.
GlueBeard - Aug 27, 2004 - 01:50 PM
Post subject:
I don't mind hacking the theme.php file. I do that all of the time. I don't think that that is what will allow me to do what I want to do, though.

Do you happen to know which file contains the output of the stories in the default PostNuke modules or blocks?
mars - Aug 27, 2004 - 02:44 PM
Post subject:
It will definetely be in theme.php as it is part of the theme process.
GlueBeard - Aug 27, 2004 - 09:01 PM
Post subject:
Problematic, though, is that "summary" is not in theme.php, at least not the one I am using.
GlueBeard - Aug 27, 2004 - 09:07 PM
Post subject:
This is, I think, the stories part of my theme.php file. What needs editing in it, if you can tell?

/************************************************************/
/* Function themeindex() */
/* */
/* This function formats the stories on the Homepage */
/************************************************************/
function themeindex ($_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $_deprecated, $info, $links, $preformat) {
global $thename, $bgcolor1, $bgcolor2;
$anonymous = pnConfigGetVar('anonymous');
$tipath = pnConfigGetVar('tipath');
?>

<!----- Begin article ----->
<DIV class="ArticleBlock">
<DIV class="ArticleHead"><H4 class="storytitle"><?php echo $preformat['catandtitle'] ?></H4>
<DIV class="pn-sub" align="right"><SPAN class="pnleft"><?PHP echo _POSTEDBY.": ".$info['informant']." "._ON." ".$info['longdatetime'] ?></SPAN>
<?PHP echo $info['counter']." "._READS ?>
</DIV>
<?PHP // Edit link if user has Edit permission
if (pnSecAuthAction(0, 'Stories::', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_EDIT)) {
echo "<span class=\"sub\"> <nobr>[ <a href=\"admin.php?module=NS-AddStory&op=EditStory&sid=$info[sid]\">"._EDIT."</a>\n";
// Delete link if user has Delete permission
if (pnSecAuthAction(0, 'Stories::', "$info[aid]:$info[cattitle]:$info[sid]", ACCESS_DELETE)) {
echo "| <a href=\"admin.php?module=NS-AddStory&op=RemoveStory&sid=$info[sid]\">"._DELETE."</a> ]";
} else { echo "]";
} // end user delete
echo "</nobr></span><br />";
} // end user edit ?>
</DIV>
<DIV class="Article">
<DIV class="TopicImgLeft"><DIV class="clear"><?php echo $preformat['searchtopic'] ?><!--Spacer DIV fudge for Opera 7--></DIV></DIV>
<!-- To change picture from left to right, change "TopicImgLeft" to "TopicImgRight" -->
<?php echo $info['hometext'] ?><BR /><BR />
<DIV class="note"><?PHP echo $preformat['notes'] ?><BR /><BR /></DIV>
<DIV align="right" class="more"><?PHP echo $preformat['more'] ?></DIV>
</DIV>
</DIV>
<!----- End article ----->

mars - Aug 27, 2004 - 09:15 PM
Post subject:
That to me looks like the FULL article and not the summary.
On your site do you see the Edit-Delete links on stories on the home page?
GlueBeard - Aug 28, 2004 - 02:40 PM
Post subject:
Well, having fiddled with my theme.php some more last night, just so that you will know for future reference, in case someone else asks again, the secction above, what you termed the "FULL article," is where the answer to my previous question lay.

I was able to figure out how to get just the title and the date to show, but then managed to stumble across a way to make the story outlines do something else which I liked the visual effect of, so I ended up keeping the stories displayed on the front page after all.

I only have one story up now, so you really can't tell, but when I have more than one story, it is like the newer story's box wraps around the existing stories, and after I added several test stories, just to see what it looked like, I decided that I liked the way that it looked, and would stick with that for a while.

Of course, I would caution anyone that is editing/hacking their theme.php file to keep a back-up working copy of their theme that they are using handy nearby, just in case they screw up their theme.php file, which I have done many times over the course of fiddiling with it, as I try to figure out how things work.
All times are GMT - 5 Hours
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits