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

Reply
 
Thread Tools Display Modes
  #1  
Old 09-15-2006, 06:00 PM
minboost minboost is offline
 
Join Date: Mar 2006
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default postparsed table...how is it updated?

I noticed that the postparsed table is updated when a new post is made (and probably when it is updated) as well as when a post is viewed (if a record doesn't exist for that post in the table).

When else is it updated?

I'm trying to write a plug-in that circumvents the forum permissions for things like posting html, bbcode, etc...so that no matter what the permissions are I can put in any post I want.

I was thinking that if I insert a record directly into the postparsed table for my post, that will do it. But I'm just not sure if/when vbulletin may delete that record and re-parse the post.

I understand only a limited number of posts are stored in the postparsed table. Would setting the dateline column to an arbitrary date in the future help to keep it from being removed from the postparsed table? How does vBulletin decide when to look in the postparsed table and when to insert/update/remove records from it?

Any ideas?

Thanks guys!
Reply With Quote
  #2  
Old 11-20-2006, 03:08 AM
timetunnel timetunnel is offline
 
Join Date: Sep 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello.

I'd like to know how the 'postparsed' table is updated also. From which file? All I've seem to see so far is 'DELETE' from that table.

Thanks in advance.
Reply With Quote
  #3  
Old 11-20-2006, 03:15 AM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When you view a post in a style that hasn't had it cached yet, it will create the cache for that post.

So, viewing a newly created/edited post would cause it to update the postparsed table.
Reply With Quote
  #4  
Old 11-20-2006, 03:20 AM
timetunnel timetunnel is offline
 
Join Date: Sep 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your reply, SirAdrian.

Which file updates that postparsed table for new posts? All I've found so far is the 'DELETE' from that table vs. INSERT.

Thanks again in advance.
Reply With Quote
  #5  
Old 11-20-2006, 03:27 AM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

from showthread.php, here is its time-out check,
PHP Code:
$post_cachable = (
    
$vbulletin->options['cachemaxage'] > AND
    (
TIMENOW - ($vbulletin->options['cachemaxage'] * 60 60 24)) <= $thread['lastpost'] AND
    
$vbulletin->session->vars['sessionurl'] == ''
); 
So it goes through each post, and if thats set or if the post has no cache, it will update it with this:
PHP Code:
if (!empty($saveparsed))
{
    
$db->shutdown_query("
        REPLACE INTO " 
TABLE_PREFIX "postparsed (postid, dateline, hasimages, pagetext_html, styleid, languageid)
        VALUES 
$saveparsed
    "
);
    unset(
$saveparsed);

Reply With Quote
  #6  
Old 11-20-2006, 03:44 AM
timetunnel timetunnel is offline
 
Join Date: Sep 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks again for your reply.

If I add a 2nd field to the 'newthread' that also uses e.g. the WYSIWYG editor, would I need to create a 2nd 'pagetext_html' (different name of course) in that 'postparsed' table OR would it use the same original 'pagetext_html' table field since it belongs to the ENTIRE post and therefore would just tack on the 2nd field's data onto the 1st field's data?

Thanks again in advance.
Reply With Quote
  #7  
Old 11-20-2006, 03:54 AM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You would need to add a second field if you want to to save the cache of it.

BTW, I think you would be better off having it NOT cache the post rather than duplicating the content.
Reply With Quote
  #8  
Old 11-20-2006, 04:57 AM
timetunnel timetunnel is offline
 
Join Date: Sep 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got it.

Thanks for your assistance!
Reply With Quote
  #9  
Old 09-08-2011, 05:24 AM
dd009 dd009 is offline
 
Join Date: Dec 2009
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very helpful.

Thanks
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 03:24 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.04188 seconds
  • Memory Usage 2,238KB
  • Queries Executed 11 (?)
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
  • (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_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