__section__
default
__description__
This is the main block of html and code that gets evaled to create the main
index page.

__title__

__page__
page
__lang__
en_US
__name__
index
__template__
	
				<!- begin whats new -->
				<p>[% PROCESS titlebar title="WHAT'S NEW" %]
				[% 
					misc.count = 3;
					whatsnew = index.displayStoriesByTitle(form.section,misc);

					FOREACH story = whatsnew; %]
				[% story.widget %]
					[% END;
				%]

				<small><b>[ <a href="[% gSkin.rootdir %]/submit.pl?section=[% form.section %]">Suggest news</a> ]</b><br>
				<b>[ <a href="[% gSkin.rootdir %]/search.pl?query=&section=[% form.section %]&amp;topic_50=What%27s+New">What's old?</a> ]</b>  
				</small>
				<!-- end whats new -->

                <!-- begin feature article -->
                <p>[% PROCESS titlebar title="FEATURE ARTICLE" %]
				[% 
				misc.subsection = 'features';
				misc.count	= 1;
				feature = 
				index.displayStories(form.section,misc); 
				story = feature.shift;
				misc.count = '';

				%]
				[% # just one story, so we know its [0] %]
				[% story.widget %]
                <!-- end of feature article -->


				<!-- begin news -->
				<p>[% PROCESS titlebar title="NEWS" %]
				[% 
				misc.subsection = 'news';
				news = index.displayStories(form.section, misc);

					FOREACH story = news; %]
				[% story.widget %]
					[% END;
				%]


				<small><b>[ <a href="[% gSkin.rootdir %]/search.pl?query=&section=[% form.section %]&amp;topic_49=News">Older news</a> ]</b><br> 
				<b>[ <a href="[% gSkin.rootdir %]/submit.pl?section=[% form.section %]">Suggest news</a> ]</b>
				</small>
				<!-- end of news -->

				<!-- begin right column -->
				<img src="[% constants.imagedir %]/pix.gif" width="16" height="1" alt="">
				<p>[% PROCESS titlebar title="CALENDAR" %]
				<!-- SECTION [% form.section %] -->
				[% 
					section = form.section;
					IF form.date;
						mydate = form.date;
					ELSE;
						mydate = Slash.timeCalc(Slash.db.getTime(), '%Y-%m-%d');
					END;
					
					events = Slash.getObject('Slash::Events');
					IF events;
						myevents = events.getEvents(mydate, '','', section);

						FOREACH event=myevents; %]
				
				<small><b><a href="[% gSkin.rootdir %]/article.pl?sid=[% event.sid %]">
				[% event.title %]</a></b><br>
				[% event.begin %] - [% event.end %]</small><p>
						[% END;
					END;
				%]
				<small><b>[ <a href="[% gSkin.rootdir %]/submit.pl?section=[% form.section %]">Suggest an event</a> ]</b></small> 
				<! -- end calendar -->
				
				<!-- begin past features -->
				<p>[% PROCESS titlebar title="PAST FEATURES" %]
				[% 
					misc.subsection = 'features';
					pastfeatures = index.displayStoriesByTitle(form.section, misc);
				 	# we don't want the first article	
					story = pastfeatures.shift; 

					FOREACH story = pastfeatures ; %]
				[% story.widget %]
					[% END;
				%]
		
				<small><b>[ <a href="[% gSkin.rootdir %]/search.pl?query=&section=[% form.section %]&amp;topic_52=Past+Features">Older features</a> ]</b></small>
				<!-- end pastfeatures -->
				
				<!-- guided opinion -->	
				<p>[% PROCESS titlebar title="GUIDED OPINION" %]
				[% 
					misc.subsection = 'opinion';
					opinion = index.displayStories(form.section, misc);
					FOREACH story = opinion ; %]
				[% story.widget %]
					[% END;
				%]
				<small><b>[ <a href="[% gSkin.rootdir %]/search.pl?query=opinions&section=[% form.section %]&amp;topic_51=Guided+Opinion">Past opinions</a> ]</b></small> 
				<!-- end guided opinion -->
	
				<!-- begin new forum -->
				<p>[% PROCESS titlebar title="NEW FORUM THREAD" %]
				[%  

				searchobj = Slash.getObject('Slash::Search');
				IF searchobj;

					type = constants.enable_discussion_topic || 'topic_2';
					# XXXSKIN - i don't know what this is but it is broken because topics_section_type does not exist
					forum_topics = Slash.db.getDescriptions('topics_section_type', form.section, type); 

					FOR t = forum_topics.keys; 
						hashref.tid = t;
						hashref.section = form.section;
						hashref.type = 'recycle';
						hashref.approved = 1; 
						total_discussions = Slash.db.sqlCount('discussions',"topic = '$t' AND section = '$form.section'");
						discussions = searchobj.findDiscussion(hashref,0,5,3); 
						
						IF discussions; %]
				<small>
				<b><a href="[% gSkin.rootdir %]/comments.pl?op=user_created_index&amp;tid=[% t %]&amp;section=[% form.section %]&amp;type=recycle">[% forum_topics.$t %]</a> Total: ([%
				total_discussions %])</b>
				</small>
				<ul>
							[% FOR discussion = discussions %]
					<li>
					<small>
					<b>
					<a href="[% gSkin.rootdir %]/comments.pl?sid=[% discussion.id %]">
								[% IF discussion.title.defined && discussion.title.length %]
					[% discussion.title %]
								[% ELSE %]
					untitled
								[% END %]
					</a>
					</b>
					</small>
							[% END %]
						[% END %]
				</ul>
					[% END; 
				END; %]

				<!-- end new forum -->

__seclev__
10000
__version__
$Id: index;page;default,v 1.6 2005/07/27 22:54:12 pudge Exp $
