Thread Rating:
  • 3 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Thread Image
davidedison Offline
Junior Member
**
Posts: 11
Joined: Mar 2012
Post: #71
RE: Thread Image

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

03-15-2012 11:28 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #72
RE: Thread Image
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);
?>


03-16-2012 04:26 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #73
RE: Thread Image
Oops, I forgot the tags, sorry.

My Blog
03-16-2012 07:22 AM
Find all posts by this user Quote this message in a reply
davidedison Offline
Junior Member
**
Posts: 11
Joined: Mar 2012
Post: #74
RE: Thread Image
(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
03-16-2012 06:28 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #75
RE: Thread Image
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

My Blog
03-16-2012 06:53 PM
Find all posts by this user Quote this message in a reply
davidedison Offline
Junior Member
**
Posts: 11
Joined: Mar 2012
Post: #76
RE: Thread Image
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 ():
(This post was last modified: 03-18-2012 04:13 AM by davidedison.)
03-18-2012 03:53 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #77
RE: Thread Image
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).

My Blog
03-18-2012 08:41 PM
Find all posts by this user Quote this message in a reply
davidedison Offline
Junior Member
**
Posts: 11
Joined: Mar 2012
Post: #78
RE: Thread Image
Ok! Thanks. Is there a way to use the url that the user specifies without uploading it to my site
03-19-2012 01:36 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #79
RE: Thread Image
Maybe this post can give you more info:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=531&pid=75

03-19-2012 05:18 AM
Find all posts by this user Quote this message in a reply
ArieKatz Offline
Junior Member
**
Posts: 11
Joined: May 2012
Post: #80
Sad Image doesnt show sup in usercp.php
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:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<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:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<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:
1
2
3
4
5
6
7
8
9
10
<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

(This post was last modified: 05-05-2012 08:00 AM by ArieKatz.)
05-05-2012 07:51 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: