Mensagens - mCavaleiro

Páginas: 1 2 3 ... 5
1
Comunidade / Re: Algumas notas e vagas para a equipa
« em: 24/Fev/2008 13:01 »
Da minha parte também admiro MUITO todo o trabalho desta comunidade.
Mas de momento ainda não me sinto com conhecimentos para tais voos...
Vou continuar a ajudar no que puder, sempre que cá vier.
Parabéns e muitas felicidades à nova equipe, e obrigado pelo email.

 :obrigado: :+trafego:

2
Obrigado mas desinstalei a mod.

1 abraço :obrigado:

3
Olá amigos, instalei o mesmo MOD, e tudo correu bem..... mas no acto de activar o novo utilizador ( usuário ), dá-me o  seguinte erro:

General Error
Admin_user_fail

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '', user_allowdefaultavatar = 1 WHERE user_id = 55' at l

UPDATE phpbb_users SET user_email = 'icxc@clix.pt', user_icq = '', user_website = '', user_occ = '', user_from = 'Porto', user_interests = '', user_sig = '', user_viewemail = 0, user_aim = '', user_yim = '', user_msnm = '', user_attachsig = 1, user_sig_bbcode_uid = '', user_allowsmile = 1, user_allowhtml = 1, user_allowavatar = 1, user_allowbbcode = 1, user_allow_viewonline = 1, user_notify = 0, user_allow_pm = 1, user_notify_pm = 1, user_popup_pm = 1, user_lang = 'portuguese', user_style = 108, user_timezone = 1, user_dateformat = 'D M d, Y g:i a', user_active = 1, user_rank = 0, user_invites = 0', user_allowdefaultavatar = 1 WHERE user_id = 55

Line : 735
File : admin_users.php



quem puder ajudar agradeço imenso.

4
phpBB / (RESOLVIDO) Hide (Advanced BBCode Box Add-on)
« em: 30/Abr/2007 10:54 »
Precisava do mod Hide, para adicionar ao Advanced BBCode Box 5.0.0, para esconder os links, e só mostrar para quem postar. ( utilizadores registados é claro )

Alguém sabe se existe e se funciona?

ESTE NÃO DÁ:

Código: [Seleccione]

############################################################################
## 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/viewtopic.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('[b]','[/b]'...

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

You will obtain something like this :
 

bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[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/download/hide/hackhide.php?ver=rc3&num=7&lang=en
Official page => http://membres.lycos.fr/philiweb/accueil.php?num=15



ESTE TBM NÃO:


Código: [Seleccione]


#################################################################
## Mod Title: Hide Links
## Mod Author: Nome < nome@bk.ru > ICQ #162783614
## Mod Version: 3.0.0
## Mod Description: This mod will prevent links from being shown
##    to unregistered users. Instead they'll be
##    advised to register or login. Registered users
##    may also be not shown links if they don't have
##    a proper amount of posts set by the forum admin.
## Mod Features:
## - hide http links and email from unregistered users
## - hide http links and email from users which do not
##  have the proper amount of posts
## - hide http links and email from moderators of other
##  forums (on/off switch in admin panel)
##
## Installation Level: Easy
## Installation Time: 5 Minutes
##
## Files To Edit: 6
##
##              admin/admin_board.php
##              includes/bbcode.php
##              language/lang_english/lang_admin.php
##              language/lang_english/lang_main.php
##              templates/subSilver/bbcode.tpl
##              templates/subSilver/admin/board_config_body.tpl
##
#################################################################
## Author's notes:
## Code has been mostly rewritten, so you'll have to reinstall
## the mode.
#################################################################
#################################################################
## History
## - 3.0.0 - Completely rewrote the mod adding some new functions
## - 2.1.1 - Updated with latest bugfixes from phpbb groupe
## - 2.1.0 - Updated with latest bugfixes from phpbb groupe
## - 2.0.0 - Fixed a bug with [url] links
## - 1.0.0 - First released
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################

#
#-----[ SQL ]-------------------------------------------
# WARNING! Change phpbb_ to whatever database prefix you have

INSERT INTO `phpbb_config` SET `config_name`='necessary_post_number', `config_value`='0';
INSERT INTO `phpbb_config` SET `config_name`='mods_priority', `config_value`='1';

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php

#
#-----[ FIND ]------------------------------------------
#
$board_email_form_yes = ( $new['board_email_form'] ) ? "checked=\"checked\"" : "";
$board_email_form_no = ( !$new['board_email_form'] ) ? "checked=\"checked\"" : "";

#
#-----[ AFTER, ADD ]------------------------------------
#
$mods_priority_yes = ( $new['mods_priority'] ) ? "checked=\"checked\"" : "";
$mods_priority_no = ( !$new['mods_priority'] ) ? "checked=\"checked\"" : "";

#
#-----[ FIND ]------------------------------------------
#
"L_HOT_THRESHOLD" => $lang['Hot_threshold'],

#
#-----[ AFTER, ADD ]------------------------------------
#
"L_NECESSARY_POST_NUMBER" => $lang['Necessary_Post_Number'],
"L_MODS_PRIORITY" => $lang['Mods_Priority'],
"L_MODS_PRIORITY_EXPLAIN" => $lang['Mods_Priority_Explain'],

#
#-----[ FIND ]------------------------------------------
#
"HOT_TOPIC" => $new['hot_threshold'],

#
#-----[ AFTER, ADD ]------------------------------------
#
"NECESSARY_POST_NUMBER" => $new['necessary_post_number'],
"MODS_PRIORITY_YES" => $mods_priority_yes,
"MODS_PRIORITY_NO" => $mods_priority_no,

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

#
#-----[ FIND ]------------------------------------------
#

function prepare_bbcode_template($bbcode_tpl)
{
global $lang;

#
#-----[ REPLACE WITH ]------------------------------------
#
function prepare_bbcode_template($bbcode_tpl)
{
global $lang, $board_config, $phpEx, $u_login_logout;

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

#
#-----[ AFTER, ADD ]------------------------------------
#
$bbcode_tpl['login_request'] = str_replace('{L_WARNING}', $lang['Links_Allowed_For_Registered_Only'], $bbcode_tpl['login_request']);
$bbcode_tpl['login_request'] = str_replace('{GET_REGISTERED}', sprintf($lang['Get_Registered'], "<a href=\"" . append_sid('profile.' . $phpEx . '?mode=register') . "\">", "</a>"), $bbcode_tpl['login_request']);
$bbcode_tpl['login_request'] = str_replace('{ENTER_FORUM}', sprintf($lang['Enter_Forum'], "<a href=\"" . append_sid($u_login_logout) . "\">", "</a>"), $bbcode_tpl['login_request']);

$bbcode_tpl['post_count_request'] = str_replace('{L_WARNING}', sprintf($lang['Post_Limit'], $board_config['necessary_post_number']), $bbcode_tpl['post_count_request']);

#
#-----[ FIND ]------------------------------------------
#
function bbencode_second_pass($text, $uid)
{
global $lang, $bbcode_tpl;

#
#-----[ REPLACE WITH ]------------------------------------
#
function bbencode_second_pass($text, $uid)
{
global $lang, $bbcode_tpl, $userdata, $board_config, $is_auth;

#
#-----[ FIND ]------------------------------------------
#
// matches a [url]xxxx://www.phpbb.com[/url] code..
$patterns[] = "#\[url\]([\w]+?://([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url1'];

// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url\]((www|ftp)\.([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url2'];

// [url=xxxx://www.phpbb.com]phpBB[/url] code..
$patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url3'];


// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = $bbcode_tpl['url4'];

// [email]user@domain.tld[/email] code..
$patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[] = $bbcode_tpl['email'];

#
#-----[ REPLACE WITH ]------------------------------------
#
$url_replacer = ( !$userdata['session_logged_in'] ) ? $bbcode_tpl['login_request'] : ( ( ( $userdata['user_posts'] >= $board_config['necessary_post_number'] ) || ( $userdata['user_level'] == 1 ) || ( ( $is_auth['auth_mod'] == 1 ) && ( $board_config['mods_priority'] == 1 ) ) ) ? '' : $bbcode_tpl['post_count_request'] );

// matches a [url]xxxx://www.phpbb.com[/url] code..
$patterns[] = "#\[url\]([\w]+?://([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is";
$replacements[] = ( $url_replacer ) ? $url_replacer : $bbcode_tpl['url1'];

// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url\]((www|ftp)\.([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is";
$replacements[] = ( $url_replacer ) ? $url_replacer : $bbcode_tpl['url2'];

// [url=xxxx://www.phpbb.com]phpBB[/url] code..
$patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = ( $url_replacer ) ? $url_replacer : $bbcode_tpl['url3'];

// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
$replacements[] = ( $url_replacer ) ? $url_replacer : $bbcode_tpl['url4'];

// [email]user@domain.tld[/email] code..
$patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[] = ( $url_replacer ) ? $url_replacer : $bbcode_tpl['email'];

#
#-----[ FIND ]------------------------------------------
#
function make_clickable($text)
{

#
#-----[ AFTER, ADD ]------------------------------------
#
global $bbcode_tpl, $userdata, $board_config, $is_auth;

#
#-----[ FIND ]------------------------------------------
#
// 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=\"\\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=\"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\">\\2@\\3</a>", $ret);

#
#-----[ REPLACE WITH ]------------------------------------
#
$url_replacer = ( !$userdata['session_logged_in'] ) ? $bbcode_tpl['login_request'] : ( ( ( $userdata['user_posts'] >= $board_config['necessary_post_number'] ) || ( $userdata['user_level'] == 1 ) || ( ( $is_auth['auth_mod'] == 1 ) && ( $board_config['mods_priority'] == 1 ) ) ) ? '' : $bbcode_tpl['post_count_request'] );

if ( $url_replacer )
{
// 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", $url_replacer, $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", $url_replacer, $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", $url_replacer, $ret);
}
else
{
// 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=\"\\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=\"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\">\\2@\\3</a>", $ret);
}

#*********************************************************************
#      
# NOTE: You will have to apply these changes to all existing
# language packs. I use lang_english as an example      
#      
#*********************************************************************

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#
$lang['Login_reset_time_explain'] =

#
#-----[ AFTER, ADD ]------------------------------------
#
//
// Hide links mod
//
$lang['Necessary_Post_Number'] = 'Number of posts without which people can\'t see links';
$lang['Mods_Priority'] = 'Forum moderators post count doesn\'t matter';
$lang['Mods_Priority_Explain'] = 'Forum moderators are allowed to see all links in their forum, even if they don\'t have enough posts';

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
$lang['Please_remove_install_contrib'] =

#
#-----[ AFTER, ADD ]------------------------------------
#

//
// Hide links mod
//
$lang['Links_Allowed_For_Registered_Only'] = 'Only registered users can see links on this board!';
$lang['Get_Registered'] = 'Get %sregistred%s or ';
$lang['Enter_Forum'] = '%senter%s the forums!';
$lang['Post_Limit'] = 'You must have <b>%s</b> posts to see links on this board';

#*********************************************************************
#      
# NOTE: You will have to apply these changes to all existing templates
# I use SubSilver as an example      
#      
#*********************************************************************

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl

#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</a><!-- END email -->

#
#-----[ AFTER, ADD ]------------------------------------
#
<!-- BEGIN login_request --></span><table width="40%" cellspacing="1" cellpadding="3" border="0">
<tr>
<td class="quote">{L_WARNING}<br />{GET_REGISTERED}{ENTER_FORUM}</td>
</tr>
</table><span class="postbody"><!-- END login_request -->

<!-- BEGIN post_count_request --> </span><table width="40%" cellspacing="1" cellpadding="3" border="0">
<tr>
<td class="quote">{L_WARNING}</td>
</tr>
</table><span class="postbody"><!-- END post_count_request -->

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_HOT_THRESHOLD}</td>
<td class="row2"><input class="post" type="text" name="hot_threshold" size="3" maxlength="4" value="{HOT_TOPIC}" /></td>
</tr>

#
#-----[ AFTER, ADD ]------------------------------------
#
<tr>
<td class="row1">{L_NECESSARY_POST_NUMBER}</td>
<td class="row2"><input class="post" type="text" name="necessary_post_number" size="3" maxlength="4" value="{NECESSARY_POST_NUMBER}" /></td>
</tr>
<tr>
<td class="row1">{L_MODS_PRIORITY}<br /><span class="gensmall">{L_MODS_PRIORITY_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="mods_priority" value="1" {MODS_PRIORITY_YES} />{L_YES}&nbsp; &nbsp;<input type="radio" name="mods_priority" value="0" {MODS_PRIORITY_NO} />{L_NO}</td>
</tr>

#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
#EoM


Agradeço.

5
phpBB / .swf no header de um phpbb
« em: 02/Fev/2007 16:45 »
Coloca este MOD:

Código: [Seleccione]


##############################################################
## MOD Title: Flash MOD
## MOD Author: MTRS - mtrs@hotmail.com
## MOD Description: Allow user to post flash video in forum (works on 2.0.21).
## MOD Version: 1.0.2
##
## Installation Level: Easy
## Installation Time: 10 minutes
##
## Files To Edit:   7
##
##                  posting.php
##                  privmsg
##                  fetchposts.php ( for the flash you post in the forum appear on ezportal news selective if you have ezportal installed.)
##                  includes/bbcode.php
##                  language/lang_english/lang_main.php
##                  templates/subSilver/bbcode.tpl  
##                  templates/subSilver/posting_body.tpl
##
## Included Files:
## N/A
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## Please add correct code as it tell you to add in the mod, and this mod ## is working on any forums without Multi-BBcode mod installed .
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
## Version History : test on phpbb2 version 2.0.21
##############################################################

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

#
#-----[ FIND ]------------------------------------------
#
   $bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
#
#-----[ AFTER, ADD ]------------------------------------------
#
   
   // [flash width= height= loop= ] and [/flash] code..
   $bbcode_tpl['swf'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['swf']);
        $bbcode_tpl['swf'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['swf']);
        $bbcode_tpl['swf'] = str_replace('{URL}', '\\3', $bbcode_tpl['swf']);
   
   
#
#-----[ FIND ]------------------------------------------
#
   $replacements[] = $bbcode_tpl['email'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
   
   // [flash width= height= loop= ] and [/flash] code..
        $patterns[] = "#\[swf width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9]):$uid\](.*?)\[/swf:$uid\]#si";
        $replacements[] = $bbcode_tpl['swf'];
   
#
#-----[ FIND ]------------------------------------------
#
#
 $text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
#
#
#-----[ AFTER, ADD ]------------------------------------------
#
   
   //[flash width= heigth= loop=] and [/flash]
        $text = preg_replace("#\[swf width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/swf\]#si","[swf width=\\1 height=\\2:$uid\]\\3[/swf:$uid]", $text);
   
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
# NOTE: the full line to look for is:
#
# $lang['bbcode_f_help'] = "Font size: [size=x-small]small text[/size]";
#


#
#-----[ AFTER, ADD ]------------------------------------------
#

$lang['bbcode_swf_help'] = 'Flash: [swf width= height= ]url to swf file[/swf]';

#
#-----[ OPEN ]------------------------------------------
#

posting.php

#
#-----[ FIND ]---------------------------------
#

'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],

#
#-----[ AFTER, ADD ]--------------------------------
#

'L_BBCODE_SWF_HELP' => $lang['bbcode_swf_help'],

#
#-----[ OPEN ]------------------------------------------
#

privmsg.php

#
#-----[ FIND ]---------------------------------
#

'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],

#
#-----[ AFTER, ADD ]--------------------------------
#

'L_BBCODE_SWF_HELP' => $lang['bbcode_swf_help'],

#
#-----[ OPEN ]------------------------------------------
#
# IF you have ezportal and want the flash you post in forum appear on the portal

fetchposts.php

#
#-----[ FIND ]---------------------------------
#

// [i] and [/i] for italicizing text.
   $text = str_replace("[i:$uid]", "", $text);
   $text = str_replace("[/i:$uid]", "", $text);

#
#-----[ AFTER, ADD ]--------------------------------
#

//[flash width= heigth= loop=] and [/flash] for flash code ..
$text = str_replace("[swf:$uid]", "", $text);
$text = str_replace("[/swf:$uid]", "", $text);
$text = preg_replace("#\[swf width=([0-9]?[0-9]?[0-9]) height=([0-9]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/swf\]#si", "", $text);

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
   
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- BEGIN swf --><!-- URL's used in the movie-->
<!-- text used in the movie-->
<!-- -->
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH={WIDTH} HEIGHT={HEIGHT}>
<PARAM NAME=movie VALUE="{URL}"><PARAM NAME=quality VALUE=high> <PARAM NAME=scale VALUE=noborder> <PARAM NAME=wmode VALUE=transparent> <PARAM NAME=bgcolor VALUE=#000000>
  <EMBED src="{URL}" quality=high scale=noborder wmode=transparent bgcolor=#000000 WIDTH={WIDTH} HEIGHT={HEIGHT} TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED></OBJECT><!-- END swf -->

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl

#
#-----[ FIND ]------------------------------------------
#
f_help = "{L_BBCODE_F_HELP}";

#
#---------[AFTER, ADD]--------------------
#

swf_help = "{L_BBCODE_SWF_HELP}";

#
#---------------[ FIND ]---------------------
#
# NOTE: the actual line to find is MUCH longer, containing all the bbcode tags
#
bbtags = new Array(

#
#-----[ IN-LINE FIND ]------------------------------------------
#
'[url]','[/url]'

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
,'[swf width=400 height=300]','[/swf]'

#
#---------------[ FIND ]---------------------
#
# Find this line if you dont have no other bbcode mod installed otherwise fine the very last line similiar to this line and
add up increase "2" in name="addbbcode " and onClick="bbstyle( )"

<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>

#
#---------[AFTER, ADD]--------------------
#
#In this case it is gonna be: [ name="addbbcode18" for name="addbbcode " ]  and:[ onClick="bbstyle(18)" for onClick="bbstyle( )" ] for the new line to add after,

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

#
#---------------[ FIND this 2 lines]---------------------
#
# Doing the same thing for this two line and replace the old value with the new value increase by 2, in this case it is gonna
#be 20 and 22

<select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">

</select> &nbsp;{L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">

#
#---------------[ REPLACE THE VALUE]---------------------
#
of 18 and 20 in the line with 20 and 22 for each correspond line (18=20, 20=22)

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


6
Desenvolvimento / Atacado com spambots?
« em: 23/Jan/2007 13:13 »
Manda pra mim tmb sff  :wink:

7
phpBB / [Resolvido] - Tutorial para backup de phpBB
« em: 22/Jan/2007 13:28 »
Ok obrigado =D&gt;  =D&gt;

8
pois, foi .

reconfigurar o config.php,
e na base dados no CPanel, o phpbb_config ( pagina 3 ).

Obrigado, na mesma. =D&gt;

9
Pois é........

:arrow: Fiz um backup TOTAL do meu forum , tudo bem a estrutura veio toda ( 48 ) tabelas.
:arrow: Reenviei para outro servidor ( MySQL/ => ( 48 ) tabelas , tudo direitinho, sem erros, com o programa de FTP, foi o conteudo do fórum todinho....

:arrow: Mas...... na hora de abrir deu o seguinte erro.

Código: [Seleccione]

Warning: mysql_connect(): Can't connect to MySQL server on 'mysql2.SERVIDOR.ANTIGO.com' (4) in /home/www/NOVO.SERVIDOR.com/fm/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/www/NOVO.SERVIDOR.com/fm/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/www/NOVO.SERVIDOR.com/fm/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database


Como poderei sair daqui  :?:

10
Desenvolvimento / Mudar de Servidor - Backups CPanel??
« em: 17/Jan/2007 14:37 »
=D&gt;

Também tinha a mesma dúvida, mas já me sinto esclarecido.

Aqui fica mais uma ajudinha, pro +speed!!!!

http://www.phpbbrasil.com.br/index.php?fuseaction=flashtutos.BackupPhpMyAdmin

http://www.phpbbrasil.com.br/index.php?fuseaction=flashtutos.RestaurandoBackupMyAdmin

abraços.

11
phpBB / [Resolvido] - Tutorial para backup de phpBB
« em: 16/Jan/2007 15:01 »
:lol:

Alguém sabe como fazer um backup, completo, completinho de um fórum em phpBB2.

Desculpem a ignorância, sei que através do ACP, se pode fazer:

- de dados
- da estrutura
- total

pois, qual a melhor forma de se fazer, e dará para depois repor num outro servidor?

 :oops:  abraços....

12
Desenvolvimento / [RESOLVIDO] MEXER NO MYSQL
« em: 12/Jan/2007 13:08 »
OK, deixem lá, deu pra entender, o que vale é a intenção.

OBRIGADO A TODOS.

JÁ RESOLVI ( de maneira diferente). =D&gt;

13
Desenvolvimento / [RESOLVIDO] MEXER NO MYSQL
« em: 11/Jan/2007 21:31 »
OK +speed vou ver isso, dividir, e depois apito, Gracias.... =D&gt;

14
Desenvolvimento / [RESOLVIDO] MEXER NO MYSQL
« em: 11/Jan/2007 20:19 »
Obrigado a ambos, Flash005 e asturmas, mas

essa imagem é o que aparece quando tento fazer a reparação, quanto ao backup parece q tbm n consigo...

tenho assim

 :arrow: backup_estrutura.sql esse funciona e adiciona 30 tabelas fica ok

 :arrow: backup_dados.sql  dá um erro e adiciona 15 tabelas

 :arrow: backup_total.sql dá um erro o mesmo do backup_dados e adiciona 30 tabelas,

depois como sou maçarico nestas coisas e nunca fiz, não sei se basta copiar todo o conteudo do fórum , root-> etc , tudo mesmo, para o servidor, ou se é preciso fazer mais coisas........

se souberem e puderem ajudar, porreiro senão lá vai ter de ir tudo à unha........
 :oops:  #-o

15
Desenvolvimento / [RESOLVIDO] MEXER NO MYSQL
« em: 11/Jan/2007 15:51 »
pois......, tou a espera dos brazucas.....

No MySQL, ESTE BLOCO ESTÁ OFF, e aparece isto:



Quem saberá a solução, mais fácil.......

 :?:

Páginas: 1 2 3 ... 5