Hamlet_PL
Forum Replies Created
-
Forum: Reviews
In reply to: [Asgaros Forum] Layout is great but …Resolved & Top stars.
see ya!
Forum: Plugins
In reply to: [bbPress] BBpress crash after updateok, thats was error from bbstyle-pack.
Sorry for off-topregards.
Forum: Themes and Templates
In reply to: [Hueman] After update everything is drop..Roger that 🙂
Forum: Themes and Templates
In reply to: [Hueman] After update everything is drop..bdbrown you deserve a beer! Great Support! Now everything is clear. Topic has been resolved 🙂
BTW. Why dont use css/bbpress.css ? I added in the same way another js folder.If after resolve you’ll cannot answer, thats my mail: [moderated]
Best regards!
HamletForum: Themes and Templates
In reply to: [Hueman] After update everything is drop..I i found error html.. now i see all sidebar.
So I have 2 last question:
1) If everythin work then I not need to restart sidebar?
2) Below files placed in child folder are good or i should peaste another files?
file: header.php
file: footer.php
file: function.php
Directory css/bbpress.cssAfter answer I make this topic on resolved.
regards
Forum: Themes and Templates
In reply to: [Hueman] After update everything is drop..Here is my site:
I added it: https://kovshenin.com/2014/child-themes-import/ in fuction.php and after removed @include in style.css but still not working..Exactly i dont see <div id=”wpadminbar” class=””></div>
and
I have problem with footer:
Parse error: syntax error, unexpected end of file in /home/users/wm-marsa/public_html/wm-marsa.pl/wp-content/themes/hueman-child-master/footer.php on line 103
Forum: Themes and Templates
In reply to: [Hueman] After update everything is drop..Note: since each theme identifies sidebars and menus using unique IDs you may need to reset your sidebars and menus.
Ok If I everything well done, now I haven’t see admin bar and pop-up. So how can I restart this sidebars?
Forum: Themes and Templates
In reply to: [Hueman] After update everything is drop..Great and exact answer bdbrown. Step by step.
Ok, I Activate it. Below ifno about activated theme:Hueman ChildWersja 1.0.0 Autor: You Sample child theme for customization.
Next when I am in child theme folder via FTP on my webserver then I paste below files?
file: header.php
file: footer.php
file: function.php
Directory css/bbpress.cssAfter copy/paste above files I have to remove my custom code from the parent theme file or delete this parent file?
regardsForum: Themes and Templates
In reply to: [Hueman] After update everything is drop..I’ll try to test more tomorrow.
Big Thanks for help 🙂
Forum: Themes and Templates
In reply to: [Hueman] After update everything is drop..OK, one genereal question.
In first point: when I am in admin panel Do I upload master.zip from: https://github.com/presscustomizr/hueman-child/archive/master.zip
or another file?
Second. How activate it?Forum: Themes and Templates
In reply to: [Hueman] After update everything is drop..yes.
I dowload from:
https://github.com/presscustomizr/hueman-child/archive/master.zipAfter unzip I have this file: hueman-child-master.
In this directory I have the following files:
function.php
screenshot
style.cssso If I understood correctly we edit this file and where paste those files?
Forum: Themes and Templates
In reply to: [Hueman] After update everything is drop..Where is child theme folder?
Page-templates?
Forum: Themes and Templates
In reply to: [Hueman] After update everything is drop..Nope. I used parent Hueaman file. Now I see child file but I dont know how use it. I paste part of my code to the child but what next? where move this child file (place where should be this childs file) and how import child to the parent (oryginal) File?
Forum: Themes and Templates
In reply to: [Hueman] After update everything is drop..OK,
My modified files are:
directory: css/bbpress.css (bbpress that is file with style forum)
file: header.php
file: footer.php
file: function.phpDirectory css/bbpress.css has to be not moving/deleting.
Header (belowe my add code):
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Dancing+Script" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <style type="text/css"> #idletimeout { font-weight:bold } </style> <?php $mystring = "$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; $findme = 'HELLO WORLD'; $pos = strpos($mystring, $findme); if ($pos === false) { } // Note our use of ===. Simply == would not work as expected else { $user = wp_get_current_user(); $allowed_roles = array('subskrybent2', 'subskrybent3', 'administrator'); if( array_intersect($allowed_roles, $user->roles ) ) { } else { wp_redirect( home_url() ); exit; } } if( is_user_logged_in() ) { print(' <style> #countdown { font-style: normal; } </style>'); } if ( is_page( 'login' ) ) { print('hello world'); }?> NEXT IN HEADER: <div class="countdown"><?php if( is_user_logged_in() ) { echo "GREAT"; } ?></div> NEXT AFTER HEADER: <div id="idletimeout"> <p>Hello user</p> </div> ITS ORYGINAL Hueaman CODE: <?php $_header_img_src = hu_get_img_src('header-image'); ?> <?php if ( ! $_header_img_src || empty( $_header_img_src ) ): //@fromfull to keep ?> <div class="group pad"> <div style="float: left; display: block;"> <?php echo hu_site_title(); ?> </div> <?php if ( hu_is_checked('site-description') ): ?> <div> <p style="line-height: 28px; font-family: Dancing Script;">Regon:</p> </div>
Footer (belowe my add code):
<section class="container" id="footer-widgets" style="background-color: #eaeaea;"> NEXT IN FOOTER: <div id="credit" style="<?php echo ! hu_is_checked( 'credit' ) ? 'display:none' : ''; ?>"> <p><?php _e('Wszystkie prawa zastrzeżone.'); ?></p> </div><!--/#credit-->
Function (belowe my add ALL code):
<?php //do not remove this /* * Get the most recently replied-to topics, and their most recent reply */ function custom_bbpress_recent_replies_by_topic($atts){ $short_array = shortcode_atts(array('show' => 5, 'forum' => false, 'include_empty_topics' => false), $atts); extract($short_array); // default values $post_types = array('reply'); $meta_key = '_bbp_last_reply_id'; // allow for topics with no replies if ($include_empty_topics) { $meta_key = '_bbp_last_active_id'; $post_types[] = 'topic'; } // get the 5 topics with the most recent replie $args = array( 'posts_per_page' => $show, 'post_type' => array('topic'), 'post_status' => array('publish'), 'orderby' => 'meta_value_num', 'order' => 'DESC', 'meta_key' => $meta_key, ); // allow for specific forum limit if ($forum){ $args['post_parent'] = $forum; } $query = new WP_Query($args); $reply_ids = array(); // get the reply post->IDs for these most-recently-replied-to-topics while($query->have_posts()){ $query->the_post(); if ($reply_post_id = get_post_meta(get_the_ID(), $meta_key, true)){ $reply_ids[] = $reply_post_id; } } // get the actual replies themselves $args = array( 'posts_per_page' => $show, 'post_type' => $post_types, 'post__in' => $reply_ids, 'orderby' => 'date', 'order' => 'DESC' ); $query = new WP_Query($args); ob_start(); // loop through results and output our rows while($query->have_posts()){ $query->the_post(); // custom function for a single reply row custom_bbpress_recent_reply_row_template( $query->current_post + 1 ); } $output = ob_get_clean(); return $output; } add_shortcode('bbpress_recent_replies_by_topic', 'custom_bbpress_recent_replies_by_topic'); /* * Executed during our custom loop * - this should be the only thing you need to edit */ function custom_bbpress_recent_reply_row_template( $row_number ){ // get the reply title $title = get_the_title(); // trim title to specific number of characters (55 characters) $title = substr( $title, 0, 55); // trim title to specific number of words (5 words)... $title = wp_trim_words( $title, 5, '...'); // determine if odd of even row $row_class = ($row_number % 2) ? 'odd' : 'even'; ?> <div class="bbpress-recent-reply-row <?php print $row_class; ?>"> <div><a href="<?php bbp_reply_url( get_the_ID() ); ?>"><?php print $title; ?></a></div> <div><?php print human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' temu'; ?></div> </div> <?php // Refs // http://codex.wordpress.org/Template_Tags#Post_tags // http://codex.wordpress.org/Function_Reference/get_avatar // http://codex.wordpress.org/Function_Reference/human_time_diff // (template tags for bbpress) // https://bbpress.trac.wordpress.org/browser/trunk/src/includes/users/template.php // https://bbpress.trac.wordpress.org/browser/trunk/src/includes/replies/template.php } // allow shortcodes to run in widgets add_filter( 'widget_text', 'do_shortcode'); // don't auto-wrap shortcode that appears on a line of it's own add_filter( 'widget_text', 'shortcode_unautop'); // Add logout popup function popup_js() { if ( is_page( 'login' ) ) { if ( !is_admin() ) { wp_register_script('popup_logout',get_template_directory_uri().'/js/popup_logout.js', false); wp_enqueue_script('popup_logout'); } } } add_action( 'wp_enqueue_scripts', 'popup_js' ); // ShowPrivateFile function ShowPrivateFile() { $user = wp_get_current_user(); $output=''; $allowed_roles = array('subskrybent2', 'subskrybent3', 'administrator'); if( array_intersect($allowed_roles, $user->roles ) ) { $output = 'Pliki dostępne tylko po zalogowaniu:</br>'.'</br><a href="https:/XXXXXXXX.pl/wp-content/uploads/Document/abcd.docx">Protocol.docx</a></br>'. } return $output; } add_shortcode("pokaz_prywatne_pliki", "ShowPrivateFile"); ORYGINAL CODE FROM HUEMAN: load_template( get_template_directory() . '/functions/init-core.php' ); /** * The best and safest way to extend the Humean WordPress theme with your own custom code is to create a child theme. * You can add temporary code snippets and hacks to the current functions.php file, but unlike with a child theme, they will be lost on upgrade. * * If you don't know what a child theme is, you really want to spend 5 minutes learning how to use child themes in WordPress, you won't regret it :) ! * https://codex.wordpress.org/Child_Themes * */
So could u Tell me what I shoild do with it if I dont want to paste code always after update?
Forum: Themes and Templates
In reply to: [Hueman] Not work Auto update from WP Theme managerI found here somethink like changelog
https://themes.trac.wordpress.org/diff?sfp_email=&sfph_mail=&new_path=%2Fhueman%2F3.0.11&old_path=%2Fhueman%2F3.0.11&new_rev=59204&old_rev=59204