Search Results for 'code'
-
Search Results
-
In case a user change his display name to be diffrent from his username, you cannot use @someusername to mention someone since you do not know what the users username is.
Would be nice to be able to optionally include an
@someusernamejust below the link to a reply or topic authors profile.Perhaps the best way of doing this would be to add an extra argument to the args array for the bbp_get_reply_author_link function. The current args are:
$defaults = array (
'post_id' => 0,
'link_title' => '',
'type' => 'both',
'size' => 80,
'sep' => ' ',
'show_role' => false
);But could be changed to:
$defaults = array (
'post_id' => 0,
'link_title' => '',
'type' => 'both',
'size' => 80,
'sep' => ' ',
'show_role' => false,
'show_mention' => true,
);I know having the user name visible is kind of a security issue, but since the user name already is visible in the profile URL…
Also, a setting for this in the backend would be nice.
Topic: Custom login Page
If you love your website you will do anything to make sure it looks more welcoming
I have been looking for a custom login for my website, searched everywhere… The only thing i got was the same login style page, with just only a logo changed, you just have to install the plugin and given an option to upload a logo. Then i figured how to make my login page something that i want. I took firebug edited css style.
I pasted all my custom css-style in a notepad and opened wp-admin.css and inserted the code. It take less than 10mins to do this, If you are looking for a custom login page do not look any further, just take you 5 to 10 mins and customise your login.
Take note: when you update you WordPress it will overwrite your edition, so for you not to loose you styles, after editing make a copy of wp-admin.css and save it in the same folder, you can do that by Zipping the file, that creates a zipped-copy. If you want to do this here is a bit of steps to help:
1. before anything just creat a copy of wp-admin.css and rename it, you can rename it wp-admin.css.Tempo, just for incase you mess up everything you can always restore…
Then OPEN public_html/example.com/wp-admin/css
You might loose hope, or your brain might hurt when you look at the code arrangement, trust me its pretty much easier to edit. Anywhere at the end of “}” create a space where you are going to insert your custom css code.
The code looks something like this:1. | dashboard_browser_nag a{color:#fff}#dashboard_browser_nag.browser-insecure a.browse-happy-link,#dashboard_browser_nag.browser-insecure a.update-browser-link{text-shadow:#871b15 0 1px 0}#dashboard_browser_nag a.browse-happy-link,#dashboard_browser_nag a.update-browser-link{text-shadow:#d29a04 0 1px 0}
At the end of each “}” its the beginning of new style code, so by creating space it will be something like:
1. | dashboard_browser_nag a{color:#fff}#dashboard_browser_nag.browser-insecure a.browse- happy-link,#dashboard_browser_nag.browser-insecure a.update-browser-link{text-shadow:#871b15 0 1px 0}
—–>>[[[space here]]] then insert you codes here ( this is just to make you see what you are editing much better)
2. | #dashboard_browser_nag a.browse-happy-link,#dashboard_browser_nag a.update-browser-link{text-shadow:#d29a04 0 1px 0}
Your custom css style will overwrite the main css style, it might look a bit weird at first, just hold on.
2. Open wp-login.php , first make a copy of it just for incase…
Just after
1. “” Insert
1. php get_header()Now your login should look like any of your pages.
Then remove this line:
1. |
<a href="” title=””>
Just after
2. |You can now refresh your login page:If you love your website you will do anything to make sure it looks more welcoming. I hope this helps, I am new to WordPress, just that i love testing things up.
Here is an example: [www.royaltweet.com/wp-login.php]
Regards
Lesego Keikabile
Have a beautifulDay 🙂Topic: JS Error: suggest
I’m getting this on all my sites that have upgraded to 2.2.x (tested on 2.2.1 too):
Uncaught TypeError: Object [object Object] has no method 'suggest'This relates to this part of the code added to every page of the WP Admin area:
jQuery(document).ready(function() {var bbp_topic_id = jQuery( '#bbp_topic_id' );
bbp_topic_id.suggest( ajaxurl + '?action=bbp_suggest_topic', {
onSelect: function() {
var value = this.value;
bbp_topic_id.val( value.substr( 0, value.indexOf( ' ' ) ) );
}
} );
});
I’m trying to create a custom forum index page which should look exactly like the default forum index page with forum names, number of topics, number of posts, last active topic etc. but sorted alphabetically based on forum names.
I’m looking at at bbp_has_forums, bbp_forums and bbp_list_forums inside /wp-content/plugins/bbpress/bbp-includes/bbp-forum-template.php.
However, I’m puzzled which function to use and
What arguments/ parameters I should pass?
the comments in bbp-forum-template.php itself says the same parameters as WP_Query() but would it make sense at all to have something like “post_type” => “forum”
I’m sure one can be clearer/ more explicit about the parameters here in some form of documentationI gave it wild tries as follows
1) The following gives me fatal error:
$args = array('orderby' => 'title',
'order' => 'ASC',);
while (bbp_forums($args)){
bbp_the_forum();echo bbp_get_template_part( 'content', 'archive-forum' );
}
The error:
Fatal error: Call to undefined method stdClass::have_posts() in C:\www\forums.local\wp-content\plugins\bbpress\bbp-includes\bbp-forum-template.php on line 109 Call Stack: 0.0004 333592 1. {main}() C:\www\forums.local\index.php:0 0.0006 337280 2. require(‘C:\www\forums.local\wp-blog-header.php’) C:\www\forums.local\index.php:17 0.3864 38499368 3. require_once(‘C:\www\forums.local\wp-includes\template-loader.php’) C:\www\forums.local\wp-blog-header.php:16 0.3920 38515824 4. include(‘C:\www\forums.local\wp-content\themes\bp-tap\custom-index.php’) C:\www\forums.local\wp-includes\template-loader.php:43 0.4732 38674368 5. bbp_forums() C:\www\forums.local\wp-content\themes\bp-tap\custom-index.php:422) While the following just takes forever to load:
$args = array('orderby' => 'title',
'order' => 'ASC',);
while (bbp_has_forums($args)){
bbp_the_forum();echo bbp_get_template_part( 'content', 'archive-forum' );
}
I’m using WordPress 3.4.2 and bbPress 2.1.2.
I’ve copied all files and directories from/wp-content/plugins/bbPress/bbp-themes/bbp-twentyten/to my theme directory.- This topic was modified 13 years, 2 months ago by .
- This topic was modified 13 years, 2 months ago by .
- This topic was modified 13 years, 2 months ago by .
- This topic was modified 13 years, 2 months ago by .
- This topic was modified 13 years, 2 months ago by .
- This topic was modified 13 years, 2 months ago by .
- This topic was modified 13 years, 2 months ago by .
- This topic was modified 13 years, 2 months ago by .
I finally started playing with bbPress. There are lot to learn because I want to display topics totally differently what is the default output.
First I want to display latest topics by latest activity like usual. I’ve created archive-topic.php in my theme so I can decide output.
After that I can filter topic post type so that topics are ordered by latest activity.
add_action( 'pre_get_posts', 'my_filter_topic' );function my_filter_topic( $query ) {
if( $query->is_main_query() && is_post_type_archive( 'topic' ) ) {
$query->set( 'meta_key', '_bbp_last_active_id' );
$query->set( 'orderby', 'meta_value_num' );
$query->set( 'order', 'DESC' );}
}
But this doesn’t display sticky posts first. They are more like last. Does someone have an idea how I get sticky posts to show first?