Thread Rating:
  • 10 Votes - 4.6 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 XThreads Example Applications
Hamster24 Offline
Member
***
Posts: 69
Joined: Sep 2014
Post: #41
RE: XThreads Example Applications
RateU example forum that is on co.cc is not working
09-18-2014 08:53 PM
Find all posts by this user Quote this message in a reply
ralph522 Offline
Junior Member
**
Posts: 1
Joined: Feb 2015
Post: #42
RE: XThreads Example Applications
Hi guys, firstly i want to thank you for xthreads... huuge mod Smile

i looked for a suggestion with fancybox (highlighting images) but i dont know how i have to make changes in php file...

fancybox works great in threads but in forumdisplay not works... (new page with img after click on it).

fancyzoom.php

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php

/*
FancyZoom Plugin for MyBB
Copyright (C) 2009 Sebastian Wunderlich

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

if(!defined("IN_MYBB"))
{
	die();
}

$plugins->add_hook("pre_output_page","fancyzoom");

function fancyzoom_info()
{
	return array
	(
		"name"=>"FancyZoom",
		"description"=>"Open images and thumbnails with FancyZoom.",
		"website"=>"http://mods.mybboard.net/view/fancyzoom",
		"author"=>"Sebastian Wunderlich",
		"version"=>"1.2",
		"guid"=>"b67008c6447fe5f3b27ee7bcb8e1fc6e",
		"compatibility"=>"18*"
	);

}

function fancyzoom($page)
{
	global $mybb,$db;
	if(THIS_SCRIPT=="showthread.php")
	{
		$result=$db->simple_select("threads","fid","tid='".intval($mybb->input["tid"])."'",array("limit"=>1));
		$thread=$db->fetch_array($result);
		$permissions=forum_permissions($thread["fid"]);
		if(!empty($thread)&&$permissions["candlattachments"]==1)
		{
			$page=str_replace("</head>",'<script type="text/javascript" src="'.$mybb->settings["bburl"].'/jscripts/fancyzoom/FancyZoom.js"></script>
<script type="text/javascript" src="'.$mybb->settings["bburl"].'/jscripts/fancyzoom/FancyZoomHTML.js"></script>
</head>',$page);
			$page=preg_replace('/\<body(.*)\>/Usi','<body$1 onload="setupZoom()">',$page);
			$page=preg_replace('/\<a href="attachment.php\?aid=([0-9]+)" target="_blank"\>\<img/Usi','<a href="attachment.php?aid=$1" rel="fancyzoom"><img',$page);
			return $page;
		}
	}
}



?>


Anyone could help me? : )
Ps. sorry for my bad english, i hope u ll understand me Smile

02-01-2015 01:24 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #43
RE: XThreads Example Applications
Try adding the referenced script file to the headerinclude template, and stick rel="fancyzoom" into the A tags of the appropriate template.

My Blog
02-01-2015 02:42 PM
Find all posts by this user Quote this message in a reply
HumanError Offline
Junior Member
**
Posts: 17
Joined: Dec 2012
Post: #44
RE: XThreads Example Applications
Awesome For All Mybb Hacks Team
Very Great !
04-19-2015 05:49 PM
Find all posts by this user Quote this message in a reply
XPMai Offline
Junior Member
**
Posts: 8
Joined: May 2015
Post: #45
RE: XThreads Example Applications
Are these applications compatible with MyBB v1.8.5?
06-14-2015 01:52 AM
Find all posts by this user Quote this message in a reply
MrBrechreiz Offline
Member
***
Posts: 69
Joined: May 2012
Post: #46
RE: XThreads Example Applications
To 98% yes.
09-27-2015 10:04 PM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: