Forum Replies Created
-
In reply to: Automatically add user topics to favorites
it is what i need too!
In reply to: The Chinese tags will be wrongany idea!?
In reply to: forum.wp-persian.comI noticed the “support forum” plugin was outputting english strings in your forum. I have just updated the plugin to use gettext on all the strings that weren’t using it. So if you want full translation it is now available (you will need to modify your language files to add the strings).
yes you are right. i was busy for configuring the plugins now i am free for translating plugins languages
so i have my bbpress full translating where can i upload it?
i eamil it to the mailing list but i got no reply
In reply to: forum.wp-persian.comWill it have bbPress support as well
not yet for bbpress we use bbpress for support wp persian.
but i am thinking to lunch support forum for bbpress i need to consult with my friends in wp persian team
In reply to: plugin idea: “report this post”hum i upload it and active it and insert <? report_post_link(); ?> in post but nothing apeaer .8.2.1
what is the problem?
In reply to: Emoticons For bbPress?Please stop pasting huge chunks of code on the forums. Use something like http://pastebin.ca/.
ok i will do
listen i want to tell you somthing important i downloaded bbEmoticons-0.72 and unpacked it and then send it to my plugin then i go to my admin and try to active it but it show fattal error my bbpress is .8.2.1
so i tried to download 6th and every time it didnt active!
now i come and copy the code form here and open new file in php and save it then try to upload it and active it
it get active and work! what is wrong?
do you test bbEmoticons-0.72 from the original download address i think there is somthing wrong in the original file
please try it once for me
In reply to: file attachments….i need attachment plugin too it is so important for a forum
In reply to: Emoticons For bbPress?yes i thought we don t need them! because before editing it didn’t work too. so here are my fresh plugin but it didn’t work too i just insert plugin info to the top of file
In reply to: Emoticons For bbPress?<?php
/*
Plugin Name: bbEmoticons
Plugin URI:
Description: A Clickable Smilies hack for bbPress. Thanks to kohaku and aka. Original WP Grins by Alex King.
Author: hiromasa
Author URI: http://hiromasa.zone.ne.jp/blog/
Version: 0.72
*/
/******************************************************************************
* bbEmoticons version 0.72
*
* A Clickable Smilies hack for bbPress.
*
* @Author hiromasa (http://hiromasa.zone.ne.jp/blog/)
* @Thanks kohaku (http://www.orioa.com/)
* aka (http://plasticdreams.org/)
* @Original WP Grins By Alex King
* (http://www.alexking.org/software/wordpress/)
* WordPress convert_smilies function and images
*****************************************************************************/
/* Copyright 2006 hiromasa (email : webmaster@hiromasa.zone.ne.jp)
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/******************************************************************************
* bbEmoticons
*
* @author hiromasa
* @version 0.72
*
*****************************************************************************/
class bbEmoticons {
var $bb_grins;
var $bb_smiliessearch = array();
var $bb_smiliesreplace = array();
/**
* The Constructor
*
* @param none
* @return none
*/
function bbEmoticons() {
if (isset($_GET)) {
switch ($_GET) {
case “javascript”:
$this->outputGringJS();
}
exit(0);
}
$bb_smiliestrans = array(
‘ ‘ => ‘icon_smile.gif’,
‘ ‘ => ‘icon_biggrin.gif’,
‘ ‘ => ‘icon_biggrin.gif’,
‘:grin:’ => ‘icon_biggrin.gif’,
‘ ‘ => ‘icon_smile.gif’,
‘ ‘ => ‘icon_smile.gif’,
‘:smile:’ => ‘icon_smile.gif’,
‘ ‘ => ‘icon_sad.gif’,
‘ ‘ => ‘icon_sad.gif’,
‘:sad:’ => ‘icon_sad.gif’,
‘ :o’ => ‘icon_surprised.gif’,
‘ :-o’ => ‘icon_surprised.gif’,
‘:eek:’ => ‘icon_surprised.gif’,
‘ 8O’ => ‘icon_eek.gif’,
‘ 8-O’ => ‘icon_eek.gif’,
‘:shock:’ => ‘icon_eek.gif’,
‘ ‘ => ‘icon_confused.gif’,
‘ ‘ => ‘icon_confused.gif’,
‘ ??:’ => ‘icon_confused.gif’,
‘ ‘ => ‘icon_cool.gif’,
‘ ‘ => ‘icon_cool.gif’,
‘:cool:’ => ‘icon_cool.gif’,
‘:lol:’ => ‘icon_lol.gif’,
‘ :x’ => ‘icon_mad.gif’,
‘ :-x’ => ‘icon_mad.gif’,
‘:mad:’ => ‘icon_mad.gif’,
‘ ‘ => ‘icon_razz.gif’,
‘ ‘ => ‘icon_razz.gif’,
‘:razz:’ => ‘icon_razz.gif’,
‘:oops:’ => ‘icon_redface.gif’,
‘:cry:’ => ‘icon_cry.gif’,
‘:evil:’ => ‘icon_evil.gif’,
‘:twisted:’ => ‘icon_twisted.gif’,
‘:roll:’ => ‘icon_rolleyes.gif’,
‘:wink:’ => ‘icon_wink.gif’,
‘ ‘ => ‘icon_wink.gif’,
‘ ‘ => ‘icon_wink.gif’,
‘:!:’ => ‘icon_exclaim.gif’,
‘:’ => ‘icon_question.gif’,
‘:idea:’ => ‘icon_idea.gif’,
‘:arrow:’ => ‘icon_arrow.gif’,
‘ ‘ => ‘icon_neutral.gif’,
‘ ‘ => ‘icon_neutral.gif’,
‘:neutral:’ => ‘icon_neutral.gif’,
‘:mrgreen:’ => ‘icon_mrgreen.gif’,
);
foreach($bb_smiliestrans as $smiley => $img) {
$this->bb_smiliessearch[] = $smiley;
$smiley_masked = htmlspecialchars(trim($smiley), ENT_QUOTES);
$this->bb_smiliesreplace[] =
” <img src='” . bb_get_option(‘uri’) .
“bb-images/smilies/$img’ alt=’$smiley_masked’ class=’wp-smiley’ /> “;
}
$this->grins = ”;
$smiled = array();
foreach ($bb_smiliestrans as $tag => $grin) {
if (!in_array($grin, $smiled)) {
$smiled[] = $grin;
$tag = str_replace(‘ ‘, ”, $tag);
$this->grins .=
‘<img src=”‘. bb_get_option(‘uri’) .
‘bb-images/smilies/’.$grin.'” alt=”‘ .$tag .
‘” onclick=”grin(‘ ‘.$tag.”);”/> ‘;
}
}
}
/**
* post_text filter
*
* @param $text
* @return $output
*/
function convert_smilies($text) {
$output = ”;
$textarr = preg_split(“/(<.*>)/U”, $text, -1, PREG_SPLIT_DELIM_CAPTURE);
$stop = count($textarr);
for($i=0; $i<$stop; $i++) {
$content = $textarr[$i];
if((strlen($content) > 0) && (‘<‘ != $content{0})) {
$content = str_replace(
$this->bb_smiliessearch,
$this->bb_smiliesreplace,
$content);
}
$output .= $content;
}
return $output;
}
/**
* bb_grins action
*
* @param none
* @return none
*/
function bb_grins() {
echo ‘<div id=”bb_grins”>’ . $this->grins . ‘</div>’;
}
/**
* bb_head action
*
* @param none
* @return none
*/
function bb_grins_head() {
echo
‘<script type=”text/javascript” src=”‘. bb_get_option(‘uri’) .
‘my-plugins/bb-emoticons.php?bb_grins_output=javascript”></script>’ .
“n”;
}
/**
* Output Grins JavaScript
*
* @param none
* @return none
*/
function outputGringJS() {
?>
function grin(tag) {
var myField;
if (document.getElementById(‘post_content’) && document.getElementById(‘post_content’).type == ‘textarea’) {
myField = document.getElementById(‘post_content’);
}
else if (document.getElementById(‘comment’) && document.getElementById(‘comment’).type == ‘textarea’) {
myField = document.getElementById(‘comment’);
}
else {
return false;
}
if (document.selection) {
myField.focus();
sel = document.selection.createRange();
sel.text = tag;
myField.focus();
}
else if (myField.selectionStart || myField.selectionStart == ‘0’) {
var startPos = myField.selectionStart;
var endPos = myField.selectionEnd;
var cursorPos = endPos;
myField.value = myField.value.substring(0, startPos)
+ tag
+ myField.value.substring(endPos, myField.value.length);
cursorPos += tag.length;
myField.focus();
myField.selectionStart = cursorPos;
myField.selectionEnd = cursorPos;
}
else {
myField.value += tag;
myField.focus();
}
}
<?php
}
}
/******************************************************************************
* – Define for bbPress interface
*****************************************************************************/
$bbemoticons = & new bbEmoticons();
bb_add_filter(‘post_text’, array(&$bbemoticons, ‘convert_smilies’));
//bb_head is not called always.
//bb_add_action(‘bb_head’, array(&$bbemoticons, ‘bb_grins_head’));
bb_add_action(‘bb_feed_head’, array(&$bbemoticons, ‘bb_grins_head’));
bb_add_action(‘bb_grins’, array(&$bbemoticons, ‘bb_grins’));
?>
In reply to: Emoticons For bbPress?i don t know what is the problem
In reply to: Emoticons For bbPress?<?php
/*
Plugin Name: bbEmoticons
Plugin URI:
Description: A Clickable Smilies hack for bbPress. Thanks to kohaku and aka. Original WP Grins by Alex King.
Author: hiromasa
Author URI: http://hiromasa.zone.ne.jp/blog/
Version: 0.72
*/
/******************************************************************************
* bbEmoticons version 0.72
*
* A Clickable Smilies hack for bbPress.
*
* @Author hiromasa (http://hiromasa.zone.ne.jp/blog/)
* @Thanks kohaku (http://www.orioa.com/)
* aka (http://plasticdreams.org/)
* @Original WP Grins By Alex King
* (http://www.alexking.org/software/wordpress/)
* WordPress convert_smilies function and images
* (https://wordpress.org/)
*****************************************************************************/
/* Copyright 2006 hiromasa (email : webmaster@hiromasa.zone.ne.jp)
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.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/******************************************************************************
* bbEmoticons
*
* @author hiromasa
* @version 0.72
*
*****************************************************************************/
class bbEmoticons {
var $bb_grins;
var $bb_smiliessearch = array();
var $bb_smiliesreplace = array();
/**
* The Constructor
*
* @param none
* @return none
*/
function bbEmoticons() {
if (isset($_GET)) {
switch ($_GET) {
case “javascript”:
$this->outputGringJS();
}
exit(0);
}
$bb_smiliestrans = array(
‘ ‘ => ‘icon_smile.gif’,
‘ ‘ => ‘icon_biggrin.gif’,
‘ ‘ => ‘icon_biggrin.gif’,
‘:grin:’ => ‘icon_biggrin.gif’,
‘ ‘ => ‘icon_smile.gif’,
‘ ‘ => ‘icon_smile.gif’,
‘:smile:’ => ‘icon_smile.gif’,
‘ ‘ => ‘icon_sad.gif’,
‘ ‘ => ‘icon_sad.gif’,
‘:sad:’ => ‘icon_sad.gif’,
‘ :o’ => ‘icon_surprised.gif’,
‘ :-o’ => ‘icon_surprised.gif’,
‘:eek:’ => ‘icon_surprised.gif’,
‘ 8O’ => ‘icon_eek.gif’,
‘ 8-O’ => ‘icon_eek.gif’,
‘:shock:’ => ‘icon_eek.gif’,
‘ ‘ => ‘icon_confused.gif’,
‘ ‘ => ‘icon_confused.gif’,
‘ ??:’ => ‘icon_confused.gif’,
‘ ‘ => ‘icon_cool.gif’,
‘ ‘ => ‘icon_cool.gif’,
‘:cool:’ => ‘icon_cool.gif’,
‘:lol:’ => ‘icon_lol.gif’,
‘ :x’ => ‘icon_mad.gif’,
‘ :-x’ => ‘icon_mad.gif’,
‘:mad:’ => ‘icon_mad.gif’,
‘ ‘ => ‘icon_razz.gif’,
‘ ‘ => ‘icon_razz.gif’,
‘:razz:’ => ‘icon_razz.gif’,
‘:oops:’ => ‘icon_redface.gif’,
‘:cry:’ => ‘icon_cry.gif’,
‘:evil:’ => ‘icon_evil.gif’,
‘:twisted:’ => ‘icon_twisted.gif’,
‘:roll:’ => ‘icon_rolleyes.gif’,
‘:wink:’ => ‘icon_wink.gif’,
‘ ‘ => ‘icon_wink.gif’,
‘ ‘ => ‘icon_wink.gif’,
‘:!:’ => ‘icon_exclaim.gif’,
‘:’ => ‘icon_question.gif’,
‘:idea:’ => ‘icon_idea.gif’,
‘:arrow:’ => ‘icon_arrow.gif’,
‘ ‘ => ‘icon_neutral.gif’,
‘ ‘ => ‘icon_neutral.gif’,
‘:neutral:’ => ‘icon_neutral.gif’,
‘:mrgreen:’ => ‘icon_mrgreen.gif’,
);
foreach($bb_smiliestrans as $smiley => $img) {
$this->bb_smiliessearch[] = $smiley;
$smiley_masked = htmlspecialchars(trim($smiley), ENT_QUOTES);
$this->bb_smiliesreplace[] =
” <img src='” . bb_get_option(‘uri’) .
“bb-images/smilies/$img’ alt=’$smiley_masked’ class=’wp-smiley’ /> “;
}
$this->grins = ”;
$smiled = array();
foreach ($bb_smiliestrans as $tag => $grin) {
if (!in_array($grin, $smiled)) {
$smiled[] = $grin;
$tag = str_replace(‘ ‘, ”, $tag);
$this->grins .=
‘<img src=”‘. bb_get_option(‘uri’) .
‘bb-images/smilies/’.$grin.'” alt=”‘ .$tag .
‘” onclick=”grin(‘ ‘.$tag.”);”/> ‘;
}
}
}
/**
* post_text filter
*
* @param $text
* @return $output
*/
function convert_smilies($text) {
$output = ”;
$textarr = preg_split(“/(<.*>)/U”, $text, -1, PREG_SPLIT_DELIM_CAPTURE);
$stop = count($textarr);
for($i=0; $i<$stop; $i++) {
$content = $textarr[$i];
if((strlen($content) > 0) && (‘<‘ != $content{0})) {
$content = str_replace(
$this->bb_smiliessearch,
$this->bb_smiliesreplace,
$content);
}
$output .= $content;
}
return $output;
}
/**
* bb_grins action
*
* @param none
* @return none
*/
function bb_grins() {
echo ‘<div id=”bb_grins”>’ . $this->grins . ‘</div>’;
}
/**
* bb_head action
*
* @param none
* @return none
*/
function bb_grins_head() {
echo
‘<script type=”text/javascript” src=”‘. bb_get_option(‘uri’) .
‘my-plugins/bb-emoticons.php?bb_grins_output=javascript”></script>’ .
“n”;
}
/**
* Output Grins JavaScript
*
* @param none
* @return none
*/
function outputGringJS() {
function grin(tag) {
var myField;
if (document.getElementById(‘post_content’) && document.getElementById(‘post_content’).type == ‘textarea’) {
myField = document.getElementById(‘post_content’);
}
else if (document.getElementById(‘comment’) && document.getElementById(‘comment’).type == ‘textarea’) {
myField = document.getElementById(‘comment’);
}
else {
return false;
}
if (document.selection) {
myField.focus();
sel = document.selection.createRange();
sel.text = tag;
myField.focus();
}
else if (myField.selectionStart || myField.selectionStart == ‘0’) {
var startPos = myField.selectionStart;
var endPos = myField.selectionEnd;
var cursorPos = endPos;
myField.value = myField.value.substring(0, startPos)
+ tag
+ myField.value.substring(endPos, myField.value.length);
cursorPos += tag.length;
myField.focus();
myField.selectionStart = cursorPos;
myField.selectionEnd = cursorPos;
}
else {
myField.value += tag;
myField.focus();
}
}
}
}
/******************************************************************************
* – Define for bbPress interface
*****************************************************************************/
$bbemoticons = & new bbEmoticons();
bb_add_filter(‘post_text’, array(&$bbemoticons, ‘convert_smilies’));
//bb_head is not called always.
//bb_add_action(‘bb_head’, array(&$bbemoticons, ‘bb_grins_head’));
bb_add_action(‘bb_feed_head’, array(&$bbemoticons, ‘bb_grins_head’));
bb_add_action(‘bb_grins’, array(&$bbemoticons, ‘bb_grins’));
?>
In reply to: Emoticons For bbPress?i did wht u said
file apear in plugin list but
when i try to actve it i see this error message:
Plugin could not be activated; it produced a Fatal Error.
In reply to: Are there any localization files?Here are full translated Persian (Farsi) File
In reply to: show search form or link to search.php on home pagethis is my coustom code in search-form:
<form action="<?php bb_option('uri'); ?>search.php" method="get">
<p><?php _e('Search:'); ?>
<input type="text" size="70" maxlength="200" name="q" value="<?php echo attribute_escape( $q ); ?>" />
<?php if( empty($q) ) : ?>
<input type="submit" value="<?php echo attribute_escape( __('Search »') ); ?>" class="inputButton" />
<?php else : ?>
<input type="submit" value="<?php echo attribute_escape( __('Search again »') ); ?>" class="inputButton" />
<?php endif; ?>
</p>
</form>In reply to: Mark all posts as readi need it too
In reply to: Emoticons For bbPress?i am using 0.8.2.1 i upload the files but in plugins list in admin area it didnt appear!! any one know the reason?
In reply to: The Chinese tags will be wrongHi we have the same problem with Pesian (farsi) adn arabic tags!