vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Can't edit thread name (https://vborg.vbsupport.ru/showthread.php?t=41954)

SuB_ZeR0 08-05-2002 07:03 PM

Can't edit thread name
 
I notice that for the first post of any thread, the subject becomes the name of the thread also. However, after the post is submitted, and I go to edit the post and change is subject name .... the thead name still doesn't change to reflect the new subject name. Can anyone tell why this is so? Is this a bug? Can it be remedied? Thanks

Logician 08-05-2002 07:10 PM

There are 2 seperate tables in db:
a) Saving message's details (and its subject)
b) Saving thread's details (and its subject which is also the subject of the first message)

When you create a new thread, both tables are populated and subject fields filled according to your subject. However when user edits his post, vb doesnt check if it's the thread's first message or not and only modify post table details.. That's why.. :)

If you are an admin you can change thread name, but users cant (without a hack)

SuB_ZeR0 08-09-2002 12:47 AM

Do you know how (or of a hack) I can edit the subject name of the first post and it will automatically change the thread name? ... I don't want to have to change a thread name every single time. It would be too time consuming. Thanks.

Xenon 08-09-2002 02:15 PM

in your editpost.php find this:
PHP Code:

  if ($isfirst and $title!="" and $postinfo[dateline]+$editthreadtitlelimit*60>time()) {
    
$DB_site->query("UPDATE thread SET title='".addslashes(htmlspecialchars($title))."', iconid=".intval($iconid)." WHERE threadid=$threadinfo[threadid]");
    
//$title="";
  


delete
PHP Code:

 and $postinfo[dateline]+$editthreadtitlelimit*60>time() 

out of the if-clause

SuB_ZeR0 08-09-2002 10:58 PM

Thanks alots .. I'll try it tonite.


All times are GMT. The time now is 03:11 AM.

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.01809 seconds
  • Memory Usage 1,718KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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