Search Results for 'bbpress'
-
AuthorSearch Results
-
July 28, 2007 at 7:35 am #59479
_ck_
ParticipantIn theory it should be possible to use the topic_status field to set a future topics flag ie. “4” and check the database everytime bbpress runs for that flag, then change it to 0 when the time has passed.
I don’t see this as a big need for forums (wordpress is another matter) but it’s a simple enough plugin so maybe I’ll try later this weekend.
July 27, 2007 at 11:07 pm #59459In reply to: Install was successful but….
amazon3d
Memberhttp://www.php1.shawnmangeot.com/bbpressfcc/
That is the link.
July 27, 2007 at 10:09 pm #59469In reply to: {Request plugin:} auto complete tags
fel64
MemberThis is the request forum but I think that feature suggestions on http://trac.bbpress.org are more likely to be seen, so I recommend making your pitch there.
July 27, 2007 at 10:06 pm #51562In reply to: Full Content of Most Recent Post on Front-Page?
fel64
MemberI don’t know off the top of my head. What I’d do in this case, as for pretty much every question that’s asked, is open my copy of bbPress and look around in the files. So that sort of thing sounds like a template tag, so I’d look at bb-includes/template-functions.php, then search for “profile_link” or a couple other similar terms if I couldn’t find it.
This time I tested it and searching for “profile_link” will pretty quickly get you the function you want. But finding out what you need is something you can pretty easily do yourself most of the time.

(Not that there’s a problem with you asking anything, this is just teach-a-man-to-fish thinkin’.)
July 27, 2007 at 7:49 pm #2173Topic: Install was successful but….
in forum Installationamazon3d
MemberAfter a bunch of tweeking and what not (put wrong info in a few times)
I got the BBPress installed. But when I go to go see a forum or post it gives me an error.
I use 1&1 Internet to host my site (dont really recommend them)
I have minor PHP knowledge (but I am learning more every minute.)
It appears that it did not create the folders it needs to draw from. Forum, users, etc. So I’m not sure weather I have to manually create them or weather I have a bad batch of files or what not, been working on it all day trying to get that and a web calender working, finally got the calender working.
Any input would be much appreciated.
-Amazon3d
July 27, 2007 at 6:15 pm #59441In reply to: Help with WP BBPress integration install
_ck_
ParticipantThere are many other things you will need to do to get it working properly with wordpress.
1. cookies paths need to be fixed in both programs
2. the integration plugin should be installed
3. the allow spaces in usernames plugin should be installed
4. force all registrations/logins through wordpress from the several places they are buried on the forum (the WP interfaces are far more developed)
5. add the ” set default role when registering new user though forum” plugin tweak
There are probably a few others I’ve forgotten by now.
July 27, 2007 at 4:17 pm #59440In reply to: Help with WP BBPress integration install
izzypop
MemberGot it working, Stupid GoDaddy latency.
Cheers
July 27, 2007 at 3:52 pm #59241In reply to: Plugin: Plugin browser for bbPress
Sam Bauers
Participant> it works, yay!
Great!
> idea: “power user toggle” that will turn the revision number into a hotlink to the svn directory
Good idea, I’ll ad it to my “to do” list.
> maybe show the filesize since curl/fopen has to pull the entire file down anyway so it knows the size
It only completely pulls down the .php files from the trunk of each plugin to interrogate then and create the list, so I could only accurately report on the size of those. Otherwise I would have to traverse through all the subdirectories and add up the totals. Which would be a bit onerous.
> a tally at the bottom of how many plugins shown would be interesting to see too
A bit superfluous, but I’ll add it.
> will it paginate if one day there are over a hundred plugins?
That wouldn’t be too hard. But there aren’t that many plugins right now.
For a lark I pointed the plugin to the WordPress Plugin SVN. It got about 1/4 of the way through retrieving the list of plugins and died (script timeout). Ultimately if this plugin is going to remain in use I’ll have to either compile the plugin list on a server somewhere and serve it as a single file to all plugins, or build a “specs” file format for plugins to use if they want to be in the browser. But that is what the WordPress plugin I mentioned earlier is attempting to do, so I’m more likely to assist in porting that plugin over to bbPress than extending this one to do it.
July 27, 2007 at 2:54 pm #54083In reply to: Automatically add user topics to favorites
_ck_
ParticipantKeep in mind that bbpress already tracks all topics started and all recent replies by each user in their profile.
Subscribing to individual threads is something probably better suited to the notification plugin. Serialized meta data would have to be added to each topic with each user subscribed and then removed when unsubscribed. I guess I can look into it eventually if no-one else creates such a feature.
July 27, 2007 at 2:03 pm #2172Topic: how can i define a .mo file for a plugin
in forum Troubleshootingmazdakam
Memberi translate some plugins and have mo files but i don’t know how to define them to work?!
i translate 22 bbpress plugins

should i insert them in to the include/language folder?
with which name or i must create one file and merge whole of them to he one file
July 27, 2007 at 11:47 am #51051In reply to: can’t receive the password letter!!!!!!!!
jackhsieh
MemberHere below is the workable method for the purpose of trying bbpress. To hide the mail() function code and then add a echo() to show the password on-screen. Like below…
(registration-functions.php)
echo (‘Your Password:’ . “$pass”);
/*
mail( bb_get_user_email( $user->ID ), bb_get_option(‘name’) . ‘: ‘ . __(‘Password’),
sprintf( $message, “$user->user_login”, “$pass”, bb_get_option(‘uri’) ),
‘From: ‘ . bb_get_option(‘admin_email’)
*/
July 27, 2007 at 10:36 am #59240In reply to: Plugin: Plugin browser for bbPress
_ck_
ParticipantOkee, will try and report back in a minute.
Thanks as always!
*** cries tears of joy ****
it works, yay!
(note I had to manually delete the two options already inserted into bbpress to get it to load the entire plugin list)
Wow, very nice work…
idea: “power user toggle” that will turn the revision number into a hotlink to the svn directory so I can directly preview the source and maybe show the filesize since curl/fopen has to pull the entire file down anyway so it knows the size
a tally at the bottom of how many plugins shown would be interesting to see too… will it paginate if one day there are over a hundred plugins?
July 27, 2007 at 10:15 am #59407In reply to: forum.wp-persian.com
Sam Bauers
Participant> so i have my bbpress full translating where can i upload it?
You should post it on your own site and add a comment with the location in the blog here.
I’ve also added a link to your translation file at http://www.bbpulp.org
July 27, 2007 at 10:04 am #59239In reply to: Plugin: Plugin browser for bbPress
Sam Bauers
ParticipantGah! In 0.1.9 I changed all the version numbers but didn’t actually change the code!
0.1.10 is now committed, and *it* will fix your problem.
July 27, 2007 at 9:13 am #59238In reply to: Plugin: Plugin browser for bbPress
Sam Bauers
ParticipantJuly 27, 2007 at 4:15 am #59406In reply to: forum.wp-persian.com
mazdakam
MemberI 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
July 27, 2007 at 4:11 am #59405In reply to: forum.wp-persian.com
mazdakam
MemberWill 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
July 27, 2007 at 2:40 am #49631In reply to: Emoticons For bbPress?
mazdakam
MemberPlease 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.1so 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
July 27, 2007 at 12:23 am #2167Topic: Help with WP BBPress integration install
in forum Troubleshootingizzypop
MemberI have a WP install with BBPress installed on the same database in a subdirectory of WP. Install went well, looked in the database and my new forum topic was written in the database but all links on the BBPress forum lead to “No input file specified”. I’m suspecting that it has something to do with the config file. Let me know if you see something wrong here:
// Change the prefix if you want to have multiple forums in a single database.
$bb_table_prefix = ‘bb_’; // Only letters, numbers and underscores please!
// The full URL of your bbPress install
$bb->uri = ‘http://theasianman.com/wordpress/bbpress’;
// What are you going to call me?
$bb->name = ‘The Asian Man Forum’;
// Set to true if you want pretty permalinks, set to ‘slugs’ if you want to use slug based pretty permalinks.
$bb->mod_rewrite = false;
// Your Akismet Key. You do not need a key to run bbPress, but if you want to take advantage
// of Akismet’s powerful spam blocking, you’ll need one. You can get an Akismet key at
// http://wordpress.com/api-keys/
$bb->akismet_key = ”; // Example: ‘0123456789ab’
// The rest is only useful if you are integrating bbPress with WordPress.
// If you’re not, just leave it as it is.
$bb->wp_table_prefix = ‘wp_’; // WordPress table prefix. Example: ‘wp_’;
$bb->wp_home = ‘http://theasianman.com/wordpress’; // WordPress – Options->General: Blog address (URL) // Example: ‘http://example.com’
$bb->wp_siteurl = ‘http://theasianman.com/wordpress’; // WordPress – Options->General: WordPress address (URL) // Example: ‘http://example.com’
I’ve turned permalinks off because it seems people are having trouble with them in conjunction with GoDaddy (my clients host : ( ).
I’ve created a .htaccess file with:
Options +MultiViews
Not sure what’s up. The default forum content is not even showing up.
Cheer all and thanks in advance
July 27, 2007 at 12:16 am #49630In reply to: Emoticons For bbPress?
fel64
MemberPlease stop pasting huge chunks of code on the forums. Use something like http://pastebin.ca/.
That code runs fine for me. What problem are you having?
It might be simplest to start off with the original plugin and fix that because you might have done quite a lot to it.
July 26, 2007 at 11:51 pm #49629In reply to: Emoticons For bbPress?
mazdakam
Memberyes 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
July 26, 2007 at 11:50 pm #49628In reply to: Emoticons For bbPress?
mazdakam
Member<?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’));
?>
July 26, 2007 at 10:48 pm #49627In reply to: Emoticons For bbPress?
fel64
MemberDid you modify the plugin? Insert a
?>before line 202 and a<?phpbefore line 237.In Notepad you can go to a specific line by pressing Ctrl + G.
July 26, 2007 at 10:45 pm #49626In reply to: Emoticons For bbPress?
mazdakam
Memberi don t know what is the problem
July 26, 2007 at 10:35 pm #49625In reply to: Emoticons For bbPress?
mazdakam
Member<?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’));
?>
-
AuthorSearch Results