Search Results for 'code'
-
AuthorSearch Results
-
March 18, 2015 at 12:51 pm #159832
In reply to: Search not finding results
teamoo
ParticipantI took the “link” code out and it posted.
March 18, 2015 at 8:41 am #159826Topic: Shortcode or link to profile, topics started, etc
in forum Showcasebren77
ParticipantI’ve looked over the documentation but can’t find a shortcode or link that will take me to the page that displays links for a user’s profile, topics, favorites, etc. For example:
http://screencast.com/t/mvPcfwwcpI can get there after I post a topic and then click on my username. I would like to add a link to this page at the top of entry page.
Thanks!
ChadMarch 18, 2015 at 4:52 am #159825In reply to: First topic text color
Navinn
ParticipantHi, it doesn’t change.
I also tried this:#bbpress-forums #top ul:first-child > li > a { color: #b84444!important; }i don’t know it that helps, but my custom CSS contains this:
li#menu-item-107548 .avia-menu-text span{ font-size: 22px; } #header_meta { background: #4a96cd; } #top ul:first-child > li > a { color: #eeeeee; } #top ul:first-child > li > a:hover { color: #4a96cd; } /* Main Menu - HIGHLIGHT BLOCK */ #top .avia-menu-fx { display:block; position:absolute; border-style:solid; border-width:5px; } .avia_desktop .av-hover-overlay-active .av-masonry-image-container { opacity: 1; } .qa-faq-title { font-size: 110%; } .faq-catname { font-size: 150%; } .header_color .main_menu ul:first-child > li > a {font-size:110%; } @media only screen and (max-width: 600px) { .av-inner-masonry-content.site-background { opacity: 0 !important; } } .single #main .content .entry-footer{ float: left !important; } /* Couleur de la sideBar */ .main_color .sidebar { background-color: #eeeeee; } /* Couleur des liens vers pages de même niveau dans la sidebar*/ ul.nested_nav a:hover { color: #4a96cd!important; } ul.nested_nav a { color: #404040!important; } /*Classe pour centrer les images dans le menu*/ p.menu-image { position: relative; top: -9px; } li#menu-item-107543 a .avia-menu-fx { bottom: 11px!important; } li#menu-item-107544 a .avia-menu-fx { bottom: 11px!important; } /*Désactiver la bordure en haut a droite du menu*/ .avia-menu.av_menu_icon_beside { border-right: none; } #top #header .avia_mega_div > .sub-menu.avia_mega_hr { padding-top: 5px; } #top #header .avia_mega_div > .sub-menu { padding: 20px 20px 20px; }March 18, 2015 at 2:59 am #159820Topic: Error related to filename in code
in forum Troubleshootingshanhard
ParticipantUsers are reporting an error when logging in using the bbPres login widget:
Warning: require_once(/home/sitename/public_html/wp-content/plugins/bbpress/includes/admin/converters/example.php) [function.require-once]: failed to open stream: No such file or directory in /home/sitename/public_html/wp-content/plugins/bbpress/includes/users/functions.php on line 1705Fatal error: require_once() [function.require]: Failed opening required ‘/home/sitename/public_html/wp-content/plugins/bbpress/includes/admin/converters/example.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /home/sitename/public_html/wp-content/plugins/bbpress/includes/users/functions.php on line 1705
I noticed that the filename is different in the referenced location, it has a capital letter in Example.php When I change the filename it resolves the issue.
Why does it need to reference the Example.php converter anyway?
March 17, 2015 at 10:04 pm #159812In reply to: Rev Slider/Image in Forum Header
Robkk
Moderatorsorry i forgot about your topic
in page is kind of hard to do since there is usually multiple forums.
the only thing i can think of is maybe outputting the shortcode in a template
like so
<?php echo do_shortcode("[shortcode]"); ?>but then since there is multiple forums you will need multiple shortcodes for each slider.
which would require you to use a bunch of if statements for each forum.
i suggest go to http://jobs.wordpress.net/ and see if a developer can do this for you.
March 17, 2015 at 9:44 pm #159809In reply to: First topic text color
Robkk
Moderatori thought it was because you closed the topic but no your theme is adding some weird CSS to the first topic.
see if this CSS fixes your issue,
#bbpress-forums #top ul:first-child > li > a { color: #b84444; }March 17, 2015 at 9:31 pm #159808In reply to: automatically insert RSS links
Robkk
Moderatori found this gist here , and it might be useful.
https://gist.github.com/trishasalas/9818135
plop this into your child theme functions.php or a functionality plugin
add_action( 'bbp_template_before_replies_loop', 'bbpress_rss' ); function bbpress_rss() { $url = "http" . (($_SERVER['SERVER_PORT']==443) ? "s://" : "://") . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; echo ' <a href="' . $url . 'feed">Subscribe via RSS</a>'; }EDIT: @netweb thats sweet!!
March 17, 2015 at 7:15 pm #159797In reply to: SMF Import to bbPress
curvemeister
ParticipantI want to offer this php script in exchange for the help Stephen’s script provided. It ran successfully on my installation, going from SMF 2.0.4 to bbPress 2.5.6 / GD bbPress Attachments 2.2. Most of my time is taken up with consulting, and I regret that I will not be providing much in the way of support for this script.
This is a stand-alone php script that you must modify to target your SMF install. I suggest using notepad++ to edit for readability, and something like FileZilla to transfer your file to your host. Install and run the script in the root folder of your WordPress folder. I used Putty configured for an SSHconnection. Do not try to run it via http – the script will time out.
Thanks to Stephen Edgar for providing the original php on which this is based.
Mike Russell – final result at: http://www.curvemeister.com/forums
==============================================================================<?php //Standalone script to import smf attachments for the GD bbPress Attachments plugin //Execute after you have imported smf into bbPress require( 'wp-load.php' ); require( 'wp-admin/includes/image.php' ); $verbose = false; //$limit = " LIMIT 0,1"; $limit = " LIMIT 0,99999"; // source database connection $host="localhost"; $uname="xxx"; $pass="xxx"; $database = "xxx"; $site_url = 'http://xxx/forum'; $forum_path = 'forum/attachments/'; echo "start smf_attachments-to-bbpress\n"; flush(); //get the attachment rows from SMF $smf_db = new wpdb($uname, $pass, $database, $host); $smf_rows = $smf_db->get_results(" SELECT * FROM <code>smf_attachments</code> WHERE file_hash != '' AND filename NOT LIKE '%thumb' ORDER BY <code>id_attach</code>" .$limit); echo "processing ".$smf_rows->num_rows." rows total\n"; // process each row $count = 0; foreach ($smf_rows as $smf_attachment_row) { if($verbose) { echo 'next row, id_attach = '.$smf_attachment_row->id_attach."\n"; flush(); } //look for both a new and old style filename. If neither exists, skip this attachment $smf_filename = $forum_path.$smf_attachment_row->id_attach.'_'.$smf_attachment_row->file_hash; if(!file_exists($smf_filename)) $smf_filename = $forum_path.$smf_attachment_row->id_attach.'_'.$smf_attachment_row->filename.$smf_attachment_row->file_hash; if(!file_exists($smf_filename)) { echo "no file, skipping attachment for ".$smf_attachment_row->id_attach.", missing SMF file: ".$smf_filename."\n"; flush(); continue; } $uploads = wp_upload_dir('SMF'); $new_upload_dir = $uploads['path']; $new_full_filename = $new_upload_dir.'/'.$smf_attachment_row->filename; if($verbose) { echo('old->new = '.$smf_filename.' -> '.$new_full_filename."\n"); flush(); } //copy the enclosed file if necessary if(!file_exists($new_full_filename) && !copy($smf_filename, $new_full_filename) ) { echo "cannot copy: ".$smf_filename."->".$new_full_filename."\n"; } else { //look for bbPress's previously imported topic or reply for the current attachment $parent_args = array( 'post_type' => array('topic', 'reply'), 'meta_key' => '_bbp_post_id', 'meta_value' => $smf_attachment_row->id_msg ); //echo "$parent_args = ".print_r($parent_args)."\n"; $parent_query = new WP_Query($parent_args); $parent_query->get_posts(); if($verbose) { echo $parent_query->post_count." posts found for smf_post id ".$smf_attachment_row->id_msg."\n"; flush(); } //normally only one post references a given enclosure, but handle possible multiples anyway ... while($parent_query->have_posts()) { $parent_query->the_post(); $post_id = get_the_ID(); $attachment_data = array( 'guid' => $uploads['url'] . '/' . basename( $new_full_filename ), 'post_mime_type' => 'image/'.$smf_attachment_row->fileext, 'post_title' => $smf_attachment_row->filename, 'post_status' => null, 'post_content' => '', ); //if($verbose) { echo "attachment_data = ".print_r($attachment_data)."\n"; flush(); } $attach_id = wp_insert_attachment($attachment_data, $new_full_filename, $post_id); //echo "attach_id = ".$attach_id."\n"; flush(); if($attach_id) { //update_post_meta($attach_id, '_bbp_attachment', 1); if($attach_metadata = wp_generate_attachment_metadata($attach_id, $new_full_filename)) { //echo 'attach_metadata = '.print_r($attach_metadata)."\n"; flush(); wp_update_attachment_metadata( $attach_id, $attach_metadata ); set_post_thumbnail( $post_id, $attach_id ); } else { echo 'wp_generate_attachment_metadata failed, fname = '.$new_full_filename."\n"; flush(); } } wp_reset_postdata(); } } $count++; if($count%100 == 0) { echo $count." attachments processed\r"; flush(); } } echo "Done, processed ".$count." records\n\n"; //clean up message body text //convert <tt> -> <br /> mysql_query("UPDATE wp_posts SET post_content = REPLACE (post_content, \'<tt>\', \'<br />\') WHERE post_content LIKE \'%<tt>%\'"); mysql_close($connection); exit; ?>March 17, 2015 at 3:58 pm #159785In reply to: bbPress downgrade?
Robin W
ModeratorNo, you’ll need to repeat whatever you did when you originally installed it.
see
March 17, 2015 at 7:36 am #159769nolimit966
ParticipantIve taken a look at the template.php file to see what id need to implement into my current functions.php breadcrumbs class but im slightly confused.
From my code above it looks like:
$output = '<li><a href="'.get_permalink($ancestor).'" title="'.get_the_title($ancestor).'">'.get_the_title($ancestor).'</a></li> <li class="separator">/</li>'.$output;is only outputting a maximum of 3 ancestors. Is that correct?Php really is not my strong point.
March 17, 2015 at 3:49 am #159756In reply to: New Topic Form Shortcode Issue
mvaneijgen
ParticipantI still have this problem on the latest bbpress and wordpress. Im trying to embed the shortcode on the
feedback-no-search.phpso that it displays when there is no search result and the user can ask the question on the forum. For admins it works fine but for non-admins get the message “You cannot create new topics.”The fix that @satrya and @robin-w posted also doesn’t work on this version of bbpress, but again thats ia comment from a year ago.
March 17, 2015 at 3:42 am #159755In reply to: New Topic Form Shortcode Issue
mvaneijgen
ParticipantI do and admins and moderators will see the form and can work with it, but users/subscribers will see the message “You cannot create new topics.” as described here https://bbpress.org/forums/topic/new-topic-form-shortcode-issue/ a topic from almost 3 years ago.
I place the shortcode in the search result page if there are no instances found of what they are trying to look for, so they can ask that question on the forums.
March 17, 2015 at 2:03 am #159754Robkk
Moderatorid say look at the bbPress breadcrumbs code and copy that and add it to your custom breadcrumbs.
its in bbpress>includes>common>
then search breadcrumbs in an editor like notepad++
March 17, 2015 at 2:00 am #159753In reply to: changing the message on bbp_topic_pagination_count
Robkk
Moderatoryou probably can replace it with a post count tag that outputs the number of replies in a topic for example.
i think this is it.
<?php bbp_topic_post_count ?>then output some text after that.
March 17, 2015 at 1:47 am #159752In reply to: Image captions not displaying in forum posts
Robkk
ModeratorbbPress doesnt output shortcodes use something like this
March 17, 2015 at 1:40 am #159751Robkk
Moderatoryou really shouldn’t edit core code…i hope you havent messed something up and now are getting a domino effect of issues.
you should also contact wp user avatar plugin support just in case too.
i gotta say email me , so i can double check your setup
im mostly going to ask how you set up your forum and see if i can duplicate the issue.
March 16, 2015 at 10:22 pm #159743In reply to: Hide Private Forums from domain../forums
Robkk
Moderatoryou can hide them with CSS
.forum-archive .status-private { display:none; }March 16, 2015 at 9:35 pm #159738In reply to: New Topic Form Shortcode Issue
Robkk
Moderatorwhat are you trying to do with the shortcode?
it should work if you just place [bbp-topic-form] in a page or a sidebar widget like blask studio tinymce widget.
March 16, 2015 at 9:25 pm #159737In reply to: Want to modify column in forum post view
Robkk
Moderatorvoice count shows how many users are in a particular topic.
for topics
you can edit the
loop-single-topic.phpfile by copying it into your child theme and changing the voice count number code to whatever php tag you have from a plugin that has a specific template tag to show a posts like count.change
<?php bbp_topic_voice_count(); ?>with what you have.to edit the label voice in the bbPress header you edit
loop-topics.phpand change<?php _e( 'Voices', 'bbpress' ); ?>and change it<?php _e( 'Likes', 'bbpress' ); ?>for forums
its close to the same instead look for
loop-forums.phpandloop-single-forum.phpand the php code would be similar but instead of
topic_look forforum_March 16, 2015 at 9:10 pm #159735In reply to: Simplify Options theme trouble
Robkk
Moderatoruse FTP and copy page.php and rename it to bbpress.php , then remove all the unwanted code like the read more buttn .
This usually fixes most theme problems.
need anymore help with this reply back , and i will give you a more detailed explaination.
March 16, 2015 at 9:06 pm #159733In reply to: blurred avatar
Robkk
Moderatorit is most likely that you tried to make avatars bigger with CSS when they were originally sized to be smaller in the PHP code hence why you would see them blurry because you are basically stretching a small image.
link to the blurred avatars to double check though on your site.
March 16, 2015 at 5:20 pm #159725In reply to: bbPress WP Tweak – Right Justified Text Sidebar
teamoo
ParticipantHey Robin – I appreciate your response but my theme designer gave me some code to make it work.
For reference, this is the custom CSS we entered:
/* bbPress WP Tweak plugin left justified text fix 3-13-2015 */
#sidebar.sidebar-left{ text-align: initial !important; }March 16, 2015 at 4:16 pm #159722Topic: broken widget / shortcode
in forum TroubleshootingPierre Ledoux
ParticipantHello,
i want to use a widget (bbpress login) and a shortcode ([bbp-lost-pass]).
But the appearance seems to be broken. The buttons are left. The descriptions are splitted. You can check the issues here:
forex.die-analysten.com/login/
forex.die-analysten.com/login/lost-pass/how can i fix that?
Kind Regards
PierreMarch 16, 2015 at 3:03 pm #159718In reply to: Users unable to register and login
rbrynest
ParticipantAn update on this.
I got it to work by editing the .htaccess file.
Add this code block at the start of the file:
<FilesMatch “^(wp-login|wp-log|index)\.php$”>
Header set Set-Cookie wordpress_test_cookie=WP+Cookie+check
</FilesMatch>Regards
RuneMarch 16, 2015 at 12:45 pm #159711In reply to: Forum topics not showing up :-(
VojtaSvoboda
ParticipantWhen I debuged WP_Query in bbpress/includes/topics/template.php on line 203, it prints:
SELECT SQL_CALC_FOUND_ROWS wp_2_posts.ID FROM wp_2_posts INNER JOIN wp_2_postmeta ON ( wp_2_posts.ID = wp_2_postmeta.post_id ) WHERE 1=1 AND wp_2_posts.post_parent = 5080 AND wp_2_posts.post_type = 'post' AND (wp_2_posts.post_status = 'publish' OR wp_2_posts.post_status = 'closed' OR wp_2_posts.post_status = 'private' OR wp_2_posts.post_status = 'hidden') AND ( wp_2_postmeta.meta_key = '_bbp_last_active_time' ) GROUP BY wp_2_posts.ID ORDER BY wp_2_postmeta.meta_value DESC LIMIT 0, 15with post_type=post, but it should be post_type=topic. Damn.
-
AuthorSearch Results