[You] MOD

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

[You] MOD

Beitrag von Kewwwin »

Code: Alles auswählen

############################################################## 
## MOD Title: You BBCode
## MOD Author: wGEric < eric@egcnetwork.com > (Eric) http://eric.best-1.biz
## MOD Description: Adds a BBCode that puts the username of the person viewing the
##                  post where you add [you] to your post.
## MOD Version: 1.0.0
## 
## Installation Level: (Easy) 
## Installation Time: 5 Minutes
## Files To Edit: - includes/bbcode.php
##                - templates/subSilver/bbcode.tpl
## Included Files: n/a
############################################################## 
## Author Notes: 
## 		  You must have Multiple BBCode MOD installed for this to work.
##      Get it here: http://www.phpbb.com/phpBB/viewtopic.php?t=74705
##
##      example:
##		  'Hi [you]' will display 'Hi Eric' or 'Hi Bob'.  It depends on who
##      is viewing the topic.
## 
############################################################## 
## MOD History: 
##
##   2003-09-17 - Version 1.0.0
##      	- First Release
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php

#
#-----[ FIND ]------------------------------------------
#
	$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
#
#-----[ AFTER, ADD ]------------------------------------------
#

  global $userdata;
  $bbcode_tpl['you'] = str_replace('{YOU}', "' . $userdata['username'] . '", $bbcode_tpl['you']);
#
#-----[ FIND ]------------------------------------------
#
	$replacements[] = $bbcode_tpl['email'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
	
	// [you] - inserts the name of the person viewing the post
	$patterns[] = "#\[you\]#ise";
	$replacements[] = $bbcode_tpl['you'];
#
#-----[ OPEN ]------------------------------------------ 
#
templates/subSilver/bbcode.tpl
    
#
#-----[ FIND ]------------------------------------------ 
#
<!-- BEGIN  --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
#
#-----[ AFTER, ADD ]------------------------------------------ 
#

<!-- BEGIN you -->{YOU}<!-- END you -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
#
# EoM
Könnte etwas an diesem MOD bzw. an diesem Text falsch sein, insbesondere diesen text:

Code: Alles auswählen

  $bbcode_tpl['you'] = str_replace('{YOU}', "' . $userdata['username'] . '", $bbcode_tpl['you']);
Denn es erscheint eine fehlermeldung dei wie folgt lautet:

Code: Alles auswählen

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hp/af/ac/vc/www/Forum/includes/bbcode.php
Hoffentlich kann mir da jemand helfen.
Kewwwin

Beitrag von Kewwwin »

Was kann an diesem Code falsch sein? Also diesen Multiple BBCode oder wie der heißt habe ich schon installiert
Kewwwin

Beitrag von Kewwwin »

Es wurde bereits eine Lösung gefunden.

http://www.phpbb.de/viewtopic.php?p=776368#776368
Antworten

Zurück zu „phpBB 2.0: Mod Support“