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)
-   -   Public Display of Affection (reputation display) (https://vborg.vbsupport.ru/showthread.php?t=61713)

vbmechanic 07-03-2004 01:09 PM

OK I looked over the install routine and I didn't see anything that would prevent it from working in 3.0.1 or 3.0.2; nothing much has changed.

If you're using postbit_legacy, did you make that change during the install?

"Alter template 'postbit', BELOW:"

Did you take that line in the instructions and instead alter postbit_legacy ?

Sanity 07-05-2004 12:01 PM

Hello,

installed everything as explained, but I get this error-message when I try to read a thread:

Quote:

Datenbankfehler in vBulletin 3.0.2:

Ungueltige SQL-Abfrage: SELECT reputation.reputation,reputation.whoadded,reputati on.reason,user.username
FROM vb_reputation
LEFT JOIN vb_user ON reputation.whoadded=user.userid
WHERE reputation.reputation!=0 AND postid='22'
mysql error: Unknown table 'reputation' in field list

mysql error number: 1109
Iam using a tableprefix.

Any suggestions?

Sanity 07-05-2004 12:36 PM

Figured out the problem. Prefixes missing o_O

Sanity 07-05-2004 01:01 PM

*install*

Reeve of shinra 07-16-2004 02:16 AM

Finally got around to installing this. This is exactly what I wanted.

I added this to the postbit_fuction template to show the rep only to the perosn that made the post. A compromise between those who wanted it and those who didnt.

PHP Code:

<if condition="$bbuserinfo['userid'] == $post['userid']"


dndog 12-05-2004 02:41 AM

Quote:

Originally Posted by Sanity
Hello,

installed everything as explained, but I get this error-message when I try to read a thread:



Iam using a tableprefix.

Any suggestions?

I'm having this same problem and I'm using a table prefix also.

What'd you do to fix this? :nervous:

robertuss 12-09-2004 02:39 PM

erm, what's with the moderateablities?

dndog 12-17-2004 03:10 AM

Not meaning to seem impatient, but its been 12 days. Can someone help me?

nintendo 02-01-2005 12:31 AM

Is there an SQL Query that can be used to turn it on on all boards?

Jamsoft 02-15-2005 05:44 PM

Hey guys,

I installed this on our forums, and wouldnt you know that our users found a vulnerability almost right away.

Seems that if the users put any HTML or JAVA code inside the comments, it actually renders when the page loads. For example:

Quote:

Rich agrees: Sounds good <script>alert('hi');</script>
Makes a java window pop open and say hi...

Im sure I dont have to tell you what a malicious hacker can do with something like this.

So, I'd propose this fix to the existing code. Inside the functions_showthread.php, find this code:

Code:

                        // START PUBLIC DISPLAY OF AFFECTION hack                       
                        if ($forum['showaffection'])
                        {
                                $post['affection']="";
                                $repcount=0;
                                if ($reps = $DB_site->query("SELECT reputation.reputation,reputation.whoadded,reputation.reason,user.username
                                                                                        FROM " . TABLE_PREFIX . "reputation
                                                                                        LEFT JOIN " . TABLE_PREFIX . "user ON reputation.whoadded=user.userid
                                                                                        WHERE reputation.reputation!=0 AND postid='".$post['postid']."'"))
                                {
                                        while ($rep = $DB_site->fetch_array($reps))
                                        {
                                                eval('$post[\'affectionbits\'] .= "' . fetch_template('postbit_affectionbit') . '";');
                                                $repcount++;
                                        }
                                        if ($repcount)
                                        {
                                                //echo "2";
                                                eval('$post[\'affection\'] .= "' . fetch_template('postbit_affection') . '";');
                                        }
                                        else
                                        {       
                                                //echo "3";
                                                $post['affection']="";
                                        }
                                }
                        }
                        // END PUBLIC DISPLAY OF AFFECTION hack

BEFORE the line:
Code:

eval('$post[\'affectionbits\'] .= "' . fetch_template('postbit_affectionbit') . '";');
Add this code:
Code:

// Fix for HTML entities
$rep[reason] = htmlentities($rep[reason]);

That will protect us from this issue.

Other than that, this is a great hack. Im using it on 3.0.6 on 5 forums...


All times are GMT. The time now is 07:28 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.01212 seconds
  • Memory Usage 1,749KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)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