y lo he instalado localmente a continuacií?³n les dejo una imagen para que puedan ver mi problema.
Uso phpbb 2.0.19 con ezPortal

Recordad que para pedir soporte alguno, debéis facilitar los datos de soporte oportunos por favor, mirad aquí y leer las Normas generales del foro, esto nos servirá de ayuda para dar el mejor soporte..
Gracias.
La Administración de phpBB España.
Raul [ThE KuKa] en phpBB
Jr. Extension Validator - Jr. Styles Validator - Style Customisations - Translator - International Support Team
Si te gustan mis estilos, traducciones, etc. y quieres mostrar algo de aprecio, no dudes en hacer una donación
phpBB España - En línea desde 2003
Código: Seleccionar todo
#
#-----[ OPEN ]------------------------------------------
#
# NOTE --- You need to do this for all your installed languages
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//+MOD: Select Expand BBcodes MOD
$lang['Select'] = "Select";
$lang['Expand'] = "Expand";
$lang['Contract'] = "Contract";
//-MOD: Select Expand BBcodes MOD
Código: Seleccionar todo
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
define("BBCODE_TPL_READY", true);
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//+MOD: Select Expand BBcodes MOD
global $phpbb_root_path;
$u_sxbb_jslib = $phpbb_root_path . 'templates/select_expand_bbcodes.js';
// Replacing BBCode variables, but also adding CR to preserve HTML comment delimiters for JS code.
$expand_ary1 = array('', '{L_SELECT}', '{L_EXPAND}', '{L_CONTRACT}', '{U_SXBB_JSLIB}');
$expand_ary2 = array("\r\r", $lang['Select'], $lang['Expand'], $lang['Contract'], $u_sxbb_jslib);
$expand_ary3 = array('');
$expand_ary4 = array("\r\r");
$bbcode_tpl['quote_open'] = str_replace($expand_ary1, $expand_ary2, $bbcode_tpl['quote_open']);
$bbcode_tpl['quote_username_open'] = str_replace($expand_ary1, $expand_ary2, $bbcode_tpl['quote_username_open']);
$bbcode_tpl['code_open'] = str_replace($expand_ary1, $expand_ary2, $bbcode_tpl['code_open']);
$bbcode_tpl['quote_close'] = str_replace($expand_ary3, $expand_ary4, $bbcode_tpl['quote_close']);
$bbcode_tpl['code_close'] = str_replace($expand_ary3, $expand_ary4, $bbcode_tpl['code_close']);
//-MOD: Select Expand BBcodes MOD
Raul [ThE KuKa] en phpBB
Jr. Extension Validator - Jr. Styles Validator - Style Customisations - Translator - International Support Team
Si te gustan mis estilos, traducciones, etc. y quieres mostrar algo de aprecio, no dudes en hacer una donación
phpBB España - En línea desde 2003
Código: Seleccionar todo
Not Found
The requested URL /foro/addform.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.34 Server at www.phpbb-es.com Port 80
Raul [ThE KuKa] en phpBB
Jr. Extension Validator - Jr. Styles Validator - Style Customisations - Translator - International Support Team
Si te gustan mis estilos, traducciones, etc. y quieres mostrar algo de aprecio, no dudes en hacer una donación
phpBB España - En línea desde 2003
Raul [ThE KuKa] en phpBB
Jr. Extension Validator - Jr. Styles Validator - Style Customisations - Translator - International Support Team
Si te gustan mis estilos, traducciones, etc. y quieres mostrar algo de aprecio, no dudes en hacer una donación
phpBB España - En línea desde 2003
Raul [ThE KuKa] en phpBB
Jr. Extension Validator - Jr. Styles Validator - Style Customisations - Translator - International Support Team
Si te gustan mis estilos, traducciones, etc. y quieres mostrar algo de aprecio, no dudes en hacer una donación
phpBB España - En línea desde 2003
Código: Seleccionar todo
y en diferentes mensajes (cada fichero en un mensaje diferente)
S@lu2
Raul [ThE KuKa] en phpBB
Jr. Extension Validator - Jr. Styles Validator - Style Customisations - Translator - International Support Team
Si te gustan mis estilos, traducciones, etc. y quieres mostrar algo de aprecio, no dudes en hacer una donación
phpBB España - En línea desde 2003
Código: Seleccionar todo
<?php
/***************************************************************************
* bbcode.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: bbcode.php,v 1.36.2.35 2005/07/19 20:01:10 acydburn Exp $
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
define("BBCODE_UID_LEN", 10);
// global that holds loaded-and-prepared bbcode templates, so we only have to do
// that stuff once.
$bbcode_tpl = null;
/**
* Loads bbcode templates from the bbcode.tpl file of the current template set.
* Creates an array, keys are bbcode names like "b_open" or "url", values
* are the associated template.
* Probably pukes all over the place if there's something really screwed
* with the bbcode.tpl file.
*
* Nathan Codding, Sept 26 2001.
*/
function load_bbcode_template()
{
global $template;
$tpl_filename = $template->make_filename('bbcode.tpl');
$tpl = fread(fopen($tpl_filename, 'r'), filesize($tpl_filename));
// replace \ with \\ and then ' with \'.
$tpl = str_replace('\\', '\\\\', $tpl);
$tpl = str_replace('\'', '\\\'', $tpl);
// strip newlines.
$tpl = str_replace("\n", '', $tpl);
// Turn template blocks into PHP assignment statements for the values of $bbcode_tpls..
$tpl = preg_replace('#<!-- BEGIN (.*?) -->(.*?)<!-- END (.*?) -->#', "\n" . '$bbcode_tpls[\'\\1\'] = \'\\2\';', $tpl);
$bbcode_tpls = array();
eval($tpl);
return $bbcode_tpls;
}
/**
* Prepares the loaded bbcode templates for insertion into preg_replace()
* or str_replace() calls in the bbencode_second_pass functions. This
* means replacing template placeholders with the appropriate preg backrefs
* or with language vars. NOTE: If you change how the regexps work in
* bbencode_second_pass(), you MUST change this function.
*
* Nathan Codding, Sept 26 2001
*
*/
function prepare_bbcode_template($bbcode_tpl)
{
global $lang;
$bbcode_tpl['olist_open'] = str_replace('{LIST_TYPE}', '\\1', $bbcode_tpl['olist_open']);
$bbcode_tpl['color_open'] = str_replace('{COLOR}', '\\1', $bbcode_tpl['color_open']);
$bbcode_tpl['size_open'] = str_replace('{SIZE}', '\\1', $bbcode_tpl['size_open']);
$bbcode_tpl['font_open'] = str_replace('{FONT}', '\\1', $bbcode_tpl['font_open']);
$bbcode_tpl['quote_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_open']);
$bbcode_tpl['quote_username_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_username_open']);
$bbcode_tpl['quote_username_open'] = str_replace('{L_WROTE}', $lang['wrote'], $bbcode_tpl['quote_username_open']);
$bbcode_tpl['quote_username_open'] = str_replace('{USERNAME}', '\\1', $bbcode_tpl['quote_username_open']);
$bbcode_tpl['code_open'] = str_replace('{L_CODE}', $lang['Code'], $bbcode_tpl['code_open']);
$bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img']);
// We do URLs in several different ways..
$bbcode_tpl['url1'] = str_replace('{URL}', 'link.php?url=\\1', $bbcode_tpl['url']);
$bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url1']);
$bbcode_tpl['url2'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']);
$bbcode_tpl['url2'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url2']);
$bbcode_tpl['url3'] = str_replace('{URL}', 'link.php?url=\\1', $bbcode_tpl['url']);
$bbcode_tpl['url3'] = str_replace('{DESCRIPTION}', '\\2', $bbcode_tpl['url3']);
$bbcode_tpl['url4'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']);
$bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url4']);
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
//+MOD: Select Expand BBcodes MOD
global $phpbb_root_path;
$u_sxbb_jslib = $phpbb_root_path . 'templates/select_expand_bbcodes.js';
// Replacing BBCode variables, but also adding CR to preserve HTML comment delimiters for JS code.
$expand_ary1 = array('<!--', '//-->', '{L_SELECT}', '{L_EXPAND}', '{L_CONTRACT}', '{U_SXBB_JSLIB}');
$expand_ary2 = array("\r<!--\r", "\r//-->\r", $lang['Select'], $lang['Expand'], $lang['Contract'], $u_sxbb_jslib);
$expand_ary3 = array('<!--', '//-->');
$expand_ary4 = array("\r<!--\r", "\r//-->\r");
$bbcode_tpl['quote_open'] = str_replace($expand_ary1, $expand_ary2, $bbcode_tpl['quote_open']);
$bbcode_tpl['quote_username_open'] = str_replace($expand_ary1, $expand_ary2, $bbcode_tpl['quote_username_open']);
$bbcode_tpl['code_open'] = str_replace($expand_ary1, $expand_ary2, $bbcode_tpl['code_open']);
$bbcode_tpl['quote_close'] = str_replace($expand_ary3, $expand_ary4, $bbcode_tpl['quote_close']);
$bbcode_tpl['code_close'] = str_replace($expand_ary3, $expand_ary4, $bbcode_tpl['code_close']);
//-MOD: Select Expand BBcodes MOD
define("BBCODE_TPL_READY", true);
return $bbcode_tpl;
}
/**
* 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.
*/
function bbencode_second_pass($text, $uid)
{
global $lang, $bbcode_tpl;
$text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);
// 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;
}
// Only load the templates ONCE..
if (!defined("BBCODE_TPL_READY"))
{
// load templates from file into array.
$bbcode_tpl = load_bbcode_template();
// prepare array for use in regexps.
$bbcode_tpl = prepare_bbcode_template($bbcode_tpl);
}
// [CODE] and
Código: Seleccionar todo
and
Código: Seleccionar todo
', '
Código: Seleccionar todo
, because
* we need to match these tags first and transform HTML tags
* in their contents..
* $func - This variable should contain a string that is the name of a function.
* That function will be called when a match is found, and passed 2
* parameters: ($text, $uid). The function should return a string.
* This is used when some transformation needs to be applied to the
* text INSIDE a pair of matching tags. If this variable is FALSE or the
* empty string, it will not be executed.
* If open_tag is an array, then the pda will try to match pairs consisting of
* any element of open_tag followed by close_tag. This allows us to match things
* like [list=A]...[/list] and [list=1]...[/list] in one pass of the PDA.
*
* NOTES: - this function assumes the first character of $text is a space.
* - every opening tag and closing tag must be of the [...] format.
*/
function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_new, $mark_lowest_level, $func, $open_regexp_replace = false)
{
$open_tag_count = 0;
if (!$close_tag_new || ($close_tag_new == ''))
{
$close_tag_new = $close_tag;
}
$close_tag_length = strlen($close_tag);
$close_tag_new_length = strlen($close_tag_new);
$uid_length = strlen($uid);
$use_function_pointer = ($func && ($func != ''));
$stack = array();
if (is_array($open_tag))
{
if (0 == count($open_tag))
{
// No opening tags to match, so return.
return $text;
}
$open_tag_count = count($open_tag);
}
else
{
// only one opening tag. make it into a 1-element array.
$open_tag_temp = $open_tag;
$open_tag = array();
$open_tag[0] = $open_tag_temp;
$open_tag_count = 1;
}
$open_is_regexp = false;
if ($open_regexp_replace)
{
$open_is_regexp = true;
if (!is_array($open_regexp_replace))
{
$open_regexp_temp = $open_regexp_replace;
$open_regexp_replace = array();
$open_regexp_replace[0] = $open_regexp_temp;
}
}
if ($mark_lowest_level && $open_is_regexp)
{
message_die(GENERAL_ERROR, "Unsupported operation for bbcode_first_pass_pda().");
}
// Start at the 2nd char of the string, looking for opening tags.
$curr_pos = 1;
while ($curr_pos && ($curr_pos < strlen($text)))
{
$curr_pos = strpos($text, "[", $curr_pos);
// If not found, $curr_pos will be 0, and the loop will end.
if ($curr_pos)
{
// We found a [. It starts at $curr_pos.
// check if it's a starting or ending tag.
$found_start = false;
$which_start_tag = "";
$start_tag_index = -1;
for ($i = 0; $i < $open_tag_count; $i++)
{
// Grab everything until the first "]"...
$possible_start = substr($text, $curr_pos, strpos($text, ']', $curr_pos + 1) - $curr_pos + 1);
//
// We're going to try and catch usernames with "[' characters.
//
if( preg_match('#\[quote=\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\"(.*?)\\"\]#si', $possible_start) )
{
// OK we are in a quote tag that probably contains a ] bracket.
// Grab a bit more of the string to hopefully get all of it..
if ($close_pos = strpos($text, '"]', $curr_pos + 9))
{
if (strpos(substr($text, $curr_pos + 9, $close_pos - ($curr_pos + 9)), '[quote') === false)
{
$possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 2);
}
}
}
// Now compare, either using regexp or not.
if ($open_is_regexp)
{
$match_result = array();
if (preg_match($open_tag[$i], $possible_start, $match_result))
{
$found_start = true;
$which_start_tag = $match_result[0];
$start_tag_index = $i;
break;
}
}
else
{
// straightforward string comparison.
if (0 == strcasecmp($open_tag[$i], $possible_start))
{
$found_start = true;
$which_start_tag = $open_tag[$i];
$start_tag_index = $i;
break;
}
}
}
if ($found_start)
{
// We have an opening tag.
// Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right.
$match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index);
bbcode_array_push($stack, $match);
//
// Rather than just increment $curr_pos
// Set it to the ending of the tag we just found
// Keeps error in nested tag from breaking out
// of table structure..
//
$curr_pos += strlen($possible_start);
}
else
{
// check for a closing tag..
$possible_end = substr($text, $curr_pos, $close_tag_length);
if (0 == strcasecmp($close_tag, $possible_end))
{
// We have an ending tag.
// Check if we've already found a matching starting tag.
if (sizeof($stack) > 0)
{
// There exists a starting tag.
$curr_nesting_depth = sizeof($stack);
// We need to do 2 replacements now.
$match = bbcode_array_pop($stack);
$start_index = $match['pos'];
$start_tag = $match['tag'];
$start_length = strlen($start_tag);
$start_tag_index = $match['index'];
if ($open_is_regexp)
{
$start_tag = preg_replace($open_tag[$start_tag_index], $open_regexp_replace[$start_tag_index], $start_tag);
}
// everything before the opening tag.
$before_start_tag = substr($text, 0, $start_index);
// everything after the opening tag, but before the closing tag.
$between_tags = substr($text, $start_index + $start_length, $curr_pos - $start_index - $start_length);
// Run the given function on the text between the tags..
if ($use_function_pointer)
{
$between_tags = $func($between_tags, $uid);
}
// everything after the closing tag.
$after_end_tag = substr($text, $curr_pos + $close_tag_length);
// Mark the lowest nesting level if needed.
if ($mark_lowest_level && ($curr_nesting_depth == 1))
{
if ($open_tag[0] == '[code]')
{
$code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#\[#', '#\]#', '#\(#', '#\)#', '#\{#', '#\}#');
$code_entities_replace = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}');
$between_tags = preg_replace($code_entities_match, $code_entities_replace, $between_tags);
}
$text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$curr_nesting_depth:$uid]";
$text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$curr_nesting_depth:$uid]";
}
else
{
if ($open_tag[0] == '[code]')
{
$text = $before_start_tag . '[code]';
$text .= $between_tags . '
Código: Seleccionar todo
tags. This includes
* running htmlspecialchars() over the text contained between
* any pair of [code] tags that are at the first level of
* nesting. Tags at the first level of nesting are indicated
* by this format: [code:1:$uid] ... [/code:1:$uid]
* Other tags are in this format: [code:$uid] ... [/code:$uid]
*/
function bbencode_second_pass_code($text, $uid, $bbcode_tpl)
{
global $lang;
$code_start_html = $bbcode_tpl['code_open'];
$code_end_html = $bbcode_tpl['code_close'];
// First, do all the 1st-level matches. These need an htmlspecialchars() run,
// so they have to be handled differently.
$match_count = preg_match_all("#\[code:1:$uid\](.*?)\[/code:1:$uid\]#si", $text, $matches);
for ($i = 0; $i < $match_count; $i++)
{
$before_replace = $matches[1][$i];
$after_replace = $matches[1][$i];
// Replace 2 spaces with " " so non-tabbed code indents without making huge long lines.
$after_replace = str_replace(" ", " ", $after_replace);
// now Replace 2 spaces with " " to catch odd #s of spaces.
$after_replace = str_replace(" ", " ", $after_replace);
// Replace tabs with " " so tabbed code indents sorta right without making huge long lines.
$after_replace = str_replace("\t", " ", $after_replace);
// now Replace space occurring at the beginning of a line
$after_replace = preg_replace("/^ {1}/m", ' ', $after_replace);
$str_to_match = "[code:1:$uid]" . $before_replace . "[/code:1:$uid]";
$replacement = $code_start_html;
$replacement .= $after_replace;
$replacement .= $code_end_html;
$text = str_replace($str_to_match, $replacement, $text);
}
// Now, do all the non-first-level matches. These are simple.
$text = str_replace("[code:$uid]", $code_start_html, $text);
$text = str_replace("[/code:$uid]", $code_end_html, $text);
return $text;
} // bbencode_second_pass_code()
/**
* Rewritten by Nathan Codding - Feb 6, 2001.
* - Goes through the given string, and replaces xxxx://yyyy with an HTML <a> tag linking
* to that URL
* - Goes through the given string, and replaces www.xxxx.yyyy[zzzz] with an HTML <a> tag linking
* to http://www.xxxx.yyyy[/zzzz]
* - Goes through the given string, and replaces xxxx@yyyy with an HTML mailto: tag linking
* to that email address
* - Only matches these 2 patterns either after a space, or at the beginning of a line
*
* Notes: the email one might get annoying - it's easy to make it more restrictive, though.. maybe
* have it require something like xxxx@yyyy.zzzz or such. We'll see.
*/
function ed2k_link_callback ($m)
{
$max_len = 120;
$href = 'href="' . $m[2] . '" class="postlink"';
$size = humn_size($m[4]);
$fname = urldecode($m[3]);
if ( strlen($fname) > $max_len )
{
$fname = substr($fname, 0, $max_len - 19) . '...' . substr($fname, -16);
}
if (preg_match('#[<>"]#', $fname))
{
$fname = htmlspecialchars($fname);
}
return "<a $href>$fname ($size)</a>";
}
function make_clickable($text)
{
$text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);
// pad it with a space so we can match things at the start of the 1st line.
$ret = ' ' . $text;
// ed2k file links (Meithar):
// ed2k://|file|fileName|fileSize|fileHash|(optional params)|(optional params)|etc|
$ret = preg_replace_callback("#(^|(?<=[^\w"']))(ed2k://\|file\|([^\\/\|:<>\*\?"]+?)\|(\d+?)\|([a-f0-9]{32})\|(.*?)/?)(?!["'])(?=([,\.]*?[\s<\[])|[,\.]*?$)#i", "ed2k_link_callback", $ret);
// ed2k server links:
// ed2k://|server|serverIP|serverPort
$ret = preg_replace("#(^|(?<=[^\w"']))(ed2k://\|server\|([\d\.]+?)\|(\d+?)\|/?)#i", "<a href="\\2" class="postLink">\\3:\\4</a>", $ret);
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, comma, double quote or <
$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href="link.php?url=\\2" target="_blank">\\2</a>", $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href="link.php?url=http://\\2" target="_blank">\\2</a>", $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href="mailto:\\2@\\3" class="postLink">\\2@\\3</a>", $ret);
// Remove our padding..
$ret = substr($ret, 1);
return($ret);
}
/**
* Nathan Codding - Feb 6, 2001
* Reverses the effects of make_clickable(), for use in editpost.
* - Does not distinguish between "www.xxxx.yyyy" and "http://aaaa.bbbb" type URLs.
*
*/
function undo_make_clickable($text)
{
$text = preg_replace("#<!-- BBCode auto-link start --><a href="(.*?)">.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text);
$text = preg_replace("#<!-- BBcode auto-mailto start --><a href="mailto:(.*?)">.*?</a><!-- BBCode auto-mailto end -->#i", "\\1", $text);
return $text;
}
/**
* Nathan Codding - August 24, 2000.
* Takes a string, and does the reverse of the PHP standard function
* htmlspecialchars().
*/
function undo_htmlspecialchars($input)
{
$input = preg_replace("/>/i", ">", $input);
$input = preg_replace("/</i", "<", $input);
$input = preg_replace("/"/i", """, $input);
$input = preg_replace("/&/i", "&", $input);
return $input;
}
/**
* This is used to change a [*] tag into a [*:$uid] tag as part
* of the first-pass bbencoding of [list] tags. It fits the
* standard required in order to be passed as a variable
* function into bbencode_first_pass_pda().
*/
function replace_listitems($text, $uid)
{
$text = str_replace("[*]", "[*:$uid]", $text);
return $text;
}
/**
* Escapes the "/" character with "\/". This is useful when you need
* to stick a runtime string into a PREG regexp that is being delimited
* with slashes.
*/
function escape_slashes($input)
{
$output = str_replace('/', '\/', $input);
return $output;
}
/**
* This function does exactly what the PHP4 function array_push() does
* however, to keep phpBB compatable with PHP 3 we had to come up with our own
* method of doing it.
*/
function bbcode_array_push(&$stack, $value)
{
$stack[] = $value;
return(sizeof($stack));
}
/**
* This function does exactly what the PHP4 function array_pop() does
* however, to keep phpBB compatable with PHP 3 we had to come up with our own
* method of doing it.
*/
function bbcode_array_pop(&$stack)
{
$arrSize = count($stack);
$x = 1;
while(list($key, $val) = each($stack))
{
if($x < count($stack))
{
$tmpArr[] = $val;
}
else
{
$return_val = $val;
}
$x++;
}
$stack = $tmpArr;
return($return_val);
}
//
// Smilies code ... would this be better tagged on to the end of bbcode.php?
// Probably so and I'll move it before B2
//
function smilies_pass($message)
{
static $orig, $repl;
if (!isset($orig))
{
global $db, $board_config;
$orig = $repl = array();
$sql = 'SELECT * FROM ' . SMILIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql);
}
$smilies = $db->sql_fetchrowset($result);
if (count($smilies))
{
usort($smilies, 'smiley_sort');
}
for ($i = 0; $i < count($smilies); $i++)
{
$orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
$repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
}
}
if (count($orig))
{
$message = preg_replace($orig, $repl, ' ' . $message . ' ');
$message = substr($message, 1, -1);
}
return $message;
}
function smiley_sort($a, $b)
{
if ( strlen($a['code']) == strlen($b['code']) )
{
return 0;
}
return ( strlen($a['code']) > strlen($b['code']) ) ? -1 : 1;
}
?>
Código: Seleccionar todo
<!-- BEGIN ulist_open --><ul><!-- END ulist_open -->
<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->
<!-- BEGIN olist_open --><ol type="{LIST_TYPE}"><!-- END olist_open -->
<!-- BEGIN olist_close --></ol><!-- END olist_close -->
<!-- BEGIN listitem --><li><!-- END listitem -->
<!-- BEGIN quote_username_open --></span>
<table class="bodyline" width="90%"; cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td class="helpline"><span class="genmed"><b>{USERNAME} {L_WROTE}:</b>
<script type="text/javascript" src="{U_SXBB_JSLIB}"></script>
<script type="text/javascript">
<!--
var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
SXBB[id] = new _SXBB(id);
SXBB[id].T['select'] = '{L_SELECT}';
SXBB[id].T['expand'] = '{L_EXPAND}';
SXBB[id].T['contract'] = '{L_CONTRACT}';
SXBB[id].writeCmd();
//-->
</script>
</span></td>
</tr>
<tr>
<td class="quote">
<script type="text/javascript">
<!--
SXBB[id].writeDiv();
//-->
</script><!-- END quote_username_open -->
<!-- BEGIN quote_open --></span>
<table class="bodyline" width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td class="helpline"><span class="genmed"><b>{L_QUOTE}:</b>
<script type="text/javascript" src="{U_SXBB_JSLIB}"></script>
<script type="text/javascript">
<!--
var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
SXBB[id] = new _SXBB(id);
SXBB[id].T['select'] = '{L_SELECT}';
SXBB[id].T['expand'] = '{L_EXPAND}';
SXBB[id].T['contract'] = '{L_CONTRACT}';
SXBB[id].writeCmd();
//-->
</script>
</span></td>
</tr>
<tr>
<td class="quote">
<script type="text/javascript">
<!--
SXBB[id].writeDiv();
//-->
</script><!-- END quote_open -->
<!-- BEGIN quote_close -->
<script type="text/javascript">
<!--
document.write('</div>');
//-->
</script>
</td>
</tr>
</table>
<span class="postbody"><!-- END quote_close -->
<!-- BEGIN code_open --></span>
<table class="bodyline" width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<td class="helpline"><span class="genmed"><b>{L_CODE}:</b>
<script type="text/javascript" src="{U_SXBB_JSLIB}"></script>
<script type="text/javascript">
<!--
var id = 'SXBB' + (1000 + Math.floor(Math.random() * 5000));
SXBB[id] = new _SXBB(id);
SXBB[id].T['select'] = '{L_SELECT}';
SXBB[id].T['expand'] = '{L_EXPAND}';
SXBB[id].T['contract'] = '{L_CONTRACT}';
SXBB[id].writeCmd();
//-->
</script>
</span></td>
</tr>
<tr>
<td class="code">
<script type="text/javascript">
<!--
SXBB[id].writeDiv();
//-->
</script><!-- END code_open -->
<!-- BEGIN code_close -->
<script type="text/javascript">
<!--
document.write('</div>');
//-->
</script>
</td>
</tr>
</table>
<span class="postbody"><!-- END code_close -->
<!-- BEGIN b_open --><span style="font-weight: bold"><!-- END b_open -->
<!-- BEGIN b_close --></span><!-- END b_close -->
<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
<!-- BEGIN u_close --></span><!-- END u_close -->
<!-- BEGIN i_open --><span style="font-style: italic"><!-- END i_open -->
<!-- BEGIN i_close --></span><!-- END i_close -->
<!-- BEGIN color_open --><span style="color: {COLOR}"><!-- END color_open -->
<!-- BEGIN color_close --></span><!-- END color_close -->
<!-- BEGIN size_open --><span style="font-size: {SIZE}px; line-height: normal"><!-- END size_open -->
<!-- BEGIN size_close --></span><!-- END size_close -->
<!-- BEGIN font_open --><span style="font-family: {FONT}"><!-- END font_open -->
<!-- BEGIN font_close --></span><!-- END font_close -->
<!-- BEGIN img --><img resizemod="on" onload="rmw_img_loaded(this)" src="{URL}" border="0" /><!-- END img -->
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
Raul [ThE KuKa] en phpBB
Jr. Extension Validator - Jr. Styles Validator - Style Customisations - Translator - International Support Team
Si te gustan mis estilos, traducciones, etc. y quieres mostrar algo de aprecio, no dudes en hacer una donación
phpBB España - En línea desde 2003