Search Results for 'code'
-
AuthorSearch Results
-
August 19, 2015 at 2:08 pm #165577
In reply to: Changing name of "Key Master"
benklocek
ParticipantI’ve updated the filter code to make it work for BBPress 2.5.7+
https://gist.github.com/benklocek/433713bceb83eec6984f
The Keymaster title changed from “Key Master” to “Keymaster” at some point, and the filter only accepts 2 variables now.
I would be hesitant to use @robkk’s code, as it is replacing a core function, instead of simply filtering.
August 19, 2015 at 11:49 am #165570In reply to: Search function doesn’t work for anonymous
Robkk
ModeratorI have been changing a bit of translations in the code – that’s why you might find a mistake here.
You haven’t been editing core files right?? There are other ways you can translate bbPress, unless you are just editing the templates that you can copy into your child theme?
There might be another thing you could do if you haven’t already, place all the bbPress templates in a child theme of theme in a folder called bbpress.
Also remove the htaccess hack since it seems not to work. I don’t want it causing issues.
August 19, 2015 at 11:22 am #165566In reply to: add a "Featured Image" to a forum
Robkk
ModeratorDid you copy and edit the bbPress templates in your child theme heavily?? Removing the hook @kachan64 pointed out, can make the code not work.
Also does the picture save correctly in the WordPress backend?? If you could link to a forum that should has a topic with a featured image, I can check to see if there is a CSS problem.
August 19, 2015 at 10:32 am #165562In reply to: bbPress Shortcode
Acs-Yt
ParticipantOMG, it’s Full Width! This code resolved the problem:
.bbpress .col-md-8 { width: 100% !important; } .bbpress .col-md-4 { width: 0 !important; display: none !important; }Thank you for helping me!
August 19, 2015 at 10:31 am #165561In reply to: Limit tags to a pre-defined list?
strategeek
ParticipantFINAL CODE HERE.
FOR CHECK BOXES.
(Difference from the upper one: fixed issue with tags with more than 1 word)function displayTagElements($selectedTags, /* $userRole, */ $task){ $html= array(); $tags = get_categories(array('hide_empty' => 0, 'taxonomy' => 'topic-tag')); $selectedTagsArray = explode(',', $selectedTags); if($userRole != 'bbp_participant' || $task != 'edit') { $html[] = ""; foreach($tags as $tag) { $selected = ''; if (in_array($tag->name, $selectedTagsArray)) { $selected = 'checked'; } $html[] = "<input type='checkbox' name='bbp_topic_tags[]'".$selected." value='". $tag->name ."'>". $tag->name ." "; } } else { $html[] = $selectedTags; } return implode('', $html);August 19, 2015 at 9:23 am #165559In reply to: add a "Featured Image" to a forum
kachan64
Participantif ( has_post_thumbnail($post->ID) ) echo get_the_post_thumbnail($post->ID,'thumbnail',array('class' => 'alignleft forum-icon')); }This is the styling for the featured image.
bbp_theme_before_topic_title
This part of the code determents where should featured image goes. You will need to check your code.August 19, 2015 at 7:57 am #165558In reply to: add a "Featured Image" to a forum
Mei Ling
ParticipantHi Robkk,
I have tested your code. Well I can select in the admin panel “edit topic” or “new topic” “featured image”, I select the picture…when I turn back to the topic, no picture. It doesn’t remain selected.
I use the latest WordPress: 4.30.Could you help me?
I thank you in advance
Mei Ling
August 19, 2015 at 6:35 am #165557In reply to: Topic Title on Forum Index
kachan64
ParticipantThanks, the code from github is running outside of a forum loop and works on a localhost test site. They used the code in loop-forum.php
<?php if (($has_replies = (strstr(bbp_get_forum_freshness_link(), '<a')))): ?> <?php bbp_topic_title(array( 'post_id' => bbp_get_forum_id() ) ); ?>, <?php _ex('by ', 'bbPress Freshness Author', 'bunyad'); ?> <?php bbp_author_link( array( 'post_id' => bbp_get_forum_last_active_id(), 'size' => 45 ) ); ?></span> <?php endif; ?>This is my code running inside a loop in loop-single-forum.php and didn’t work, will just output my forum title for some strange reason if I post to that forum’s sub-forum.
August 19, 2015 at 2:31 am #165555In reply to: Add custom text fields to reply form
project_subdomain
Participant@robkk I’m not sure why it’s not working proplerly (showing all divs in all forums). Could you give me a hint how the code has to look like, when I’d like to have
forum id 1 echo div 1
forum id 2 echo div 2
forum id 3 echo div 3unforrtunately I’m not familiar with ternary operators which may be a option.
August 19, 2015 at 2:21 am #165554In reply to: Search function doesn’t work for anonymous
AntonHoelstad
ParticipantI have been changing a bit of translations in the code – that’s why you might find a mistake here. What I don’t understand is, that when I upload all the original files, it still does the same mistake.
Is there one or a few of the files that determine this part with the URL? Because then I could show you those, and we could see if something was wrong here?
August 19, 2015 at 2:16 am #165553In reply to: Search function doesn’t work for anonymous
AntonHoelstad
ParticipantGood suggestions I must say! But unfortunately none of these worked either. Let me go trough them one by one:
1. I set the permalink structure back to default. The only change here is, that when you search now, and land on the URL string “search?action=bbp-search-request&bbp_search=adwords” – you now see the frontpage for some weird reason?
2. I have no trailing slash in the settings part of the forum
3. I did try the htaccess hack – but this did no change? I still see the frontpage now when I try to search.Something weird is going on. Would it help you if I send you the code for some of the files for my plugin?
August 18, 2015 at 11:07 pm #165550In reply to: bbPress Shortcode
Robkk
ModeratorIt should be this
@media and (min-width: 992px) { .bbpress .col-md-8 { width: 100% !important; } .bbpress .col-md-4 { width: 0 !important; display: none !important; } }You can also try it without the media queries.
.bbpress .col-md-8 { width: 100% !important; } .bbpress .col-md-4 { width: 0 !important; display: none !important; }August 18, 2015 at 11:00 pm #165549In reply to: conversion of PHPBB to BBPress
Robkk
ModeratorNo file attachments are imported.
If the image was part of the original post with using the BBCode [img] then that IS imported as part of the post, if the image was an attachment to the post then it is not imported.
There are scripts that handles importing images from other forum software to GD bbPress Attachments that you can take a look at though. This might be custom development and you may need to hire a developer to create an importer for file attachments from phpBB though.
August 18, 2015 at 10:42 pm #165548In reply to: Add custom text fields to reply form
Robkk
Moderatorcould also just be
bbp_is_forum( ID )August 18, 2015 at 9:32 pm #165545Robkk
ModeratorOkay I have also seen posts saying file permissions and possibly a user created issue messing with comments
<!-- comment-->in php files.You didn’t edit the files in the bbPress right??
Before editing the file permissions you may need to do some more troubleshooting as listed here.
You have the right file permissions set right??
August 18, 2015 at 4:37 pm #165539In reply to: bbPress Shortcode
Acs-Yt
ParticipantI added them into the “Simple Custom CSS” plugin, downloaded from wordpress.org.
At the end, it looked like:
@media and (min-width: 992px) { .bbpress .col-md-8 { width: 100% !important; } }and
@media and (min-width: 992px) { .bbpress .col-md-8 { width: 100% !important; } }It is still not Full-Width 🙁
August 18, 2015 at 3:19 pm #165536Topic: Restrict URL Link In Topics For Non Loged Users
in forum Requests & Feedbackgurselgunacar
ParticipantHello, i am trying to find a code or plugin to restrict url links in topics for non loged in users. For example :
to download click here : http://www.blabla.com > non loged in users will see please register or log in to see links.August 18, 2015 at 3:14 pm #165535In reply to: Add custom text fields to reply form
project_subdomain
Participant<?php if ( bbp_is_single_forum('ID') ) :?> <div>…</div> <php endif;?>does not work (no div at all at forum with this ID).
August 18, 2015 at 2:28 pm #165532In reply to: Add custom text fields to reply form
Robkk
ModeratorNot sure yet but maybe using a conditional
bbp_is_single_forum('ID')with ID being the id of the forum.August 18, 2015 at 2:21 pm #165530In reply to: bbPress Shortcode
Robkk
ModeratorWhere did you put the CSS?? Did you add !important to the end like this??
width: 100% !important;August 18, 2015 at 2:17 pm #165527In reply to: Search function doesn’t work for anonymous
Robkk
ModeratorOkay I found a few fixes for this possible bug, I will need to contact the devs later to see if they had seen something similar before. One is an htaccess rewrite rule and the other is really something simple.
Okay you can try the trailing slash fix mentioned here first to see if it helps, but you are not really experiencing a 404 error because the search term you are searching is stripped for some reason.
As a test try setting your permalinks to default and try searching again to see if it will keep your search term and search for it. The query
search?action=bbp-search-request&bbp_search=adwordsis usually seen in the default permalink structure instead of /search.Also make sure you do not have a trailing slash in any of the slugs in Settings>Forums.
The htaccess rewrite method is adding this to your htaccess file on your site that is uaually in the WordPress directory to solve the issue, but do not try this just yet, I don’t want you messing with your htaccess file
# BEGIN bbpress search hack <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{QUERY_STRING} ^action=(.*)&bbp_search=(.*)$ RewriteRule ^/soeg/(.*)$ http://antonhoelstad.dk/soeg/%2/? [L] </IfModule> # END bbpress search hackAugust 18, 2015 at 1:18 pm #165520In reply to: Search function doesn’t work for anonymous
Robkk
ModeratorWhen I tested it, it doesn’t have the extra added query
?action=bbp-search-request&bbp_search=”like your site does.I also tested it with/without the forum root slug and it worked fine for me.
August 18, 2015 at 12:53 pm #165519In reply to: bbPress Shortcode
August 18, 2015 at 12:44 pm #165516In reply to: SMF Import Help Needed
sharingsunshine_wp
ParticipantI deactivated all the plugins and now I am getting this error
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups_table.forum_id = forums_table.forum_id LIMIT 0, 100' at line 1] SELECT convert(forums_table.the_forum_id USING "utf8mb4") AS the_forum_id,convert(forums_table.the_parent_id USING "utf8mb4") AS the_parent_id,convert(forums_table.the_topic_count USING "utf8mb4") AS the_topic_count,convert(forums_table.the_reply_count USING "utf8mb4") AS the_reply_count,convert(forums_table.the_total_topic_count USING "utf8mb4") AS the_total_topic_count,convert(forums_table.the_total_reply_count USING "utf8mb4") AS the_total_reply_count,convert(forums_table.the_forum_title USING "utf8mb4") AS the_forum_title,convert(forums_table.the_forum_slug USING "utf8mb4") AS the_forum_slug,convert(forums_table.the_forum_description USING "utf8mb4") AS the_forum_description,convert(forums_table.the_forum_order USING "utf8mb4") AS the_forum_order,convert(groups_table.forum_id USING "utf8mb4") AS forum_id FROM smf_forums_table AS forums_table INNER JOIN smf_groups_table AS groups_table USING groups_table.forum_id = forums_table.forum_id LIMIT 0, 100I made sure I am using your revision of code. I only have the bbPress plugin activated and I put the site in maintenance mode via .htaccess
Thanks for helping me with this.
Randal
August 18, 2015 at 12:13 pm #165515In reply to: new topic “Time out” issue
Robkk
ModeratorWhat are the bbPress plugins you have on your site?? There has been some similar issues while using some specific plugins.
Also did the user see the issue message somewhere in the form like the flood control errors in bbPress or was it displayed in place of the whole site?? This issue could also be a connection time out error on your server.
https://codex.wordpress.org/Common_WordPress_Errors#Connection_Timed_Out
-
AuthorSearch Results