Seite 1 von 1

[You] MOD

Verfasst: 29.09.2006 04:05
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.

Verfasst: 29.09.2006 20:55
von Kewwwin
Was kann an diesem Code falsch sein? Also diesen Multiple BBCode oder wie der heißt habe ich schon installiert

Verfasst: 15.10.2006 16:49
von Kewwwin
Es wurde bereits eine Lösung gefunden.

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