Search Results for 'code'
-
AuthorSearch Results
-
July 28, 2010 at 3:57 pm #77023
In reply to: can admin execute php code in post?
pagal
ParticipantJuly 28, 2010 at 3:52 pm #77022In reply to: can admin execute php code in post?
zaerl
ParticipantAlways wrap PHP code inside script tags
<script language="PHP">echo phpversion()</script>also remember to make the change explained here: https://bbpress.org/forums/topic/admin-can-paste-php-code-in-post?replies=28#post-71965
Can you please explain what do you mean about production environment?
A public site. The code isn’t tested at all.
July 28, 2010 at 3:41 pm #77021In reply to: can admin execute php code in post?
pagal
ParticipantWoW That Works
example to execute code
<script language="PHP">
echo
php code here without <?php and ?>
</script>
Thanks zaerl, you are really a smart person,
Keep in mind that this code isn’t suitable for production environment.
Can you please explain what do you mean about production environment?
Thanks Again,
Cheers
July 28, 2010 at 2:55 pm #77020In reply to: can admin execute php code in post?
pagal
ParticipantReally thanks zaerl,
please also give an example how to write complete php code to execute with this plugin
Parse error: syntax error, unexpected '>' in /my-site-path/my-plugins/zaerl-Eval-PHP.php(37) : eval()'d code on line 1
July 28, 2010 at 2:52 pm #77019In reply to: can admin execute php code in post?
zaerl
ParticipantOps, substitute
za_ep_filterwith:function za_ep_filter($text)
{
$eval_text = "?>$text";
ob_start();
eval($eval_text);
$ret = ob_get_contents();
ob_end_clean();
return $ret;
}July 28, 2010 at 1:54 pm #77018In reply to: can admin execute php code in post?
zaerl
Participant<?php
/*
Plugin Name: zaerl Eval PHP
Plugin URI: http://www.zaerl.com
Description: execute PHP code posted by admins
Author: zaerl
Author URI: http://www.zaerl.com
Version: 0.1
zaerl Eval PHP: execute PHP code posted by admins
Copyright (C) 2010 Francesco Bigiarini
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.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
define('ZA_EP_VERSION', '0.1');
define('ZA_EP_ID', 'za-eval-php');
define('ZA_EP_NAME', 'zaerl Eval PHP');
function za_ep_filter($text)
{
$eval_text = "?>$text";
eval($eval_text);
}
function za_ep_allow_tag($tags)
{
$tags['script'] = array('language' => array());
return $tags;
}
function za_ep_initialize()
{
global $bb_current_user;
if($bb_current_user && $bb_current_user->has_cap('administrate'))
{
add_filter('bb_allowed_tags', 'za_ep_allow_tag');
add_filter('post_text', 'za_ep_filter');
}
}
add_action('bb_init', 'za_ep_initialize');
?>example:
I'm running PHP <script language="PHP">echo phpversion()</script>Keep in mind that this code isn’t suitable for production environment.
July 28, 2010 at 12:10 pm #77017In reply to: can admin execute php code in post?
pagal
ParticipantTitle should be “Can Admin execute php code in post?”, apologize.
July 28, 2010 at 11:46 am #91874In reply to: Matching my WordPress Theme
kevinjohngallagher
MemberHi John,
I don’t know why after all these years that there is a refusal to put a clear and defining sentace saying that this isn’t part of the default bbPress package. It casues so much confusion for new users.
bbPress is a totally separate standalone forum, that can integrate user sessions (login/log-out) with WordPress. Nothing more. Its important to keep that in mind because it’ll save alot of thinking from a wordpress point of view.
That said, theming bbPress is quite simple as long as you know 1 thing: bbPress won’t run WordPress commands/functions/API calls.
Copy your default bbPress theme (the rather lacking Kakumei), rename it both in folder and in the template information held in the style.css file contained within.
You now have your own bbPress theme. Congrats.
The next step is simply to copy/paste the HTML you want to replicate from your WordPress theme into your bbPress theme. If you’re not doing any special processing, I strongly suggest copy/pasting the loaded/outputed HTML from when you load your WordPress homepage in a browser.
If you want to copy/paste from your header.php file in your WordPress theme, remember and take out all of those pesky WordPress functions, and replace them with bbPress equivalent or hardcoded information.
If you’ve ever made your own WordPress theme, you’ll find bbPress follows a very similar path/structure.
Good Luck
July 28, 2010 at 11:11 am #77016In reply to: can admin execute php code in post?
zaerl
Participantcan be VERY dangerous and should be avoided when possible.
Indeed but the title is Admin can paste PHP code in post.
July 28, 2010 at 10:58 am #77015In reply to: can admin execute php code in post?
kevinjohngallagher
MemberI’m going to go no record an suggest thats the best bit of spam i’ve read in a while. Reading via RSS I thought, why is _ck_ repeating herself?
July 28, 2010 at 10:36 am #83010In reply to: Login Integration Issues – bbpress and wordpress mu
thomas.joy
Memberhow can the wordpress admin username/password be used in bbpress login and log in successfully (globally)
also how can the bbpress (if necessary) be used to successfully log in to wordpress and have the global admin?
same for users, which i haven’t tried yet
i’ve setup these (codes removed)
wp-config.php:
define(‘AUTH_KEY’, ”);
define(‘SECURE_AUTH_KEY’, ”);
define(‘LOGGED_IN_KEY’, ”);
define(‘NONCE_KEY’, ”);
define(‘AUTH_SALT’, ”);
define(‘LOGGED_IN_SALT’, ”);
define(‘SECURE_AUTH_SALT’, ”);
bb-config.php:
define( ‘BB_AUTH_KEY’, ” );
define( ‘BB_SECURE_AUTH_KEY’, ” );
define( ‘BB_LOGGED_IN_KEY’, ” );
define( ‘BB_NONCE_KEY’, ” );
i copied the corresponding ones to the bb-config.php one
when i log out of bbpress wordpress is still logged in..
July 28, 2010 at 10:24 am #91850In reply to: Doesn't Play Well with Others
Ashish Kumar (Ashfame)
Participant
July 28, 2010 at 10:22 am #91849In reply to: Doesn't Play Well with Others
johncalvinhall
MemberLand Sakes! I get one problem fixed and it still gives grief.
I did as you said, and you were right. It wasn’t my username and password as much as it was the name of the MySQL database, which is ‘wordpress’.
I entered the name of the database, username, and password. It now responds, “Great, saved bb-config.php. Let’s go to Step 2.”
Then I try to move onto Step 2 and it says, “You are missing bb-config.php. This means you are setting things up for the first time.”
The result? It loops me back to where I was!
… long delay… John has a brainstorm….
I figured out what to do!
I basically lied to it, and said the config file was generated properly. Actually, I snagged the bb-config-sample.php, changed the parameters in there (database name, username, password), and saved it as bb-config.php.
The little bugger is now behaving properly!
Bah! If I survive this, I am going to be a monster guru!

Thanks ashfame for your help! Your advice is priceless.
July 28, 2010 at 9:46 am #73948In reply to: One bbpress per blog in wordpress mu
Radhe
MemberGreetings

Fred, did you find any solution?
Thanks a lot
Radhe
July 28, 2010 at 9:00 am #77013In reply to: can admin execute php code in post?
Himanshu Mehta
Memberyes. it can possible and easily found in net.
July 28, 2010 at 4:28 am #34883Topic: Doesn't Play Well with Others
in forum Installationjohncalvinhall
MemberHello All,
I have setup a localhost on my computer. I am planning on migrating from wordpress.com and moving to a registered domain, and before I start shelling out the $$$, I would like to be somewhat familiar with what I am doing.
After installing PWS, I added WordPress software. Everything is working great, and I am loving what I see. Now I tried installing bbPress, so I can have a forum, and it is hairballing on me!
I am strongly suspicious that the problem lies somewhere with MySQL. I fill out the setup info, and it responds with:
There was a problem connecting to the database you specified.
Please check the settings, then try again.
Where do I find MySQL on my computer? Can I not have separate databases?
:sigh:
I am not a cyber-guru, and I am hoping that I don’t have to become one!

Any help you can provide would be great!
July 27, 2010 at 10:16 pm #90589In reply to: Kakumei Black theme
copperblade
ParticipantOk sorry I didn’t check back for a while (I see “Notify me of followup posts” at the bottom now)
Yeah I mean distributing what amounts to a kakumei-black style. Can I just call it a plugin and upload it to the repo here?
I guess not since it has to go in a different directory.
July 27, 2010 at 8:40 pm #91860chrishajer
ParticipantCopy the register.php from the
bb-templates/kakumei/folder into your theme folder. If you don’t have a theme file present in your theme, the file from the default theme is used. Since that’s happening now, go ahead and copy the register.php into your theme folder and make the modifications there.July 27, 2010 at 7:06 pm #91858chrishajer
ParticipantJust the text that is displayed? The fields would still be required and go through validation? Just edit the template file register.php and eliminate that line:
./bb-templates/kakumei/register.php line 65
<p class="required-message"><?php _e('These items are <span class="required">required</span>.') ?></p>You could also hide the text with some jQuery, but I think it’s easiest to just remove the text from your template file.
July 27, 2010 at 5:50 pm #91795In reply to: Rearrange Profile Pages
mr_pelle
ParticipantSorry, no hint about that…
July 27, 2010 at 3:06 pm #91811In reply to: doesn't work checkbox "remember me"
kevinjohngallagher
MemberCool, ok, well let do a wee hunt in Opera.
I’ll have a look and get back to you if i find anything
July 27, 2010 at 2:36 pm #91810In reply to: doesn't work checkbox "remember me"
eramar91
Membermay be
July 27, 2010 at 1:59 pm #91808In reply to: doesn't work checkbox "remember me"
eramar91
Memberit works in IE 8, safari on my computer , but not in opera
July 27, 2010 at 10:31 am #77012In reply to: can admin execute php code in post?
mr_pelle
Participant@mr_pelle like support forum , why not update this plugin with extra features of bbPages the author of this plugin is no more active in this forum.
I do not see how bbPages would be related to Support Forum(s)…
July 27, 2010 at 10:02 am #77011In reply to: can admin execute php code in post?
kevinjohngallagher
MemberI want to use it in bbPages to create, contact page, feed back forms and other stuff.. I was avoiding to create static pages like this
OK, cool.
While it might be possible, its not likely. Its not what bbPress was designed for. It’s not a Content Management System.
In honesty, if you want that sort of functionality, WordPress side by side with a bbPress forum is the best way forward.
-
AuthorSearch Results