vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Need Daily Digest Modification (https://vborg.vbsupport.ru/showthread.php?t=283124)

Chimpie 05-18-2012 12:06 PM

Need Daily Digest Modification
 
Hey everyone,

I would like to modify the daily digest. In addition to the list of what threads are new and what threads have been updated, I need the post content to be listed as well. So it should look like:

Quote:

The following threads are new:
********
Thread title
Link
Started by
Post content

Posted by
Post content

Posted by
Post content

********
(next new thread)
Thread title
Link
Started by
Post content

Posted by
Post content

Posted by
Post content


The following threads are updated:
********

Thread title
Link
Started by
Post content

Posted by
Post content

Posted by
Post content

Repeated
Can this be done?

kh99 05-18-2012 12:24 PM

I think it can be done. If you look at includes/functions_digest.php, the first section gets subscribed threads and includes all new posts from those threads. Then the next section gets subscribed forums and provides links to new or updated threads. So I suppose what you could do is take the results of searching for new and updated threads and do the same thing that's done for subscribed threads (it'll obviously take some moving around of code).

Chimpie 05-18-2012 12:35 PM

Yeah I was looking at that, but I was thinking that I needed to add code so the post content was added.

kh99 05-18-2012 12:49 PM

That's true - for each new or updated thread found in a subscribed forum, you would need to do a query for new posts. But I think it should be almost the same query that's done for updated posts in each subscribed thread. I was thinking maybe if you could take the part from the beginning that processes each subscribed thread and make it a separate function, then maybe you could use it in the section that processes new and updated threads.

BTW, I responded because I remember seeing you post this as a follow-up question in that other thread and I meant to answer there but I forgot. But I guess when people post here they're really looking for someone to do the coding, so my answer really isn't very good. If I get a chance to look at it later maybe I can be of more help.

ETA: actually I won't be able to do this, so if anyone else can help please go ahead.

Chimpie 05-18-2012 12:55 PM

Thanks. Yeah, I tried coding it myself and couldn't get it right so I posted here. :/

kh99 05-18-2012 01:21 PM

I thought of another approach that might work - make a different way for users to subscribe to a forum - by subscribing to all existing and new threads. Then I think the existing digest code would work. Adding a subscription for each existing thread should be pretty easy, and then you'd only need to catch when a new thread was created and add subscriptions to it for each user in question.

Chimpie 05-18-2012 01:44 PM

I thought of that as well, but the forum owner doesn't want the members to receive lots of emails. The forum only has four suggestions so, since they are all subscribed to those four sections, the most they'll receive is four emails.

Simon Lloyd 05-18-2012 03:36 PM

Look at the code for a subscribed thread, that gives you the post content you should be able to gleam it from there


All times are GMT. The time now is 05:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00971 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete