Page 1 of 2
Remove Date/Time from Recent Topics Widget
Posted: Fri Sep 04, 2020 5:52 pm
by WilboBaggins
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!
Re: Remove Date/Time from Recent Topics Widget
Posted: Fri Sep 04, 2020 6:03 pm
by axew3
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
Re: Remove Date/Time from Recent Topics Widget
Posted: Fri Sep 04, 2020 11:49 pm
by WilboBaggins
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";
}
}
Re: Remove Date/Time from Recent Topics Widget
Posted: Sat Sep 05, 2020 8:17 am
by axew3
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!
Re: Remove Date/Time from Recent Topics Widget
Posted: Sat Sep 05, 2020 1:17 pm
by WilboBaggins
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!
Re: Remove Date/Time from Recent Topics Widget
Posted: Sat Sep 05, 2020 2:41 pm
by WilboBaggins
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!