Search Results for 'code'
-
AuthorSearch Results
-
May 17, 2014 at 8:42 pm #146475
In reply to: Documented import from snitz access database
gianjj
ParticipantOk STEPHEN, tomorrow I’ll try to config a new SNITZ.PHP with all information and run it!
(hope will be my friend hihihihi)Actually the only doubt is where store the signature, Snitz stored in
FORUM_MEMBERS > M_SIGAnd ….I think can be more helpful indicate which fieldname are required in bbp …may be ther is but I didn’t find it
Tnks
Bye JMay 17, 2014 at 8:28 pm #146473In reply to: Documented import from snitz access database
Stephen Edgar
KeymasterAnd just because I could and it was quick and easy, here is a copy of the
Snitz.phpbased on the latestExample.phpwith Robin’s fields mappings.https://gist.github.com/ntwb/2f057071dd05f9758570
You can also compare the revisions (Seeing the changes made from the source Example.php)
https://gist.github.com/ntwb/2f057071dd05f9758570/revisionsMay 17, 2014 at 7:54 pm #146471In reply to: Documented import from snitz access database
Stephen Edgar
KeymasterOne more thing, when making a custom importer always base it of the
Example.phpimporter, I keep that updated with examples and any other changes I make for bbPress.The latest (updated 3 days ago) is here:
https://bbpress.trac.wordpress.org/browser/trunk/src/includes/admin/converters/Example.phpAs Robin points out, you just delete/remove the sections or fields that are not applicable to your import e.g. ‘tags’ or if your database doesn’t include the ‘counts’ for topics in forums then remove that part in the forum section.
May 17, 2014 at 7:50 pm #146470In reply to: Documented import from snitz access database
Stephen Edgar
KeymasterCool, I just edited a couple of the posts above to wrap some code in ‘code’ tags to make things a little clearer 🙂
May 17, 2014 at 4:56 pm #146468In reply to: Can’t change forum’s index meta title
Robin W
Moderatorok, the answer is somewhere in this function
function bbp_title( $title = '', $sep = '»', $seplocation = '' ) { // Title array $new_title = array(); /** Archives **************************************************************/ // Forum Archive if ( bbp_is_forum_archive() ) { $new_title['text'] = bbp_get_forum_archive_title(); // Topic Archive } elseif ( bbp_is_topic_archive() ) { $new_title['text'] = bbp_get_topic_archive_title(); /** Edit ******************************************************************/ // Forum edit page } elseif ( bbp_is_forum_edit() ) { $new_title['text'] = bbp_get_forum_title(); $new_title['format'] = esc_attr__( 'Forum Edit: %s', 'bbpress' ); // Topic edit page } elseif ( bbp_is_topic_edit() ) { $new_title['text'] = bbp_get_topic_title(); $new_title['format'] = esc_attr__( 'Topic Edit: %s', 'bbpress' ); // Reply edit page } elseif ( bbp_is_reply_edit() ) { $new_title['text'] = bbp_get_reply_title(); $new_title['format'] = esc_attr__( 'Reply Edit: %s', 'bbpress' ); // Topic tag edit page } elseif ( bbp_is_topic_tag_edit() ) { $new_title['text'] = bbp_get_topic_tag_name(); $new_title['format'] = esc_attr__( 'Topic Tag Edit: %s', 'bbpress' ); /** Singles ***************************************************************/ // Forum page } elseif ( bbp_is_single_forum() ) { $new_title['text'] = bbp_get_forum_title(); $new_title['format'] = esc_attr__( 'Forum: %s', 'bbpress' ); // Topic page } elseif ( bbp_is_single_topic() ) { $new_title['text'] = bbp_get_topic_title(); $new_title['format'] = esc_attr__( 'Topic: %s', 'bbpress' ); // Replies } elseif ( bbp_is_single_reply() ) { $new_title['text'] = bbp_get_reply_title(); // Topic tag page } elseif ( bbp_is_topic_tag() || get_query_var( 'bbp_topic_tag' ) ) { $new_title['text'] = bbp_get_topic_tag_name(); $new_title['format'] = esc_attr__( 'Topic Tag: %s', 'bbpress' ); /** Users *****************************************************************/ // Profile page } elseif ( bbp_is_single_user() ) { // User is viewing their own profile if ( bbp_is_user_home() ) { $new_title['text'] = esc_attr_x( 'Your', 'User viewing his/her own profile', 'bbpress' ); // User is viewing someone else's profile (so use their display name) } else { $new_title['text'] = sprintf( esc_attr_x( "%s's", 'User viewing another users profile', 'bbpress' ), get_userdata( bbp_get_user_id() )->display_name ); } // User topics created if ( bbp_is_single_user_topics() ) { $new_title['format'] = esc_attr__( "%s Topics", 'bbpress' ); // User rueplies created } elseif ( bbp_is_single_user_replies() ) { $new_title['format'] = esc_attr__( "%s Replies", 'bbpress' ); // User favorites } elseif ( bbp_is_favorites() ) { $new_title['format'] = esc_attr__( "%s Favorites", 'bbpress' ); // User subscriptions } elseif ( bbp_is_subscriptions() ) { $new_title['format'] = esc_attr__( "%s Subscriptions", 'bbpress' ); // User "home" } else { $new_title['format'] = esc_attr__( "%s Profile", 'bbpress' ); } // Profile edit page } elseif ( bbp_is_single_user_edit() ) { // Current user if ( bbp_is_user_home_edit() ) { $new_title['text'] = esc_attr__( 'Edit Your Profile', 'bbpress' ); // Other user } else { $new_title['text'] = get_userdata( bbp_get_user_id() )->display_name; $new_title['format'] = esc_attr__( "Edit %s's Profile", 'bbpress' ); } /** Views *****************************************************************/ // Views } elseif ( bbp_is_single_view() ) { $new_title['text'] = bbp_get_view_title(); $new_title['format'] = esc_attr__( 'View: %s', 'bbpress' ); /** Search ****************************************************************/ // Search } elseif ( bbp_is_search() ) { $new_title['text'] = bbp_get_search_title(); } // This filter is deprecated. Use 'bbp_before_title_parse_args' instead. $new_title = apply_filters( 'bbp_raw_title_array', $new_title ); // Set title array defaults $new_title = bbp_parse_args( $new_title, array( 'text' => $title, 'format' => '%s' ), 'title' ); // Get the formatted raw title $new_title = sprintf( $new_title['format'], $new_title['text'] ); // Filter the raw title $new_title = apply_filters( 'bbp_raw_title', $new_title, $sep, $seplocation ); // Compare new title with original title if ( $new_title === $title ) return $title; // Temporary separator, for accurate flipping, if necessary $t_sep = '%WP_TITILE_SEP%'; $prefix = ''; if ( !empty( $new_title ) ) $prefix = " $sep "; // sep on right, so reverse the order if ( 'right' === $seplocation ) { $new_title_array = array_reverse( explode( $t_sep, $new_title ) ); $new_title = implode( " $sep ", $new_title_array ) . $prefix; // sep on left, do not reverse } else { $new_title_array = explode( $t_sep, $new_title ); $new_title = $prefix . implode( " $sep ", $new_title_array ); } // Filter and return return apply_filters( 'bbp_title', $new_title, $sep, $seplocation ); }a filter such as
function amend_title () { if ( bbp_is_single_forum() ) { $new_title['text'] = 'YA book forum' ; $new_title['format'] = esc_attr__( 'YA book Forum', 'bbpress' ); } return $new_title; } add_filter('bbp_before_title_parse_args', 'amend_title' );should sort it but doesn’t, and I’m too tired to work out why 🙂
Over to you !
May 17, 2014 at 4:43 pm #146466JBBoY
ParticipantHahaha It’s better easy, but the hard doesn’t scares me! Yeah it would be great to know your idea, because I’m completely lost.
You’re right about forum categories, I didn’t realise.I’ve tried with a code from this site who shows the last topics of all forums in a different table, but not the last (4?,5?,6?… variable who control the number ) topics in the same table. And not each topic under his Forum. 🙂
May 17, 2014 at 1:48 pm #146459In reply to: Can’t change forum’s index meta title
Robin W
ModeratorI think I understand
go into dashboard>settings>forums and change the slugs for forum root and single forum root. that will change the url
If you want to change the breadcrumb, then see
you can also set
‘home_text’ , ‘root_text’ and ‘current_text’
using this code
If that’s not what you are after – come back !
May 17, 2014 at 1:28 pm #146456In reply to: CSS Plugin
Robin W
Moderator@blankstage – not a bad description of what css does. css (cascade style sheets) changes the way the information is displayed – for instance font sizes, colours, where stuff appears, backgrounds. So the core code decides what is displayed, and css how !
some themes allow you to alter css, some don’t, but you can use a plugin such as ‘simple css’ to add css code without needing to access the backend.
May 17, 2014 at 1:19 pm #146451In reply to: Display unread posts distinctively
Robin W
ModeratorThanks for your comments, I have not been ignoring you, I have been running a training course all today.
It’s great that you plan to improve an existing plugin, this is exactly what community software is all about, and I really hope that you will share it when done to help others :-).
I would hasten to add I have nothing to do with bbPress, I just help out on the forum, and have written a few bbPress plugins, so views are my own!
There’s lots I’d like to see in a core bbPress or as well maintained plugins, but someone has to write the stuff, and as it’s free no-one gets paid to do so. Where there is perceived demand, then hopefully the core guys will add it.
Read/unread is a popular feature on many forums, I don’t use it on my own as it’s not relevant, but I do take advantage of other forum sites that do, and you could easily argue that it should be core, but then of course it would only be the way that the bbPress guys want it to work, which could be either of the plugins that you don’t like !
Of course ones person’s standard is another’s stifling of innovation, and that community software can grow organically is both an argument for it, and an annoyance with it 🙂
Anyway, I would love to see a read/unread plugin along the lines you propose, so if you’re the man to code it, and then share with us, you’ll be very welcome here ! necessity is the mother of invention.
@blankstage – hey thanks for your comments- they cheered me up after a long day !
May 17, 2014 at 1:04 pm #146449In reply to: Documented import from snitz access database
gianjj
ParticipantOpss REPLACE the CODE TAG with ‘
May 17, 2014 at 1:00 pm #146448In reply to: Documented import from snitz access database
gianjj
ParticipantThis script launched in QUERY ANALYZER of MsSQL server will generate a list of SQL to import in MySQL ; remember to select “Result in a File”
Alla this script will not take effect on your database, but will help you to pre-generate all SQL to move your data….
TEST IT BEFORE MOVE ALL DATA YOU ARE THE ONLY ONE RESPONSABLE OF YOURS WORK 😛-------------------------------- --- Will Generate a List of INSERT INTO query --- Formatted for MySQL table: wp_users --- JUST ONE MEMEBR -------------------------------- Select TOP 1 'INSERT INTO ''wp_users''(''ID'', ''user_login'', ''user_pass'', ''user_nickname'', ''user_email'', ''user_url'', ''user_registred'', ''user_activation_key'', ''user_status'', ''display_name'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', '''+M_NAME+''', ''REMEMBER_TO_REST_ALL_PASSWORD'', '''+M_NAME+''','''+M_EMAIL+''' , '''+M_HOMEPAGE+''', '''+M_NAME+''', '''+ substring(M_DATE, 1,4)+ '-' + substring(M_DATE, 5,2)+ '-'+ substring(M_DATE, 7,2)+ ' ' + substring(M_DATE, 9,2)+ ':'+ substring(M_DATE, 11,2)+ ':' + substring(M_DATE, 13,2) +''','''',''0'','''+M_NAME+''' );' from dbo.FORUM_MEMBERS order by MEMBER_ID asc -------------------------------- --- Will Generate a List of INSERT INTO query --- Formatted for MySQL table: wp_usermeta --- JUST ONE MEMEBR -------------------------------- Select TOP 1 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''first_name'', '''+M_FIRSTNAME+''');', 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''last_name'', '''+M_LASTNAME+''');', 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''nickname'','''+M_NAME+''');', 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''description'', '''');', 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''rich_editing'', ''true'');', 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''comment_shortcuts'', ''false'');', 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''admin_color'', ''fresh'' );', 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''use_ssl'', ''0'');', 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''show_admin_bar_front'', ''true'');', 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''wp_capabilities'', ''a:1:{s:10:"subscriber";b:1;}'');', 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''wp_user_level'', ''0'');', 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''dismissed_wp_pointers'', ''wp330_toolbar,wp330_saving_widgets,wp340_choose_image_from_library,wp340_customize_current_theme_link,wp350_media,wp360_revisions,wp360_locks'');', 'INSERT INTO ''wp_usermeta''(''user_id'', ''meta_key'', ''meta_value'') VALUES ('+CAST(MEMBER_ID as nvarchar(10))+', ''default_password_nag'', ''1'');' from dbo.FORUM_MEMBERS order by MEMBER_ID ascMay 17, 2014 at 12:28 pm #146447In reply to: Documented import from snitz access database
gianjj
ParticipantExample of DATE formatted with functionaly made for MSSQL Server
--------------------- --- 10 TOPIC POST from FORUM_TOPICS --------------------- SELECT TOP (10) substring(T_LAST_POST, 1,4)+ '-' + substring(T_LAST_POST, 5,2)+ '-'+ substring(T_LAST_POST, 7,2)+ ' ' + substring(T_LAST_POST, 9,2)+ ':'+ substring(T_LAST_POST, 11,2)+ ':' + substring(T_LAST_POST, 13,2) AS T_LAST_POST_FORMATTED, substring(T_DATE, 1,4)+ '-' + substring(T_DATE, 5,2)+ '-'+ substring(T_DATE, 7,2)+ ' ' + substring(T_DATE, 9,2)+ ':'+ substring(T_DATE, 11,2)+ ':' + substring(T_DATE, 13,2) AS T_DATE_FORMATTED, * FROM FORUM_TOPICS --------------------- --- 10 TOPIC REPLY from FORUM_REPLY --------------------- SELECT TOP (10) substring(R_DATE, 1,4)+ '-' + substring(R_DATE, 5,2)+ '-'+ substring(R_DATE, 7,2)+ ' ' + substring(R_DATE, 9,2)+ ':'+ substring(R_DATE, 11,2)+ ':' + substring(R_DATE, 13,2) AS R_DATE_FORMATTED, * FROM FORUM_REPLY --------------------- --- 10 USER from FORUM_MEMBERS --------------------- SELECT TOP (10) substring(M_DATE, 1,4)+ '-' + substring(M_DATE, 5,2)+ '-'+ substring(M_DATE, 7,2)+ ' ' + substring(M_DATE, 9,2)+ ':'+ substring(M_DATE, 11,2)+ ':' + substring(M_DATE, 13,2) AS M_DATE_FORMATTED, * FROM FORUM_MEMBERSMay 17, 2014 at 8:44 am #146443In reply to: CSS Plugin
Brent Brooks
ParticipantI use a theme and drop in CSS in an ePanel. So far it seems to be working. CSS confuses me but I think it is the code that creates the forum and the makers have made it so when you do it it does not destroy the core of the code – but one can alter it and delete it later and it all returns to normal…
May 17, 2014 at 7:55 am #146437JBBoY
ParticipantThanks a lot for your response 🙂
I have seen in “Step by step guide to setting up a bbPress forum – Part 1”
The way I want my forum looks like. Is this screenshot from previous versions and now there isn’t an easy way to do this ? I just want the topics (better last 4 topics of each forum) under the name of the forum wich they belong. The only solution is hardcoding? I don’t know where to start. Which file should I edit to change the forum structure? :S
Thanks a lot for all.
May 17, 2014 at 4:20 am #146431In reply to: Display unread posts distinctively
nirgalo
Participant@robin-w – thanks for pointing out bbPress Mark as read plugin. I have checked it but for the reason mentioned above (not using the same db keys), it is not compatible with bbPress Unread posts plugin. So what I’ll do it make a custom version of bbPress Unread posts plugin whose code is simple and easily fixable and get along with this. Again, the read/unread state of posts really needs to be standardised by bbPress to prevent these incompatibilites between plugins.
May 17, 2014 at 3:12 am #146426Topic: Display unread posts distinctively
in forum Requests & Feedbacknirgalo
ParticipantHi, I would like the unread posts for a given user to display distinctively so the user quickly knows what to read. Also I would like threads which have new replies to also display distinctively. Not necessarily through colors, maybe using icons.
There is a plugin bbPress Unread Posts doing close to what I am looking for, but it is not maintained anymore. Why such a basic feature needs to be done through a plugin and is not part of the bbPress stock features? Any idea of other plugins or custom code I can use?May 16, 2014 at 6:24 pm #146416Topic: Breadcrumb navigation.
in forum Troubleshootingherowp
ParticipantHowdy.
I have a problem with the breadcrumb navigation link. The link to the root forum(which returns a 404 page) is
http://example.com/forums/forumand it should be:
http://example.com/forums/I have no idea what to do, as I only installed the plugin and activated it.
Can someone help me?
Kind regards.May 16, 2014 at 1:21 pm #146413Robin W
Moderator‘I have some forums that only serves as main forum for sub-forums’
Try setting them as categories rather than forums – on the edit forum page you will see the option on the right hand side
‘It would also be nice if members could comment on a post, but not create new topics.’
You can create a custom role to do this – see
If you are not very good at code, come back and I will try to help further
May 16, 2014 at 1:16 pm #146412Robin W
Moderatorok, on your breadcrumb issue see
On your weird forums page, given that it says “continue reading” I suspect that your theme is treating this as a post, and just giving what it thinks is an ‘excerpt’.
I’d suggest you next try setting up a page called ‘forums’ and using [bbp-forum-index] to get it to render. ie
method 2
If this doesn’t work, then come back
May 16, 2014 at 3:44 am #146402Cars10
Participant..and same applies for scripts in line 245 (after code above was inserted)
May 16, 2014 at 3:28 am #146401Cars10
ParticipantTemp fix as we don’t know if we get a fix any time soon:
file: /wp-content/plugins/bbpress/includes/core/template-functions.php at 173, INSERT //Temp fix $located = str_replace( "//", "", $located ); $located = substr($located, strpos($located, "/")); before: // Enqueue the styleMay 16, 2014 at 2:40 am #146398In reply to: CSS Plugin
Robin W
ModeratorI have thought several times about building a bbPress styling plugin, but not had time yet !
There’s plenty about styling in the documentation
including a styling crib
and instructions on how to style
May 16, 2014 at 2:22 am #146396Topic: CSS Plugin
in forum PluginsSolidify
ParticipantMy theme comes with an option in the settings to add my own CSS codes. I love it because I’m just starting out and learning a lot about CSS by just putting snippets of code in there and seeing what it does. Of course none of it fazes my forum and that really really sucks because I’ve read a lot of great reviews about bbPress and I’d like to use it on my site.
Why doesn’t bbPress have the same feature? Is there an up to date plugin I can use, or do I have to create a custom style sheet?
May 15, 2014 at 9:27 pm #146391In reply to: Problems after Importing Vbulliten
Stephen Edgar
KeymasterThanks, I’ll add the BBCode
[video=youtube_share;$1]$2[/video]as part of the vBulletin importer.And yes, let me know how it goes.
May 15, 2014 at 6:44 pm #146388In reply to: Kunena converter for bbPress 2.4
jbuesking
ParticipantApparently having a few broken attachments lingering from a phpbb3 to Kunena migration several years ago is what is giving me a problem now migrating attachments to bbPress.
The error I’m seeing in my logs is:
[15-May-2014 22:32:08 UTC] PHP Warning: copy(http://www.mydomain.com/media/kunena/attachments/phpbb3/Cabs%201.jpg) [<a href='function.copy'>function.copy</a>]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /home/username/public_html/dev002/kunena-attachments-to-bbpress.php on line 45I looked to see if there was a “Kunena fix for broken attachments” script but nothing popped up yet.
-
AuthorSearch Results