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

Reply
 
Thread Tools Display Modes
  #21  
Old 02-19-2018, 01:33 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm talking about all plugins whose hook location is "threaddata_presave."
Reply With Quote
  #22  
Old 02-19-2018, 02:38 PM
I.G.O.T.A.'s Avatar
I.G.O.T.A. I.G.O.T.A. is offline
 
Join Date: Mar 2011
Location: USA
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
I'm talking about all plugins whose hook location is "threaddata_presave."
Yep, I did that.

So let me walk through this one more time.

First I create a plugin hooked at "threaddata_presave" with the code:

global $vbulletin;

if ($vbulletin->GPC['threadid'] == XXX)
{
$vbulletin->db->query_write("
UPDATE " . TABLE_PREFIX . "post
SET title = '" . $vbulletin->db->escape_string($vbulletin->GPC['title']) . "'
WHERE threadid = " . $vbulletin->GPC['threadid'] . "
AND parentid != 0
");
}

Using my ID number which is 10573 in the XXX

Next, I go to the thread and update the title and hit save. The title changes, but only the main one which is my issue, not all the rest of the posts.

Is that correct sir?
Reply With Quote
  #23  
Old 02-19-2018, 02:43 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For whatever reason that plugin is not executing...have no idea why...it works perfectly for me.
Reply With Quote
  #24  
Old 02-19-2018, 02:52 PM
I.G.O.T.A.'s Avatar
I.G.O.T.A. I.G.O.T.A. is offline
 
Join Date: Mar 2011
Location: USA
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have an idea, brb.

--------------- Added [DATE]1519059557[/DATE] at [TIME]1519059557[/TIME] ---------------

GOT IT!

Thank you!!!
Reply With Quote
  #25  
Old 02-19-2018, 03:26 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by I.G.O.T.A. View Post
I have an idea, brb.

--------------- Added [DATE]1519059557[/DATE] at [TIME]1519059557[/TIME] ---------------

GOT IT!

Thank you!!!
The post merging here is a real PITA...the only way I knew you had posted another reply was to check, as it does not show up as a new reply.

Anyway, what was causing the plugin not to execute?
Reply With Quote
  #26  
Old 02-19-2018, 04:28 PM
I.G.O.T.A.'s Avatar
I.G.O.T.A. I.G.O.T.A. is offline
 
Join Date: Mar 2011
Location: USA
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Our server was on fast CGI and we kept hitting limits which cause errors and issues.

Once I changed us back to just regular CGI my errors went away and everything worked.

Thanks, friend,
JJ
Reply With Quote
Благодарность от:
Stratis
  #27  
Old 02-20-2018, 11:51 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tested this plugin in my dev site, to work I disabled the "fast CGI"

Is there a way Mark... to the second post title and so on until last post to have the word "Re" before the title
or what else we use?

Thanks
Reply With Quote
  #28  
Old 02-20-2018, 04:43 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just change the query to this:

PHP Code:
    $vbulletin->db->query_write("
        UPDATE " 
TABLE_PREFIX "post
        SET title = 'Re: " 
$vbulletin->db->escape_string($vbulletin->GPC['title']) . "'
        WHERE threadid = " 
$vbulletin->GPC['threadid'] . "
        AND parentid != 0
    "
); 
Reply With Quote
Благодарность от:
Stratis
  #29  
Old 02-21-2018, 03:47 AM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok thanks Mark , some times i get an error
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; modpm_checker has a deprecated constructor...
Reply With Quote
  #30  
Old 02-21-2018, 04:26 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Stratis View Post
Ok thanks Mark , some times i get an error
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; modpm_checker has a deprecated constructor...
That has nothing to do with the query I posted...sounds like an add-on.
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 01:00 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08300 seconds
  • Memory Usage 2,287KB
  • Queries Executed 14 (?)
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_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete