Search Results for 'code'
-
AuthorSearch Results
-
February 15, 2016 at 8:07 am #171725
In reply to: Topic answer – proble with font alingment
Pascal Casier
ModeratorKalimera,
Strange, mostly width 100% is needed, but it’s because of the width 100% that you have this issue π
Try to add the following CSS:
#bbpress-forums div.reply { width: auto; }Pascal.
February 15, 2016 at 2:51 am #171712In reply to: Converter for Dizkus Forums
DL
ParticipantThanks! I appreciate your help, I’m desperate to update these sites on old versions of Zikula. I can’t even update the PHP on the server past 5.3 because because Zikula 1.2x won’t work on anything later.
The issues you noted.
Categories
aren’t used much, so yes, they can be ignored, it doesn’t seem like it’s difficult to assign forums to categories in bbPress if needed.Subscriptions
The table prefix is causing me confusion as I switch between databases. Some of my forums have databases using nuke_ for prefix and some have zk_ , this is an artifact from many years of using Postnuke/Zikula and based on when the original database was created.in the dizkus schema the (prefix)_dizkus_subscription table contains which forums a user is subscribed to.
The (prefix)_dizkus_topic_subscription table contains which topics a user is subscribed to.
Topic Author IP
This isn’t necessary to move to bbPress as far as I’m concerned. Only used when I’m investigating a possible spam post. Someone else might need to have it though, so put it on the “nice to have” list.Topic Content
None of the conversion attempts have been successful enough to see yet. So far have always errored out because of failed sql statements.I attempted to do a join because the title of a new topic is stored in (prefix)_dizkus_topics along with the topic post time, views, num. replies, last post ID, forum ID, and sticky status (0 or 1). But the content of the first post in a topic is stored in the (prefix)_dizkus_posts table.
There is no “first post in topic” post ID in either table, as it looks like phpBB had so I tried to adapt this.
// Topic content. // Note: We join the 'posts' table because 'topics' does not include topic content. $this->field_map[] = array( 'from_tablename' => 'posts', 'from_fieldname' => 'post_text', 'join_tablename' => 'topics', 'join_type' => 'INNER', 'join_expression' => 'USING (topic_id) WHERE posts.post_id = topics.topic_first_post_id', 'to_type' => 'topic', 'to_fieldname' => 'post_content', 'callback_method' => 'callback_html' );Topic Favorites
Dizkus doesn’t have topic favorites, only forum.Passwords
Since Dizkus doesn’t store passwords, they would have to taken from (prefix)_users table, but thinking about it I’m not sure that this script needs to deal with passwords at all. I will still need to migrate ALL the users from the Zikula installs, not just the ones that have posted in the forums. I’m planning on using WP All Import Pro for that job and migrating other data like converting news items to news and bringing over static pages.Worst case, if the passwords get screwed up everyone would have to use the “lost password” system to set a new one.
Just tried the version of dizkusZK in Github after merging your changes and got this error.
Repair any missing information: Continue WordPress database error: [Unknown column 'zk_users.pn_uname' in 'field list'] SELECT convert(zk_dizkus_users.user_id USING "utf8mb4") AS user_id,convert(zk_users.pn_uname USING "utf8mb4") AS pn_uname,convert(zk_users.pn_email USING "utf8mb4") AS pn_email,convert(zk_users.pn_url USING "utf8mb4") AS pn_url,convert(zk_users.pn_user_regdate USING "utf8mb4") AS pn_user_regdate,convert(zk_users.pn_user_avatar USING "utf8mb4") AS pn_user_avatar FROM zk_dizkus_users AS zk_dizkus_users LIMIT 0, 100 No users to convertNo data to cleanStarting ConversionFebruary 14, 2016 at 11:27 pm #171706In reply to: Converter for Dizkus Forums
Stephen Edgar
KeymasterFirstly, awesome job at what you’ve done so far π
I just sent through a pull request with some basic/minor changes
These are the things I noticed when comparing the DB schema to the importer:
Categories:
β’ This will be tricky as they are in a different tablenuke_dizkus_categories, can you manually create these and add the forums to them later after import etc?Forum subscriptions:
β’ Your schema suggestsnuke_dizkus_subscriptionrather than thiszk_dizkus_forum_subscriptionTopic Author IP:
β’ With some juggling of the phpBB query this should be possible I thinkTopic content:
β’ This doesn’t quite look right, have you had issues with multiple same topics imported when you run the import at the moment?Topic favorites:
β’ It looks like there are no topic favorites, though I do see forum favorites innuke_dizkus_forum_favorites, unless the value stored inuser_favoritesstored in thenuke_dizkus_userstable is for user favorites maybePasswords:
β’ Passwords are hard πPassword verify class:
β’ If password importing works this field should match the importer class namedizkusZKFebruary 14, 2016 at 9:57 pm #171701In reply to: Converter for Dizkus Forums
Stephen Edgar
KeymasterI did spend several hours trying to modify the phpBB converter to work with the Dizkus database tables before coming here. Was able to get it partly working but was losing meta data like poster name, post time, and it seemed the posts (replies) werenβt always assigned to the right topic.
If you still have the code for what you did here could you also upload that please, will save me some time and help me out quite a bit if you could π
February 14, 2016 at 9:47 pm #171700In reply to: Converter for Dizkus Forums
DL
ParticipantThe sites I have using Dizkus are on Zikula 1.2.10 and using Dizkus 3.1.
The Github you linked is a newer version that was supposed to get ready for the new Bootstrap version of Zikula, schema would be completely different. I doubt if anyone is actually using that version because Zikula 1.2.10 and Dizkus 3.1 were the last backward compatible and widely used versions.
Because of the break in development I don’t think the code for those versions are online anywhere.
I’ve uploaded a structure dump from the biggest site to.
http://linkpro.net/files/zikula-1210-nuke-prefix.sqlThanks for any help or tips you can provide. If a full dump of the database would help I can package one up but would need a more secure way to share it with you.
February 14, 2016 at 8:17 pm #171698In reply to: Converter for Dizkus Forums
Stephen Edgar
KeymasterIs the latest version of Dizkus v1.3?
Does this look like the source code? https://github.com/paustian/Dizkus
The partial work that you did could you post the source code to GitHub please and I’ll take a look https://gist.github.com/
February 14, 2016 at 7:49 pm #171696In reply to: Admin Bar Menu Editing
wafflecloud
ParticipantThat worked beautifully! You totally and completely rock….HARD!
A huge thank you! I wish there was a button I could click to thank you with or something but all I can think to do is share my code so it can help others / hopefully prevent you from having to answer the same question again.Here is what I put to make it work:
<?php function annointed_admin_bar_remove() { global $wp_admin_bar, $current_user; get_currentuserinfo(); $myadmins = array(1, 3); // Add all IDs of the admins in this array if ( !in_array($current_user->ID, $myadmins) ) { $wp_admin_bar->remove_menu('wp-logo'); // Remove the WP Logo Menu $wp_admin_bar->remove_menu('site-name'); // Remove the site name menu $wp_admin_bar->remove_menu('view-site'); // Remove the view site link } } add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove');February 14, 2016 at 2:44 pm #171691spleen387
ParticipantHi, I’m writing a plugin that wraps around most of the bbpress pages using add_action
for some reason when I try
add_action('bbp_template_before_search',
it works, but only with text. when I check the source files in the web inspector it’s missing javascript files for my plugins.I’m using wp_enqueue_script to add my script, it works on /forums so I don’t really understand why It wouldn’t for the search page
February 14, 2016 at 10:29 am #171679In reply to: Help with custom bbpress Like/Dislike plugin
Robin W
ModeratorSo yes I’d love to see how you created that great layout, and maybe share the code to allow others to get the same effect.
Are you up for that?
February 14, 2016 at 7:43 am #171674In reply to: Admin Bar Menu Editing
Pascal Casier
ModeratorHi,
No dumb questions here…As you might have seen in your database, the ID field is a bigint, so to continue on the IF that you used, you could go for:
$myadmins = array(1, 2); // Add all IDs of the admins in this array if ( !in_array($current_user->ID, $myadmins) ) {Pascal.
February 13, 2016 at 6:30 pm #171659In reply to: Auto reply to topics after a certain time period
Robin W
Moderatorit’s do-able but I don’t know of anything that already does this.
Suspect you need to pay someone to cut the code for you.
February 13, 2016 at 3:07 pm #171653In reply to: Converter for Dizkus Forums
Pascal Casier
ModeratorIf you look for a coder concerning WP/bbPress, don’t forget to post on http://jobs.wordpress.net/
Pascal.
February 13, 2016 at 2:24 pm #171652In reply to: Converter for Dizkus Forums
DL
ParticipantThanks for the codex links.
I did spend several hours trying to modify the phpBB converter to work with the Dizkus database tables before coming here. Was able to get it partly working but was losing meta data like poster name, post time, and it seemed the posts (replies) weren’t always assigned to the right topic. Also, what to do about avatars and signatures.
I’ll try doing it from scratch based on the codex example.phpj. Was just hoping someone had already done it.
As far as Dizkus, here is a small basic forum that uses it.
http://www.deltasailing.com/Dizkus/viewforum/forum/1And a larger one
http://www.thebeachcats.com/forumsI’ve put this out on Codeable.com to pay to get it done if anyone here does projects there.
February 13, 2016 at 11:51 am #171648In reply to: Converter for Dizkus Forums
Stephen Edgar
KeymasterI’ve never heard of Dizkus π
You could try making some more changes to the phpBB importer yourself if it already partially works:
Also checkout both of these for SMF and phpBB for the upcoming bbPress 2.6 release.
https://bbpress.trac.wordpress.org/browser/trunk/src/includes/admin/converters/phpBB.php
https://bbpress.trac.wordpress.org/browser/trunk/src/includes/admin/converters/SMF.phpFebruary 13, 2016 at 9:12 am #171645In reply to: Admin Bar Menu Editing
Pascal Casier
ModeratorHi,
Are you sure your $current_user already has data at that moment ?Just before your if statement, try to run
get_currentuserinfo();
And just to make a quick test, you could always echo the ID just after running the above function to verify
echo 'User ID: ' . $current_user->ID . "\n";
Pascal.February 13, 2016 at 8:01 am #171637In reply to: Import data from Drupal 6.x Advanced forum
Stephen Edgar
KeymasterIf you look at the phpBB importer it has the
callback_htmland parses a bunch or regular expressions to manipulate the previous BBCode or HTML strings, will that work for you?https://bbpress.trac.wordpress.org/browser/trunk/src/includes/admin/converters/phpBB.php#L934
February 13, 2016 at 5:14 am #171627In reply to: Plugin to show Last Post
Pascal Casier
ModeratorHi,
You could do this by copying the bbPress php file needed to a (child) theme and then modify it accordingly.
More info here: https://codex.bbpress.org/themes/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/
Pascal.February 12, 2016 at 7:24 pm #171611Topic: Admin Bar Menu Editing
in forum Troubleshootingwafflecloud
ParticipantHiya,
So apologies if this exists already but my searched didn’t yield any suitable results.I used this code in my functions.php of my theme:
function annointed_admin_bar_remove() { global $wp_admin_bar, $current_user; if ($current_user->ID != 2) { $wp_admin_bar->remove_menu('wp-logo'); // Remove the WP Logo Menu $wp_admin_bar->remove_menu('site-name'); // Remove the site name menu $wp_admin_bar->remove_menu('view-site'); // Remove the view site link } } add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove');The issue is that I want it to show for my admin accounts still (User ID 1 & 2 but trying 2 for now) but it still is disabled for all. What am I missing and how do I get it to work with both user IDs? Thanks in advance for all assistance / replies!
February 12, 2016 at 7:15 pm #171610In reply to: Notifications Widget
wafflecloud
ParticipantSorry for double posting but I figured the following would be beneficial for anyone who might view this as well.
I decided to go the latter route and used this code:
function annointed_admin_bar_remove() { global $wp_admin_bar, $wp_admin_bar->remove_menu('wp-logo'); // Remove the WP Logo Menu $wp_admin_bar->remove_menu('site-name'); // Remove the site name menu $wp_admin_bar->remove_menu('view-site'); // Remove the view site link } add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove');February 12, 2016 at 6:59 pm #171609In reply to: how to remove sidebar?
Robin W
ModeratorFebruary 12, 2016 at 6:54 pm #171607In reply to: Page can’t be displayed
Robin W
Moderatorok, how have you set your forum up ?
Have you been through
in particular step 3?
February 12, 2016 at 2:13 pm #171603In reply to: How to disable participants in creating topic?
Robin W
Moderatoryes you can create new roles with custom capabilities
February 11, 2016 at 5:08 pm #171569Brandon Allen
ParticipantTry this
function casiepa_mention_gravatar() { ?> <div> <label for="bbp-gravatar-notice">Avatar</label> <fieldset style="width: 60%;"> <span style="margin-left: 0; width: 100%;" name="bbp-gravatar-notice" class="description">Manage your profile picture at <a href="https://gravatar.com" title="Gravatar">Gravatar</a>.</span> </fieldset> </div> <?php } add_action( 'bbp_user_edit_after_about', 'casiepa_mention_gravatar' );February 11, 2016 at 4:14 pm #171566Brandon Allen
ParticipantI’m assuming you mean that it broke your layout, and not your site, because the code @casiepa posted works. Also, there’s no question mark in the code that he posted.
If you want the link to Gravatar to show only on a user’s edit profile page, try this:
function casiepa_mention_gravatar() { ?> <div> <label for="bbp-gravatar-notice">Avatar</label> <span name="bbp-gravatar-notice" class="description">Manage your profile picture at <a href="https://gravatar.com" title="Gravatar">Gravatar</a>.</span> </div> <?php } add_action( 'bbp_user_edit_after_about', 'casiepa_mention_gravatar' );February 11, 2016 at 2:36 pm #171563luisthegeek
ParticipantJust went to log into my site which uses the bbp-login shortcode and it just shows me a blank page. logged in using the wp-login, checked the login page with the shortcode, the shortcode is still there.
Also, the forums page is all blank as well. no forums are showing. Go to forums > all forums, they are listed there.
Tried Chrome and IE. Same issue on both.
-
AuthorSearch Results