[2.0.5] Status zu einem Thema hinzufügen

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
dabba
Mitglied
Beiträge: 45
Registriert: 26.07.2003 04:42

Beitrag 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) ))  
dabba
Mitglied
Beiträge: 45
Registriert: 26.07.2003 04:42

Beitrag von dabba »

Keiner?... :oops:
dabba
Mitglied
Beiträge: 45
Registriert: 26.07.2003 04:42

Beitrag 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
dabba
Mitglied
Beiträge: 45
Registriert: 26.07.2003 04:42

Beitrag von dabba »

Hallo?...

Alle im noch Urlaub? :D :oops:
Benutzeravatar
resBB
Mitglied
Beiträge: 6
Registriert: 03.12.2003 14:59
Wohnort: Copenhagen, DK

Search for topics with a certain status?

Beitrag 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)
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag von Acid »

@resBB
Which phpBB version are you using ?

@dabba
Und wo soll´s angezeigt werden.. beim recent-Block ?
Benutzeravatar
resBB
Mitglied
Beiträge: 6
Registriert: 03.12.2003 14:59
Wohnort: Copenhagen, DK

Beitrag 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
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag von Acid »

do you want to show all topics with such a status... or just a few with a special status ?
Benutzeravatar
resBB
Mitglied
Beiträge: 6
Registriert: 03.12.2003 14:59
Wohnort: Copenhagen, DK

Beitrag 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
Acid
Ehrenadmin
Beiträge: 12195
Registriert: 26.04.2001 02:00
Wohnort: Berlin

Beitrag 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 .
Antworten

Zurück zu „phpBB 2.0: Mod Support“