MyBB Hacks

Full Version: Thread Image
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12

Code:
var_dump(function_exists('stream_copy_to_stream')); stream_copy_to_stream(fopen('global.php', 'r'), fopen('php://output', 'w'), 100);


That's the output Frown

You need to put the code inside a php tag:

PHP Code:
<?php
var_dump(function_exists('stream_copy_to_stream'));
stream_copy_to_stream(fopen('global.php', 'r'), fopen('php://output', 'w'), 100);
?>

Oops, I forgot the tags, sorry.
(03-16-2012 07:22 AM)ZiNgA BuRgA Wrote: [ -> ]Oops, I forgot the tags, sorry.

I dont know anything about php and stuff like that. Its my fault. Dont worry.

Here is the output: http://davidedisongames.zzl.org/New%20Te...http://davidedisongames.zzl.org/New%20Text%20Do
Quote:bool(false)
Warning: stream_copy_to_stream() has been disabled for security reasons in
Why the hell would a host disable that function?  Unless they're deliberately being a pain (ie trying to get you to pay/pay more), it sounds completely retarded.
As such, I'd recommend trying a less retarded host.

But if you must get it to work, you can try replacing all instances of stream_copy_to_stream with something like xthreads_stream_copy_to_stream in xthreads_attach.php
It worked! Thanks! Thank u very very much! Biggrin

There is another problem. When we type the url to be used as image it is showing this error:
Error attaching file for "Thread Image"; Sockets error ():
Considering that they block stream_copy_to_stream, I wouldn't be surprised if they blocked sockets transfers, and possibly remote fopen too.

You can disable the URL option by editing cache/xthreads.php (shouldn't be too hard to find).
Ok! Thanks. Is there a way to use the url that the user specifies without uploading it to my site
Hey all

I have a strange problem.

Click here! - Link to my post - you will see the thread that the user "Demo" created. image is OK

in search - Click here! - Image OK

Now log in as "Demo" pass "1q2w3e4r"

Go to  usercp - Click here! - no image Frown

forumdisplay_thread CODE

Code:
<tr>
	<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
<td align="center" class="{$bgcolor}" width="2%"><a href="{$thread_link}{$highlight}">{$GLOBALS['threadfields']['timg']['value']}</a></td>
	<td class="{$bgcolor}{$thread_type_class}">
		{$attachment_count}
		<div>
			<span>{$prefix} {$gotounread}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['threadprefix']}{$thread['subject']}</a>{$thread['multipage']}</span>
			<div class="author smalltext">{$thread['profilelink']}</div>
		</div>
	</td>
	<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
	<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
	{$rating}
	<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;">
		<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
		<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
	</td>
{$modbit}
</tr>


search_results_threads_thread CODE

Code:
<tr>
	<td align="center" class="{$bgcolor}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif"  alt="{$folder_label}" title="{$folder_label}" /></td>
	<td align="center" class="{$bgcolor}" width="2%"><a href="{$thread_link}{$highlight}">{$GLOBALS['threadfields']['timg']['value']}</a></td>
	<td class="{$bgcolor}">
		{$attachment_count}
		<div>
			<span><a href="{$thread_link}{$highlight}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$prefix} {$gotounread}{$thread['threadprefix']}{$thread['subject']}</a>{$thread['multipage']}</span>
			<div class="author smalltext">{$thread['profilelink']}</div>
		</div>
	</td>
	<td class="{$bgcolor}">{$thread['forumlink']}</td>
	<td align="center" class="{$bgcolor}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a></td>
	<td align="center" class="{$bgcolor}">{$thread['views']}</td>
	<td class="{$bgcolor}" style="white-space: nowrap">
		<span class="smalltext">
			{$lastpostdate} {$lastposttime}<br />
			<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}
		</span>
	</td>
	{$inline_mod_checkbox}
</tr>


usercp_latest_threads_threads - CODE - The problem is here Ouch

Code:
<tr>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><a href="{$thread['threadlink']}">{$GLOBALS['threadfields']['timg']['value']}</a></td>
<td class="{$bgcolor}"><a href="{$thread['threadlink']}" class="{$new_class}">{$gotounread}{$thread['displayprefix']}{$thread['subject']}</a><br /><span class="smalltext">{$thread['author']}</span></td>
<td align="center" class="{$bgcolor}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a></td>
<td align="center" class="{$bgcolor}">{$thread['views']}</td>
<td class="{$bgcolor}" style="white-space: nowrap"><span class="smalltext">{$lastpostdate} {$lastposttime}
<br /><a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
</td>
</tr>


Please help!

And thanks anyway for this amazing plugin Smile

Pages: 1 2 3 4 5 6 7 8 9 10 11 12
Reference URL's