Search Results for 'code'
-
AuthorSearch Results
-
August 5, 2014 at 9:43 pm #150355
In reply to: Random Topic Link
Stephen Edgar
KeymasterLet me think about the menu solution for a bit….
e.g. To include forum ID’s
2,5,12and14add thepost_parent__inif ( bbp_has_topics( array( 'orderby' => 'rand', 'posts_per_page' => 1, 'post_parent__in' => array( 3, 5, 12, 14 ) ) ) ) {e.g. To exclude forum ID’s
7,11,19and21add thepost_parent__not_inif ( bbp_has_topics( array( 'orderby' => 'rand', 'posts_per_page' => 1, 'post_parent__not_in' => array( 7, 9, 11, 19 ) ) ) ) {August 5, 2014 at 7:45 pm #150345In reply to: Text Color and Font
desiamerican26
ParticipantAaahh That hurts….this close to fix it and this major issue….. 🙁
let me try that code….but where do I have to insert it? In function.php or which one….?? I can give this a shot….if not, then I will create another thread to get help…..cuz I just need for users to have those Color and some other tags…. 🙁
Please let me know where I can insert this code?
Thank You
August 5, 2014 at 4:44 pm #150338In reply to: Css Issue?
xplusboy
Participantits for css conflict.
use this code in your theme style.css file to fixing that :#main-content #bbpress-forums ul ul li, #main-content #bbpress-forums ul li { margin: 0px; list-style: none outside none; }August 5, 2014 at 3:24 pm #150332Topic: 0 Voices 1 Posts?
in forum TroubleshootingXaveus
ParticipantI have installed bbpress on multiple wordpress sites and seem to always have the same issue. On the main forum index page it says 0 voices and 1 posts no matter how many posts you create this never changes. Being that this has occurred on every site that I have included bbpress and being different themes and installs I can only conclude that I must be missing something when I set it up.
If anyone can help I would appreciate it….because you cannot run a forum that says there is only 1 post in it 🙁
Also I use no shortcodes, I just install bbpress then go to http://www.example.com/forums and start posting.
August 5, 2014 at 3:09 pm #150331In reply to: Text Color and Font
Robkk
Moderatorbut then the emoticon don’t show up. Well, emoticon is the least of the worries….please help me figure out how to get normal users HTML access so that they won’t get this issue.
i dont have any clue what could cause a problem with your emoticons, maybe your other emoticon plugin is causing issues, deactivate it see if it fixes that.
Yes sir, it do look like it’s restricted to to normal users. I just posted from the admin side and it works well
ok now your going to have to allow certain html tags, other than just allowing html to everyone. people might abuse that and add something malicious to your site.
heres a good topic to read about this. https://bbpress.org/forums/topic/allow-html-from-users/
heres a function that allows the common html tags already in bbpress.
you can take it from here , or until someone else helps you on this, i have no idea how to do this haha .
add_filter( 'bbp_kses_allowed_tags', 'ntwb_bbpress_custom_kses_allowed_tags' ); function ntwb_bbpress_custom_kses_allowed_tags() { return array( // Links 'a' => array( 'class' => true, 'href' => true, 'title' => true, 'rel' => true, 'class' => true, 'target' => true, ), // Quotes 'blockquote' => array( 'cite' => true, ), // Span 'span' => array( 'class' => true, ), // Code 'code' => array(), 'pre' => array( 'class' => true, ), // Formatting 'em' => array(), 'strong' => array(), 'del' => array( 'datetime' => true, ), // Lists 'ul' => array(), 'ol' => array( 'start' => true, ), 'li' => array(), // Images 'img' => array( 'class' => true, 'src' => true, 'border' => true, 'alt' => true, 'height' => true, 'width' => true, ), // Tables 'table' => array( 'align' => true, 'bgcolor' => true, 'border' => true, ), 'tbody' => array( 'align' => true, 'valign' => true, ), 'td' => array( 'align' => true, 'valign' => true, ), 'tfoot' => array( 'align' => true, 'valign' => true, ), 'th' => array( 'align' => true, 'valign' => true, ), 'thead' => array( 'align' => true, 'valign' => true, ), 'tr' => array( 'align' => true, 'valign' => true, ) ); }August 5, 2014 at 2:15 pm #150329In reply to: Text Color and Font
Robkk
ModeratorThis is the Image of forum. Right above the emoticons there is a letter “p”. I am not too sure what that is for:
i dont really know either, but i think it indicates what heading style you are on , you see that list box that says paragraph click Heading 2 , now your p symbol should show h2
This is the image of what user posted on the forum and ended up with all the codes showing up:
it might be because participants cant post any other html tags than what bbpress allows, im not for sure though.
easy way to test it is for keymaster to post using span style, if it works then its allowing participants to use restricted html.
The user just replied that once he highlight any part of the content, that’s when it shows with all the codes.
how??
link me to your site ,give me some demo login details and ill sign up and try it out??
August 5, 2014 at 1:01 pm #150322In reply to: Text Color and Font
desiamerican26
ParticipantThe user just replied that once he highlight any part of the content, that’s when it shows with all the codes.
August 5, 2014 at 12:47 pm #150320In reply to: Text Color and Font
desiamerican26
ParticipantHello @robkk,
All the buttons I needed is showing up as it is.
For the Media ones, I will contact the Author and ask them about it if anything can be done or else I will find another way to show video as per your suggestion.I just received a message from one of the user that he encountered a problem while posting on Forums.
Please see the Links below and let me know the solution:This is the setting section of TinyMCE Advanced of how I have it:
http://www.mediafire.com/view/5ycbdzwtx4yddp9/Untitled8.pngThis is the Image of forum. Right above the emoticons there is a letter “p”. I am not too sure what that is for:
http://www.mediafire.com/view/bx36jo5qjyf1y02/Untitled9.pngThis is the image of what user posted on the forum and ended up with all the codes showing up:
http://www.mediafire.com/view/7c9p4c0oa4fjqnf/Untitled10.pngHow can I resolve this issue?
Thanks you again for your time and help….
August 5, 2014 at 12:44 pm #150319Robin W
Moderatoryes, just change it !
you can then do one of two things
1. just make a note, so that each time I upgrade this plugin, you’ll need to go back and change the code again
2. rename the plugin in line 4 – say to
Plugin Name: bbP shortcodes robkkand then change the directory the plugin sits in to something else
Worpdress will then tell you that you have a plugin installed but not activated called bbP shortcodes robkk, and that the plugin bbp shortcodes no longer exists, and you can then delete it.
August 5, 2014 at 9:43 am #150304Robkk
Moderator@robin-w is there a filter i could use to output a different template
i dont want certain items to be seen when i add this shortcode somewhere, and the easiest is copying a template and renaming it and just removing the unwanted code.
i want to basically just edit this
// Output template bbp_get_template_part( 'content', 'archive-topic' );is there a way to change it to
// Output template bbp_get_template_part( 'content', 'archive-topicno' );August 5, 2014 at 8:00 am #150298In reply to: Profile page link hook
Robkk
Moderatorbecause otherwise you can just make a custom bbpress theme
August 5, 2014 at 8:00 am #150297In reply to: Menu link to Profile
Robin W
Moderator@netweb thanks for posting that, thought there would be but couldn’t find it offhand.
@mathijs-lemmers ok so try<meta http-equiv="refresh" content="0;URL=http://mysite.com/forums/users/<?php global $current_user; get_currentuserinfo(); echo sanitize_file_name($current_user->user_login). ""; ?>/edit/">August 5, 2014 at 7:17 am #150287In reply to: Finding .css style file
Robkk
Moderatoryehhhh your theme is acting weird..
make sure you added it correctly, other than that try this css code
div.bbp-template-notice.info { display: none; }August 5, 2014 at 7:01 am #150284In reply to: Finding .css style file
Robkk
Moderatorplace this inside your child themes functions.php
add_filter( 'bbp_get_single_forum_description', 'ja_return_blank' ); add_filter( 'bbp_get_single_topic_description', 'ja_return_blank' ); function ja_return_blank() { return ''; }August 5, 2014 at 6:43 am #150280In reply to: Finding .css style file
Robkk
Moderatormann your bbpress is acting weird….
try
span.bbp-topic-freshness-author img { width:20px; height:20px; }August 5, 2014 at 6:39 am #150279In reply to: Finding .css style file
tonydes
ParticipantIt does show 14. I replaced it, but it didn’t change. Do I need to add any code to the CSS editor?
August 5, 2014 at 6:35 am #150278In reply to: Finding .css style file
Robkk
Moderatorokay on loop-single-topic.php in your child theme
look for
<span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span>does it show 14 on your theme??, to remove it replace with this
<span class="bbp-topic-freshness-author"><?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id()) ); ?></span>did it work??
August 5, 2014 at 6:16 am #150276In reply to: Finding .css style file
Robkk
Moderatorwhen you edited the template , did you just remove the
array( 'size' => '14' )because when i look at http://revlanka.com/forums/forum/automotive-news/local-news/
it doesnt even show
started by: Adminanymore, just remove the array code and that should remove the avatar and thats it.August 5, 2014 at 6:09 am #150274In reply to: Finding .css style file
tonydes
ParticipantI just tried out the code as well and it didn’t work.
August 5, 2014 at 6:02 am #150273In reply to: Finding .css style file
tonydes
ParticipantSo I did what you said and added the loop-single-topic.php to a folder in my child theme labelled bbpress. I edited out that code, but unfortunately nothing changed!
August 5, 2014 at 5:49 am #150269In reply to: Menu link to Profile
Stephen Edgar
KeymasterRobin, WordPress includes functions for this:
e.g.
sanitize_file_name($current_user->user_login);https://codex.wordpress.org/Function_Reference/sanitize_file_name
https://codex.wordpress.org/Function_Reference/sanitize_title
https://codex.wordpress.org/Function_Reference/sanitize_title_with_dashes
(There are quite a few of them, they are linked in the ‘related’ sections of the above articles)August 5, 2014 at 5:46 am #150267In reply to: Finding .css style file
Robkk
Moderator@tonydes i just forgot about this, do this first
pay attention to the started by image on the link to your forums in the above post.
add this for custom css ,
span.bbp-topic-started-by img { width:20px; height:20px; }does that change the size??
August 5, 2014 at 5:37 am #150265In reply to: Finding .css style file
Robkk
Moderatorfirst one more question , do you have custom css rules that you added already that include modifying images?
I don’t have a bbpress custom theme
okay create a bbpress custom theme now, add all the templates into your child theme.
more info here https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum-part-3/
lets work on this first http://revlanka.com/forums/forum/automotive-news/local-news/
since it has the issue on the notice , started by and freshness authors
now go to loop-single-topic.php and find
<span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?></span>does it say 14 ?
if you dont want the started by author image remove make it where its like this
<span class="bbp-topic-started-by"><?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link() ); ?></span>tell me if that works
I’m pretty novice at this, but does this mean that I have to edit from the style sheet?
all of the images that have issues (started by, notice, freshness), are sized in the templates in php rather than css .
August 5, 2014 at 5:08 am #150259In reply to: Finding .css style file
tonydes
Participant@robkk, I’m using a premiumpress theme. I tried again after disabling all my plugins, but the code still didn’t work.
I don’t have a bbpress custom theme either. I’m pretty novice at this, but does this mean that I have to edit from the style sheet?August 5, 2014 at 4:40 am #150256In reply to: Finding .css style file
-
AuthorSearch Results