vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Automatic 'Thank you' Hack (https://vborg.vbsupport.ru/showthread.php?t=63368)

Boofo 04-05-2004 12:33 PM

Look for this then. ;)

HTML Code:

<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply

Boofo 04-05-2004 12:36 PM

Quote:

Originally Posted by teksigns
i fixed this myself


in :

includes/functions_databuild.php

Find:

Code:

        delete_post_index($post['postid']); //remove search engine entries
                        }
                }

                if (!empty($userbyuserid) AND !$threadinfo['isdeleted'])
                { // if the thread is already deleted, the posts have already been reduced


add this right above it :


Code:

$DB_site->query("DELETE FROM " . TABLE_PREFIX . "thanks WHERE threadid=$threadid");
save and your done !


now anytime you Physically remove it it will also remove the thanks.

What if there isn't a thanks message in the thread you want to delete. Wouldn't that give you a db error? ;)

teksigns 04-05-2004 01:50 PM

Quote:

What if there isn't a thanks message in the thread you want to delete. Wouldn't that give you a db error?

not it would not .....


i just deletes any it finds ....if none match then it just continues .......

Boofo 04-05-2004 01:54 PM

It deletes any it finds, or finds for that thread you mean? ;)

subu1 04-05-2004 02:23 PM

Quote:

Originally Posted by Boofo
Look for this then. ;)

HTML Code:

<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply

Hi Boofo

Sorry, but you can write me the code please, view can see that I after something other I also, but how it goes.

teksigns 04-05-2004 02:39 PM

Quote:

Originally Posted by Boofo
It deletes any it finds, or finds for that thread you mean? ;)



find for that thread ..........

teksigns 04-05-2004 02:43 PM

heres another wish filled .....


Quote:

2 ability to bump a post when a user say thank you

with this each time someone clicks thankyou your post will be bumped to the
top of the list again ......


in newreply.php
Find this :

Code:

        $DB_site->query("
        INSERT INTO ". TABLE_PREFIX ."thanks
        (userid, username, date, threadid)
        VALUES ('$bbuserinfo[userid]', '" . addslashes($bbuserinfo[username]) . "', " . TIMENOW . ", '$threadid')");


bellow it , add this :

Code:

$DB_site->query("UPDATE ".TABLE_PREFIX."thread SET lastpost=".TIMENOW." WHERE threadid='".$threadid."'");

thats it !


your done ......

Boofo 04-05-2004 02:45 PM

LOL How many queries is all of this adding?

teksigns 04-05-2004 02:50 PM

Quote:

Originally Posted by Boofo
LOL How many queries is all of this adding?


just trying to help !


im not a coder... if you have better way .....please post it .......

its only way i know to get job done .......

subu1 04-05-2004 02:55 PM

...what a Mod :(


All times are GMT. The time now is 03:07 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.01182 seconds
  • Memory Usage 1,740KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_html_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete