Protected Message

Du suchst einen bestimmten Mod, weißt aber nicht genau wo bzw. ob er überhaupt existiert? Wenn dir dieser Artikel nicht weiterhilft, kannst du hier den von dir gewünschten/gesuchten Mod beschreiben ...
Falls ein Mod-Autor eine der Anfragen hier aufnimmt um einen neuen Mod zu entwicklen, geht's in phpBB 2.0: Mods in Entwicklung weiter.
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.
adidas
Mitglied
Beiträge: 1204
Registriert: 14.08.2003 00:09

Protected Message

Beitrag von adidas »

Ich habe auf einer Seite sowas wie Protected Message gesehen. Also, zum Beispiel macht6 der Poster vorher:

Hallo, ich woll euch was sagen

[hide]haha verarscht[/hide]

:P

Wenn jemand dieses Beitrag liest, kann er nicht lesen, was er zwischen [hide][/hide]geschrieben hat, weil er vorher [hide][/hide] benutzt hat. Er sieht nur " Hallo, ich wollt euch was sagen

to read this protected message you must post into this topic"

wo finde ich diesen MOD?
>>>>>>0<<<<<<
Benutzeravatar
Gert
Mitglied
Beiträge: 954
Registriert: 17.11.2002 13:44
Wohnort: Bettlach
Kontaktdaten:

Beitrag von Gert »

Hi......

iss das nicht der Bedankmod?

Gruss Gert
Greetz Gert

Mein Board:http://www.gege65.ch/FSSForum/ ----- Meine private HP: http://www.gege65.ch
Benutzeravatar
rabbit
Ehemaliger Übersetzer
Beiträge: 4199
Registriert: 14.06.2003 22:09
Wohnort: Hildesheim
Kontaktdaten:

Beitrag von rabbit »

@ www.phpbbhacks.com ;)

-> suche 'hide message'
Offizieller Übersetzer des Categories Hierarchy MOD 2.1.x
Deutscher UserGuide für den Categories Hierarchy MOD v2.1.4
Empfohlener Hoster: All-Inkl.com
Benutzeravatar
Gert
Mitglied
Beiträge: 954
Registriert: 17.11.2002 13:44
Wohnort: Bettlach
Kontaktdaten:

Beitrag von Gert »

Nix Bedankmod :lol:

Der hier:

http://www.phpbbhacks.com/download/870

Gruss gert
Greetz Gert

Mein Board:http://www.gege65.ch/FSSForum/ ----- Meine private HP: http://www.gege65.ch
adidas
Mitglied
Beiträge: 1204
Registriert: 14.08.2003 00:09

Beitrag von adidas »

hi,

danke erstmal!

da steht

phpBB Version: 2.0.0 - 2.0.4

ich hoffe es wird für 2.0.11 klappen

oder?
>>>>>>0<<<<<<
Benutzeravatar
rabbit
Ehemaliger Übersetzer
Beiträge: 4199
Registriert: 14.06.2003 22:09
Wohnort: Hildesheim
Kontaktdaten:

Beitrag von rabbit »

yep... :)
Offizieller Übersetzer des Categories Hierarchy MOD 2.1.x
Deutscher UserGuide für den Categories Hierarchy MOD v2.1.4
Empfohlener Hoster: All-Inkl.com
adidas
Mitglied
Beiträge: 1204
Registriert: 14.08.2003 00:09

Beitrag von adidas »

boah, was ist das denn für eine scheiße

echt, sowas regt mich so was von auf
############################################################################
## MOD HIDE | Made By / Auteur: Philiweb < http://www.philiweb.fr.st/ >
############################################################################
## Description : MOD "HIDE" (aka lockdown) - this mod allow users to hide
## a message via some "bbcodes", ex : [hide] message [/hide]. To see the
## hidden message, you must be a member and you must post a reply to
## the message...
############################################################################
## VERSION DE PHPBB : PHPBB 2.0 RC3 - RC4 - 2.0.x (gold) - 2.0.4 |02/2003|
############################################################################
## You can find the last versions and informations here on the official
## website (in English and French) :
## http://membres.lycos.fr/philiweb/accueil.php?num=15
## Info : There is also some pre-modified files if you have difficulties !
############################################################################
## And you can find some modifications to "hide" mod here :
## http://membres.lycos.fr/philiweb/accueil.php?num=23
## new : version 4 => administrators and moderators can see "hidden
## messages" immediatly...)
############################################################################
## Demo : http://membres.lycos.fr/philiweb/forums ... .php?t=167
############################################################################
## This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
############################################################################

There is 7 files to modify :

1 - posting.php
2 - viewtopic.php
3 - search.php
4 - topic_review.php // in the "/includes" directory
5 - bbcode.php // in the "/includes" directory
6 - bbcode.tpl // in the Templates/{Used template}/ directory
7 - posting_body.tpl // in the Templates/{Used template}/ directory

This mod is easy to install. (20 mn)

------------------
1 - In posting.php
------------------

Find

if( $attach_sig && $user_sig != '' && $userdata['user_sig_bbcode_uid'] )
{
$user_sig = bbencode_second_pass($user_sig, $userdata['user_sig_bbcode_uid']);
}

if( $bbcode_on )
{
$preview_message = bbencode_second_pass($preview_message, $bbcode_uid);
}


Replace by

$valid = FALSE;
if( $userdata['session_logged_in'] ) {
$sql = "SELECT p.poster_id, p.topic_id
FROM " . POSTS_TABLE . " p
WHERE p.topic_id = $topic_id
AND p.poster_id = " . $userdata['user_id'];
$resultat = $db->sql_query($sql);
$valid = $db->sql_numrows($resultat) ? TRUE : FALSE;}

if( $attach_sig && $user_sig != '' && $userdata['user_sig_bbcode_uid'] )
{
$user_sig = bbencode_second_pass($user_sig, $userdata['user_sig_bbcode_uid']);
$user_sig = bbencode_third_pass($user_sig, $userdata['user_sig_bbcode_uid'], $valid);
}

if( $bbcode_on )
{
$preview_message = bbencode_second_pass($preview_message, $bbcode_uid);
$preview_message = bbencode_third_pass($preview_message, $bbcode_uid, $valid);
}


Find

if ( !preg_match('/^Re:/', $subject) && strlen($subject) > 0 )
{
$subject = 'Re: ' . $subject;
}


Add Below

if( !$userdata['session_logged_in'] ) {$message = hide_in_quote($message);}
else { $sql = "SELECT p.poster_id, p.topic_id
FROM " . POSTS_TABLE . " p
WHERE p.topic_id = $topic_id
AND p.poster_id = " . $userdata['user_id'];
$resultat = $db->sql_query($sql);
if(!$db->sql_numrows($resultat)) {$message = hide_in_quote($message);}
}


--------------------
2 - In viewtopic.php
--------------------


Find

//
// Generate a 'Show posts in previous x days' select box. If the postdays var is POSTed
// then get it's value, find the number of topics with dates newer than it (to properly
// handle pagination) and alter the main query
//


Add below

$valid = FALSE;
if( $userdata['session_logged_in'] ) {
$sql = "SELECT p.poster_id, p.topic_id
FROM " . POSTS_TABLE . " p
WHERE p.topic_id = $topic_id
AND p.poster_id = " . $userdata['user_id'];
$resultat = $db->sql_query($sql);
$valid = $db->sql_numrows($resultat) ? TRUE : FALSE;}


Find

if ( $user_sig != '' && $user_sig_bbcode_uid != '' )
{
$user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $user_sig);
}

if ( $bbcode_uid != '' )
{
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
}


Replace by

if ( $user_sig != '' && $user_sig_bbcode_uid != '' )
{
$user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $user_sig);
$user_sig = bbencode_third_pass($user_sig, $user_sig_bbcode_uid, $valid);
}

if ( $bbcode_uid != '' )
{
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
$message = bbencode_third_pass($message, $bbcode_uid, $valid);
}

-----------------
3 - In search.php
-----------------

Find

//
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( $return_chars != -1 )


And replace it by

//
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if( $return_chars == -1 )


Find

if ( $bbcode_uid != '' )
{
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
}


Replace by

if ( $bbcode_uid != '' )
{
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
$message = bbencode_third_pass($message, $bbcode_uid, FALSE);
}

-----------------------
4 - In topic_review.php // in the "/includes" directory
-----------------------

Find

//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//
if ( $row = $db->sql_fetchrow($result) )
{


Add below

$valid = FALSE;
if( $userdata['session_logged_in'] ) {
$sql = "SELECT p.poster_id, p.topic_id
FROM " . POSTS_TABLE . " p
WHERE p.topic_id = $topic_id
AND p.poster_id = " . $userdata['user_id'];
$resultat = $db->sql_query($sql);
$valid = $db->sql_numrows($resultat) ? TRUE : FALSE;}


Find

if ( $bbcode_uid != "" )
{
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
}


Replace by

if ( $bbcode_uid != "" )
{
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
$message = bbencode_third_pass($message, $bbcode_uid, $valid);
}

-----------------
5 - In bbcode.php // in the "/includes" directory
-----------------

Find

$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);

Add Below

$bbcode_tpl['show'] = str_replace('{HTEXTE}', '\\1', $bbcode_tpl['show']);


*Before* this text

/**
* Does second-pass bbencoding. This should be used before displaying the message in
* a thread. Assumes the message is already first-pass encoded, and we are given the
* correct UID as used in first-pass encoding.
*/


Add this functions

function hide_in_quote($text)
{
$text = preg_replace("#\[hide\](.*?)\[\/hide\]#si","--- phpBB : The Protected Message is not copied in this quote ---", $text);
return $text;
}

function bbencode_third_pass($text, $uid, $deprotect)
{
global $bbcode_tpl;

// pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
// This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
$text = " " . $text;

// First: If there isn't a "[" and a "]" in the message, don't bother.
if (! (strpos($text, "[") && strpos($text, "]")) )
{
// Remove padding, return.
$text = substr($text, 1);
return $text;
}
// Patterns and replacements for URL and email tags..
$patterns = array();
$replacements = array();

if ( $deprotect ) {
$patterns[0] = "#\[hide:$uid\](.*?)\[/hide:$uid\]#si";
$replacements[0] = $bbcode_tpl['show'];
}
else
{
$patterns[0] = "#\[hide:$uid\](.*?)\[/hide:$uid\]#si";
$replacements[0] = $bbcode_tpl['hide'];
}

$text = preg_replace($patterns, $replacements, $text);

// Remove our padding from the string..
$text = substr($text, 1);

return $text;
}


Find in function "bbencode_first_pass"

// [img]image_url_here[/img] code..
$text = preg_replace("#\[img\](([a-z]+?)://([^ \"\n\r]+?))\[/img\]#si", "[img:$uid]\\1[/img:$uid]", $text);

Add Below

//[hide]message[/hide]
$text = preg_replace("#\[hide\](.*?)\[\/hide\]#si","[hide:$uid]\\1[/hide:$uid]", $text);


-----------------
6 - In bbcode.tpl // in the Templates/{Used template}/ directory
-----------------

At the top, add

<!-- BEGIN show -->
</span>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td><span class="genmed"><b>Protected Message:</b></span></td>
</tr>
<tr>
<td class="quote">
{HTEXTE}
</td>
</tr>
</table>
<span class="postbody">
<!-- END show -->

<!-- BEGIN hide -->
</span>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td><span class="genmed"><b>Protected Message:</b></span></td>
</tr>
<tr>
<td class="quote">
<center>--- If you are a *registered user* : you need to post in this topic to see the message ---</center>
</td>
</tr>
</table>
<span class="postbody">
<!-- END hide -->

-----------------------
7 - In posting_body.tpl // in the Templates/{Used template}/ directory
-----------------------

This part add a button in the dialog box (newtopic,...).

In the list of "// Helpline messages", add :


h_help = "Hide: [hide]message[/hide] (alt+h)";

Find this line :
bbtags = new Array('',''...

And add at the end :
'[hide]' and '[/hide]'

You will obtain something like this :


bbtags = new Array('','','','','','','
','
','','
  • ','
','
  • ','
','[img]','[/img]','','','[hide]','[/hide]');


Find

<td><span class="genmed">
<input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
</span></td>


Add Below : (Don't forget to adapt the "addbbcode" numbers if neccesary ! (exemple: addbbcode18 -> addbbcode20, 20 -> 22, etc)

<td><span class="genmed">
<input type="button" class="button" accesskey="h" name="addbbcode18" value="Hide" style="width: 40px" onClick="bbstyle(18)" onMouseOver="helpline('h')" />
</span></td>


Next, you need to modify all the "addbbcodexx" in the rest of the file. (exemple : addbbcode20 -> addbbcode22)

That's all ! :-)
Philippe

IF YOU HAVE A PROBLEM ("undefined" instead of [hide]...) - Go on my website or contact me :
http://membres.lycos.fr/philiweb/downlo ... =7&lang=en
Official page => http://membres.lycos.fr/philiweb/accueil.php?num=15
Warum können diese arschlöcher das einfach nicht so verständlich machen, statt da zu rätseln

sorry für das fluchen aber sowas regt mich echt zum scheiß kotzen auf
>>>>>>0<<<<<<
Benutzeravatar
rabbit
Ehemaliger Übersetzer
Beiträge: 4199
Registriert: 14.06.2003 22:09
Wohnort: Hildesheim
Kontaktdaten:

Beitrag von rabbit »

statt hier verbalen müll zu verzapfen solltest du vielleicht mal hier gucken: KB:modsfaq ;) (und hier: KB:knigge )

wo ist denn dein problem mit dem MOD, denn das hast du wohl vergessen, zu erwähnen... :roll:
Offizieller Übersetzer des Categories Hierarchy MOD 2.1.x
Deutscher UserGuide für den Categories Hierarchy MOD v2.1.4
Empfohlener Hoster: All-Inkl.com
adidas
Mitglied
Beiträge: 1204
Registriert: 14.08.2003 00:09

Beitrag von adidas »

na alles unverständlich

habs aber trodzdem mal raufgemacht und nun spinnt alles

wenn ich z.b. auf URL oben klicke, passiert gar nichts, oder Hide, oder Quote usw.

danach kann ichim nachrichtentext nicht alles markieren

und unten im browser statusleiste steht fehler auf der seite, halt wenn seiten bugs haben ist das so

ich möchte gerne diesen MOD haben, doch der bringt mir probleme :(

hab alles richtig gemacht

aber nur das habe ich nicht verstanden, vielleicht liegts an das hier :

"Next, you need to modify all the "addbbcodexx" in the rest of the file. (exemple : addbbcode20 -> addbbcode22)"
>>>>>>0<<<<<<
Benutzeravatar
rabbit
Ehemaliger Übersetzer
Beiträge: 4199
Registriert: 14.06.2003 22:09
Wohnort: Hildesheim
Kontaktdaten:

Beitrag von rabbit »

ok, nun sprechen wir wieder die gleiche sprache... :)
adidas hat geschrieben: "Next, you need to modify all the "addbbcodexx" in the rest of the file. (exemple : addbbcode20 -> addbbcode22)"
das bedeutet, dass die addbbcode-zeilen in aufsteigender reihenfolge in zweierschritten numeriert werden müssen. wenn du also mittendrin den hide-code einfügst, stimmt die numerierung nicht mehr, so dass du aus 20 eben 22 machen musst, danach die zeile aus der 22 eine 24 etc.

wenn du die datei mal anschaust, wird dir auffallen, dass die bei 0 anfangen und dann eben aufsteigend in zweierschritten hochgezählt werden.
Offizieller Übersetzer des Categories Hierarchy MOD 2.1.x
Deutscher UserGuide für den Categories Hierarchy MOD v2.1.4
Empfohlener Hoster: All-Inkl.com
Antworten

Zurück zu „phpBB 2.0: Mod Suche/Anfragen“