jf_bertrand
Forum Replies Created
-
Here is one to allow loading of comments-classic-forum.php from theme. This fix uses the same logic found in class-ct-db-template-loader.php
Fix in class-ct-db-skins.php, function comments_template()
replacereturn DB_PLUGIN_DIR . '/templates/comments-classic-forum.php';
with// Check child theme first if ( file_exists ( trailingslashit ( get_stylesheet_directory() ) . 'comments-classic-forum.php' ) ) { return trailingslashit ( get_stylesheet_directory() ) . 'comments-classic-forum.php'; // Check parent theme next } else if ( file_exists( trailingslashit( get_template_directory() ) . 'comments-classic-forum.php' ) ) { return trailingslashit( get_template_directory() ) . 'comments-classic-forum.php'; // Check plugin compatibility last } else { return DB_PLUGIN_DIR . '/templates/comments-classic-forum.php'; }This will allow to copy comments-classic-forum.php to your theme and use this version instead 🙂
While I am at it might as well add one more.
This time it as to do with the date displayed when viewing a topic ( with timeago.js ). When using a different language than English the datetime attribute of the time tag is wrong causing timeago to always display something like 47 years ago…
Here is the fix:
in class-ct-db-skins.php function topic_date_classic
replace$time = date( 'c', strtotime( get_the_date() . ' ' . get_the_time() ) );
with$time = date( 'c', strtotime( get_the_date('Y-m-d') . ' ' . get_the_time() ) );This way we will be using a format that strtotime will be able to understand.
Thanks !
PS… sorry to keep on adding stuff but I am working on a project using your plugins so I might as well contribute as much as I can while I am at it 😉
Another small contribution…
When viewing a topic, if you want to enable the follow button or categories/tags but you do not want meta data fields displayed, the current code does not render the button or the categories/tags…Here is the fix:
in class-ct-db-skins.php, function classic_topic_meta
We need to move the Topic categories and Topic date outside theif( ! empty( $fields ) ) {Thanks again !
No problem, happy to contribute…
One more thing I found, this time it’s in the pro version in class-ct-db-pro-profiles.php, the function author_link:
I think the line :
if( isset( $options['enable_profiles'] ) ) {should read:
if( isset( $options['enable_profiles'] ) && $options['enable_profiles']!=false ) {That option is set but returning 0 causing the if statement to always be executed even though profiles are off.
Thanks !! 🙂
Forum: Plugins
In reply to: [Polylang] Polylang – Language from different domainsHi Chouby,
I just tested the update you sent me… It’s almost working! It is now redirecting to : http://domain2.comhttp//domain2.com/en-this-page-starts-with-en/
So it finds the correct url to redirect to, but it duplicates the http://domain2.com/.
Thanks once more !
JF