Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2008, 12:08 PM
Sven Sven is offline
 
Join Date: Oct 2001
Location: Neuss, Germany
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Hack not working in internal forums?

We have created a nice function that parses information of a gamereplay that is attached to a posting. Works nice but there's a problem:
In all forums that are 'internal' the tool won't work.

This is the code used:
showthread.php (3.6.4), lines 939 to 942, of course the file that contains the stremreplay function is included at the top of showthread.php (line 99: require_once("twrr.php"); )
Code:
            if (stristr($attachment['filename'], ".CNC3Replay"))
            {
            	$attachment['replay'] = streamReplay("http://www.cncforen.de/attachment.php?attachmentid=$attachment[attachmentid]", $attachment['filename']);
}
postbit_attachment template:
Code:
<tr>
	<td valign='top'><img class="inlineimg" src="$stylevar[imgdir_attach]/$attachment[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
	<td><a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a> ($attachment[filesize]<if condition="$show['views']">, <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase></if>)


<if condition="$attachment['replay']">
<div style='border:1px double medium; height: 300px; margin:3px; padding:3px;'>
<div class='thead'>Replayinfos: (<small>Beta-Status)</small></div>
<div class='alt1'>
	<span>Replay-Version: {$attachment[replay][version]} | </span>
	<span>Game-Name: {$attachment[replay][name]} | </span>
	<span>Voip: {$attachment[replay][ini][voip]} | </span>
	<span>Battlecast: {$attachment[replay][ini][bc]}</span>
</div>
<div class='alt2' style='border-top:1px solid; border-bottom:1px solid;'>
	<span>Kisten: {$attachment[replay][ini][crates]} | </span>
	<span>Startcredits: {$attachment[replay][ini][startcash]} | </span>
	<span>Gamespeed: {$attachment[replay][ini][gamespeed]} | </span>
	<span>Sonst: {$attachment[replay][ini][gametype]}, {$attachment[replay][ini][matchtype]}</span>
</div>
<div style='float:left;'>
<div style='text-align:center; padding:3px;'><strong>Map: {$attachment[replay][mapname]}</strong></div>
<if condition="$attachment['replay']['official']">
<img src='images/mappics/{$attachment[replay][mapname]}.png' style='width:200px; height:200px; margin:3px;' alt='{$attachment[replay][mapname]}' />
<else />
<img src='images/mappics/unofficial.jpg' style='width:200px; height:200px; margin:3px;' alt='{$attachment[replay][mapname]}' />
</if></div>
<div style='margin:3px; text-align:center;'>
	<table border='1' cellpadding='0' cellspacing='0'>
		<tr>
			<td style='font-weight:bold;'>#</td>
			<td style='font-weight:bold;'>&nbsp;Fraktion&nbsp;</td>
			<td style='font-weight:bold;'>&nbspSpieler-Typ&nbsp;</td>
			<td style='font-weight:bold;'>&nbsp;Name&nbsp;</td>
			<td style='font-weight:bold;'>&nbsp;Team&nbsp;</td>
			<td style='font-weight:bold;'>&nbsp;Farbe&nbsp;</td>
			<td style='font-weight:bold;'>&nbsp;Position&nbsp;</td>
			<td style='font-weight:bold;'>&nbsp;Clan&nbsp;</td>
		</tr>
<if condition="$attachment[replay][ini][players][1]">
		<tr style='height:25px;'>
			<td>1</td>
			<td>&nbsp;<img src='images/mappics/{$attachment[replay][ini][players][1][faction]}.png' alt='{$attachment[replay][ini][players][1][faction]}' />&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][1][playertype]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][1][playername]}</a>&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][1][team]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][1][color]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][1][mappos]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][1][clan]}&nbsp;</td>
		</tr>
</if>
<if condition="$attachment[replay][ini][players][2]">
		<tr style='height:25px;'>
			<td>2</td>
			<td>&nbsp;<img src='images/mappics/{$attachment[replay][ini][players][2][faction]}.png' alt='{$attachment[replay][ini][players][2][faction]}' />&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][2][playertype]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][2][playername]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][2][team]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][2][color]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][2][mappos]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][2][clan]}&nbsp;</td>
		</tr>
</if>
<if condition="$attachment[replay][ini][players][3]">
		<tr style='height:25px;'>
			<td>3</td>
			<td>&nbsp;<img src='images/mappics/{$attachment[replay][ini][players][3][faction]}.png' alt='{$attachment[replay][ini][players][3][faction]}' />&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][3][playertype]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][3][playername]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][3][team]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][3][color]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][3][mappos]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][3][clan]}&nbsp;</td>
		</tr>
</if>
<if condition="$attachment[replay][ini][players][4]">
		<tr style='height:25px;'>
			<td>4</td>
			<td>&nbsp;<img src='images/mappics/{$attachment[replay][ini][players][4][faction]}.png' alt='{$attachment[replay][ini][players][4][faction]}' />&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][4][playertype]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][4][playername]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][4][team]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][4][color]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][4][mappos]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][4][clan]}&nbsp;</td>
		</tr>
</if>
<if condition="$attachment[replay][ini][players][5]">
		<tr style='height:25px;'>
			<td>5</td>
			<td>&nbsp;<img src='images/mappics/{$attachment[replay][ini][players][5][faction]}.png' alt='{$attachment[replay][ini][players][5][faction]}' />&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][5][playertype]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][5][playername]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][5][team]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][5][color]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][5][mappos]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][5][clan]}&nbsp;</td>
		</tr>
</if>
<if condition="$attachment[replay][ini][players][6]">
		<tr style='height:25px;'>
			<td>6</td>
			<td>&nbsp;<img src='images/mappics/{$attachment[replay][ini][players][6][faction]}.png' alt='{$attachment[replay][ini][players][6][faction]}' />&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][6][playertype]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][6][playername]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][6][team]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][6][color]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][6][mappos]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][6][clan]}&nbsp;</td>
		</tr>
</if>
<if condition="$attachment[replay][ini][players][7]">
		<tr style='height:25px;'>
			<td>7</td>
			<td>&nbsp;<img src='images/mappics/{$attachment[replay][ini][players][7][faction]}.png' alt='{$attachment[replay][ini][players][7][faction]}' />&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][7][playertype]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][7][playername]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][7][team]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][7][color]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][7][mappos]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][7][clan]}&nbsp;</td>
		</tr>
</if>
<if condition="$attachment[replay][ini][players][8]">
		<tr style='height:25px;'>
			<td>8</td>
			<td>&nbsp;<img src='images/mappics/{$attachment[replay][ini][players][8][faction]}.png' alt='{$attachment[replay][ini][players][8][faction]}' />&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][8][playertype]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][8][playername]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][8][team]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][8][color]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][8][mappos]}&nbsp;</td>
			<td>&nbsp;{$attachment[replay][ini][players][8][clan]}&nbsp;</td>
		</tr>
</if>
</table>
</div>
<div style='clear:left;'></div>		
<div class='thead' style='padding:3px; margin:3px;'>&copy; Chrissyx &amp; cncforen.de</div>
</div>
</if>

</td>
</tr>
Attached please find the twrr.php

I don't have a clue why it is working in forums that are public and not in forums that have limited access by usergroup or individually.
Please help...
Attached Files
File Type: php twrr.php (12.7 KB, 3 views)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:47 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.03300 seconds
  • Memory Usage 2,264KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete