Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
PhilDbz
tagDiv Member

Hi Christopher,

thank you for the quick replies.I’m trying to look for a different approach: since all images are just in custom field and not in the library, i can try to automatically add all images in the upload folder to the library, then associate each image to a post as a thumbnail image, since by then all images should have a postID. Otherwise, I’ll get in touch with Sanisoft.

Cheers!

PhilDbz
tagDiv Member

Yep, I’ve read your posts before writing this request. The problem is: Auto Post Thumbnail PRO takes the first image in a post, but we don’t have any images in the post, just a custom field with a URL that is used in the template.

PhilDbz
tagDiv Member

Hi, I’m joining in with a question. I hope I’m not off-topic. I’m planning to move another website to Newspaper, but the current theme uses a custom field “other_media” instead of the standard Featured Image (it’s an old theme). Since it’s more than 700 posts, it would be a pain to upload a featured image again for each one of them. Is there any way we can set Newspaper to use the URL in the custom field when it does not find a featured image? Or is there a plugin you’re aware of that can do this automatically?

Thank you in advance!

Phil

PhilDbz
tagDiv Member

I’m still using the workaround above, for now… but in the update info it said that something had indeed been changed in the views counter. Not sure what, though…

PhilDbz
tagDiv Member

@r1kay, sorry for the late reply, I was out of town on vacation and couldn’t check the code. Here’s a quick fix, which still overrides the the_views function of wp-postviews, but fixes the issue with the thousand’s dot not showing and the text “views” not showing:

on line 153, where it says
$buffy .= $post_views;
change this with
$buffy .= number_format_i18n($post_views).' addwordhere';

this will change the format of $post_views created on line 152 and concatenate that with a word of your choice (change addwordhere with whatever you like, but make sure to leave a blank before the word).

Make sure you also make the original modification to line 152 I mentioned in my previous reply (https://forum.tagdiv.com/topic/posts-view-in-v-3-5/#post-10902).

This is not the best solution… It seems to work fine, but it would be better to change the “the_views” function in wp-postviews instead, or call its settings from here so you woudln’t have to concatenate manually the text “views”… in the meantime I hope it works, let me know (it works on my site).

Cheers!

  • This reply was modified 12 years by PhilDbz. Reason: wrong line number, corrected
PhilDbz
tagDiv Member

Hi there,
I had the same problem. It’s due to the fact that the the_views function in wp-postviews.php reads the value of the “views” custom field from the homepage instead of the single posts mentioned in the blocks, so all counters on the homepage show the same value.
I fixed this commenting out
//$post_views = the_views(false); in td_module.php
and adding
$post_views = get_post_meta( $this->post->ID, 'views', true );
which reads the value of the views custom field of each single post. It seems to be working so far… but be careful, it has some implications, as it overrides the the_views function.

PhilDbz
tagDiv Member

Hi guys, Marius’ solution worked perfectly, thank you!

PhilDbz
tagDiv Member

Hi Radu,
as always, thank you for your quick reply.

The problem is that an author page for subscribers to bbpress is created anyway, which might get indexed by search engines along with the actual blog authors pages. Example:

This is the bbpress profile page (which is ok to be indexed):
http://demo.tagdiv.com/newspaper/forums/users/brsmncr/

This is the wordpress author page for the same forum user (which should not exist,because he’s not an author):
http://demo.tagdiv.com/newspaper/author/brsmncr/

Otherwise we will end up with hundreds of /author/ pages, one for each forum subscriber…

But at this point I don’t think this has anything to do with the theme, it is probably just the way wordpress deals with users of any kind…

Any thoughts?

Thank you!

PhilDbz
tagDiv Member

Hi there,
I’m trying a solution to this that seems to work so far.

First:
open /newspaper/bbpress7content-archive-forum.php and change lines 52-54 to this:

                        di <a class="td-forum-last-author" href="<?php bbp_reply_author_url($last_active)
                        ?>"><?php echo
                            bbp_get_topic_author_display_name($last_active); ?></a>

which gets the right user name for each forum (using what is defined on line 17), so that the last user in THAT forum is shown

Second:
/newspaper/bbpress/content-single-forum.php change line 171 so that
bbp_topic_post_date()' becomesbbp_reply_post_date()’.
this will show the correct time for each reply, under the name of the author of each reply.

This will show on the forum index page the author of the last topic (not the last reply), and the correct date for replies in the single topic. If you want the author of the last REPLY to show, instead of the author of the last TOPIC, then you need to work a bit on line 52 and 57 (try to look on sourcexref.com/xref/bbpress/nav.html?_functions/index.html for functions with last_reply).

Hope this helps, let me know if it works!

PhilDbz
tagDiv Member

@Simmons, thanks for the tip!
In the meantime I deactivated the social butons in the Theme Customizer, then activated the ShareThis plugin with pretty much the same visual effect as the Newspaper buttons, see autoproduco[dot]it/costruire-una-libreria-con-cassette-della-frutta/

I don’t like that plugin a lot as it adds lots of scripts, but it appears a bit more flexible than Addthis (allows to deactivate the buttons on pages) and shows the count of share/tweets/etc exactly as the Magazine one.

Looking forward to see something similar in Newspaper!

PhilDbz
tagDiv Member

Hi Radu,

thank you for your quick reply. No problem at all, we’ll be waiting for the next updates :).

Cheers!

Viewing 11 posts - 1 through 11 (of 11 total)