vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Who Rated This Thread / Delete Who Rated (https://vborg.vbsupport.ru/showthread.php?t=133067)

richTV 07-20-2007 05:04 AM

Code:

$vbulletin->db->query_write("
 DELETE FROM " . TABLE_PREFIX . "threadrate
 WHERE userid = '" . $_REQUEST['userid'] . "'
 ");

Hi.

i could really use this add-on if the threadid could be added so that it doesn't delete all ratings by a user

i'm not a programmer so i was wondering if someone could be so kind as to tell me if it would look like this? [my additioin is in red]....

Code:

$vbulletin->db->query_write("
 DELETE FROM " . TABLE_PREFIX . "threadrate
 WHERE userid = '" . $_REQUEST['userid'] . "' AND threadid = '" . $_REQUEST['threadid'] . "'
 ");

:):):)

Carlos2 07-20-2007 11:15 AM

Good work ;)

Muellmann 07-24-2007 01:06 AM

Your red code addition looks correctly richTV.
However the ' ' are for both values not necessary. :rolleyes:

Carlos2 07-24-2007 07:58 AM

I install Vborg thread ratings and this plugins seems to doesnt work now. Anybody knows why?

richTV 07-25-2007 02:27 AM

Quote:

Originally Posted by Muellmann (Post 1299718)
Your red code addition looks correctly richTV.
However the ' ' are for both values not necessary. :rolleyes:

ok, many tnx in looking into this. :)

richTV 12-29-2007 06:31 AM

1 Attachment(s)
hey guys, using MS Sharepoint Designer, i incorporated Muellmann's edit [thanks!] into an updated xml and it's working fine in vB 3.6.8 PL1

this will do as Paul described but it won't delete ALL of that member's ratings from ALL threads....only that particular thread.

if u already installed it, then just overwrite the product with this one.

many thanks to Paul for sharing this useful addon. :)

and apologies if this was wrong of me to share here.

richTV 09-24-2008 02:43 AM

1 Attachment(s)
currently using it in vB3.7.3 :)

i didn't like how it looked:

Attachment 87255

so i changed it to look like this:

Attachment 87256

Full Install Notes:

upload delete.gif to your images/misc and then install xml [above post]

In SHOWTHREAD template,

Find:

Code:

</head>

BEFORE IT ADD:

Code:

<script language="JavaScript">
<!--//BEGIN Script

function new_window(url) {

link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=500,height=250,left=180,top=180");

}
//END Script-->
</script>

Find:

Code:

<td class="thead">$vbphrase[rate_this_thread]<a name="goto_threadrating"></a>
After it add:

Code:

<if condition="in_array($bbuserinfo[usergroupid], array(5,6,7))"><a href="#" onclick="javascript:new_window('misc.php?do=whorate&threadid=$threadinfo[threadid]')"><center><b><font color=red>$vbphrase[devel_whorate_who]?</font></b></center></a></if>
Find:

Code:

<td class="thead">$vbphrase[rate_this_thread]<a name="goto_threadrating"></a>
change to:

Code:

<td class="thead"><center>$vbphrase[rate_this_thread]</center><a name="goto_threadrating"></a>
cheers and many thanks again to Paul. :)


All times are GMT. The time now is 04:59 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.03264 seconds
  • Memory Usage 1,737KB
  • 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
  • (8)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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