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)
-   -   VbTeams/Clubs Hack (https://vborg.vbsupport.ru/showthread.php?t=72448)

anubis 12-27-2004 10:22 AM

In team vote to users,
Appear database error :


There seems to have been a slight problem with the 虛空論壇 database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.
Code:

Database error in vBulletin 3.0.3:

Invalid SQL:
                                UPDATE thread
                                SET lastpost = 1104148790
                                WHERE threadid =
                       
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3

mysql error number: 1064

Date: Monday 27th of December 2004 07:59:51 PM
Script: http://www.helzone.com/vbb/poll.php
Referer: http://www.helzone.com/vbb/teamprivtearea.php?do=viewpoll&pollid=100&teamid=4
Username: 阿修羅
IP Address: 61.230.41.76

poll.php whether want to amend what?

JD210 12-28-2004 01:47 AM

Getting the same error, and also, when anyone clicks the link to invite a user to join, they get taken to a blank page.

JD210 12-29-2004 08:41 AM

It was just brought to my attention that when someone clicks on a username, they are getting the following error:

Quote:

There seems to have been a slight problem with the Vast Frontier database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.
If they are logged in, there is no problem, they are taken right to the user profile, but if they are not logged in, then they get the above error message.


Edit: The more I think about it, the less use I can find for this modification on my board. How do I go about uninstalling it?

eXtremeTim 01-01-2005 04:35 PM

Should learn to use left joins. This adds two queries per thread on forumdisplay and adds a good number of queries to show thread as well.

eXtremeTim 01-01-2005 08:19 PM

In your show teamless code you used a query within the while loop. Mean there will be one query for each user who is teamless. Meaning on a large site you would have just hit that db hard. What you should do is what I did on my site and use the fetch_online_status function.

eXtremeTim 01-01-2005 10:01 PM

Quote:

Originally Posted by JD210
It was just brought to my attention that when someone clicks on a username, they are getting the following error:



If they are logged in, there is no problem, they are taken right to the user profile, but if they are not logged in, then they get the above error message.


Edit: The more I think about it, the less use I can find for this modification on my board. How do I go about uninstalling it?

This is simple to fix I just fixed it on my site.

do the following

Find in member.php
PHP Code:

$bbteam =  $DB_site->query_first("
            SELECT *
            FROM " 
TABLE_PREFIX "teams
            WHERE teamid = 
$bbuserinfo[teamid]
        "
); 

Replace with
PHP Code:

$bbteam =  $DB_site->query_first("
            SELECT *
            FROM " 
TABLE_PREFIX "teams
            WHERE teamid = 
$userinfo[teamid]
        "
); 

Miz if you want I can release all the changes I did to my files to your for your next version so that you have a load optimized version. My sites url is http://www.extremechatforums.com/forums/index.php I cleaned up the code on forumdisplay using left joins. I cleaned up the code for showthread (required changes to showthread and functions_showthread) I also cleaned up the not in team list which now runs at 11 (4 of which are from some stats tracking code im using on my site so its really 7 queries) queries on my site no matter how many users as displayed.

MikaK 01-07-2005 02:21 PM

EDIT
The below parse errors were most potentially cused by a erroneus coding - one too much </if> conditionals in the postbit template (my own coding). However, as I decided to remove the hack before finding about the flaw I can not be totally sure.
EDIT

When trying to browse a thread:

If trying to view any thread I get a following error message:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/soundchi/public_html/loud_lounge/includes/functions_showthread.php(820) : eval()'d code on line 346

While the above repeats itself many times with a RBS forum it otherwise shows only once (currently that's the only thread with multiple messages - an indication?) and as the trhread opens the threadbits doesn?t show:
With single post threrads a vBulletin error message shows instead of any of the thread itself:

vBulletin Message

Unable to add cookies, header already sent.
File: /home/soundchi/public_html/loud_lounge/includes/functions_showthread.php(820) : eval()'d code
Line: 346



Now, my setup functions_showthread.php code at lines 340-346:
PHP Code:

$attachcount sizeof($post['attachments']);
$thumbcount 0;
if (!
$vboptions['attachthumbs'] AND !$vboptions['viewattachedimages'])
{
$showimagesprev $bbuserinfo['showimages'];
$bbuserinfo['showimages'] = false;


The only modificaction into the threadbit template was the one showing in red below

<div class="smallfont">

<if condition="$show['threadratings'] AND $show['threadrating']"><span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_$thread[rating].gif" border="0" alt="<phrase 1="$thread[votenum]" 2="$thread[voteavg]">$vbphrase[thread_rating_x_votes_y_average]</phrase>" /></span></if>

<if condition="$show['guestuser']">

$thread[postusername]

<else />

<span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]')">$thread[postusername]</span>

<if condition="$teaminfo['teamid']!=1">
<span style="cursor:pointer" onclick="window.open('showteams.php?$session[sessionurl]do=teamprofile&amp;teamid=$teaminfo[teamid]')"> @ $teaminfo[name]</span>
<else />

<span style="cursor:pointer" onclick="window.open('showteams.php?$session[sessionurl]do=teamless')"> @ $teaminfo[name]</span>

</if>

</if>

</div>

All admin area image paths are also somehow false... Only broken images showing... Voting on poll shows a false message, also the pm message showing as an error is quite annoying...

Any comments correcting the above would be greatly appreciated!


Best regards,
Mika

miz 01-09-2005 12:35 PM

if you getting error on polls issue its only cuse you edited poll.php worng
or missed few things, you cant blame me for problems you having, i dont say my code is perfect but its working, here its working for 100 % i know there might be few problems its ok im having problem to give support 24/7 here as most of week im not at home , im working to get updated and to fix bugs as soon as possible, sorry for problems
dont have anything to say anymore.

sv1cec 01-16-2005 06:01 PM

Quote:

Originally Posted by eXtremeTim
This is simple to fix I just fixed it on my site.

do the following

Find in member.php
PHP Code:

$bbteam =  $DB_site->query_first("
            SELECT *
            FROM " 
TABLE_PREFIX "teams
            WHERE teamid = 
$bbuserinfo[teamid]
        "
); 

Replace with
PHP Code:

$bbteam =  $DB_site->query_first("
            SELECT *
            FROM " 
TABLE_PREFIX "teams
            WHERE teamid = 
$userinfo[teamid]
        "
); 

Miz if you want I can release all the changes I did to my files to your for your next version so that you have a load optimized version. My sites url is http://www.extremechatforums.com/forums/index.php I cleaned up the code on forumdisplay using left joins. I cleaned up the code for showthread (required changes to showthread and functions_showthread) I also cleaned up the not in team list which now runs at 11 (4 of which are from some stats tracking code im using on my site so its really 7 queries) queries on my site no matter how many users as displayed.

Sorry, but aren't these two pieces of code the same? Unless I am too tired right now!

Rgds :-)

yoyoyoyo 01-17-2005 08:03 AM

Quote:

Originally Posted by sv1cec
Sorry, but aren't these two pieces of code the same? Unless I am too tired right now!

Rgds :-)

the first one uses:
PHP Code:

$bbuserinfo[teamid

and the second one uses:
PHP Code:

$userinfo[teamid



All times are GMT. The time now is 10:49 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.01328 seconds
  • Memory Usage 1,774KB
  • 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
  • (1)bbcode_code_printable
  • (7)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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