Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-11-2009, 01:03 PM
joyfulmiller joyfulmiller is offline
 
Join Date: Jul 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do I put full text in forum notifications?

I'm interested in putting the full forum post text in each forum notification email that members receive. This would be for all new posts, not just posts/threads the member has started or replied to.

I'm not interested in allowing members to reply by email (I already tried the email integration mod and it didn't work), only in members being able to read the full text of each post in their email. Having hits on my forum is not important at all. Having members easily read all the new/updated forum posts is the priority.

Is there a template modification that can be done to insert the full text of posts into the notification emails? I know full text is included in emails notifications for subscribed threads, so it must be possible somehow.

We are currently using vBulletin 3.8.3.

Thanks.
Reply With Quote
  #2  
Old 09-11-2009, 02:08 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you talking about the Daily Digest or what?
Reply With Quote
  #3  
Old 09-11-2009, 02:29 PM
joyfulmiller joyfulmiller is offline
 
Join Date: Jul 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, when someone subscribes through Forum Tools to daily or weekly digests, I need to be able to include the full text of the posts in the email notifications instead of just the title, author, and link to the post on the forum.
Reply With Quote
  #4  
Old 09-11-2009, 02:43 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The phrase for the digestpostbit is this:
HTML Code:
************
$post[title]
$vboptions[bburl]/showthread.php?p=$post[postid]#post$post[postid]
Posted by: $post[postusername]
On: $post[postdate] $post[posttime]

$post[pagetext]
So, you should be sending out the pagetext. Exactly what is being sent out?
Reply With Quote
  #5  
Old 09-11-2009, 02:57 PM
joyfulmiller joyfulmiller is offline
 
Join Date: Jul 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is an example of contents of the notification email that is received by members who have subscribed to Daily Digest of forums:

###

Dear John Doe,

You are subscribed to the forum General Discussion, there have been 4 new thread(s) and 5 updated thread(s).
http://mysite.org/members/forum/forumdisplay.php?f=13

The following threads are new:
************
Library update and thoughts on new forum
http://mysite.org/members/forum/showthread.php?t=99
In forum: General Discussion
Started by: M Smith
Last post: 09-10-2009 09:55 AM
************
Where to shop?
http://mysite.org/members/forum/showthread.php?t=100
In forum: Local Recommendations
Started by: E Crownover
Last post: 09-10-2009 11:11 AM
************

So as you see, it includes just the Title, the Link, the Forum Category, the Author, and the Post Date. No full text at all.
Reply With Quote
  #6  
Old 09-11-2009, 05:00 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is for when users are subscribed to a forum, not a particular thread. The post text is not grabbed in the query for the forum subscriptions and there are no hooks available. That means you will have to modify the actual query to grab the post text and then modify the code to parse it for the email and then modify the phrase to spit it out. The query is around line 204 in includes/functions_digest.php. I think you'll need to JOIN the post table in order to get the post text of the first post (I assume that is all you are wanting to grab).
Reply With Quote
  #7  
Old 09-11-2009, 05:17 PM
joyfulmiller joyfulmiller is offline
 
Join Date: Jul 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are there more specific instructions that you could give me to modify the code? I am a newbie and coding and I'm afraid I couldn't figure it out on my own.

Would this also put the text of the Updated Posts in the digest in addition to the text for the New Posts?
Reply With Quote
  #8  
Old 09-11-2009, 05:37 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe forum digests only go out for new threads that are posted in a forum. So, if there are new posts to a thread in a forum, these will not be included in the digest.

As for what to add... I've never done what you want to do, so I can't really give you specifics. But, the query I pointed out is, I think, the one you need to modify to grab the first post text at the same time as it grabs the other info. You need to add a join, something like:
PHP Code:
INNER JOIN " . TABLE_PREFIX . "post AS post ON(thread.firstpostid=post.postid
And then in the SELCT part of the statement, you need to add in "post.pagetext". That should grab the pagetest of the first post in the thread for you. Then you need to do something with it. In the code above the query you are modifying, the post text is selected, and then they do this to it to get it ready for the email output:
PHP Code:
$post['pagetext'] = $plaintext_parser->parse($post['pagetext'], $thread['forumid']); 
So, you may need to add that to your code before you then try to insert it into your phrase (with different variable names, of course).... you will have to modify that phrase also - digestthreadbit ?

I would suggest you play with this on your test site.
Reply With Quote
  #9  
Old 09-18-2009, 01:43 AM
joyfulmiller joyfulmiller is offline
 
Join Date: Jul 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anyone else that can give me more specific instruction for how to do this? I can find the right place in the file that was referred to in the last post, but I still don't know exactly what code I need to put where. Please help?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:09 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.03728 seconds
  • Memory Usage 2,241KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete