/***************************************************************************

    supportware
    Copyright (C) 2001-2008 by c.holzheuer
    c.holzheuer@sourceworx.org

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

***************************************************************************/

#ifndef SXPAGEFORUMBASE_H
#define SXPAGEFORUMBASE_H

#include <sxpage.h>


/// sxpageforumbase : Basis für alle Forumsseiten
/**
	
	Die Mutter des supportnets :-) bzw.
	Basis für alle Forumsseiten, wird geerbt von:
	
	- sxpageforum
	- sxpageforumoverview
	- sxpageforumgroups
	- sxpageforumgthread
	- sxpageforumold

	Diese bilden dann eigenständige Generatoren.
	
	Das alte Konglomerat aus /home /forum 
	/groups /forumgroups /homegroups
	wird folgendermassen entschlackt:
	
	/home 				: /
	/home/x ...		:	/mostwanted/x
	/homegroups		: /groups
	/forumgroups	:	/groups
	
	
*/

class sxpageforumbase : public sxpage
{

public:

	sxpageforumbase( const ddstring& name, ddwebsite* site ); 
 	
	
	virtual dd_result on_show( dditem& item );
	virtual dd_result on_show_entry( dditem& item );
 	virtual dd_result on_solve( dditem& item );
 	
	virtual dd_result on_overview( dditem& item ); 
	virtual dd_result on_show_group( dditem& item ); 
 	virtual dd_result on_create( dditem& item );
	virtual dd_result on_reply_create( dditem& item );
	virtual dd_result on_user_edit( dditem& item );
	virtual dd_result on_reply_user_edit( dditem& item );
	
	// 3schritt frage
	virtual dd_result query_stage0( dditem& item );
  virtual dd_result query_stage1( dditem& item );
	virtual dd_result query_stage2( dditem& item );	
	virtual dd_result query_stage3( dditem& item );	
 	
	virtual dd_result create_box_teaser( dditem& item );
	virtual dd_result create_box_news( dditem& item );
	virtual dd_result create_box_top_news( dditem& item );

		
protected:

	void 			init_requests();
	size_t	 	_itemsperhome;
	ddstring	_linkroot;
	
	
};

#endif

