- Kod: Tümünü seç
##############################################################
## MOD Title: Google search BBCode for Advanced BBCode Box v5.0.0
## MOD Author: Trunks81 <ejlvb@hotmail.com>
## based upon the 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: Yazılarınıza yeni bir bbcode ekler. Bu bbcode sayesinde google arama ## motorunuzu yazınıza ekleyebilirsiniz.
## Google'de aratmak için. ([google]aranacak kelime[/google])
## MOD Version: 1.2.0
##
## Installation Level: (Easy)
## Installation Time: 10 Minutes
## Files To Edit: - posting.php
## - includes/bbcode.php,
## - templates/subSilver/bbcode.tpl,
## - templates/subSilver/posting_body.tpl
## - mods/bbcode_box/bbcode_box.js
## 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
##
## NOTE ! you have to install Advanced BBCode Box v5.0.0 first!!!!!
##
## example:
## [google]string to search for[/google]
##
##############################################################
## MOD History:
##
## 2006-05-4 - code adapted for
## - the advanced bbcode box v5
## - added google.gif to template
##
## 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
##
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#--------[ COPY ]--------------------------------
images/google.gif => mods/bbcode_box/google.gif
#-----[ 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 ]------------------------------------------
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN google --><a href="http://www.google.nl/search?q={QUERY}" target="_blank">{STRING}</a><!-- END google -->
#
#-----[ OPEN ]---------------------------------
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]---------------------------------
#
<img border="0" src="mods/bbcode_box/images/code.gif" name="code" type="image" onClick="BBCcode()" onMouseOver="helpline('code')" class="postimage" alt="Code">
#
#-----[ IN-LINE FIND ]---------------------------------
#
<img border="0" src="mods/bbcode_box/images/plain.gif" name="plain" type="image" onClick="BBCplain()" onMouseOver="helpline('plain')" class="postimage" alt="Remove BBcode">
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
<img border="0" src="mods/bbcode_box/images/google.gif" name="google" type="image" onClick="BBCgoogle()" onMouseOver="helpline('google')" class="postimage" alt="google">
#
#-----[OPEN]------------------------------------------
#
mods/bbcode_box/bbcode_box.js
#
#------[ FIND ]----------------------------------------
#
symbol_help =
#
#------[ AFTER ADD ]-------------------------------------
#
google_help = "Google: [Google]ZoekWoord[/Google]";
#
#-------[ FIND ]------------------------------------------
#
var symbol = 0;
#
#------[ AFTER ADD ]-------------------------------------
#
var Google = 0;
#
#------[ FIND ]----------------------------------------
#
Quote = 0;
}
PostWrite(ToAdd);
}
#
#------[ AFTER ADD ]-------------------------------------
#
function BBCgoogle() {
var txtarea = document.post.message;
if ((clientVer >= 4) && is_ie && is_win) {
theSelection = document.selection.createRange().text;
if (theSelection != '') {
document.selection.createRange().text = "[google]" + theSelection + "[/google]";
document.post.message.focus();
return;
}
}
else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
{
mozWrap(txtarea, "[google]", "[/google]");
return;
}
if (google == 0) {
ToAdd = "[google]";
document.post.google.src = "mods/bbcode_box/images/google.gif";
google = 1;
} else {
ToAdd = "[/google]";
document.post.google.src = "mods/bbcode_box/images/google.gif";
google = 0;
}
PostWrite(ToAdd);
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM