Seite 4 von 7

Verfasst: 15.09.2003 02:51
von dabba
Ich hab mich noch mal rangewagt und versucht, es so umzubauen, dass Tehmenstarter UND MOderator UND Admin den Status einstellen können...

Leider funktioniert es zwar, dass der Admin alles darf und die Gäste nix - jedoch können alle anderen registrierten User den Status ebenfalls einstellen...

Hier mein Code - vielleicht findet jemand den Fehler oder hat ne bessere Idee:

Code: Alles auswählen

if( ($userdata['user_id'] != ANONYMOUS) || ($userdata['user_id'] == $topic_poster) || ($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD) ) 

Code: Alles auswählen

if ( isset($HTTP_POST_VARS['submit']) && $HTTP_POST_VARS['topic_info'] != 0 && ( ($userdata['user_id'] != ANONYMOUS) || ($userdata['user_id'] == $topic_poster) || ($userdata['user_level'] == ADMIN) || ($userdata['user_level'] == MOD) ))  

Verfasst: 16.09.2003 20:10
von dabba
Keiner?... :oops:

Verfasst: 18.09.2003 02:16
von dabba
Schade... :o

Weiß jemand, was ich noch verändern muss, damit der Status im Portal ebenfalls ebenfalls angezeigt wird? (Ich habe den Portal-Mod von AWSW)

Freue mich über eure HIlfe,
viele Grüße,
Dabba

Verfasst: 20.09.2003 16:14
von dabba
Hallo?...

Alle im noch Urlaub? :D :oops:

Search for topics with a certain status?

Verfasst: 03.12.2003 15:26
von resBB
Hi Acid and everybody,

(Sorry, I have to write in English - cause NOBODY would understand ANY german of mine - I read so-so german, so you can post answers in german if you prefer...)

I have installed this great Mod - it works just as intended - thanks, Acid !

I am trying to extend your Mod with a feature on either the index-page or on the search-page:

1. Like you have the View your posts link (at the upper-right of index-page), I would like to have a View posts/topics with status XXX - where XXX is a given status-option

or

2. On the search-page - some way? to search for a certain topic-status!
This could of course be used as a (hardcoded) link from index-page as well, and I believe this is the way to go...

Would you, Acid, or anyone else have done something similar..?

In my own attempt to build-in this feature, I have come to this part of the search-page,

below this:

Code: Alles auswählen

			else if ( $search_id == 'egosearch' )
			{
				if ( $userdata['session_logged_in'] )
				{
					$sql = "SELECT post_id 
						FROM " . POSTS_TABLE . " 
						WHERE poster_id = " . $userdata['user_id'];;
				}
				else
				{
					header("Location: login.$phpEx?redirect=search.$phpEx&search_id=egosearch", true);
					exit;
				}

				$show_results = 'topics';
				$sort_by = 0;
				$sort_dir = 'DESC';
			}
I added this:

Code: Alles auswählen

			else if ( $search_id == 'statussearch' )
			{
				if ( $userdata['session_logged_in'] )
				{
					$sql = "SELECT post_id 
						FROM " . TOPICS_TABLE . " 
						WHERE topic_info = MY_STATUS";
				}
				else
				{
					header("Location: login.$phpEx?redirect=search.$phpEx&search_id=statussearch", true);
					exit;
				}

				$show_results = 'topics';
				$sort_by = 0;
				$sort_dir = 'DESC';
			}
, where MY_STATUS is the status I want to search for.

I know that this does not work correct, and that this is only a part of what should be done in search.php, but this must be the essential part.

Any feedback would be highly appreciated !

- Jesper (as in Copenhagen, DK)

Verfasst: 04.12.2003 10:15
von Acid
@resBB
Which phpBB version are you using ?

@dabba
Und wo soll´s angezeigt werden.. beim recent-Block ?

Verfasst: 04.12.2003 10:59
von resBB
Hi Acid,
Acid hat geschrieben:@resBB
Which phpBB version are you using ?
The version is 2.0.3

I want to update to 2.0.6 in time, but I have done A LOT of moderations and added things to the database etc. so its not an option right now... (read: = a couple of weeks work)

Anyway, the feature I am trying to build into your Status-mod is a search-function on the index-page.
I realise that there are some differences around:
v. 2.0.3:

Code: Alles auswählen

header("Location: login.$phpEx?redirect=search.$phpEx&search_id=egosearch", true);
and v. 2.0.6:

Code: Alles auswählen

redirect(append_sid("login.$phpEx?redirect=search.$phpEx&search_id=egosearch", true));
but this should not relate to the actual mysql-query, which for both versions for the $search_id == 'egosearch' search-option is:

Code: Alles auswählen

$sql = "SELECT post_id
	FROM " . POSTS_TABLE . "
	WHERE poster_id = " . $userdata['user_id'];
My idea is to copy and rewrite this search-option to a $search_id == 'statussearch', where you could search for a specific topic-status.

But my mysql skills unfortunately aren't as good as I could hope... :-?


and once again...
Any help and/or feedback is highly appreciated !

Best regards
- Jesper

Verfasst: 04.12.2003 11:08
von Acid
do you want to show all topics with such a status... or just a few with a special status ?

Verfasst: 04.12.2003 11:27
von resBB
Acid,

Yes, my idea is to return ALL topics available with e.g. status '2' from the topic_info of phpbb_topics.

This would be very usefull when using your Status-mod as a ToDo-reminder, as I would like to. We are four users who serve/support alot of regular forum users. With your Status-mod the four of us can mark topics as e.g. Jesper (topic_info value = 2).
When I enter the forum I could then click statussearch and have all topics marked Jesper returned = my ToDo-list !
If a topic is not my area, I can easily change the status to e.g. Kenneth and it would be on Kenneth's ToDo-list when he logs in.


Best regards
- Jesper

Verfasst: 04.12.2003 12:24
von Acid
hmm.. I can´t test it at the moment, but your change should work.
further you have to alter the following lines..

Code: Alles auswählen

	if ( $search_id == 'newposts' || $search_id == 'egosearch' || $search_id == 'unanswered' || $search_id == 'unread' || $search_keywords != '' || $search_author != '' )
	{
		if ( $search_id == 'newposts' || $search_id == 'egosearch' || ( $search_author != '' && $search_keywords == '' )  )
(add || $search_id == 'statussearch')

the link would be http://www.your_domain.de/phpbb/search.php?search_id=statussearch .