Search Results for 'code'
-
Search Results
-
Topic: Extending BB_Locale
Is there a way to extend BB_Locale?
Today, BB_Locale calls init and that’s that. No hooks/event handling at all, as far as I can tell.
In method init, among other things, the following loads:
$this->datetime_formatstring['datetime'] = __('F j, Y - h:i A');$this->datetime_formatstring['date'] = __('F j, Y');$this->datetime_formatstring['time'] = __('h:i A');The Question
What if anything can I do if I want to have a
datetime_formatstring['special-date'] = __('Y F j - h');added to BB_Locale. I’m using the three existing formats as listed above already and I want to add a fourth alternative without adding a row in core BB-files.Just to be clear, I want to be able to do this:
_e("Today's date, formatted in a special way is:") . bb_datetime_format_i18n( bb_current_time(), 'special-date' );Am I missing something obvious here or is the only solution right now to modify the locale.php file?
Appreciate the help.
Topic: Calling functions outside
I want to login function on a straight html page that is outside of the bbpress .9 standalone. Once the person logsin, then they are moved to the front-page.
I used this in the html page
<?php login_form(); ?>and of course I get an error,
Fatal error: Call to undefined function login_form()In straight html, I would code the full url. How can I call this function from outside of its directory? What is the full function path?
Hi,
I can not figure out what is causing one function in a plugin I am trying to make (modify) to cancel out another function from the same plugin on the same page.
OK, did that make sense.
Here are my examples.
bbSocialize – IF (and this is only an example) I want to display all the information from bbSocialize at the top of the profile and at the bottom of the profile, then it is ONLY displayed at the top (canceling the one one the bottom).
Avatar Upload – I can put the code in to display my avatar as many times as I want and it shows all of them.
I am not understanding why the bbSocialize code or functions are causing the second one to cancel out.
That is basically my problem.
I have modified bbSocialize in the sense that I have added A LOT to it including customizable fields. What I would like to do is have 2 or 3 functions pulling out certain information so that instead of all that info (or whatever you choose) being displayed in one area, you could break it up on the profile page and put some up top, some down on bottom, some in the middle or possibly floating to the right…..whatever. And of course the main function would be available to display all your selections.
I hope I made that clear enough.
Almost like the functions are not closing properly — but I really don’t know.
Ok, here is the basic bbsocialize funtion to display on the profile page.
// The following function can be used to display profiles on user-profile-page
function get_socialize() {
global $user_id, $bb_current_user, $bb_socialize;
$user_id = bb_get_user( $user_id );
$bb_twitter = $user_id->social_twitter;
echo '<div class="socialize_wrap">';
if ( $bb_socialize['twitter'] == true ) { if ( !empty( $bb_twitter ) ) { echo '<dd><img src="'.$bb_socialize['images_url'].'/bb_twitter.png" width="16" height="16" border="0" /> <a href="http://twitter.com/'.$bb_twitter.'" title="User Twitter account" rel="'.$bb_socialize['links_rel'].'"><span>'.$bb_twitter.'</span></a></dd>'; } }
echo '</div>';
}Topic: My code is showing :P
Some of the code for bb-config. php is showing at the top of my bulletin board.
http://www.comicbooksyndicate.com/syndicatebb/
How do I get rid of this?

