Search Results for 'codes'
-
AuthorSearch Results
-
January 11, 2010 at 2:36 am #83736
In reply to: Delimeter Separate Tags
chrishajerParticipantTo space them out, could you do something like this?
#tag-page a {
margin-right: 10px;
}I think I would add an additional div to your template so that this
#tag-page a
doesn’t affect all the links on the page. Just wrap the section you want this to work on in something like<div id="tag-heat-map">
.If you want to do use a bullet instead after each link, you could do this also, but I am not certain what browsers actually support text generated by the
:after
pseudo-element (I think it’s CSS 2.1):#tag-page a:after {
content: "%5C2007%5C00B7%5C2007";
}The 2007 is a digit space, and the 00B7 is a middot. Maybe something like that? Not even related to bbPress really.
EDIT: above, those %5C are supposed to be backslashes but I can’t keep them from being translated or decoded or whatever. Should be character encoding from here:
December 24, 2009 at 11:09 pm #81781In reply to: What's happening with bbPress?
DailytalkerMemberKevin, you can check yourself:
Old forum:
http://www.dailytalk.ch/forums/index.php
(I had pretty urls before but I removed them when I moved this forum into another folder.)
New forum:
http://www.dailytalk.ch/forum/
The old forum had a tinymce-editor with a lot of cool features…drop-down menu for font-size, drop-down menu for different font-style, drop-down menu for different font-color, you could put some letters up (for example “CO2” you could write with the 2 higher than the other letters and also deeper etc.) movies, pictures, links, quotes with name of the original author, message function to reporte abusive messages to the moderators, you could temporary ban members, you could move posts from one topic to another in a very easy and very nice way, sophisticated privat messaging, high security level no spam, you could in an easy way change the login requirements, sophisticated admin-section, admins could see the IP-Number of the visitors, very easy mod (=plugins) upload through integrated ftp-upload, ssi-functions and so on….
The change to bbpress was not an easy decision for me. In my opinion bbpress is still an adventure. Many bbpress-projects are on release candidate level. I used SMF for 3 years and was happy. The problem is that I also have blogs on wordpress and wordpress mu. I had some problems with integration of SMF into wordpress. There are certainly some very old bridges but the different codings didn’t make it easy to me. I integrated SMF with SSI-Functions to wordpress…but I think that because of the similiar coding bbpress is much easier to integrate into wordpress. Thats why I finally decided to give bbpress a chance. I’m somebody who likes to try out new or other things.
@hpguru, what you say is not true at all!!! I never ever had problems with spam when I used SMF!!! SMF offers different register opportunities. They have in the admin-section a so called registration management which offers four different options for registration:
1) Registration Disabled:
Disables the registration process, which means that no new members can register to join your forum.
2) Immediate Registration
New members can login and post immediately after registering on your forum.
3) Member Activation
When this option is enabled any members registering to the forum will have a activation link emailed to them which they must click before they can become full members
4) Member Approval
This option will make it so all new members registering to your forum will need to be approved by the admin before they become members.
Further they have captcha-codes which need to be entered in a registration field. (You can even change the level of those codes. They have different difficulty-levels).
New updates are shown in the admin section…is very simliar to wordpress and you can easy update with integrated ftp-upload.
December 22, 2009 at 2:33 am #82912In reply to: 3 topics I can't find the answers to
stulynnMemberNow I’m in a pickle. I cannot visibly see an admin screen for bbpress and therefore I can’t login to try to make changes. I did add this path in bb-config
$bb->uri = ‘http://your-domain-name.com/forum-path/’;
(after key codes) and it’s done nothing. My folder in file manager has been changed from bbpress to forum. I tried to change it back but because I can’t get into bbpress admin I can’t change the admin link. Right now I’d be happy to go back to bbpress and not forum and believe you me when I say I’ll become backup queen.
Can anyone please help?!!
December 21, 2009 at 6:03 pm #32602Topic: Bug in post count?
in forum InstallationhpguruMemberHi, i have very good bbPress forum. I like bbPress. I am use a bbPress 1.0.2 but i may found 1 new bug.
I go to my bbPress dashboard and see posts count, thats say: 4024 posts.
Then i go to bb-admin/posts.php and i see 1 – 20 / 4,121. This mean i have 4121 posts on my forum.
I try recounting without any help to this problem.
My plugins now:
Akismet
Human Test For bbPress
Topics Per Page
bbSmilies (maybe smilies from WordPress plugin, i change it name, when i modified smilies codes)
November 11, 2009 at 2:15 am #81301In reply to: Post_Text Front Page
DoobusMemberA bit surprised no one has chimed in yet, didn’t think it was that difficult to achieve.
Anyways here is the code that I found in another thread:
<?php
function get_post_teaser($chars = 200){
global $bbdb;
$topic_id_ft = get_topic_id(); //topic id for getting text of first post of the topic
$first_post = (int) $bbdb->get_var("SELECT post_id FROM $bbdb->posts WHERE topic_id = $topic_id_ft ORDER BY post_id ASC LIMIT 1");
$content = substr(strip_tags(strip_shortcodes(get_post_text($first_post))),0, $chars); //gets the first 200 chars of the post
return $content;
}
?>I figured it’s the same basis, however since I’m pretty much brain dead in regards to php I can’t for the life of me make the post_text show fully. This code strips out html code so links don’t show, how can the code be altered to allow html? I figure this code is similar to WordPress’ content_excerpt. If there is another way, I’m open to suggestions.
Sorry for all the newbie questions, I assure you I’ve tried my best to track down my issues in the forum search before asking my questions, unfortunately due to lack of a codex and documentation I’m pretty much at a lost.
October 27, 2009 at 7:54 am #80920In reply to: Display Custom-Userfields in Forumposts
ArioMemberIt is possible I would think. I am going to do some experimenting on it but if you are looking for a good plugin to deconstruct and learn from (what I am doing since I lack the skill to make something from scratch) then try looking at the Gaming Codes plugin.
October 9, 2009 at 12:53 am #80307In reply to: Making `from` a link in Topic View
chandersbsMemberThanks for posting the solution also, I was looking at my codes if I could get a solution, but I couldn’t, when I looked back at this topic, I saw the solution already posted.
October 2, 2009 at 12:34 am #80011gerikgMemberThe way I did it was to duplicate kakamei theme (not the blue) and put it in the my-template.
Then started with the BB header, I copied what was in the WP header. I took everything out after the body tag except for the “main” div. The BB footer I did the same. I just made sure there were enough div closing tags. Then copied over the codes that apply for the header and footer from the WP css. Most WP theme has two column one main and one sidebar. I treated BB like it was wordpress, one side the main section and the other sidebar. I treated the MAIN div as the main section and View/Hottags as the sidebar. I know this is not the best explanation but I hope you get the idea. It just takes a lot of css work.
September 27, 2009 at 2:37 pm #50311In reply to: Combined Register + Post
Adam Harley (Kawauso)MemberOkay, after much lucky guessing with regards to the user object handling, I have an ALPHA VERSION of a plugin to do this. There’s nothing to stop spambots, this is purely a proof of concept, I’ll try adding a captcha or something later if necessary. Email verification sounds like a royal pain though. Save the files exactly where I’ve said and as ever, make sure you leave no whitespace around the PHP tags. Apart from that, please test it but it’s your own risk if you run it on a production server.
my-plugins/register-post/load.php:
<?php
/*
Plugin Name: Register & Post
Description: Allows a user to register and make a post at the same time.
Author: Kawauso
Version: Alpha
*/
// Add the post form
add_action( 'post_post_form', 'register_post_form' );
function register_post_form() {
global $h2, $forum, $topic;
if( bb_is_user_logged_in() )
return;
// Setup the register form
$profile_info_keys = bb_get_profile_info_keys();
unset( $profile_info_keys['first_name'], $profile_info_keys['last_name'], $profile_info_keys['display_name'], $profile_info_keys['occ'], $profile_info_keys['from'], $profile_info_keys['user_url'], $profile_info_keys['interest'] );
$bb_register_error = new WP_Error;
$user_login_error = $bb_register_error->get_error_message( 'user_login' );
?>
<style type="text/css">p#post-form-forum-container{display:none}</style>
<form class="postform post-form" id="postform" method="post" action="<?php bb_uri( 'my-plugins/register-post/create.php', null, BB_URI_CONTEXT_FORM_ACTION )?>">
<h2 class="postform">Register and post?</h2>
<fieldset>
<table width="100%">
<tr class="form-field form-required required<?php if ( $user_login_error ) echo ' form-invalid error'; ?>">
<th scope="row">
<label for="user_login"><?php _e('Username'); ?></label>
<?php if ( $user_login_error ) echo "<em>$user_login_error</em>"; ?>
</th>
<td>
<input name="user_login" type="text" id="user_login" size="30" maxlength="30" value="<?php echo $user_login; ?>" />
</td>
</tr>
<?php
if ( is_array($profile_info_keys) ) :
foreach ( $profile_info_keys as $key => $label ) :
$class = 'form-field';
if ( $label[0] ) {
$class .= ' form-required required';
}
if ( $profile_info_key_error = $bb_register_error->get_error_message( $key ) )
$class .= ' form-invalid error';
?>
<tr class="<?php echo $class?>">
<th scope="row">
<label for="<?php echo $key?>"><?php echo $label[1]?></label>
<?php if ( $profile_info_key_error ) echo "<em>$profile_info_key_error</em>"; ?>
</th>
<td>
<input name="<?php echo $key?>" type="text" id="<?php echo $key?>" size="30" maxlength="140" value="<?php echo $$key?>" />
</td>
</tr>
<?php
endforeach; // profile_info_keys
endif; // profile_info_keys
?>
</table>
<br />
<?php
bb_load_template( 'post-form.php', array('h2' => $h2) );
bb_nonce_field( bb_is_topic() ? 'create-post_' . $topic->topic_id : 'create-topic' );
if ( bb_is_forum() ) {
echo '<input type="hidden" name="forum_id" value="' . $forum->forum_id . '" />' . "n";
} elseif ( bb_is_topic() ) {
echo '<input type="hidden" name="topic_id" value="' . $topic->topic_id . '" />' . "n";
}
echo "n</fieldset>n</form>n";
}my-plugins/register-post/create.php:
<?php
require_once('../../bb-load.php');
$profile_info_keys = bb_get_profile_info_keys();
unset( $profile_info_keys['first_name'], $profile_info_keys['last_name'], $profile_info_keys['display_name'], $profile_info_keys['occ'], $profile_info_keys['from'], $profile_info_keys['user_url'], $profile_info_keys['interest'] );
$user_login = '';
$user_safe = true;
$bb_register_error = new WP_Error;
if ( $_POST && 'post' == strtolower($_SERVER['REQUEST_METHOD']) ) {
$_POST = stripslashes_deep( $_POST );
$_POST['user_login'] = trim( $_POST['user_login'] );
$user_login = sanitize_user( $_POST['user_login'], true );
if ( $user_login !== $_POST['user_login'] ) {
$bad_input = true;
if ( $user_login )
$bb_register_error->add( 'user_login', sprintf( __( "%s is an invalid username. How's this one? <strong>%s</strong>" ), esc_html( $_POST['user_login'] ), $user_login ) );
else
$bb_register_error->add( 'user_login', sprintf( __( '%s is an invalid username.' ), esc_html( $_POST['user_login'] ) ) );
}
foreach ( $profile_info_keys as $key => $label ) {
if ( is_string($$key) )
$$key = esc_attr( $$key );
elseif ( is_null($$key) )
$$key = esc_attr( $_POST[$key] );
if ( !$$key && $label[0] == 1 ) {
$bad_input = true;
$$key = false;
$bb_register_error->add( $key, sprintf( __( '%s is required' ), $label[1] ) );
}
}
if ( !$bad_input ) {
// Invoke non-user post checks here
if ( !$post_content = trim($_POST['post_content']) )
bb_die(__('You need to actually submit some content!'));
if ( isset($_POST['topic']) && $forum_id = (int) $_POST['forum_id'] ) {
$topic = trim( $_POST['topic'] );
if ('' == $topic)
bb_die(__('Please enter a topic title'));
} elseif ( isset($_POST['topic_id'] ) ) {
$topic_id = (int) $_POST['topic_id'];
bb_check_admin_referer( 'create-post_' . $topic_id );
}
if ( !topic_is_open( $topic_id ) )
bb_die(__('This topic has been closed'));
// Invoke registration
$user_id = bb_new_user( $user_login, $_POST['user_email'], null );
if ( is_wp_error( $user_id ) ) { // Error creating user
foreach ( $user_id->get_error_codes() as $code )
$bb_register_error->add( $code, $user_id->get_error_message( $code ) );
if ( $bb_register_error->get_error_message( 'user_login' ) )
$user_safe = false;
} elseif ( $user_id ) { // Registration success
foreach( $profile_info_keys as $key => $label )
if ( strpos($key, 'user_') !== 0 && $$key !== '' )
bb_update_usermeta( $user_id, $key, $$key );
do_action('register_user', $user_id);
// Create the current user object
$wp_auth_object->set_current_user( $user_id );
$bb_current_user = $wp_auth_object->current;
// Do last minute post/topic checks
if ( !empty($topic) && $forum_id = (int) $_POST['forum_id'] ) {
if ( !bb_current_user_can('write_posts') )
bb_die(__('You are not allowed to post. Are you logged in?'));
if ( !bb_current_user_can( 'write_topic', $forum_id ) )
bb_die(__('You are not allowed to write new topics.'));
if ( !bb_current_user_can( 'write_topic', $forum_id ) )
bb_die(__('You are not allowed to write new topics in this forum.'));
bb_check_admin_referer( 'create-topic' );
$topic_id = bb_new_topic( $topic, $forum_id, $tags );
}
if ( !bb_current_user_can( 'write_post', $topic_id ) )
bb_die(__('You are not allowed to post in this topic.'));
// Create the new post
$post_id = bb_new_post( $topic_id, $_POST['post_content'] );
$tags = trim( $_POST['tags'] );
bb_add_topic_tags( $topic_id, $tags );
$link = get_post_link( $post_id );
$topic = get_topic( $topic_id, false );
if ( $topic->topic_posts )
$link = add_query_arg( 'replies', $topic->topic_posts, $link );
do_action( 'bb-post.php', $post_id );
if ( $post_id )
wp_redirect( $link );
else
wp_redirect( bb_get_uri(null, null, BB_URI_CONTEXT_HEADER) );
exit;
}
}
}
// If you've reached this point, there must have been an error
$user_login_error = $bb_register_error->get_error_message( 'user_login' );
if( empty( $user_login_error ) ) // For some reason, error strings are not always available (i.e. for invalid emails)
$user_login_error = __( 'Something went wrong! Check what you entered and try again.' );
bb_die( $user_login_error );September 20, 2009 at 12:23 am #79508gerikgMemberand you need this for images https://bbpress.org/plugins/topic/allow-images/#post-6
September 20, 2009 at 12:02 am #79507sixyofoMemberThanks!!
September 19, 2009 at 11:57 pm #79506September 19, 2009 at 11:47 pm #31815Topic: Can I embed codes and show videos and pictures in bbPress
in forum PluginssixyofoMemberI’m trying to embed one in this topic
<object width=”560″ height=”340″><param name=”movie” value=”http://www.youtube.com/v/pM1Z1y4-Ylg&hl=zh_TW&fs=1&”></param><param name=”allowFullScreen” value=”true”></param><param name=”allowscriptaccess” value=”always”></param><embed src=”http://www.youtube.com/v/pM1Z1y4-Ylg&hl=zh_TW&fs=1&” type=”application/x-shockwave-flash” allowscriptaccess=”always” allowfullscreen=”true” width=”560″ height=”340″></embed></object>
NOt working.. > <
September 17, 2009 at 9:57 am #79227In reply to: Google Analytics
mba-studiumMemberI think you can track this seperataly with two codes.
September 4, 2009 at 5:27 pm #78614In reply to: Failing miserably at porting theme
gerikgMemberThis is how I’m doing it. Please, this is not the official how to on this.
PART 1
COPY Kakemi theme into my-template. Open Style.css and change this line, Theme Name: Kakumei
I changed it to Theme Name: Kakumei (Edited Theme)
Activate it, you’ll see Kakumei’s screen shot but Kakumei (Edited Theme) as it’s name.
Then open style.css of the Edited Theme and open the CSS of the WordPress theme. Their might be multiple css so look out. I make a line in the style.css at the bottom.
/*********************** WPTHEME *******************
Then start with Header.php and footer.php start copying over the codes from WP theme to BBpress theme. Slowly start looking at the classes it that the header uses and start bringing in the codes from the WP to BBpress CSS. BEWARE some of them uses the same class! so rename the WP one not the BBpress one!!! You will have to replace all the div tags and such. The only one I recommend to keep in the header is the
<div id="main">
at the end. The same with the footer. but remember to put an extra</div>
on the top to cover the<div id="main">
in the header. Start with that. If you can get the hang of it then you’ll be able to continue.August 28, 2009 at 9:18 pm #76608In reply to: cookie integration problem, another
gerikgMembertry add the same codes to bb-config without the Hash
August 25, 2009 at 3:50 am #78296In reply to: How to echo "nice_username" from post_author ?
gerikgMemberanandasama here’s acouple of codes that will help you. I think I know what you’re planning.
This will put the user’s name with link to their buddypress profile:
<?php echo post_author_link();?>
This will get the user’s login name:
<?php echo get_user_name( get_post_author_id() ); ?>
This is you can send message like PM but it uses message in Buddypress:
<a href="<?php echo get_option('home') ?>/members/
<?php global $current_user;get_currentuserinfo();echo($current_user->user_login);
?>/messages/compose/?r=<?php echo get_user_name( get_post_author_id() ); ?>">Send Message</a>August 24, 2009 at 7:00 pm #78336In reply to: inove theme has a bad suspected link
gerikgMember_ck_ they did it to your theme too.
https://bbpress.org/forums/topic/theme-hybrid-kakumeibbpressorg-template#post-56316
it’s that website adding codes to the header and removing the original author’s footer.
August 20, 2009 at 10:07 pm #78226In reply to: How do you paginate posts?
johnhilerMemberunholyfruitbat – Glad that we narrowed it down. Do you have a program to compare two text files? I use Beyond Compare and love it:
http://www.scootersoftware.com/download.php
You could use that to compare theme pages like front-page.php… and see what differences there are in your theme codes.
August 17, 2009 at 3:14 am #77788In reply to: Sometimes Less Is Just Less
chandersbsMemberI really love bbPress, but still wished some features existed by default. I know it’s doable via plugins, but default features are more cool, you can always turn it off. I really dislike the fact that some of the solutions I have seen on this forum, are related to “integrate your forum with WordPress, and use this plugin and it will work”, no, I don’t like that. bbPress should be able to do stuff on its own, without WordPress.
I don’t want to install WordPress for the sake of making some things work. I have been a WordPress user for so many years already, but still I refuse to do that. I have managed to convert my forum, which was originally SMF into bbPress (SMF > phpBB > bbPress), that was a lot of work, but I’m really happy I did that.
bbPress is by default very EMPTY, very very very empty. I was not used to a forum, with so less features and options. My users didn’t like it. I managed to add a lot of features via plugins. Now my users are a bit happy, I’m also very happy.
The best part I love so far is, that making changes not always is so difficult compared to SMF or phpBB. phpBB is the last forum software on this planet I’d want to use, OMG so difficult to make changes. SMF is one of the best out there, but has some limits due to their copyright system.
Some things I’d really love to see happening anytime very soon:
1. A codex page, with detailed instruction about the codes, just like its big brother WordPress has, at least a start, so we, the webmasters, can do more cool stuff
2. More features by default, such as:
a. Private message
b. Avatar upload
c. Memberlist
d. Quote option in topics
e. Smilies
These are some very basic options.
I’m sure bbPress will be one of the most professional forum software out there one day, it’s not so far yet, but I see it happen.
That’s why I’m a proud user of this software.
August 16, 2009 at 7:21 pm #78106In reply to: Bavatars doesn't work!
Marius-MemberAgain, I have no clue about permissions and codes and stuff. I just upload files to my server. And no, that directory does not exist. Atleast not as I can see.
August 13, 2009 at 8:35 pm #76987Marius-MemberThanks man. Can I post both codes without them conflicting each other?
Both border radius and mozilla codes?
And using border-radius, do you have input each of the four corners, like in the Moz-code? Or can you just specify one line like the one you gave me?
July 29, 2009 at 7:05 pm #56568In reply to: limit forums included in latest discussions
anandasamaMemberSomehow both of your codes doesnt work.
July 20, 2009 at 9:20 am #76617In reply to: show a snippet of the post under the topic title?
GautamMemberCreate a functions.php file in your theme folder, and write this in it:
<?php
function get_post_teaser($chars = 200){
global $bbdb;
$topic_id_ft = get_topic_id(); //topic id for getting text of first post of the topic
$first_post = (int) $bbdb->get_var("SELECT post_id FROM $bbdb->posts WHERE topic_id = $topic_id_ft ORDER BY post_id ASC LIMIT 1");
$content = substr(strip_tags(strip_shortcodes(get_post_text($first_post))),0, $chars); //gets the first 200 chars of the post
return $content;
}
?>Then at the front page, put this where you need to display the post text (it should be inside the loop):
<?php echo get_post_teaser(200); ?>
You can change that 200 to anything, any number of letters you want. Default is 200.
I think, this should work.
July 17, 2009 at 10:24 am #75196In reply to: How to send forum posts to email
GautamMemberCan you give me the current source of the plugin you have made?
You can get the post text (of the first post of the topic) by:
global $bbdb;
$topic_id_ft = get_topic_id(); //topic id for getting text of first post of the topic
$first_post = (int) $bbdb->get_var("SELECT post_id FROM $bbdb->posts WHERE topic_id = $topic_id_ft ORDER BY post_id ASC LIMIT 1");
$content = urlencode(substr(strip_tags(strip_shortcodes(get_post_text($first_post))),0,300));
$content = str_replace('+','%20', $content);
$content = str_replace("’","'", $content);
$post_summary = stripslashes($content);
-
AuthorSearch Results