Hello again,
Is it possible to remove the Date/Time from the Recent Topics Widget? So instead of it saying "by WilboBaggins at 17:33 2020-09-04" it would just say "by WilboBaggins" or even just "WilboBaggins".
Thanks!
Remove Date/Time from Recent Topics Widget
-
- User w
- Posts: 7
- Joined: Wed Sep 02, 2020 12:21 am
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Remove Date/Time from Recent Topics Widget
if you know php, then change the file
/wp-content/plugins/wp-w3all-phpbb-integration/views/phpbb_last_topics.php
where lines of code starts like this:
echo "<li class=\"".$w3all_lastopics_style_li_class."\">...
a part on these lines instructions, needs to be removed (or almost the one that output, based on your plugin options settings)
Note that if you edit these files inside /views/ folder, when plugin update, you'll loose edits, because files rewritten.
To avoid this may follow instruction/option into plugin admin where option:
Use custom files to display Last Topics Widgets, Login Widget or Shortcodes content
if you need help on edit the file correctly, let me know, asap (not now because it dinner time!) i will take a look
/wp-content/plugins/wp-w3all-phpbb-integration/views/phpbb_last_topics.php
where lines of code starts like this:
echo "<li class=\"".$w3all_lastopics_style_li_class."\">...
a part on these lines instructions, needs to be removed (or almost the one that output, based on your plugin options settings)
Note that if you edit these files inside /views/ folder, when plugin update, you'll loose edits, because files rewritten.
To avoid this may follow instruction/option into plugin admin where option:
Use custom files to display Last Topics Widgets, Login Widget or Shortcodes content
if you need help on edit the file correctly, let me know, asap (not now because it dinner time!) i will take a look
-
- User w
- Posts: 7
- Joined: Wed Sep 02, 2020 12:21 am
Re: Remove Date/Time from Recent Topics Widget
Thanks for the info! I tried modifying that file but it didn't seem to have an effect.
First I added some text after "at" to see if it updated in the widget.
Then I tried deleting all the date/time info from the relevant area.
I'm using HTML (not iframe) and post_text=0. Below is the widget code, and then the code I altered.
-----------------------
[w3allastopicforumsids topics_number="4" forums_id="1,2,4,9,12,13,15,21,33,43,44,49,50,57,59,60,63,65,66,98,105,106,107,108,110,113,125,126,127" post_text="0" text_words="30"]
-------------------------
} else { // if not iframe phpBB embedded mode, direct url
if ( $wp_w3all_post_text == 0 ){ // only links author and date
if ( $w3all_avatars_yn ){
echo "<li class=\"".$w3all_lastopics_style_li_class."\"><table style=\"border-spacing:0;border-collapse:collapse;vertical-align:middle;margin:0;border:0;\"><tr><td style=\"border:0;width:".$w3all_last_t_avatar_dim."px;\">".$w3all_avatar_display."</td><td style=\"border:0;width:auto\"><a href=\"$w3all_url_to_cms/viewtopic.php?f=$value->forum_id&t=$value->topic_id&p=$value->post_id#p$value->post_id\">$value->topic_title</a> ".$w3all_post_state_ru."<br />". __( 'by ' , 'wp-w3all-phpbb-integration' )." $value->topic_last_poster_name ". __ ."</td></tr></table></li>\n";
} else {
echo "<li class=\"".$w3all_lastopics_style_li_class."\"><a href=\"$w3all_url_to_cms/viewtopic.php?f=$value->forum_id&t=$value->topic_id&p=$value->post_id#p$value->post_id\">$value->topic_title</a> ".$w3all_post_state_ru."<br />". __( 'by ' , 'wp-w3all-phpbb-integration' )." $value->topic_last_poster_name ". __ ."</li>\n";
}
}
First I added some text after "at" to see if it updated in the widget.
Then I tried deleting all the date/time info from the relevant area.
I'm using HTML (not iframe) and post_text=0. Below is the widget code, and then the code I altered.
-----------------------
[w3allastopicforumsids topics_number="4" forums_id="1,2,4,9,12,13,15,21,33,43,44,49,50,57,59,60,63,65,66,98,105,106,107,108,110,113,125,126,127" post_text="0" text_words="30"]
-------------------------
} else { // if not iframe phpBB embedded mode, direct url
if ( $wp_w3all_post_text == 0 ){ // only links author and date
if ( $w3all_avatars_yn ){
echo "<li class=\"".$w3all_lastopics_style_li_class."\"><table style=\"border-spacing:0;border-collapse:collapse;vertical-align:middle;margin:0;border:0;\"><tr><td style=\"border:0;width:".$w3all_last_t_avatar_dim."px;\">".$w3all_avatar_display."</td><td style=\"border:0;width:auto\"><a href=\"$w3all_url_to_cms/viewtopic.php?f=$value->forum_id&t=$value->topic_id&p=$value->post_id#p$value->post_id\">$value->topic_title</a> ".$w3all_post_state_ru."<br />". __( 'by ' , 'wp-w3all-phpbb-integration' )." $value->topic_last_poster_name ". __ ."</td></tr></table></li>\n";
} else {
echo "<li class=\"".$w3all_lastopics_style_li_class."\"><a href=\"$w3all_url_to_cms/viewtopic.php?f=$value->forum_id&t=$value->topic_id&p=$value->post_id#p$value->post_id\">$value->topic_title</a> ".$w3all_post_state_ru."<br />". __( 'by ' , 'wp-w3all-phpbb-integration' )." $value->topic_last_poster_name ". __ ."</li>\n";
}
}
- axew3
- w3all User
- Posts: 2883
- Joined: Fri Jan 22, 2016 5:15 pm
- Location: Italy
- Contact:
Re: Remove Date/Time from Recent Topics Widget
Hello! Sorry, then what you are using is a shortcode, not the widget, the file to aim to is:
/wp-content/plugins/wp-w3all-phpbb-integration/views/phpbb_last_topics_output_shortcode.php
and not the phpbb_last_topics.php!
/wp-content/plugins/wp-w3all-phpbb-integration/views/phpbb_last_topics_output_shortcode.php
and not the phpbb_last_topics.php!
-
- User w
- Posts: 7
- Joined: Wed Sep 02, 2020 12:21 am
Re: Remove Date/Time from Recent Topics Widget
Thanks and sorry for the confusion. It wasn't that file either, but actually the "phpbb_last_topics_forums_ids_shortcode.php" file that needed to be edited since I'm using forum ID's to identify which ones are shown.
Thanks again for your help!
Thanks again for your help!
-
- User w
- Posts: 7
- Joined: Wed Sep 02, 2020 12:21 am
Re: Remove Date/Time from Recent Topics Widget
OK. Last question, I swear (hope)! How can I bold just the poster name?
I've used "$w3all_lastopics_style_ul" to style the widget/shortcode in the "phpbb_last_topics_forums_ids_shortcode.php" file, but can I change the style of just the poster name, such as to make it bolded text?
Thanks!
I've used "$w3all_lastopics_style_ul" to style the widget/shortcode in the "phpbb_last_topics_forums_ids_shortcode.php" file, but can I change the style of just the poster name, such as to make it bolded text?
Thanks!