Dakin Quelia Décimètre en Chef

Inscrit le: 17 Sep 2006 Messages: 484 Localisation: Belgique
|
Posté le: Mer 11 Oct 2006 à 20:23 Sujet du message: [DEMANDE] BBCode Google |
|
|
Bonsoir,
Serait-il possible de pouvoir adapter ce mod sans qu'on ait besoin d'installer un mod spécifique avant?
| Code: | ##############################################################
## MOD Title: Google Search BBCode
## MOD Author: wGEric < eric@egcnetwork.com > (Eric) http://eric.best-1.biz
## MOD Author, Secondary: LifeIsPain <brian@orvp.net> (Brian Evans)
## MOD Description: Adds a new bbcode. Allows you put make strings in your post
## be searched for in Google. ([google]string to search for[/google])
## MOD Version: 1.2.0
##
## Installation Level: (Easy)
## Installation Time: 10 Minutes
## Files To Edit: - posting.php
## - includes/bbcode.php,
## - langugage/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:
## You must have Multiple BBCode MOD installed for this to work.
## Get it here: http://www.phpbb.com/phpBB/viewtopic.php?t=74705
##
## example:
## [google]string to search for[/google]
##
##############################################################
## MOD History:
##
## 2004-09-27 - Version 1.2.0
## - Updated to work with Multi BBcode 1.4.0
##
## 2003-07-30 - Version 1.1.2
## - Fixed a typo
##
## 2003-07-28 - Version 1.1.1
## - Fixed bug that would escape ", Thanks to LifeIsPain
##
## 2003-07-24 - Version 1.1.0
## - Added Button
## - Minor Changes
##
## 2003-07-18 - 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 ]---------------------------------
#
$EMBB_widths = array(''
#
#-----[ IN-LINE FIND ]---------------------------------
#
array(''
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'55'
#
#-----[ FIND ]---------------------------------
#
$EMBB_values = array(''
#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_values = array(''
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'Google'
#
#-----[ FIND ]------------------------------------------
#
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$bbcode_tpl['google'] = '\'' . $bbcode_tpl['google'] . '\'';
$bbcode_tpl['google'] = str_replace('{STRING}', "' . str_replace('\\\"', '\"', '\\1') . '", $bbcode_tpl['google']);
$bbcode_tpl['google'] = str_replace('{QUERY}', "' . urlencode(str_replace('\\\"', '\"', '\\1')) . '", $bbcode_tpl['google']);
#
#-----[ FIND ]------------------------------------------
#
$replacements[] = $bbcode_tpl['email'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
// [google]string for search[/google] code..
$patterns[] = "#\[google\](.*?)\[/google\]#ise";
$replacements[] = $bbcode_tpl['google'];
#
#-----[ 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]";
#
$lang['bbcode_f_help'] =
#
#-----[ AFTER, ADD ]---------------------------------
#
$lang['bbcode_help']['google'] = 'Google: [google]String to search for[/google] (alt+%s)';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN google --><a href="http://www.google.com/search?q={QUERY}" target="_blank">{STRING}</a><!-- END google -->
#
#-----[ OPEN ]---------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ 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 ]---------------------------------
#
,'[google]','[/google]'
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM |
|
|