It is currently 19 Feb 2018, 15:49

Anything Goesphpbb How to show latest image attachments on top of forum list (Showcase | Slideshow)

Anything, almost anything at all
(even advertisement if it's decent, spammers will be banned)
Post Reply
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/6
Posts: 2157
Joined: 26 Sep 2016, 00:16
Cash on hand: 7,894.01 GLP
Bank: 51,356.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1196
x 256
Contact:
Canada

phpbb How to show latest image attachments on top of forum list

Post#1 by tim » 12 Feb 2017, 21:02


This mod hack is altered code from http://www.jssor.com/demos/scrolling-lo ... der.slider
Image
1) Unzip this file
last_attachments.zip #
Zipped .php file
(12.27 KiB) Downloaded 18 times
2) Edit line 25, 28 to reflect your database connection and database.
3) Edit line 44 to reflect your site's urls (one for link, and one for where to get files from)
4) ACP - Security settings - turn on to allow PHP template.
5) In template/forumlist_body.html
Add

Code: Select all

<!-- INCLUDEPHP last_attachments.php -->
to beginning of file.
6) Upload the .php from step 1) to template folder and you're done.
7) You might have to delete .htaccess from /files/ folder to allow browsers to hit files in that folder.
0 x



aka Tin
Image gimplearn.net                                              

Registered members enjoy ads-free content
User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/6
Posts: 2157
Joined: 26 Sep 2016, 00:16
Cash on hand: 7,894.01 GLP
Bank: 51,356.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1196
x 256
Contact:
Canada

Post#2 by tim » 12 Feb 2017, 22:34


If you don't want to delete .htaccess in /files/ folder.
Alternately you can select an extra field in SQL
a.attach_id
like this

Code: Select all

$query = "SELECT a.post_msg_id,a.physical_filename,a.attach_id FROM `phpbbsf_attachments` a WHERE a.mimetype like 'image%' ORDER BY a.filetime DESC"  ;
Then insert this code on line 44

Code: Select all

$attachid = $row["attach_id"];
then for the echo line (old 44, now line 45).
use this code (just change to your url)

Code: Select all

echo '<div><a href="http://gimplearn.net/viewtopic.php?p='.$postid.'#p'.$postid.'"><img data-u="image" src="http://gimplearn.net/download/file.php?id='.$attachid.'"/></a></div>';
  
So that you're using the forum links to src the file and not hitting the /files/ folder directly.
0 x



aka Tin
Image gimplearn.net                                              

User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/6
Posts: 2157
Joined: 26 Sep 2016, 00:16
Cash on hand: 7,894.01 GLP
Bank: 51,356.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1196
x 256
Contact:
Canada

Post#3 by tim » 13 Feb 2017, 03:43


added

Code: Select all

<?php $forum_id = request_var('f', 0);?>
to beginning of latest_attachments.php file.
then changed query to

Code: Select all

// Build SQL Query  
$query = "SELECT a.post_msg_id,a.physical_filename,a.attach_id
FROM `phpbbsf_attachments` a 
INNER JOIN `phpbbsf_posts` p ON p.post_id = a.post_msg_id
INNER JOIN `phpbbsf_forums` f ON p.forum_id = f.forum_id
WHERE a.mimetype like 'image%'
AND (0 = ".$forum_id."
     OR f.forum_id = ".$forum_id."
	 OR f.parent_id = ".$forum_id.")

ORDER BY a.filetime DESC"  ;
Now i just included the template in index_body.html
and viewforum_body.html

And now query will return attachments specific to forum(s) that you're looking at.
0 x



aka Tin
Image gimplearn.net                                              

User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/6
Posts: 2157
Joined: 26 Sep 2016, 00:16
Cash on hand: 7,894.01 GLP
Bank: 51,356.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1196
x 256
Contact:
Canada

Post#4 by tim » 13 Feb 2017, 18:07


and not show it if query returns no result.

Code: Select all

<?php $forum_id = request_var('f', 0);?>
<?php

  
//connect to your database
mysql_connect('localhost','bakon306_phpb537','password'); //(host, username, password)

//specify database
mysql_select_db('bakon306_phpb537') or die("Unable to select database"); //select which database we're using

// Build SQL Query  
$query = "SELECT a.post_msg_id,a.physical_filename,a.attach_id
FROM `phpbbsf_attachments` a 
INNER JOIN `phpbbsf_posts` p ON p.post_id = a.post_msg_id
INNER JOIN `phpbbsf_forums` f ON p.forum_id = f.forum_id
WHERE a.mimetype like 'image%'
AND (0 = ".$forum_id."
     OR f.forum_id = ".$forum_id."
	 OR f.parent_id = ".$forum_id.")

ORDER BY a.filetime DESC"  ;
 $numresults=mysql_query($query);
 $numrows=mysql_num_rows($numresults);
// next determine if s has been passed to script, if not use 0
// get results
  $query .= " limit 30";
  $result = mysql_query($query) or die("Couldn't execute query");

if ($numrows > 0) { ?>
<!-- #region Jssor Slider Begin -->
<!-- Generator: Jssor Slider Maker -->
<!-- Source: http://www.jssor.com -->
<!-- This is deep minimized code which works independently. -->
<script type="text/javascript">
(function(f,g,c,h,e,k,i){/*! Jssor */
new(function(){});var d={Ub:function(a){return a},jd:function(a){return-a*(a-2)}};var b=new function(){var j=this,F=1,wb=2,cb=3,bb=4,fb=5,G,r=0,l=0,s=0,Y=0,A=0,I=navigator,kb=I.appName,o=I.userAgent,p=parseFloat;function Fb(){if(!G){G={ye:"ontouchstart"in f||"createTouch"in g};var a;if(I.pointerEnabled||(a=I.msPointerEnabled))G.Zc=a?"msTouchAction":"touchAction"}return G}function v(i){if(!r){r=-1;if(kb=="Microsoft Internet Explorer"&&!!f.attachEvent&&!!f.ActiveXObject){var e=o.indexOf("MSIE");r=F;s=p(o.substring(e+5,o.indexOf(";",e)));/*@cc_on Y=@_jscript_version@*/;l=g.documentMode||s}else if(kb=="Netscape"&&!!f.addEventListener){var d=o.indexOf("Firefox"),b=o.indexOf("Safari"),h=o.indexOf("Chrome"),c=o.indexOf("AppleWebKit");if(d>=0){r=wb;l=p(o.substring(d+8))}else if(b>=0){var j=o.substring(0,b).lastIndexOf("/");r=h>=0?bb:cb;l=p(o.substring(j+1,b))}else{var a=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/i.exec(o);if(a){r=F;l=s=p(a[1])}}if(c>=0)A=p(o.substring(c+12))}else{var a=/(opera)(?:.*version|)[ \/]([\w.]+)/i.exec(o);if(a){r=fb;l=p(a[2])}}}return i==r}function q(){return v(F)}function vb(){return q()&&(l<6||g.compatMode=="BackCompat")}function ab(){return v(cb)}function eb(){return v(fb)}function rb(){return ab()&&A>534&&A<535}function J(){v();return A>537||l>42||r==F&&l>=11}function tb(){return q()&&l<9}function sb(a){var b,c;return function(f){if(!b){b=e;var d=a.substr(0,1).toUpperCase()+a.substr(1);n([a].concat(["WebKit","ms","Moz","O","webkit"]),function(g,e){var b=a;if(e)b=g+d;if(f.style[b]!=i)return c=b})}return c}}function qb(b){var a;return function(c){a=a||sb(b)(c)||b;return a}}var K=qb("transform");function jb(a){return{}.toString.call(a)}var gb={};n(["Boolean","Number","String","Function","Array","Date","RegExp","Object"],function(a){gb["[object "+a+"]"]=a.toLowerCase()});function n(b,d){var a,c;if(jb(b)=="[object Array]"){for(a=0;a<b.length;a++)if(c=d(b[a],a,b))return c}else for(a in b)if(c=d(b[a],a,b))return c}function D(a){return a==h?String(a):gb[jb(a)]||"object"}function B(a){try{return D(a)=="object"&&!a.nodeType&&a!=a.window&&(!a.constructor||{}.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf"))}catch(b){}}function u(a,b){return{x:a,y:b}}function nb(b,a){setTimeout(b,a||0)}function H(b,d,c){var a=!b||b=="inherit"?"":b;n(d,function(c){var b=c.exec(a);if(b){var d=a.substr(0,b.index),e=a.substr(b.index+b[0].length+1,a.length-1);a=d+e}});a=c+(!a.indexOf(" ")?"":" ")+a;return a}function pb(b,a){if(l<9)b.style.filter=a}j.ve=Fb;j.gd=q;j.ce=ab;j.zd=J;sb("transform");j.Mc=function(){return l};j.vc=nb;function V(a){a.constructor===V.caller&&a.uc&&a.uc.apply(a,V.caller.arguments)}j.uc=V;j.Sb=function(a){if(j.ue(a))a=g.getElementById(a);return a};function t(a){return a||f.event}j.tc=t;j.Rb=function(b){b=t(b);var a=b.target||b.srcElement||g;if(a.nodeType==3)a=j.rc(a);return a};j.qc=function(a){a=t(a);return{x:a.pageX||a.clientX||0,y:a.pageY||a.clientY||0}};function w(c,d,a){if(a!==i)c.style[d]=a==i?"":a;else{var b=c.currentStyle||c.style;a=b[d];if(a==""&&f.getComputedStyle){b=c.ownerDocument.defaultView.getComputedStyle(c,h);b&&(a=b.getPropertyValue(d)||b[d])}return a}}function X(b,c,a,d){if(a!==i){if(a==h)a="";else d&&(a+="px");w(b,c,a)}else return p(w(b,c))}function m(c,a){var d=a?X:w,b;if(a&4)b=qb(c);return function(e,f){return d(e,b?b(e):c,f,a&2)}}function Ab(b){if(q()&&s<9){var a=/opacity=([^)]*)/.exec(b.style.filter||"");return a?p(a[1])/100:1}else return p(b.style.opacity||"1")}function Cb(b,a,f){if(q()&&s<9){var h=b.style.filter||"",i=new RegExp(/[\s]*alpha\([^\)]*\)/g),e=c.round(100*a),d="";if(e<100||f)d="alpha(opacity="+e+") ";var g=H(h,[i],d);pb(b,g)}else b.style.opacity=a==1?"":c.round(a*100)/100}var L={R:["rotate"],F:["rotateX"],N:["rotateY"],vb:["skewX"],zb:["skewY"]};if(!J())L=C(L,{o:["scaleX",2],q:["scaleY",2],B:["translateZ",1]});function M(d,a){var c="";if(a){if(q()&&l&&l<10){delete a.F;delete a.N;delete a.B}b.f(a,function(d,b){var a=L[b];if(a){var e=a[1]||0;if(N[b]!=d)c+=" "+a[0]+"("+d+(["deg","px",""])[e]+")"}});if(J()){if(a.P||a.W||a.B!=i)c+=" translate3d("+(a.P||0)+"px,"+(a.W||0)+"px,"+(a.B||0)+"px)";if(a.o==i)a.o=1;if(a.q==i)a.q=1;if(a.o!=1||a.q!=1)c+=" scale3d("+a.o+", "+a.q+", 1)"}}d.style[K(d)]=c}j.Hc=m("transformOrigin",4);j.ke=m("backfaceVisibility",4);j.je=m("transformStyle",4);j.ie=m("perspective",6);j.he=m("perspectiveOrigin",4);j.ge=function(a,b){if(q()&&s<9||s<10&&vb())a.style.zoom=b==1?"":b;else{var c=K(a),f="scale("+b+")",e=a.style[c],g=new RegExp(/[\s]*scale\(.*?\)/g),d=H(e,[g],f);a.style[c]=d}};j.Oc=function(b,a){return function(c){c=t(c);var e=c.type,d=c.relatedTarget||(e=="mouseout"?c.toElement:c.fromElement);(!d||d!==a&&!j.ee(a,d))&&b(c)}};j.c=function(a,d,b,c){a=j.Sb(a);if(a.addEventListener){d=="mousewheel"&&a.addEventListener("DOMMouseScroll",b,c);a.addEventListener(d,b,c)}else if(a.attachEvent){a.attachEvent("on"+d,b);c&&a.setCapture&&a.setCapture()}};j.nb=function(a,c,d,b){a=j.Sb(a);if(a.removeEventListener){c=="mousewheel"&&a.removeEventListener("DOMMouseScroll",d,b);a.removeEventListener(c,d,b)}else if(a.detachEvent){a.detachEvent("on"+c,d);b&&a.releaseCapture&&a.releaseCapture()}};j.Ob=function(a){a=t(a);a.preventDefault&&a.preventDefault();a.cancel=e;a.returnValue=k};j.be=function(a){a=t(a);a.stopPropagation&&a.stopPropagation();a.cancelBubble=e};j.Db=function(d,c){var a=[].slice.call(arguments,2),b=function(){var b=a.concat([].slice.call(arguments,0));return c.apply(d,b)};return b};j.xb=function(d,c){for(var b=[],a=d.firstChild;a;a=a.nextSibling)(c||a.nodeType==1)&&b.push(a);return b};function ib(a,c,e,b){b=b||"u";for(a=a?a.firstChild:h;a;a=a.nextSibling)if(a.nodeType==1){if(S(a,b)==c)return a;if(!e){var d=ib(a,c,e,b);if(d)return d}}}j.z=ib;function db(a,c,d){for(a=a?a.firstChild:h;a;a=a.nextSibling)if(a.nodeType==1){if(a.tagName==c)return a;if(!d){var b=db(a,c,d);if(b)return b}}}j.ze=db;function C(){var e=arguments,d,c,b,a,g=1&e[0],f=1+g;d=e[f-1]||{};for(;f<e.length;f++)if(c=e[f])for(b in c){a=c[b];if(a!==i){a=c[b];var h=d[b];d[b]=g&&(B(h)||B(a))?C(g,{},h,a):a}}return d}j.Eb=C;j.Ic=function(a){return D(a)=="function"};j.ue=function(a){return D(a)=="string"};j.Ae=function(a){return!isNaN(p(a))&&isFinite(a)};j.f=n;function P(a){return g.createElement(a)}j.yb=function(){return P("DIV")};j.Gc=function(){};function T(b,c,a){if(a==i)return b.getAttribute(c);b.setAttribute(c,a)}function S(a,b){return T(a,b)||T(a,"data-"+b)}j.ub=T;j.g=S;function y(b,a){if(a==i)return b.className;b.className=a}j.Lb=y;j.rc=function(a){return a.parentNode};j.L=function(a){j.K(a,"none")};j.sb=function(a,b){j.K(a,b?"none":"")};j.wd=function(b,a){b.removeAttribute(a)};j.td=function(){return q()&&l<10};j.sd=function(d,a){if(a)d.style.clip="rect("+c.round(a.j||a.m||0)+"px "+c.round(a.s)+"px "+c.round(a.u)+"px "+c.round(a.k||a.n||0)+"px)";else if(a!==i){var g=d.style.cssText,f=[new RegExp(/[\s]*clip: rect\(.*?\)[;]?/i),new RegExp(/[\s]*cliptop: .*?[;]?/i),new RegExp(/[\s]*clipright: .*?[;]?/i),new RegExp(/[\s]*clipbottom: .*?[;]?/i),new RegExp(/[\s]*clipleft: .*?[;]?/i)],e=H(g,f,"");b.Hb(d,e)}};j.D=function(){return+new Date};j.Q=function(b,a){b.appendChild(a)};j.Fb=function(b,a,c){(c||a.parentNode).insertBefore(b,a)};j.pc=function(b,a){a=a||b.parentNode;a&&a.removeChild(b)};j.hd=function(a,b){n(a,function(a){j.pc(a,b)})};j.Lc=function(a){j.hd(j.xb(a,e),a)};j.id=function(a,b){var c=j.rc(a);b&1&&j.C(a,(j.l(c)-j.l(a))/2);b&2&&j.H(a,(j.p(c)-j.p(a))/2)};j.kd=function(b,a){return parseInt(b,a||10)};j.ld=p;j.ee=function(b,a){var c=g.body;while(a&&b!==a&&c!==a)try{a=a.parentNode}catch(d){return k}return b===a};function U(d,c,b){var a=d.cloneNode(!c);!b&&j.wd(a,"id");return a}j.fb=U;j.lb=function(d,f){var a=new Image;function b(e,d){j.nb(a,"load",b);j.nb(a,"abort",c);j.nb(a,"error",c);f&&f(a,d)}function c(a){b(a,e)}if(eb()&&l<11.6||!d)b(!d);else{j.c(a,"load",b);j.c(a,"abort",c);j.c(a,"error",c);a.src=d}};j.Od=function(d,a,e){var c=d.length+1;function b(b){c--;if(a&&b&&b.src==a.src)a=b;!c&&e&&e(a)}n(d,function(a){j.lb(a.src,b)});b()};j.G=w;j.ob=m("overflow");j.H=m("top",2);j.C=m("left",2);j.l=m("width",2);j.p=m("height",2);j.gc=m("marginLeft",2);j.Jb=m("marginTop",2);j.A=m("position");j.K=m("display");j.v=m("zIndex",1);j.fc=function(b,a,c){if(a!=i)Cb(b,a,c);else return Ab(b)};j.Hb=function(a,b){if(b!=i)a.style.cssText=b;else return a.style.cssText};j.Rd=function(b,a){if(a===i){a=w(b,"backgroundImage")||"";var c=/\burl\s*\(\s*["']?([^"'\r\n,]+)["']?\s*\)/gi.exec(a)||[];return c[1]}w(b,"backgroundImage",a?"url('"+a+"')":"")};var R={db:j.fc,j:j.H,k:j.C,qb:j.l,Ab:j.p,jb:j.A,Ne:j.K,ab:j.v};function x(f,l){var e=tb(),b=J(),d=rb(),g=K(f);function k(b,d,a){var e=b.T(u(-d/2,-a/2)),f=b.T(u(d/2,-a/2)),g=b.T(u(d/2,a/2)),h=b.T(u(-d/2,a/2));b.T(u(300,300));return u(c.min(e.x,f.x,g.x,h.x)+d/2,c.min(e.y,f.y,g.y,h.y)+a/2)}function a(d,a){a=a||{};var n=a.B||0,p=(a.F||0)%360,q=(a.N||0)%360,u=(a.R||0)%360,l=a.o,m=a.q,f=a.Oe;if(l==i)l=1;if(m==i)m=1;if(f==i)f=1;if(e){n=0;p=0;q=0;f=0}var c=new zb(a.P,a.W,n);c.F(p);c.N(q);c.Nd(u);c.Md(a.vb,a.zb);c.Ld(l,m,f);if(b){c.cb(a.n,a.m);d.style[g]=c.Kd()}else if(!Y||Y<9){var o="",h={x:0,y:0};if(a.E)h=k(c,a.E,a.U);j.Jb(d,h.y);j.gc(d,h.x);o=c.Jd();var s=d.style.filter,t=new RegExp(/[\s]*progid:DXImageTransform\.Microsoft\.Matrix\([^\)]*\)/g),r=H(s,[t],o);pb(d,r)}}x=function(e,c){c=c||{};var g=c.n,k=c.m,f;n(R,function(a,b){f=c[b];f!==i&&a(e,f)});j.sd(e,c.a);if(!b){g!=i&&j.C(e,(c.Ec||0)+g);k!=i&&j.H(e,(c.Fc||0)+k)}if(c.Id)if(d)nb(j.Db(h,M,e,c));else a(e,c)};j.eb=M;if(d)j.eb=x;if(e)j.eb=a;else if(!b)a=M;j.O=x;x(f,l)}j.eb=x;j.O=x;function zb(j,k,o){var d=this,b=[1,0,0,0,0,1,0,0,0,0,1,0,j||0,k||0,o||0,1],i=c.sin,g=c.cos,l=c.tan;function f(a){return a*c.PI/180}function n(a,b){return{x:a,y:b}}function m(c,e,l,m,o,r,t,u,w,z,A,C,E,b,f,k,a,g,i,n,p,q,s,v,x,y,B,D,F,d,h,j){return[c*a+e*p+l*x+m*F,c*g+e*q+l*y+m*d,c*i+e*s+l*B+m*h,c*n+e*v+l*D+m*j,o*a+r*p+t*x+u*F,o*g+r*q+t*y+u*d,o*i+r*s+t*B+u*h,o*n+r*v+t*D+u*j,w*a+z*p+A*x+C*F,w*g+z*q+A*y+C*d,w*i+z*s+A*B+C*h,w*n+z*v+A*D+C*j,E*a+b*p+f*x+k*F,E*g+b*q+f*y+k*d,E*i+b*s+f*B+k*h,E*n+b*v+f*D+k*j]}function e(c,a){return m.apply(h,(a||b).concat(c))}d.Ld=function(a,c,d){if(a!=1||c!=1||d!=1)b=e([a,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1])};d.cb=function(a,c,d){b[12]+=a||0;b[13]+=c||0;b[14]+=d||0};d.F=function(c){if(c){a=f(c);var d=g(a),h=i(a);b=e([1,0,0,0,0,d,h,0,0,-h,d,0,0,0,0,1])}};d.N=function(c){if(c){a=f(c);var d=g(a),h=i(a);b=e([d,0,-h,0,0,1,0,0,h,0,d,0,0,0,0,1])}};d.Nd=function(c){if(c){a=f(c);var d=g(a),h=i(a);b=e([d,h,0,0,-h,d,0,0,0,0,1,0,0,0,0,1])}};d.Md=function(a,c){if(a||c){j=f(a);k=f(c);b=e([1,l(k),0,0,l(j),1,0,0,0,0,1,0,0,0,0,1])}};d.T=function(c){var a=e(b,[1,0,0,0,0,1,0,0,0,0,1,0,c.x,c.y,0,1]);return n(a[12],a[13])};d.Kd=function(){return"matrix3d("+b.join(",")+")"};d.Jd=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+b[0]+", M12="+b[4]+", M21="+b[1]+", M22="+b[5]+", SizingMethod='auto expand')"}}new function(){var a=this;function b(d,g){for(var j=d[0].length,i=d.length,h=g[0].length,f=[],c=0;c<i;c++)for(var k=f[c]=[],b=0;b<h;b++){for(var e=0,a=0;a<j;a++)e+=d[c][a]*g[a][b];k[b]=e}return f}a.o=function(b,c){return a.Pc(b,c,0)};a.q=function(b,c){return a.Pc(b,0,c)};a.Pc=function(a,c,d){return b(a,[[c,0],[0,d]])};a.T=function(d,c){var a=b(d,[[c.x],[c.y]]);return u(a[0][0],a[1][0])}};var N={Ec:0,Fc:0,n:0,m:0,V:1,o:1,q:1,R:0,F:0,N:0,P:0,W:0,B:0,vb:0,zb:0};j.Fd=function(c,d){var a=c||{};if(c)if(b.Ic(c))a={I:a};else if(b.Ic(c.a))a.a={I:c.a};a.I=a.I||d;if(a.a)a.a.I=a.a.I||d;return a};j.Ed=function(l,m,x,q,z,A,n){var a=m;if(l){a={};for(var g in m){var B=A[g]||1,w=z[g]||[0,1],f=(x-w[0])/w[1];f=c.min(c.max(f,0),1);f=f*B;var u=c.floor(f);if(f!=u)f-=u;var j=q.I||d.Ub,k,C=l[g],o=m[g];if(b.Ae(o)){j=q[g]||j;var y=j(f);k=C+o*y}else{k=b.Eb({wb:{}},l[g]);var v=q[g]||{};b.f(o.wb||o,function(d,a){j=v[a]||v.I||j;var c=j(f),b=d*c;k.wb[a]=b;k[a]+=b})}a[g]=k}var t=b.f(m,function(b,a){return N[a]!=i});t&&b.f(N,function(c,b){if(a[b]==i&&l[b]!==i)a[b]=l[b]});if(t){if(a.V)a.o=a.q=a.V;a.E=n.E;a.U=n.U;a.Id=e}}if(m.a&&n.cb){var p=a.a.wb,s=(p.j||0)+(p.u||0),r=(p.k||0)+(p.s||0);a.k=(a.k||0)+r;a.j=(a.j||0)+s;a.a.k-=r;a.a.s-=r;a.a.j-=s;a.a.u-=s}if(a.a&&b.td()&&!a.a.j&&!a.a.k&&!a.a.m&&!a.a.n&&a.a.s==n.E&&a.a.u==n.U)a.a=h;return a}};function m(){var a=this,d=[];function i(a,b){d.push({cc:a,kc:b})}function h(a,c){b.f(d,function(b,e){b.cc==a&&b.kc===c&&d.splice(e,1)})}a.gb=a.addEventListener=i;a.removeEventListener=h;a.i=function(a){var c=[].slice.call(arguments,1);b.f(d,function(b){b.cc==a&&b.kc.apply(f,c)})}}var l=function(z,E,g,K,N,M){z=z||0;var a=this,q,o,p,u,B=0,H,I,G,C,y=0,j=0,m=0,F,l,i,d,n,D,w=[],x;function P(a){i+=a;d+=a;l+=a;j+=a;m+=a;y+=a}function t(p){var f=p;if(n)if(!D&&(f>=d||f<i)||D&&f>=n)f=((f-i)%n+n)%n+i;if(!F||u||j!=f){var h=c.min(f,d);h=c.max(h,i);if(!F||u||h!=m){if(M){var k=(h-l)/(E||1);if(g.Dd)k=1-k;var o=b.Ed(N,M,k,H,G,I,g);if(x)b.f(o,function(b,a){x[a]&&x[a](K,b)});else b.O(K,o)}a.Xb(m-l,h-l);var r=m,q=m=h;b.f(w,function(b,c){var a=f<=j?w[w.length-c-1]:b;a.M(m-y)});j=f;F=e;a.Bb(r,q)}}}function A(a,b,e){b&&a.Yb(d);if(!e){i=c.min(i,a.zc()+y);d=c.max(d,a.bc()+y)}w.push(a)}var r=f.requestAnimationFrame||f.webkitRequestAnimationFrame||f.mozRequestAnimationFrame||f.msRequestAnimationFrame;if(b.ce()&&b.Mc()<7)r=h;r=r||function(a){b.vc(a,g.Nc)};function J(){if(q){var d=b.D(),e=c.min(d-B,g.Ac),a=j+e*p;B=d;if(a*p>=o*p)a=o;t(a);if(!u&&a*p>=o*p)L(C);else r(J)}}function s(f,g,h){if(!q){q=e;u=h;C=g;f=c.max(f,i);f=c.min(f,d);o=f;p=o<j?-1:1;a.oc();B=b.D();r(J)}}function L(b){if(q){u=q=C=k;a.lc();b&&b()}}a.mc=function(a,b,c){s(a?j+a:d,b,c)};a.nc=s;a.Y=L;a.oe=function(a){s(a)};a.J=function(){return j};a.Kc=function(){return o};a.Z=function(){return m};a.M=t;a.cb=function(a){t(j+a)};a.Jc=function(){return q};a.Hd=function(a){n=a};a.Yb=P;a.Dc=function(a,b){A(a,0,b)};a.dc=function(a){A(a,1)};a.zc=function(){return i};a.bc=function(){return d};a.Bb=a.oc=a.lc=a.Xb=b.Gc;a.hc=b.D();g=b.Eb({Nc:16,Ac:50},g);n=g.ic;D=g.Vd;x=g.Ad;i=l=z;d=z+E;I=g.Bd||{};G=g.yd||{};H=b.Fd(g.mb)};new(function(){});var j=function(q,fc){var o=this;function Bc(){var a=this;l.call(a,-1e8,2e8);a.se=function(){var b=a.Z(),d=c.floor(b),f=t(d),e=b-c.floor(b);return{X:f,re:d,jb:e}};a.Bb=function(b,a){var d=c.floor(a);if(d!=a&&a>b)d++;Tb(d,e);o.i(j.qe,t(a),t(b),a,b)}}function Ac(){var a=this;l.call(a,0,0,{ic:r});b.f(A,function(b){D&1&&b.Hd(r);a.dc(b);b.Yb(kb/bc)})}function zc(){var a=this,b=Ub.S;l.call(a,-1,2,{mb:d.Ub,Ad:{jb:Zb},ic:r},b,{jb:1},{jb:-2});a.Pb=b}function mc(n,m){var b=this,d,f,g,i,c;l.call(b,-1e8,2e8,{Ac:100});b.oc=function(){O=e;R=h;o.i(j.pe,t(w.J()),w.J())};b.lc=function(){O=k;i=k;var a=w.se();o.i(j.me,t(w.J()),w.J());!a.jb&&Dc(a.re,s)};b.Bb=function(j,h){var b;if(i)b=c;else{b=f;if(g){var e=h/g;b=a.bd(e)*(f-d)+d}}w.M(b)};b.Cb=function(a,e,c,h){d=a;f=e;g=c;w.M(a);b.M(0);b.nc(c,h)};b.fe=function(a){i=e;c=a;b.mc(a,h,e)};b.de=function(a){c=a};w=new Bc;w.Dc(n);w.Dc(m)}function oc(){var c=this,a=Xb();b.v(a,0);b.G(a,"pointerEvents","none");c.S=a;c.tb=function(){b.L(a);b.Lc(a)}}function xc(n,f){var d=this,q,N,v,i,y=[],x,C,W,H,S,F,g,w,p;l.call(d,-u,u+1,{});function E(a){q&&q.cd();T(n,a,0);F=e;q=new J.ib(n,J,b.ld(b.g(n,"idle"))||lc,!I);q.M(0)}function Z(){q.hc<J.hc&&E()}function O(p,r,n){if(!H){H=e;if(i&&n){var g=n.width,c=n.height,m=g,l=c;if(g&&c&&a.hb){if(a.hb&3&&(!(a.hb&4)||g>L||c>K)){var h=k,q=L/K*c/g;if(a.hb&1)h=q>1;else if(a.hb&2)h=q<1;m=h?g*K/c:L;l=h?K:c*L/g}b.l(i,m);b.p(i,l);b.H(i,(K-l)/2);b.C(i,(L-m)/2)}b.A(i,"absolute");o.i(j.ae,f)}}b.L(r);p&&p(d)}function Y(b,c,e,g){if(g==R&&s==f&&I)if(!Cc){var a=t(b);B.Ce(a,f,c,d,e);c.xe();U.Yb(a-U.zc()-1);U.M(a);z.Cb(b,b,0)}}function bb(b){if(b==R&&s==f){if(!g){var a=h;if(B)if(B.X==f)a=B.ne();else B.tb();Z();g=new vc(n,f,a,q);g.Yc(p)}!g.Jc()&&g.Mb()}}function G(e,i,l){if(e==f){if(e!=i)A[i]&&A[i].fd();else!l&&g&&g.Be();p&&p.Bc();var m=R=b.D();d.lb(b.Db(h,bb,m))}else{var k=c.min(f,e),j=c.max(f,e),o=c.min(j-k,k+r-j),n=u+a.Yd-1;(!S||o<=n)&&d.lb()}}function db(){if(s==f&&g){g.Y();p&&p.Wd();p&&p.xd();g.ed()}}function eb(){s==f&&g&&g.Y()}function ab(a){!P&&o.i(j.vd,f,a)}function Q(){p=w.pInstance;g&&g.Yc(p)}d.lb=function(c,a){a=a||v;if(y.length&&!H){b.sb(a);if(!W){W=e;o.i(j.rd,f);b.f(y,function(a){if(!b.ub(a,"src")){a.src=b.g(a,"src2")||"";b.K(a,a["display-origin"])}})}b.Od(y,i,b.Db(h,O,c,a))}else O(c,a)};d.nd=function(){var j=f;if(a.Tb<0)j-=r;var e=j+a.Tb*tc;if(D&2)e=t(e);if(!(D&1)&&!ib)e=c.max(0,c.min(e,r-u));if(e!=f){if(B){var g=B.De(r);if(g){var k=R=b.D(),i=A[t(e)];return i.lb(b.Db(h,Y,e,i,g,k),v)}}cb(e)}else if(a.Ib){d.fd();G(f,f)}};d.Gb=function(){G(f,f,e)};d.fd=function(){p&&p.Wd();p&&p.xd();d.ad();g&&g.od();g=h;E()};d.xe=function(){b.L(n)};d.ad=function(){b.sb(n)};d.md=function(){p&&p.Bc()};function T(a,d,f,c){if(b.ub(a,"jssor-slider"))return;if(!F){if(a.tagName=="IMG"){y.push(a);if(!b.ub(a,"src")){S=e;a["display-origin"]=b.K(a);b.L(a)}}var g=b.Rd(a);if(g){var h=new Image;b.g(h,"src2",g);y.push(h)}if(f){c=a.style.pointerEvents||b.Lb(a);!c&&b.G(a,"pointerEvents",a.tagName=="A"?"all":"none");b.v(a,(b.v(a)||0)+1);b.Jb(a,b.Jb(a)||0);b.gc(a,b.gc(a)||0);b.eb(a,{B:0})}}var j=b.xb(a);b.f(j,function(g){var j=g.tagName,l=b.g(g,"u");if(l=="player"&&!w){w=g;if(w.pInstance)Q();else b.c(w,"dataavailable",Q)}if(l=="caption"){if(d){b.Hc(g,b.g(g,"to"));b.ke(g,b.g(g,"bf"));b.g(g,"3d")&&b.je(g,"preserve-3d")}else if(!b.gd()){var h=b.fb(g,k,e);b.Fb(h,g,a);b.pc(g,a);g=h;d=e}}else if(!F&&!f&&!i){if(j=="A"){if(b.g(g,"u")=="image")i=b.ze(g,"IMG");else i=b.z(g,"image",e);if(i){x=g;b.K(x,"block");b.O(x,V);C=b.fb(x,e);b.A(x,"relative");b.fc(C,0);b.G(C,"backgroundColor","#000")}}else if(j=="IMG"&&b.g(g,"u")=="image")i=g;if(i){i.border=0;b.O(i,V)}}T(g,d,f+1,c)})}d.Xb=function(c,b){var a=u-b;Zb(N,a)};d.X=f;m.call(d);b.ie(n,b.g(n,"p"));b.he(n,b.g(n,"po"));var M=b.z(n,"thumb",e);if(M){b.fb(M);b.L(M)}b.sb(n);v=b.fb(gb);b.v(v,1e3);b.c(n,"click",ab);E(e);d.we=i;d.dd=C;d.Pb=N=n;b.Q(N,v);o.gb(203,G);o.gb(28,eb);o.gb(24,db)}function vc(y,f,p,q){var a=this,m=0,u=0,g,h,d,c,i,t,r,n=A[f];l.call(a,0,0);function v(){b.Lc(N);cc&&i&&n.dd&&b.Q(N,n.dd);b.sb(N,!i&&n.we)}function w(){a.Mb()}function x(b){r=b;a.Y();a.Mb()}a.Mb=function(){var b=a.Z();if(!C&&!O&&!r&&s==f){if(!b){if(g&&!i){i=e;a.ed(e);o.i(j.pd,f,m,u,g,c)}v()}var k,p=j.Rc;if(b!=c)if(b==d)k=c;else if(b==h)k=d;else if(!b)k=h;else k=a.Kc();o.i(p,f,b,m,h,d,c);var l=I&&(!E||F);if(b==c)(d!=c&&!(E&12)||l)&&n.nd();else(l||b!=d)&&a.nc(k,w)}};a.Be=function(){d==c&&d==a.Z()&&a.M(h)};a.od=function(){B&&B.X==f&&B.tb();var b=a.Z();b<c&&o.i(j.Rc,f,-b-1,m,h,d,c)};a.ed=function(a){p&&b.ob(lb,a&&p.wc.Me?"":"hidden")};a.Xb=function(b,a){if(i&&a>=g){i=k;v();n.ad();B.tb();o.i(j.Ud,f,m,u,g,c)}o.i(j.Td,f,a,m,h,d,c)};a.Yc=function(a){if(a&&!t){t=a;a.gb($JssorPlayer$.ud,x)}};p&&a.dc(p);g=a.bc();a.dc(q);h=g+q.Vc;c=a.bc();d=I?g+q.Uc:c}function Kb(a,c,d){b.C(a,c);b.H(a,d)}function Zb(c,b){var a=x>0?x:fb,d=zb*b*(a&1),e=Ab*b*(a>>1&1);Kb(c,d,e)}function Pb(){qb=O;Ib=z.Kc();G=w.J()}function gc(){Pb();if(C||!F&&E&12){z.Y();o.i(j.Sd)}}function ec(f){if(!C&&(F||!(E&12))&&!z.Jc()){var d=w.J(),b=c.ceil(G);if(f&&c.abs(H)>=a.Sc){b=c.ceil(d);b+=jb}if(!(D&1))b=c.min(r-u,c.max(b,0));var e=c.abs(b-d);e=1-c.pow(1-e,5);if(!P&&qb)z.oe(Ib);else if(d==b){tb.md();tb.Gb()}else z.Cb(d,b,e*Vb)}}function Hb(a){!b.g(b.Rb(a),"nodrag")&&b.Ob(a)}function rc(a){Yb(a,1)}function Yb(a,c){a=b.tc(a);var i=b.Rb(a);if(!M&&!b.g(i,"nodrag")&&sc()&&(!c||a.touches.length==1)){C=e;yb=k;R=h;b.c(g,c?"touchmove":"mousemove",Bb);b.D();P=0;gc();if(!qb)x=0;if(c){var f=a.touches[0];ub=f.clientX;vb=f.clientY}else{var d=b.qc(a);ub=d.x;vb=d.y}H=0;hb=0;jb=0;o.i(j.Qd,t(G),G,a)}}function Bb(d){if(C){d=b.tc(d);var f;if(d.type!="mousemove"){var l=d.touches[0];f={x:l.clientX,y:l.clientY}}else f=b.qc(d);if(f){var j=f.x-ub,k=f.y-vb;if(c.floor(G)!=G)x=x||fb&M;if((j||k)&&!x){if(M==3)if(c.abs(k)>c.abs(j))x=2;else x=1;else x=M;if(ob&&x==1&&c.abs(k)-c.abs(j)>3)yb=e}if(x){var a=k,i=Ab;if(x==1){a=j;i=zb}if(!(D&1)){if(a>0){var g=i*s,h=a-g;if(h>0)a=g+c.sqrt(h)*5}if(a<0){var g=i*(r-u-s),h=-a-g;if(h>0)a=-g-c.sqrt(h)*5}}if(H-hb<-2)jb=0;else if(H-hb>2)jb=-1;hb=H;H=a;sb=G-H/i/(Y||1);if(H&&x&&!yb){b.Ob(d);if(!O)z.fe(sb);else z.de(sb)}}}}}function bb(){qc();if(C){C=k;b.D();b.nb(g,"mousemove",Bb);b.nb(g,"touchmove",Bb);P=H;z.Y();var a=w.J();o.i(j.Xd,t(a),a,t(G),G);E&12&&Pb();ec(e)}}function jc(c){if(P){b.be(c);var a=b.Rb(c);while(a&&v!==a){a.tagName=="A"&&b.Ob(c);try{a=a.parentNode}catch(d){break}}}}function Jb(a){A[s];s=t(a);tb=A[s];Tb(a);return s}function Dc(a,b){x=0;Jb(a);o.i(j.Pd,t(a),b)}function Tb(a,c){wb=a;b.f(S,function(b){b.ec(t(a),a,c)})}function sc(){var b=j.Wc||0,a=X;if(ob)a&1&&(a&=1);j.Wc|=a;return M=a&~b}function qc(){if(M){j.Wc&=~X;M=0}}function Xb(){var a=b.yb();b.O(a,V);b.A(a,"absolute");return a}function t(a){return(a%r+r)%r}function kc(b,d){if(d)if(!D){b=c.min(c.max(b+wb,0),r-u);d=k}else if(D&2){b=t(b+wb);d=k}cb(b,a.pb,d)}function xb(){b.f(S,function(a){a.jc(a.rb.Fe<=F)})}function hc(){if(!F){F=1;xb();if(!C){E&12&&ec();E&3&&A[s]&&A[s].Gb()}}}function Ec(){if(F){F=0;xb();C||!(E&12)||gc()}}function ic(){V={qb:L,Ab:K,j:0,k:0};b.f(T,function(a){b.O(a,V);b.A(a,"absolute");b.ob(a,"hidden");b.L(a)});b.O(gb,V)}function ab(b,a){cb(b,a,e)}function cb(g,f,l){if(Rb&&(!C&&(F||!(E&12))||a.Xc)){O=e;C=k;z.Y();if(f==i)f=Vb;var d=Cb.Z(),b=g;if(l){b=d+g;if(g>0)b=c.ceil(b);else b=c.floor(b)}if(D&2)b=t(b);if(!(D&1))b=c.max(0,c.min(b,r-u));var j=(b-d)%r;b=d+j;var h=d==b?0:f*c.abs(j);h=c.min(h,f*u*1.5);z.Cb(d,b,h||1)}}o.mc=function(){if(!I){I=e;A[s]&&A[s].Gb()}};function W(){return b.l(y||q)}function nb(){return b.p(y||q)}o.E=W;o.U=nb;function Eb(c,d){if(c==i)return b.l(q);if(!y){var a=b.yb(g);b.Lb(a,b.Lb(q));b.Hb(a,b.Hb(q));b.K(a,"block");b.A(a,"relative");b.H(a,0);b.C(a,0);b.ob(a,"visible");y=b.yb(g);b.A(y,"absolute");b.H(y,0);b.C(y,0);b.l(y,b.l(q));b.p(y,b.p(q));b.Hc(y,"0 0");b.Q(y,a);var h=b.xb(q);b.Q(q,y);b.G(q,"backgroundImage","");b.f(h,function(c){b.Q(b.g(c,"noscale")?q:a,c);b.g(c,"autocenter")&&Lb.push(c)})}Y=c/(d?b.p:b.l)(y);b.ge(y,Y);var f=d?Y*W():c,e=d?c:Y*nb();b.l(q,f);b.p(q,e);b.f(Lb,function(a){var c=b.kd(b.g(a,"autocenter"));b.id(a,c)})}o.Cd=Eb;m.call(o);o.S=q=b.Sb(q);var a=b.Eb({hb:0,Yd:1,Wb:1,Zb:0,ac:k,Ib:1,kb:e,Xc:e,Tb:1,Qc:3e3,Nb:1,pb:500,bd:d.jd,Sc:20,Tc:0,bb:1,xc:0,te:1,Qb:1,sc:1},fc);a.kb=a.kb&&b.zd();if(a.yc!=i)a.Qc=a.yc;if(a.le!=i)a.xc=a.le;var fb=a.Qb&3,tc=(a.Qb&4)/-4||1,mb=a.Ee,J=b.Eb({ib:p,kb:a.kb},a.Ge);J.Vb=J.Vb||J.Le;var Fb=a.Ke,Z=a.Ie,eb=a.He,Q=!a.te,y,v=b.z(q,"slides",Q),gb=b.z(q,"loading",Q)||b.yb(g),Nb=b.z(q,"navigator",Q),dc=b.z(q,"arrowleft",Q),ac=b.z(q,"arrowright",Q),Mb=b.z(q,"thumbnavigator",Q),pc=b.l(v),nc=b.p(v),V,T=[],uc=b.xb(v);b.f(uc,function(a){a.tagName=="DIV"&&!b.g(a,"u")&&T.push(a);b.v(a,(b.v(a)||0)+1)});var s=-1,wb,tb,r=T.length,L=a.Cc||pc,K=a.qd||nc,Wb=a.Tc,zb=L+Wb,Ab=K+Wb,bc=fb&1?zb:Ab,u=c.min(a.bb,r),lb,x,M,yb,S=[],Qb,Sb,Ob,cc,Cc,I,E=a.Nb,lc=a.Qc,Vb=a.pb,rb,ib,kb,Rb=u<r,D=Rb?a.Ib:0,X,P,F=1,O,C,R,ub=0,vb=0,H,hb,jb,Cb,w,U,z,Ub=new oc,Y,Lb=[];if(r){if(a.kb)Kb=function(a,c,d){b.eb(a,{P:c,W:d})};I=a.ac;o.rb=fc;ic();b.ub(q,"jssor-slider",e);b.v(v,b.v(v)||0);b.A(v,"absolute");lb=b.fb(v,e);b.Fb(lb,v);if(mb){cc=mb.Je;rb=mb.ib;ib=u==1&&r>1&&rb&&(!b.gd()||b.Mc()>=8)}kb=ib||u>=r||!(D&1)?0:a.xc;X=(u>1||kb?fb:-1)&a.sc;var Gb=v,A=[],B,N,Db=b.ve(),ob=Db.ye,G,qb,Ib,sb;Db.Zc&&b.G(Gb,Db.Zc,([h,"pan-y","pan-x","none"])[X]||"");U=new zc;if(ib)B=new rb(Ub,L,K,mb,ob);b.Q(lb,U.Pb);b.ob(v,"hidden");N=Xb();b.G(N,"backgroundColor","#000");b.fc(N,0);b.Fb(N,Gb.firstChild,Gb);for(var db=0;db<T.length;db++){var wc=T[db],yc=new xc(wc,db);A.push(yc)}b.L(gb);Cb=new Ac;z=new mc(Cb,U);b.c(v,"click",jc,e);b.c(q,"mouseout",b.Oc(hc,q));b.c(q,"mouseover",b.Oc(Ec,q));if(X){b.c(v,"mousedown",Yb);b.c(v,"touchstart",rc);b.c(v,"dragstart",Hb);b.c(v,"selectstart",Hb);b.c(g,"mouseup",bb);b.c(g,"touchend",bb);b.c(g,"touchcancel",bb);b.c(f,"blur",bb)}E&=ob?10:5;if(Nb&&Fb){Qb=new Fb.ib(Nb,Fb,W(),nb());S.push(Qb)}if(Z&&dc&&ac){Z.Ib=D;Z.bb=u;Sb=new Z.ib(dc,ac,Z,W(),nb());S.push(Sb)}if(Mb&&eb){eb.Zb=a.Zb;Ob=new eb.ib(Mb,eb);S.push(Ob)}b.f(S,function(a){a.Kb(r,A,gb);a.gb(n.Zd,kc)});b.G(q,"visibility","visible");Eb(W());xb();a.Wb&&b.c(g,"keydown",function(b){if(b.keyCode==37)ab(-a.Wb);else b.keyCode==39&&ab(a.Wb)});var pb=a.Zb;if(!(D&1))pb=c.max(0,c.min(pb,r-u));z.Cb(pb,pb,0)}};j.vd=21;j.Qd=22;j.Xd=23;j.pe=24;j.me=25;j.rd=26;j.ae=27;j.Sd=28;j.qe=202;j.Pd=203;j.pd=206;j.Ud=207;j.Td=208;j.Rc=209;var n={Zd:1};function p(e,d,c){var a=this;l.call(a,0,c);a.cd=b.Gc;a.Vc=0;a.Uc=c}jssor_1_slider_init=function(){var h={ac:e,yc:0,Tb:4,pb:2500,bd:d.Ub,Nb:4,Cc:140,bb:7},g=new j("jssor_1",h);function a(){var b=g.S.parentNode.clientWidth;if(b){b=c.min(b,809);g.Cd(b)}else f.setTimeout(a,30)}a();b.c(f,"load",a);b.c(f,"resize",a);b.c(f,"orientationchange",a)}})(window,document,Math,null,true,false)
</script>
<style>

</style>
<div id="container" style="position:relative;margin:0 auto;top:0px;left:0px;width:822px;height:120px;overflow:hidden;">
<div style="position:absolute;display:block;background:url('http://gimplearn.net/styles/prosilver/template/img/filmstrip.jpg') no-repeat center center;top:0px;left:0px;width:100%;height:100%;"></div>

<div id="jssor_1" style="position:relative;margin:0 auto;top:18px;left:0px;width:980px;height:100px;overflow:hidden;visibility:hidden;">
<!-- Loading Screen -->
<div data-u="loading" style="position:absolute;top:0px;left:0px;background-color:rgba(0,0,0,0.7);">
<div style="filter: alpha(opacity=70); opacity: 0.7; position: absolute; display: block; top: 0px; left: 0px; width: 100%; height: 100%;"></div>
<div style="position:absolute;display:block;background:url('http://gimplearn.net/styles/prosilver/template/img/loading.gif') no-repeat center center;top:0px;left:0px;width:100%;height:100%;"></div>
</div>
<div data-u="slides" style="cursor:default;position:relative;top:0px;left:0px;width:980px;height:100px;overflow:hidden;">
<a data-u="any" href="http://www.jssor.com" style="display:none">Scrolling Logo Thumbnail Slider</a>
<?php } ?>

<?php
// now you can display the results returned
  while ($row= mysql_fetch_array($result)) {
  $filename = $row["physical_filename"];
  $postid = $row["post_msg_id"];
  $attachid = $row["attach_id"];
  echo '<div><a title="Latest 30 image attachments
Click to go to post"  href="http://gimplearn.net/viewtopic.php?p='.$postid.'#p'.$postid.'"><img data-u="image" src="http://gimplearn.net/download/file.php?id='.$attachid.'"/></a></div>';
  }
?>
<?php if ($numrows > 0) { ?>
</div>
</div>
</div>
<script type="text/javascript">jssor_1_slider_init();</script>
<!-- #endregion Jssor Slider End -->
<?php } ?>
0 x



aka Tin
Image gimplearn.net                                              

User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/6
Posts: 2157
Joined: 26 Sep 2016, 00:16
Cash on hand: 7,894.01 GLP
Bank: 51,356.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1196
x 256
Contact:
Canada

Post#5 by tim » 14 Feb 2017, 02:31


This code will look through latest attachments, and 1st [img] tags of posts to include them in the latest/newest 30 images.

Code: Select all

<?php $forum_id = request_var('f', 0);?>
<?php

  
//connect to your database
mysql_connect('localhost','bakon306_phpb537','password'); //(host, username, password)

//specify database
mysql_select_db('bakon306_phpb537') or die("Unable to select database"); //select which database we're using

// Build SQL Query  
/*$query = "SELECT a.post_msg_id,a.physical_filename,a.attach_id
FROM `phpbbsf_attachments` a 
INNER JOIN `phpbbsf_posts` p ON p.post_id = a.post_msg_id
INNER JOIN `phpbbsf_forums` f ON p.forum_id = f.forum_id
WHERE a.mimetype like 'image%'
AND (0 = ".$forum_id."
     OR f.forum_id = ".$forum_id."
	 OR f.parent_id = ".$forum_id.")

ORDER BY a.filetime DESC"  ;
*/
$query = "SELECT post_msg_id,attach_id,filetime,post_text FROM
(SELECT p.post_id as post_msg_id,-1 as attach_id,p.post_modified as filetime,p.post_text
FROM `phpbbsf_posts` p
INNER JOIN `phpbbsf_forums` f ON p.forum_id = f.forum_id
WHERE p.post_text like '%<IMG src=%'
AND (0 = ".$forum_id."
     OR f.forum_id = ".$forum_id."
	 OR f.parent_id = ".$forum_id.")
ORDER BY p.post_modified DESC
LIMIT 30)A
UNION
SELECT * FROM 
(SELECT a.post_msg_id,a.attach_id,a.filetime,'' as post_text
FROM `phpbbsf_attachments` a 
INNER JOIN `phpbbsf_posts` p ON p.post_id = a.post_msg_id
INNER JOIN `phpbbsf_forums` f ON p.forum_id = f.forum_id
WHERE a.mimetype like 'image%'
AND (0 = ".$forum_id."
     OR f.forum_id = ".$forum_id."
	 OR f.parent_id = ".$forum_id.")
ORDER BY a.filetime DESC LIMIT 30)B


ORDER BY filetime DESC";

 $numresults=mysql_query($query);
 $numrows=mysql_num_rows($numresults);
// next determine if s has been passed to script, if not use 0
// get results
  $query .= " limit 30";
  $result = mysql_query($query) or die("Couldn't execute query");

if ($numrows > 0) { ?>
<!-- #region Jssor Slider Begin -->
<!-- Generator: Jssor Slider Maker -->
<!-- Source: http://www.jssor.com -->
<!-- This is deep minimized code which works independently. -->
<script type="text/javascript">
(function(f,g,c,h,e,k,i){/*! Jssor */
new(function(){});var d={Ub:function(a){return a},jd:function(a){return-a*(a-2)}};var b=new function(){var j=this,F=1,wb=2,cb=3,bb=4,fb=5,G,r=0,l=0,s=0,Y=0,A=0,I=navigator,kb=I.appName,o=I.userAgent,p=parseFloat;function Fb(){if(!G){G={ye:"ontouchstart"in f||"createTouch"in g};var a;if(I.pointerEnabled||(a=I.msPointerEnabled))G.Zc=a?"msTouchAction":"touchAction"}return G}function v(i){if(!r){r=-1;if(kb=="Microsoft Internet Explorer"&&!!f.attachEvent&&!!f.ActiveXObject){var e=o.indexOf("MSIE");r=F;s=p(o.substring(e+5,o.indexOf(";",e)));/*@cc_on Y=@_jscript_version@*/;l=g.documentMode||s}else if(kb=="Netscape"&&!!f.addEventListener){var d=o.indexOf("Firefox"),b=o.indexOf("Safari"),h=o.indexOf("Chrome"),c=o.indexOf("AppleWebKit");if(d>=0){r=wb;l=p(o.substring(d+8))}else if(b>=0){var j=o.substring(0,b).lastIndexOf("/");r=h>=0?bb:cb;l=p(o.substring(j+1,b))}else{var a=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/i.exec(o);if(a){r=F;l=s=p(a[1])}}if(c>=0)A=p(o.substring(c+12))}else{var a=/(opera)(?:.*version|)[ \/]([\w.]+)/i.exec(o);if(a){r=fb;l=p(a[2])}}}return i==r}function q(){return v(F)}function vb(){return q()&&(l<6||g.compatMode=="BackCompat")}function ab(){return v(cb)}function eb(){return v(fb)}function rb(){return ab()&&A>534&&A<535}function J(){v();return A>537||l>42||r==F&&l>=11}function tb(){return q()&&l<9}function sb(a){var b,c;return function(f){if(!b){b=e;var d=a.substr(0,1).toUpperCase()+a.substr(1);n([a].concat(["WebKit","ms","Moz","O","webkit"]),function(g,e){var b=a;if(e)b=g+d;if(f.style[b]!=i)return c=b})}return c}}function qb(b){var a;return function(c){a=a||sb(b)(c)||b;return a}}var K=qb("transform");function jb(a){return{}.toString.call(a)}var gb={};n(["Boolean","Number","String","Function","Array","Date","RegExp","Object"],function(a){gb["[object "+a+"]"]=a.toLowerCase()});function n(b,d){var a,c;if(jb(b)=="[object Array]"){for(a=0;a<b.length;a++)if(c=d(b[a],a,b))return c}else for(a in b)if(c=d(b[a],a,b))return c}function D(a){return a==h?String(a):gb[jb(a)]||"object"}function B(a){try{return D(a)=="object"&&!a.nodeType&&a!=a.window&&(!a.constructor||{}.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf"))}catch(b){}}function u(a,b){return{x:a,y:b}}function nb(b,a){setTimeout(b,a||0)}function H(b,d,c){var a=!b||b=="inherit"?"":b;n(d,function(c){var b=c.exec(a);if(b){var d=a.substr(0,b.index),e=a.substr(b.index+b[0].length+1,a.length-1);a=d+e}});a=c+(!a.indexOf(" ")?"":" ")+a;return a}function pb(b,a){if(l<9)b.style.filter=a}j.ve=Fb;j.gd=q;j.ce=ab;j.zd=J;sb("transform");j.Mc=function(){return l};j.vc=nb;function V(a){a.constructor===V.caller&&a.uc&&a.uc.apply(a,V.caller.arguments)}j.uc=V;j.Sb=function(a){if(j.ue(a))a=g.getElementById(a);return a};function t(a){return a||f.event}j.tc=t;j.Rb=function(b){b=t(b);var a=b.target||b.srcElement||g;if(a.nodeType==3)a=j.rc(a);return a};j.qc=function(a){a=t(a);return{x:a.pageX||a.clientX||0,y:a.pageY||a.clientY||0}};function w(c,d,a){if(a!==i)c.style[d]=a==i?"":a;else{var b=c.currentStyle||c.style;a=b[d];if(a==""&&f.getComputedStyle){b=c.ownerDocument.defaultView.getComputedStyle(c,h);b&&(a=b.getPropertyValue(d)||b[d])}return a}}function X(b,c,a,d){if(a!==i){if(a==h)a="";else d&&(a+="px");w(b,c,a)}else return p(w(b,c))}function m(c,a){var d=a?X:w,b;if(a&4)b=qb(c);return function(e,f){return d(e,b?b(e):c,f,a&2)}}function Ab(b){if(q()&&s<9){var a=/opacity=([^)]*)/.exec(b.style.filter||"");return a?p(a[1])/100:1}else return p(b.style.opacity||"1")}function Cb(b,a,f){if(q()&&s<9){var h=b.style.filter||"",i=new RegExp(/[\s]*alpha\([^\)]*\)/g),e=c.round(100*a),d="";if(e<100||f)d="alpha(opacity="+e+") ";var g=H(h,[i],d);pb(b,g)}else b.style.opacity=a==1?"":c.round(a*100)/100}var L={R:["rotate"],F:["rotateX"],N:["rotateY"],vb:["skewX"],zb:["skewY"]};if(!J())L=C(L,{o:["scaleX",2],q:["scaleY",2],B:["translateZ",1]});function M(d,a){var c="";if(a){if(q()&&l&&l<10){delete a.F;delete a.N;delete a.B}b.f(a,function(d,b){var a=L[b];if(a){var e=a[1]||0;if(N[b]!=d)c+=" "+a[0]+"("+d+(["deg","px",""])[e]+")"}});if(J()){if(a.P||a.W||a.B!=i)c+=" translate3d("+(a.P||0)+"px,"+(a.W||0)+"px,"+(a.B||0)+"px)";if(a.o==i)a.o=1;if(a.q==i)a.q=1;if(a.o!=1||a.q!=1)c+=" scale3d("+a.o+", "+a.q+", 1)"}}d.style[K(d)]=c}j.Hc=m("transformOrigin",4);j.ke=m("backfaceVisibility",4);j.je=m("transformStyle",4);j.ie=m("perspective",6);j.he=m("perspectiveOrigin",4);j.ge=function(a,b){if(q()&&s<9||s<10&&vb())a.style.zoom=b==1?"":b;else{var c=K(a),f="scale("+b+")",e=a.style[c],g=new RegExp(/[\s]*scale\(.*?\)/g),d=H(e,[g],f);a.style[c]=d}};j.Oc=function(b,a){return function(c){c=t(c);var e=c.type,d=c.relatedTarget||(e=="mouseout"?c.toElement:c.fromElement);(!d||d!==a&&!j.ee(a,d))&&b(c)}};j.c=function(a,d,b,c){a=j.Sb(a);if(a.addEventListener){d=="mousewheel"&&a.addEventListener("DOMMouseScroll",b,c);a.addEventListener(d,b,c)}else if(a.attachEvent){a.attachEvent("on"+d,b);c&&a.setCapture&&a.setCapture()}};j.nb=function(a,c,d,b){a=j.Sb(a);if(a.removeEventListener){c=="mousewheel"&&a.removeEventListener("DOMMouseScroll",d,b);a.removeEventListener(c,d,b)}else if(a.detachEvent){a.detachEvent("on"+c,d);b&&a.releaseCapture&&a.releaseCapture()}};j.Ob=function(a){a=t(a);a.preventDefault&&a.preventDefault();a.cancel=e;a.returnValue=k};j.be=function(a){a=t(a);a.stopPropagation&&a.stopPropagation();a.cancelBubble=e};j.Db=function(d,c){var a=[].slice.call(arguments,2),b=function(){var b=a.concat([].slice.call(arguments,0));return c.apply(d,b)};return b};j.xb=function(d,c){for(var b=[],a=d.firstChild;a;a=a.nextSibling)(c||a.nodeType==1)&&b.push(a);return b};function ib(a,c,e,b){b=b||"u";for(a=a?a.firstChild:h;a;a=a.nextSibling)if(a.nodeType==1){if(S(a,b)==c)return a;if(!e){var d=ib(a,c,e,b);if(d)return d}}}j.z=ib;function db(a,c,d){for(a=a?a.firstChild:h;a;a=a.nextSibling)if(a.nodeType==1){if(a.tagName==c)return a;if(!d){var b=db(a,c,d);if(b)return b}}}j.ze=db;function C(){var e=arguments,d,c,b,a,g=1&e[0],f=1+g;d=e[f-1]||{};for(;f<e.length;f++)if(c=e[f])for(b in c){a=c[b];if(a!==i){a=c[b];var h=d[b];d[b]=g&&(B(h)||B(a))?C(g,{},h,a):a}}return d}j.Eb=C;j.Ic=function(a){return D(a)=="function"};j.ue=function(a){return D(a)=="string"};j.Ae=function(a){return!isNaN(p(a))&&isFinite(a)};j.f=n;function P(a){return g.createElement(a)}j.yb=function(){return P("DIV")};j.Gc=function(){};function T(b,c,a){if(a==i)return b.getAttribute(c);b.setAttribute(c,a)}function S(a,b){return T(a,b)||T(a,"data-"+b)}j.ub=T;j.g=S;function y(b,a){if(a==i)return b.className;b.className=a}j.Lb=y;j.rc=function(a){return a.parentNode};j.L=function(a){j.K(a,"none")};j.sb=function(a,b){j.K(a,b?"none":"")};j.wd=function(b,a){b.removeAttribute(a)};j.td=function(){return q()&&l<10};j.sd=function(d,a){if(a)d.style.clip="rect("+c.round(a.j||a.m||0)+"px "+c.round(a.s)+"px "+c.round(a.u)+"px "+c.round(a.k||a.n||0)+"px)";else if(a!==i){var g=d.style.cssText,f=[new RegExp(/[\s]*clip: rect\(.*?\)[;]?/i),new RegExp(/[\s]*cliptop: .*?[;]?/i),new RegExp(/[\s]*clipright: .*?[;]?/i),new RegExp(/[\s]*clipbottom: .*?[;]?/i),new RegExp(/[\s]*clipleft: .*?[;]?/i)],e=H(g,f,"");b.Hb(d,e)}};j.D=function(){return+new Date};j.Q=function(b,a){b.appendChild(a)};j.Fb=function(b,a,c){(c||a.parentNode).insertBefore(b,a)};j.pc=function(b,a){a=a||b.parentNode;a&&a.removeChild(b)};j.hd=function(a,b){n(a,function(a){j.pc(a,b)})};j.Lc=function(a){j.hd(j.xb(a,e),a)};j.id=function(a,b){var c=j.rc(a);b&1&&j.C(a,(j.l(c)-j.l(a))/2);b&2&&j.H(a,(j.p(c)-j.p(a))/2)};j.kd=function(b,a){return parseInt(b,a||10)};j.ld=p;j.ee=function(b,a){var c=g.body;while(a&&b!==a&&c!==a)try{a=a.parentNode}catch(d){return k}return b===a};function U(d,c,b){var a=d.cloneNode(!c);!b&&j.wd(a,"id");return a}j.fb=U;j.lb=function(d,f){var a=new Image;function b(e,d){j.nb(a,"load",b);j.nb(a,"abort",c);j.nb(a,"error",c);f&&f(a,d)}function c(a){b(a,e)}if(eb()&&l<11.6||!d)b(!d);else{j.c(a,"load",b);j.c(a,"abort",c);j.c(a,"error",c);a.src=d}};j.Od=function(d,a,e){var c=d.length+1;function b(b){c--;if(a&&b&&b.src==a.src)a=b;!c&&e&&e(a)}n(d,function(a){j.lb(a.src,b)});b()};j.G=w;j.ob=m("overflow");j.H=m("top",2);j.C=m("left",2);j.l=m("width",2);j.p=m("height",2);j.gc=m("marginLeft",2);j.Jb=m("marginTop",2);j.A=m("position");j.K=m("display");j.v=m("zIndex",1);j.fc=function(b,a,c){if(a!=i)Cb(b,a,c);else return Ab(b)};j.Hb=function(a,b){if(b!=i)a.style.cssText=b;else return a.style.cssText};j.Rd=function(b,a){if(a===i){a=w(b,"backgroundImage")||"";var c=/\burl\s*\(\s*["']?([^"'\r\n,]+)["']?\s*\)/gi.exec(a)||[];return c[1]}w(b,"backgroundImage",a?"url('"+a+"')":"")};var R={db:j.fc,j:j.H,k:j.C,qb:j.l,Ab:j.p,jb:j.A,Ne:j.K,ab:j.v};function x(f,l){var e=tb(),b=J(),d=rb(),g=K(f);function k(b,d,a){var e=b.T(u(-d/2,-a/2)),f=b.T(u(d/2,-a/2)),g=b.T(u(d/2,a/2)),h=b.T(u(-d/2,a/2));b.T(u(300,300));return u(c.min(e.x,f.x,g.x,h.x)+d/2,c.min(e.y,f.y,g.y,h.y)+a/2)}function a(d,a){a=a||{};var n=a.B||0,p=(a.F||0)%360,q=(a.N||0)%360,u=(a.R||0)%360,l=a.o,m=a.q,f=a.Oe;if(l==i)l=1;if(m==i)m=1;if(f==i)f=1;if(e){n=0;p=0;q=0;f=0}var c=new zb(a.P,a.W,n);c.F(p);c.N(q);c.Nd(u);c.Md(a.vb,a.zb);c.Ld(l,m,f);if(b){c.cb(a.n,a.m);d.style[g]=c.Kd()}else if(!Y||Y<9){var o="",h={x:0,y:0};if(a.E)h=k(c,a.E,a.U);j.Jb(d,h.y);j.gc(d,h.x);o=c.Jd();var s=d.style.filter,t=new RegExp(/[\s]*progid:DXImageTransform\.Microsoft\.Matrix\([^\)]*\)/g),r=H(s,[t],o);pb(d,r)}}x=function(e,c){c=c||{};var g=c.n,k=c.m,f;n(R,function(a,b){f=c[b];f!==i&&a(e,f)});j.sd(e,c.a);if(!b){g!=i&&j.C(e,(c.Ec||0)+g);k!=i&&j.H(e,(c.Fc||0)+k)}if(c.Id)if(d)nb(j.Db(h,M,e,c));else a(e,c)};j.eb=M;if(d)j.eb=x;if(e)j.eb=a;else if(!b)a=M;j.O=x;x(f,l)}j.eb=x;j.O=x;function zb(j,k,o){var d=this,b=[1,0,0,0,0,1,0,0,0,0,1,0,j||0,k||0,o||0,1],i=c.sin,g=c.cos,l=c.tan;function f(a){return a*c.PI/180}function n(a,b){return{x:a,y:b}}function m(c,e,l,m,o,r,t,u,w,z,A,C,E,b,f,k,a,g,i,n,p,q,s,v,x,y,B,D,F,d,h,j){return[c*a+e*p+l*x+m*F,c*g+e*q+l*y+m*d,c*i+e*s+l*B+m*h,c*n+e*v+l*D+m*j,o*a+r*p+t*x+u*F,o*g+r*q+t*y+u*d,o*i+r*s+t*B+u*h,o*n+r*v+t*D+u*j,w*a+z*p+A*x+C*F,w*g+z*q+A*y+C*d,w*i+z*s+A*B+C*h,w*n+z*v+A*D+C*j,E*a+b*p+f*x+k*F,E*g+b*q+f*y+k*d,E*i+b*s+f*B+k*h,E*n+b*v+f*D+k*j]}function e(c,a){return m.apply(h,(a||b).concat(c))}d.Ld=function(a,c,d){if(a!=1||c!=1||d!=1)b=e([a,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1])};d.cb=function(a,c,d){b[12]+=a||0;b[13]+=c||0;b[14]+=d||0};d.F=function(c){if(c){a=f(c);var d=g(a),h=i(a);b=e([1,0,0,0,0,d,h,0,0,-h,d,0,0,0,0,1])}};d.N=function(c){if(c){a=f(c);var d=g(a),h=i(a);b=e([d,0,-h,0,0,1,0,0,h,0,d,0,0,0,0,1])}};d.Nd=function(c){if(c){a=f(c);var d=g(a),h=i(a);b=e([d,h,0,0,-h,d,0,0,0,0,1,0,0,0,0,1])}};d.Md=function(a,c){if(a||c){j=f(a);k=f(c);b=e([1,l(k),0,0,l(j),1,0,0,0,0,1,0,0,0,0,1])}};d.T=function(c){var a=e(b,[1,0,0,0,0,1,0,0,0,0,1,0,c.x,c.y,0,1]);return n(a[12],a[13])};d.Kd=function(){return"matrix3d("+b.join(",")+")"};d.Jd=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+b[0]+", M12="+b[4]+", M21="+b[1]+", M22="+b[5]+", SizingMethod='auto expand')"}}new function(){var a=this;function b(d,g){for(var j=d[0].length,i=d.length,h=g[0].length,f=[],c=0;c<i;c++)for(var k=f[c]=[],b=0;b<h;b++){for(var e=0,a=0;a<j;a++)e+=d[c][a]*g[a][b];k[b]=e}return f}a.o=function(b,c){return a.Pc(b,c,0)};a.q=function(b,c){return a.Pc(b,0,c)};a.Pc=function(a,c,d){return b(a,[[c,0],[0,d]])};a.T=function(d,c){var a=b(d,[[c.x],[c.y]]);return u(a[0][0],a[1][0])}};var N={Ec:0,Fc:0,n:0,m:0,V:1,o:1,q:1,R:0,F:0,N:0,P:0,W:0,B:0,vb:0,zb:0};j.Fd=function(c,d){var a=c||{};if(c)if(b.Ic(c))a={I:a};else if(b.Ic(c.a))a.a={I:c.a};a.I=a.I||d;if(a.a)a.a.I=a.a.I||d;return a};j.Ed=function(l,m,x,q,z,A,n){var a=m;if(l){a={};for(var g in m){var B=A[g]||1,w=z[g]||[0,1],f=(x-w[0])/w[1];f=c.min(c.max(f,0),1);f=f*B;var u=c.floor(f);if(f!=u)f-=u;var j=q.I||d.Ub,k,C=l[g],o=m[g];if(b.Ae(o)){j=q[g]||j;var y=j(f);k=C+o*y}else{k=b.Eb({wb:{}},l[g]);var v=q[g]||{};b.f(o.wb||o,function(d,a){j=v[a]||v.I||j;var c=j(f),b=d*c;k.wb[a]=b;k[a]+=b})}a[g]=k}var t=b.f(m,function(b,a){return N[a]!=i});t&&b.f(N,function(c,b){if(a[b]==i&&l[b]!==i)a[b]=l[b]});if(t){if(a.V)a.o=a.q=a.V;a.E=n.E;a.U=n.U;a.Id=e}}if(m.a&&n.cb){var p=a.a.wb,s=(p.j||0)+(p.u||0),r=(p.k||0)+(p.s||0);a.k=(a.k||0)+r;a.j=(a.j||0)+s;a.a.k-=r;a.a.s-=r;a.a.j-=s;a.a.u-=s}if(a.a&&b.td()&&!a.a.j&&!a.a.k&&!a.a.m&&!a.a.n&&a.a.s==n.E&&a.a.u==n.U)a.a=h;return a}};function m(){var a=this,d=[];function i(a,b){d.push({cc:a,kc:b})}function h(a,c){b.f(d,function(b,e){b.cc==a&&b.kc===c&&d.splice(e,1)})}a.gb=a.addEventListener=i;a.removeEventListener=h;a.i=function(a){var c=[].slice.call(arguments,1);b.f(d,function(b){b.cc==a&&b.kc.apply(f,c)})}}var l=function(z,E,g,K,N,M){z=z||0;var a=this,q,o,p,u,B=0,H,I,G,C,y=0,j=0,m=0,F,l,i,d,n,D,w=[],x;function P(a){i+=a;d+=a;l+=a;j+=a;m+=a;y+=a}function t(p){var f=p;if(n)if(!D&&(f>=d||f<i)||D&&f>=n)f=((f-i)%n+n)%n+i;if(!F||u||j!=f){var h=c.min(f,d);h=c.max(h,i);if(!F||u||h!=m){if(M){var k=(h-l)/(E||1);if(g.Dd)k=1-k;var o=b.Ed(N,M,k,H,G,I,g);if(x)b.f(o,function(b,a){x[a]&&x[a](K,b)});else b.O(K,o)}a.Xb(m-l,h-l);var r=m,q=m=h;b.f(w,function(b,c){var a=f<=j?w[w.length-c-1]:b;a.M(m-y)});j=f;F=e;a.Bb(r,q)}}}function A(a,b,e){b&&a.Yb(d);if(!e){i=c.min(i,a.zc()+y);d=c.max(d,a.bc()+y)}w.push(a)}var r=f.requestAnimationFrame||f.webkitRequestAnimationFrame||f.mozRequestAnimationFrame||f.msRequestAnimationFrame;if(b.ce()&&b.Mc()<7)r=h;r=r||function(a){b.vc(a,g.Nc)};function J(){if(q){var d=b.D(),e=c.min(d-B,g.Ac),a=j+e*p;B=d;if(a*p>=o*p)a=o;t(a);if(!u&&a*p>=o*p)L(C);else r(J)}}function s(f,g,h){if(!q){q=e;u=h;C=g;f=c.max(f,i);f=c.min(f,d);o=f;p=o<j?-1:1;a.oc();B=b.D();r(J)}}function L(b){if(q){u=q=C=k;a.lc();b&&b()}}a.mc=function(a,b,c){s(a?j+a:d,b,c)};a.nc=s;a.Y=L;a.oe=function(a){s(a)};a.J=function(){return j};a.Kc=function(){return o};a.Z=function(){return m};a.M=t;a.cb=function(a){t(j+a)};a.Jc=function(){return q};a.Hd=function(a){n=a};a.Yb=P;a.Dc=function(a,b){A(a,0,b)};a.dc=function(a){A(a,1)};a.zc=function(){return i};a.bc=function(){return d};a.Bb=a.oc=a.lc=a.Xb=b.Gc;a.hc=b.D();g=b.Eb({Nc:16,Ac:50},g);n=g.ic;D=g.Vd;x=g.Ad;i=l=z;d=z+E;I=g.Bd||{};G=g.yd||{};H=b.Fd(g.mb)};new(function(){});var j=function(q,fc){var o=this;function Bc(){var a=this;l.call(a,-1e8,2e8);a.se=function(){var b=a.Z(),d=c.floor(b),f=t(d),e=b-c.floor(b);return{X:f,re:d,jb:e}};a.Bb=function(b,a){var d=c.floor(a);if(d!=a&&a>b)d++;Tb(d,e);o.i(j.qe,t(a),t(b),a,b)}}function Ac(){var a=this;l.call(a,0,0,{ic:r});b.f(A,function(b){D&1&&b.Hd(r);a.dc(b);b.Yb(kb/bc)})}function zc(){var a=this,b=Ub.S;l.call(a,-1,2,{mb:d.Ub,Ad:{jb:Zb},ic:r},b,{jb:1},{jb:-2});a.Pb=b}function mc(n,m){var b=this,d,f,g,i,c;l.call(b,-1e8,2e8,{Ac:100});b.oc=function(){O=e;R=h;o.i(j.pe,t(w.J()),w.J())};b.lc=function(){O=k;i=k;var a=w.se();o.i(j.me,t(w.J()),w.J());!a.jb&&Dc(a.re,s)};b.Bb=function(j,h){var b;if(i)b=c;else{b=f;if(g){var e=h/g;b=a.bd(e)*(f-d)+d}}w.M(b)};b.Cb=function(a,e,c,h){d=a;f=e;g=c;w.M(a);b.M(0);b.nc(c,h)};b.fe=function(a){i=e;c=a;b.mc(a,h,e)};b.de=function(a){c=a};w=new Bc;w.Dc(n);w.Dc(m)}function oc(){var c=this,a=Xb();b.v(a,0);b.G(a,"pointerEvents","none");c.S=a;c.tb=function(){b.L(a);b.Lc(a)}}function xc(n,f){var d=this,q,N,v,i,y=[],x,C,W,H,S,F,g,w,p;l.call(d,-u,u+1,{});function E(a){q&&q.cd();T(n,a,0);F=e;q=new J.ib(n,J,b.ld(b.g(n,"idle"))||lc,!I);q.M(0)}function Z(){q.hc<J.hc&&E()}function O(p,r,n){if(!H){H=e;if(i&&n){var g=n.width,c=n.height,m=g,l=c;if(g&&c&&a.hb){if(a.hb&3&&(!(a.hb&4)||g>L||c>K)){var h=k,q=L/K*c/g;if(a.hb&1)h=q>1;else if(a.hb&2)h=q<1;m=h?g*K/c:L;l=h?K:c*L/g}b.l(i,m);b.p(i,l);b.H(i,(K-l)/2);b.C(i,(L-m)/2)}b.A(i,"absolute");o.i(j.ae,f)}}b.L(r);p&&p(d)}function Y(b,c,e,g){if(g==R&&s==f&&I)if(!Cc){var a=t(b);B.Ce(a,f,c,d,e);c.xe();U.Yb(a-U.zc()-1);U.M(a);z.Cb(b,b,0)}}function bb(b){if(b==R&&s==f){if(!g){var a=h;if(B)if(B.X==f)a=B.ne();else B.tb();Z();g=new vc(n,f,a,q);g.Yc(p)}!g.Jc()&&g.Mb()}}function G(e,i,l){if(e==f){if(e!=i)A[i]&&A[i].fd();else!l&&g&&g.Be();p&&p.Bc();var m=R=b.D();d.lb(b.Db(h,bb,m))}else{var k=c.min(f,e),j=c.max(f,e),o=c.min(j-k,k+r-j),n=u+a.Yd-1;(!S||o<=n)&&d.lb()}}function db(){if(s==f&&g){g.Y();p&&p.Wd();p&&p.xd();g.ed()}}function eb(){s==f&&g&&g.Y()}function ab(a){!P&&o.i(j.vd,f,a)}function Q(){p=w.pInstance;g&&g.Yc(p)}d.lb=function(c,a){a=a||v;if(y.length&&!H){b.sb(a);if(!W){W=e;o.i(j.rd,f);b.f(y,function(a){if(!b.ub(a,"src")){a.src=b.g(a,"src2")||"";b.K(a,a["display-origin"])}})}b.Od(y,i,b.Db(h,O,c,a))}else O(c,a)};d.nd=function(){var j=f;if(a.Tb<0)j-=r;var e=j+a.Tb*tc;if(D&2)e=t(e);if(!(D&1)&&!ib)e=c.max(0,c.min(e,r-u));if(e!=f){if(B){var g=B.De(r);if(g){var k=R=b.D(),i=A[t(e)];return i.lb(b.Db(h,Y,e,i,g,k),v)}}cb(e)}else if(a.Ib){d.fd();G(f,f)}};d.Gb=function(){G(f,f,e)};d.fd=function(){p&&p.Wd();p&&p.xd();d.ad();g&&g.od();g=h;E()};d.xe=function(){b.L(n)};d.ad=function(){b.sb(n)};d.md=function(){p&&p.Bc()};function T(a,d,f,c){if(b.ub(a,"jssor-slider"))return;if(!F){if(a.tagName=="IMG"){y.push(a);if(!b.ub(a,"src")){S=e;a["display-origin"]=b.K(a);b.L(a)}}var g=b.Rd(a);if(g){var h=new Image;b.g(h,"src2",g);y.push(h)}if(f){c=a.style.pointerEvents||b.Lb(a);!c&&b.G(a,"pointerEvents",a.tagName=="A"?"all":"none");b.v(a,(b.v(a)||0)+1);b.Jb(a,b.Jb(a)||0);b.gc(a,b.gc(a)||0);b.eb(a,{B:0})}}var j=b.xb(a);b.f(j,function(g){var j=g.tagName,l=b.g(g,"u");if(l=="player"&&!w){w=g;if(w.pInstance)Q();else b.c(w,"dataavailable",Q)}if(l=="caption"){if(d){b.Hc(g,b.g(g,"to"));b.ke(g,b.g(g,"bf"));b.g(g,"3d")&&b.je(g,"preserve-3d")}else if(!b.gd()){var h=b.fb(g,k,e);b.Fb(h,g,a);b.pc(g,a);g=h;d=e}}else if(!F&&!f&&!i){if(j=="A"){if(b.g(g,"u")=="image")i=b.ze(g,"IMG");else i=b.z(g,"image",e);if(i){x=g;b.K(x,"block");b.O(x,V);C=b.fb(x,e);b.A(x,"relative");b.fc(C,0);b.G(C,"backgroundColor","#000")}}else if(j=="IMG"&&b.g(g,"u")=="image")i=g;if(i){i.border=0;b.O(i,V)}}T(g,d,f+1,c)})}d.Xb=function(c,b){var a=u-b;Zb(N,a)};d.X=f;m.call(d);b.ie(n,b.g(n,"p"));b.he(n,b.g(n,"po"));var M=b.z(n,"thumb",e);if(M){b.fb(M);b.L(M)}b.sb(n);v=b.fb(gb);b.v(v,1e3);b.c(n,"click",ab);E(e);d.we=i;d.dd=C;d.Pb=N=n;b.Q(N,v);o.gb(203,G);o.gb(28,eb);o.gb(24,db)}function vc(y,f,p,q){var a=this,m=0,u=0,g,h,d,c,i,t,r,n=A[f];l.call(a,0,0);function v(){b.Lc(N);cc&&i&&n.dd&&b.Q(N,n.dd);b.sb(N,!i&&n.we)}function w(){a.Mb()}function x(b){r=b;a.Y();a.Mb()}a.Mb=function(){var b=a.Z();if(!C&&!O&&!r&&s==f){if(!b){if(g&&!i){i=e;a.ed(e);o.i(j.pd,f,m,u,g,c)}v()}var k,p=j.Rc;if(b!=c)if(b==d)k=c;else if(b==h)k=d;else if(!b)k=h;else k=a.Kc();o.i(p,f,b,m,h,d,c);var l=I&&(!E||F);if(b==c)(d!=c&&!(E&12)||l)&&n.nd();else(l||b!=d)&&a.nc(k,w)}};a.Be=function(){d==c&&d==a.Z()&&a.M(h)};a.od=function(){B&&B.X==f&&B.tb();var b=a.Z();b<c&&o.i(j.Rc,f,-b-1,m,h,d,c)};a.ed=function(a){p&&b.ob(lb,a&&p.wc.Me?"":"hidden")};a.Xb=function(b,a){if(i&&a>=g){i=k;v();n.ad();B.tb();o.i(j.Ud,f,m,u,g,c)}o.i(j.Td,f,a,m,h,d,c)};a.Yc=function(a){if(a&&!t){t=a;a.gb($JssorPlayer$.ud,x)}};p&&a.dc(p);g=a.bc();a.dc(q);h=g+q.Vc;c=a.bc();d=I?g+q.Uc:c}function Kb(a,c,d){b.C(a,c);b.H(a,d)}function Zb(c,b){var a=x>0?x:fb,d=zb*b*(a&1),e=Ab*b*(a>>1&1);Kb(c,d,e)}function Pb(){qb=O;Ib=z.Kc();G=w.J()}function gc(){Pb();if(C||!F&&E&12){z.Y();o.i(j.Sd)}}function ec(f){if(!C&&(F||!(E&12))&&!z.Jc()){var d=w.J(),b=c.ceil(G);if(f&&c.abs(H)>=a.Sc){b=c.ceil(d);b+=jb}if(!(D&1))b=c.min(r-u,c.max(b,0));var e=c.abs(b-d);e=1-c.pow(1-e,5);if(!P&&qb)z.oe(Ib);else if(d==b){tb.md();tb.Gb()}else z.Cb(d,b,e*Vb)}}function Hb(a){!b.g(b.Rb(a),"nodrag")&&b.Ob(a)}function rc(a){Yb(a,1)}function Yb(a,c){a=b.tc(a);var i=b.Rb(a);if(!M&&!b.g(i,"nodrag")&&sc()&&(!c||a.touches.length==1)){C=e;yb=k;R=h;b.c(g,c?"touchmove":"mousemove",Bb);b.D();P=0;gc();if(!qb)x=0;if(c){var f=a.touches[0];ub=f.clientX;vb=f.clientY}else{var d=b.qc(a);ub=d.x;vb=d.y}H=0;hb=0;jb=0;o.i(j.Qd,t(G),G,a)}}function Bb(d){if(C){d=b.tc(d);var f;if(d.type!="mousemove"){var l=d.touches[0];f={x:l.clientX,y:l.clientY}}else f=b.qc(d);if(f){var j=f.x-ub,k=f.y-vb;if(c.floor(G)!=G)x=x||fb&M;if((j||k)&&!x){if(M==3)if(c.abs(k)>c.abs(j))x=2;else x=1;else x=M;if(ob&&x==1&&c.abs(k)-c.abs(j)>3)yb=e}if(x){var a=k,i=Ab;if(x==1){a=j;i=zb}if(!(D&1)){if(a>0){var g=i*s,h=a-g;if(h>0)a=g+c.sqrt(h)*5}if(a<0){var g=i*(r-u-s),h=-a-g;if(h>0)a=-g-c.sqrt(h)*5}}if(H-hb<-2)jb=0;else if(H-hb>2)jb=-1;hb=H;H=a;sb=G-H/i/(Y||1);if(H&&x&&!yb){b.Ob(d);if(!O)z.fe(sb);else z.de(sb)}}}}}function bb(){qc();if(C){C=k;b.D();b.nb(g,"mousemove",Bb);b.nb(g,"touchmove",Bb);P=H;z.Y();var a=w.J();o.i(j.Xd,t(a),a,t(G),G);E&12&&Pb();ec(e)}}function jc(c){if(P){b.be(c);var a=b.Rb(c);while(a&&v!==a){a.tagName=="A"&&b.Ob(c);try{a=a.parentNode}catch(d){break}}}}function Jb(a){A[s];s=t(a);tb=A[s];Tb(a);return s}function Dc(a,b){x=0;Jb(a);o.i(j.Pd,t(a),b)}function Tb(a,c){wb=a;b.f(S,function(b){b.ec(t(a),a,c)})}function sc(){var b=j.Wc||0,a=X;if(ob)a&1&&(a&=1);j.Wc|=a;return M=a&~b}function qc(){if(M){j.Wc&=~X;M=0}}function Xb(){var a=b.yb();b.O(a,V);b.A(a,"absolute");return a}function t(a){return(a%r+r)%r}function kc(b,d){if(d)if(!D){b=c.min(c.max(b+wb,0),r-u);d=k}else if(D&2){b=t(b+wb);d=k}cb(b,a.pb,d)}function xb(){b.f(S,function(a){a.jc(a.rb.Fe<=F)})}function hc(){if(!F){F=1;xb();if(!C){E&12&&ec();E&3&&A[s]&&A[s].Gb()}}}function Ec(){if(F){F=0;xb();C||!(E&12)||gc()}}function ic(){V={qb:L,Ab:K,j:0,k:0};b.f(T,function(a){b.O(a,V);b.A(a,"absolute");b.ob(a,"hidden");b.L(a)});b.O(gb,V)}function ab(b,a){cb(b,a,e)}function cb(g,f,l){if(Rb&&(!C&&(F||!(E&12))||a.Xc)){O=e;C=k;z.Y();if(f==i)f=Vb;var d=Cb.Z(),b=g;if(l){b=d+g;if(g>0)b=c.ceil(b);else b=c.floor(b)}if(D&2)b=t(b);if(!(D&1))b=c.max(0,c.min(b,r-u));var j=(b-d)%r;b=d+j;var h=d==b?0:f*c.abs(j);h=c.min(h,f*u*1.5);z.Cb(d,b,h||1)}}o.mc=function(){if(!I){I=e;A[s]&&A[s].Gb()}};function W(){return b.l(y||q)}function nb(){return b.p(y||q)}o.E=W;o.U=nb;function Eb(c,d){if(c==i)return b.l(q);if(!y){var a=b.yb(g);b.Lb(a,b.Lb(q));b.Hb(a,b.Hb(q));b.K(a,"block");b.A(a,"relative");b.H(a,0);b.C(a,0);b.ob(a,"visible");y=b.yb(g);b.A(y,"absolute");b.H(y,0);b.C(y,0);b.l(y,b.l(q));b.p(y,b.p(q));b.Hc(y,"0 0");b.Q(y,a);var h=b.xb(q);b.Q(q,y);b.G(q,"backgroundImage","");b.f(h,function(c){b.Q(b.g(c,"noscale")?q:a,c);b.g(c,"autocenter")&&Lb.push(c)})}Y=c/(d?b.p:b.l)(y);b.ge(y,Y);var f=d?Y*W():c,e=d?c:Y*nb();b.l(q,f);b.p(q,e);b.f(Lb,function(a){var c=b.kd(b.g(a,"autocenter"));b.id(a,c)})}o.Cd=Eb;m.call(o);o.S=q=b.Sb(q);var a=b.Eb({hb:0,Yd:1,Wb:1,Zb:0,ac:k,Ib:1,kb:e,Xc:e,Tb:1,Qc:3e3,Nb:1,pb:500,bd:d.jd,Sc:20,Tc:0,bb:1,xc:0,te:1,Qb:1,sc:1},fc);a.kb=a.kb&&b.zd();if(a.yc!=i)a.Qc=a.yc;if(a.le!=i)a.xc=a.le;var fb=a.Qb&3,tc=(a.Qb&4)/-4||1,mb=a.Ee,J=b.Eb({ib:p,kb:a.kb},a.Ge);J.Vb=J.Vb||J.Le;var Fb=a.Ke,Z=a.Ie,eb=a.He,Q=!a.te,y,v=b.z(q,"slides",Q),gb=b.z(q,"loading",Q)||b.yb(g),Nb=b.z(q,"navigator",Q),dc=b.z(q,"arrowleft",Q),ac=b.z(q,"arrowright",Q),Mb=b.z(q,"thumbnavigator",Q),pc=b.l(v),nc=b.p(v),V,T=[],uc=b.xb(v);b.f(uc,function(a){a.tagName=="DIV"&&!b.g(a,"u")&&T.push(a);b.v(a,(b.v(a)||0)+1)});var s=-1,wb,tb,r=T.length,L=a.Cc||pc,K=a.qd||nc,Wb=a.Tc,zb=L+Wb,Ab=K+Wb,bc=fb&1?zb:Ab,u=c.min(a.bb,r),lb,x,M,yb,S=[],Qb,Sb,Ob,cc,Cc,I,E=a.Nb,lc=a.Qc,Vb=a.pb,rb,ib,kb,Rb=u<r,D=Rb?a.Ib:0,X,P,F=1,O,C,R,ub=0,vb=0,H,hb,jb,Cb,w,U,z,Ub=new oc,Y,Lb=[];if(r){if(a.kb)Kb=function(a,c,d){b.eb(a,{P:c,W:d})};I=a.ac;o.rb=fc;ic();b.ub(q,"jssor-slider",e);b.v(v,b.v(v)||0);b.A(v,"absolute");lb=b.fb(v,e);b.Fb(lb,v);if(mb){cc=mb.Je;rb=mb.ib;ib=u==1&&r>1&&rb&&(!b.gd()||b.Mc()>=8)}kb=ib||u>=r||!(D&1)?0:a.xc;X=(u>1||kb?fb:-1)&a.sc;var Gb=v,A=[],B,N,Db=b.ve(),ob=Db.ye,G,qb,Ib,sb;Db.Zc&&b.G(Gb,Db.Zc,([h,"pan-y","pan-x","none"])[X]||"");U=new zc;if(ib)B=new rb(Ub,L,K,mb,ob);b.Q(lb,U.Pb);b.ob(v,"hidden");N=Xb();b.G(N,"backgroundColor","#000");b.fc(N,0);b.Fb(N,Gb.firstChild,Gb);for(var db=0;db<T.length;db++){var wc=T[db],yc=new xc(wc,db);A.push(yc)}b.L(gb);Cb=new Ac;z=new mc(Cb,U);b.c(v,"click",jc,e);b.c(q,"mouseout",b.Oc(hc,q));b.c(q,"mouseover",b.Oc(Ec,q));if(X){b.c(v,"mousedown",Yb);b.c(v,"touchstart",rc);b.c(v,"dragstart",Hb);b.c(v,"selectstart",Hb);b.c(g,"mouseup",bb);b.c(g,"touchend",bb);b.c(g,"touchcancel",bb);b.c(f,"blur",bb)}E&=ob?10:5;if(Nb&&Fb){Qb=new Fb.ib(Nb,Fb,W(),nb());S.push(Qb)}if(Z&&dc&&ac){Z.Ib=D;Z.bb=u;Sb=new Z.ib(dc,ac,Z,W(),nb());S.push(Sb)}if(Mb&&eb){eb.Zb=a.Zb;Ob=new eb.ib(Mb,eb);S.push(Ob)}b.f(S,function(a){a.Kb(r,A,gb);a.gb(n.Zd,kc)});b.G(q,"visibility","visible");Eb(W());xb();a.Wb&&b.c(g,"keydown",function(b){if(b.keyCode==37)ab(-a.Wb);else b.keyCode==39&&ab(a.Wb)});var pb=a.Zb;if(!(D&1))pb=c.max(0,c.min(pb,r-u));z.Cb(pb,pb,0)}};j.vd=21;j.Qd=22;j.Xd=23;j.pe=24;j.me=25;j.rd=26;j.ae=27;j.Sd=28;j.qe=202;j.Pd=203;j.pd=206;j.Ud=207;j.Td=208;j.Rc=209;var n={Zd:1};function p(e,d,c){var a=this;l.call(a,0,c);a.cd=b.Gc;a.Vc=0;a.Uc=c}jssor_1_slider_init=function(){var h={ac:e,yc:0,Tb:4,pb:2500,bd:d.Ub,Nb:4,Cc:140,bb:7},g=new j("jssor_1",h);function a(){var b=g.S.parentNode.clientWidth;if(b){b=c.min(b,809);g.Cd(b)}else f.setTimeout(a,30)}a();b.c(f,"load",a);b.c(f,"resize",a);b.c(f,"orientationchange",a)}})(window,document,Math,null,true,false)
</script>
<style>

</style>
<div id="container" style="position:relative;margin:0 auto;top:0px;left:0px;width:822px;height:120px;overflow:hidden;">
<div style="position:absolute;display:block;background:url('http://gimplearn.net/styles/prosilver/template/img/filmstrip.gif') no-repeat center center;top:0px;left:0px;width:100%;height:100%;"></div>

<div id="jssor_1" style="position:relative;margin:0 auto;top:18px;left:0px;width:980px;height:100px;overflow:hidden;visibility:hidden;">
<!-- Loading Screen -->
<div data-u="loading" style="position:absolute;top:0px;left:0px;background-color:rgba(0,0,0,0.7);">
<div style="filter: alpha(opacity=70); opacity: 0.7; position: absolute; display: block; top: 0px; left: 0px; width: 100%; height: 100%;"></div>
<div style="position:absolute;display:block;background:url('http://gimplearn.net/styles/prosilver/template/img/loading.gif') no-repeat center center;top:0px;left:0px;width:100%;height:100%;"></div>
</div>
<div data-u="slides" style="cursor:default;position:relative;top:0px;left:0px;width:980px;height:100px;overflow:hidden;">
<a data-u="any" href="http://www.jssor.com" style="display:none">Scrolling Logo Thumbnail Slider</a>
<?php } ?>

<?php
// now you can display the results returned
  while ($row=mysql_fetch_array($result)) {
	  //$filename = $row["physical_filename"];
	  $postid = $row["post_msg_id"];
	  $attachid = $row["attach_id"];
	  $posttxt = $row["post_text"];
	  if ($attachid > -1) {
		echo '<div><a title="30 Latest images
Click to go to post"  href="http://gimplearn.net/viewtopic.php?p='.$postid.'#p'.$postid.'"><img data-u="image" src="http://gimplearn.net/download/file.php?id='.$attachid.'"/></a></div>';
	  }else{
		  preg_match('%<img.*?src=["\'](.*?)["\'].*?>%i', $posttxt , $imgs);
			$img = $imgs[1];
		echo '<div><a title="30 Latest images
Click to go to post"  href="http://gimplearn.net/viewtopic.php?p='.$postid.'#p'.$postid.'"><img data-u="image" src="'.$img.'"/></a></div>';
	  }
  }
?>
<?php if ($numrows > 0) { ?>
</div>
</div>
</div>
<script type="text/javascript">jssor_1_slider_init();</script>
<!-- #endregion Jssor Slider End -->
<?php } ?>
0 x



aka Tin
Image gimplearn.net                                              

User avatar
tim

Administrator
View: Showcase | Slideshow
Topic Posts: 6/6
Posts: 2157
Joined: 26 Sep 2016, 00:16
Cash on hand: 7,894.01 GLP
Bank: 51,356.25 GLP
Gender: Guy
Location: Victoria, BC
Website: https://gimplearn.net
Operating System: Windows
GIMP Version: 2.8.22
My Personal Blog
My FineArtAmerica
x 1196
x 256
Contact:
Canada

Post#6 by tim » 14 Feb 2017, 19:18


Feature showing up to 3 images from img tags and/or 3 image attachments for each post for newest 30 posts that have img tags or image attachments.

Code: Select all

<?php $forum_id = request_var('f', 0);?>
<?php

//connect to your database
mysql_connect('localhost','bakon306_phpb537','password'); //(host, username, password)

//specify database
mysql_select_db('bakon306_phpb537') or die("Unable to select database"); //select which database we're using

// Build SQL Query  
/*$query = "SELECT a.post_msg_id,a.physical_filename,a.attach_id
FROM `phpbbsf_attachments` a 
INNER JOIN `phpbbsf_posts` p ON p.post_id = a.post_msg_id
INNER JOIN `phpbbsf_forums` f ON p.forum_id = f.forum_id
WHERE a.mimetype like 'image%'
AND (0 = ".$forum_id."
     OR f.forum_id = ".$forum_id."
	 OR f.parent_id = ".$forum_id.")

ORDER BY a.filetime DESC"  ;
*/
/*$query = "SELECT post_msg_id,attach_id,filetime,post_text FROM
(SELECT p.post_id as post_msg_id,-1 as attach_id,p.post_modified as filetime,p.post_text
FROM `phpbbsf_posts` p
INNER JOIN `phpbbsf_forums` f ON p.forum_id = f.forum_id
WHERE p.post_text like '%<IMG src=%'
AND (0 = ".$forum_id."
     OR f.forum_id = ".$forum_id."
	 OR f.parent_id = ".$forum_id.")
ORDER BY p.post_modified DESC
LIMIT 30)A
UNION
SELECT * FROM 
(SELECT a.post_msg_id,a.attach_id,a.filetime,'' as post_text
FROM `phpbbsf_attachments` a 
INNER JOIN `phpbbsf_posts` p ON p.post_id = a.post_msg_id
INNER JOIN `phpbbsf_forums` f ON p.forum_id = f.forum_id
WHERE a.mimetype like 'image%'
AND (0 = ".$forum_id."
     OR f.forum_id = ".$forum_id."
	 OR f.parent_id = ".$forum_id.")
ORDER BY a.filetime DESC LIMIT 30)B


ORDER BY filetime DESC";*/

$query = "
SELECT post_msg_id,attach_id,filetime,post_text FROM
(SELECT p.post_id as post_msg_id,'' as attach_id,p.post_modified as filetime,p.post_text
FROM `phpbbsf_posts` p
INNER JOIN `phpbbsf_forums` f ON p.forum_id = f.forum_id
WHERE p.post_text like '%<IMG src=%'
AND (0 = 0
     OR f.forum_id = 0
	 OR f.parent_id = 0)
ORDER BY p.post_modified DESC
LIMIT 30)A
UNION
SELECT * FROM 
(SELECT p.post_id,p.attach_id,p.filetime,'' as post_text
FROM 
(SELECT p1.post_id,GROUP_CONCAT(a.attach_id)as attach_id,p1.post_modified as filetime FROM `phpbbsf_posts` p1
         INNER JOIN `phpbbsf_forums` f ON p1.forum_id = f.forum_id
 		 INNER JOIN `phpbbsf_attachments` a ON p1.post_id = a.post_msg_id
           WHERE a.mimetype like 'image%'
			AND (0 = 0
     		OR f.forum_id = 0
	 		OR f.parent_id = 0)
 GROUP BY p1.post_id
 ORDER BY p1.post_modified DESC LIMIT 30
)p
)B


ORDER BY filetime DESC";
 $numresults=mysql_query($query);
 $numrows=mysql_num_rows($numresults);
// next determine if s has been passed to script, if not use 0
// get results
  $query .= " limit 30";
  $result = mysql_query($query) or die("Couldn't execute query");

if ($numrows > 0) { ?>
<!-- #region Jssor Slider Begin -->
<!-- Generator: Jssor Slider Maker -->
<!-- Source: http://www.jssor.com -->
<!-- This is deep minimized code which works independently. -->
<script type="text/javascript">
(function(f,g,c,h,e,k,i){/*! Jssor */
new(function(){});var d={Ub:function(a){return a},jd:function(a){return-a*(a-2)}};var b=new function(){var j=this,F=1,wb=2,cb=3,bb=4,fb=5,G,r=0,l=0,s=0,Y=0,A=0,I=navigator,kb=I.appName,o=I.userAgent,p=parseFloat;function Fb(){if(!G){G={ye:"ontouchstart"in f||"createTouch"in g};var a;if(I.pointerEnabled||(a=I.msPointerEnabled))G.Zc=a?"msTouchAction":"touchAction"}return G}function v(i){if(!r){r=-1;if(kb=="Microsoft Internet Explorer"&&!!f.attachEvent&&!!f.ActiveXObject){var e=o.indexOf("MSIE");r=F;s=p(o.substring(e+5,o.indexOf(";",e)));/*@cc_on Y=@_jscript_version@*/;l=g.documentMode||s}else if(kb=="Netscape"&&!!f.addEventListener){var d=o.indexOf("Firefox"),b=o.indexOf("Safari"),h=o.indexOf("Chrome"),c=o.indexOf("AppleWebKit");if(d>=0){r=wb;l=p(o.substring(d+8))}else if(b>=0){var j=o.substring(0,b).lastIndexOf("/");r=h>=0?bb:cb;l=p(o.substring(j+1,b))}else{var a=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/i.exec(o);if(a){r=F;l=s=p(a[1])}}if(c>=0)A=p(o.substring(c+12))}else{var a=/(opera)(?:.*version|)[ \/]([\w.]+)/i.exec(o);if(a){r=fb;l=p(a[2])}}}return i==r}function q(){return v(F)}function vb(){return q()&&(l<6||g.compatMode=="BackCompat")}function ab(){return v(cb)}function eb(){return v(fb)}function rb(){return ab()&&A>534&&A<535}function J(){v();return A>537||l>42||r==F&&l>=11}function tb(){return q()&&l<9}function sb(a){var b,c;return function(f){if(!b){b=e;var d=a.substr(0,1).toUpperCase()+a.substr(1);n([a].concat(["WebKit","ms","Moz","O","webkit"]),function(g,e){var b=a;if(e)b=g+d;if(f.style[b]!=i)return c=b})}return c}}function qb(b){var a;return function(c){a=a||sb(b)(c)||b;return a}}var K=qb("transform");function jb(a){return{}.toString.call(a)}var gb={};n(["Boolean","Number","String","Function","Array","Date","RegExp","Object"],function(a){gb["[object "+a+"]"]=a.toLowerCase()});function n(b,d){var a,c;if(jb(b)=="[object Array]"){for(a=0;a<b.length;a++)if(c=d(b[a],a,b))return c}else for(a in b)if(c=d(b[a],a,b))return c}function D(a){return a==h?String(a):gb[jb(a)]||"object"}function B(a){try{return D(a)=="object"&&!a.nodeType&&a!=a.window&&(!a.constructor||{}.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf"))}catch(b){}}function u(a,b){return{x:a,y:b}}function nb(b,a){setTimeout(b,a||0)}function H(b,d,c){var a=!b||b=="inherit"?"":b;n(d,function(c){var b=c.exec(a);if(b){var d=a.substr(0,b.index),e=a.substr(b.index+b[0].length+1,a.length-1);a=d+e}});a=c+(!a.indexOf(" ")?"":" ")+a;return a}function pb(b,a){if(l<9)b.style.filter=a}j.ve=Fb;j.gd=q;j.ce=ab;j.zd=J;sb("transform");j.Mc=function(){return l};j.vc=nb;function V(a){a.constructor===V.caller&&a.uc&&a.uc.apply(a,V.caller.arguments)}j.uc=V;j.Sb=function(a){if(j.ue(a))a=g.getElementById(a);return a};function t(a){return a||f.event}j.tc=t;j.Rb=function(b){b=t(b);var a=b.target||b.srcElement||g;if(a.nodeType==3)a=j.rc(a);return a};j.qc=function(a){a=t(a);return{x:a.pageX||a.clientX||0,y:a.pageY||a.clientY||0}};function w(c,d,a){if(a!==i)c.style[d]=a==i?"":a;else{var b=c.currentStyle||c.style;a=b[d];if(a==""&&f.getComputedStyle){b=c.ownerDocument.defaultView.getComputedStyle(c,h);b&&(a=b.getPropertyValue(d)||b[d])}return a}}function X(b,c,a,d){if(a!==i){if(a==h)a="";else d&&(a+="px");w(b,c,a)}else return p(w(b,c))}function m(c,a){var d=a?X:w,b;if(a&4)b=qb(c);return function(e,f){return d(e,b?b(e):c,f,a&2)}}function Ab(b){if(q()&&s<9){var a=/opacity=([^)]*)/.exec(b.style.filter||"");return a?p(a[1])/100:1}else return p(b.style.opacity||"1")}function Cb(b,a,f){if(q()&&s<9){var h=b.style.filter||"",i=new RegExp(/[\s]*alpha\([^\)]*\)/g),e=c.round(100*a),d="";if(e<100||f)d="alpha(opacity="+e+") ";var g=H(h,[i],d);pb(b,g)}else b.style.opacity=a==1?"":c.round(a*100)/100}var L={R:["rotate"],F:["rotateX"],N:["rotateY"],vb:["skewX"],zb:["skewY"]};if(!J())L=C(L,{o:["scaleX",2],q:["scaleY",2],B:["translateZ",1]});function M(d,a){var c="";if(a){if(q()&&l&&l<10){delete a.F;delete a.N;delete a.B}b.f(a,function(d,b){var a=L[b];if(a){var e=a[1]||0;if(N[b]!=d)c+=" "+a[0]+"("+d+(["deg","px",""])[e]+")"}});if(J()){if(a.P||a.W||a.B!=i)c+=" translate3d("+(a.P||0)+"px,"+(a.W||0)+"px,"+(a.B||0)+"px)";if(a.o==i)a.o=1;if(a.q==i)a.q=1;if(a.o!=1||a.q!=1)c+=" scale3d("+a.o+", "+a.q+", 1)"}}d.style[K(d)]=c}j.Hc=m("transformOrigin",4);j.ke=m("backfaceVisibility",4);j.je=m("transformStyle",4);j.ie=m("perspective",6);j.he=m("perspectiveOrigin",4);j.ge=function(a,b){if(q()&&s<9||s<10&&vb())a.style.zoom=b==1?"":b;else{var c=K(a),f="scale("+b+")",e=a.style[c],g=new RegExp(/[\s]*scale\(.*?\)/g),d=H(e,[g],f);a.style[c]=d}};j.Oc=function(b,a){return function(c){c=t(c);var e=c.type,d=c.relatedTarget||(e=="mouseout"?c.toElement:c.fromElement);(!d||d!==a&&!j.ee(a,d))&&b(c)}};j.c=function(a,d,b,c){a=j.Sb(a);if(a.addEventListener){d=="mousewheel"&&a.addEventListener("DOMMouseScroll",b,c);a.addEventListener(d,b,c)}else if(a.attachEvent){a.attachEvent("on"+d,b);c&&a.setCapture&&a.setCapture()}};j.nb=function(a,c,d,b){a=j.Sb(a);if(a.removeEventListener){c=="mousewheel"&&a.removeEventListener("DOMMouseScroll",d,b);a.removeEventListener(c,d,b)}else if(a.detachEvent){a.detachEvent("on"+c,d);b&&a.releaseCapture&&a.releaseCapture()}};j.Ob=function(a){a=t(a);a.preventDefault&&a.preventDefault();a.cancel=e;a.returnValue=k};j.be=function(a){a=t(a);a.stopPropagation&&a.stopPropagation();a.cancelBubble=e};j.Db=function(d,c){var a=[].slice.call(arguments,2),b=function(){var b=a.concat([].slice.call(arguments,0));return c.apply(d,b)};return b};j.xb=function(d,c){for(var b=[],a=d.firstChild;a;a=a.nextSibling)(c||a.nodeType==1)&&b.push(a);return b};function ib(a,c,e,b){b=b||"u";for(a=a?a.firstChild:h;a;a=a.nextSibling)if(a.nodeType==1){if(S(a,b)==c)return a;if(!e){var d=ib(a,c,e,b);if(d)return d}}}j.z=ib;function db(a,c,d){for(a=a?a.firstChild:h;a;a=a.nextSibling)if(a.nodeType==1){if(a.tagName==c)return a;if(!d){var b=db(a,c,d);if(b)return b}}}j.ze=db;function C(){var e=arguments,d,c,b,a,g=1&e[0],f=1+g;d=e[f-1]||{};for(;f<e.length;f++)if(c=e[f])for(b in c){a=c[b];if(a!==i){a=c[b];var h=d[b];d[b]=g&&(B(h)||B(a))?C(g,{},h,a):a}}return d}j.Eb=C;j.Ic=function(a){return D(a)=="function"};j.ue=function(a){return D(a)=="string"};j.Ae=function(a){return!isNaN(p(a))&&isFinite(a)};j.f=n;function P(a){return g.createElement(a)}j.yb=function(){return P("DIV")};j.Gc=function(){};function T(b,c,a){if(a==i)return b.getAttribute(c);b.setAttribute(c,a)}function S(a,b){return T(a,b)||T(a,"data-"+b)}j.ub=T;j.g=S;function y(b,a){if(a==i)return b.className;b.className=a}j.Lb=y;j.rc=function(a){return a.parentNode};j.L=function(a){j.K(a,"none")};j.sb=function(a,b){j.K(a,b?"none":"")};j.wd=function(b,a){b.removeAttribute(a)};j.td=function(){return q()&&l<10};j.sd=function(d,a){if(a)d.style.clip="rect("+c.round(a.j||a.m||0)+"px "+c.round(a.s)+"px "+c.round(a.u)+"px "+c.round(a.k||a.n||0)+"px)";else if(a!==i){var g=d.style.cssText,f=[new RegExp(/[\s]*clip: rect\(.*?\)[;]?/i),new RegExp(/[\s]*cliptop: .*?[;]?/i),new RegExp(/[\s]*clipright: .*?[;]?/i),new RegExp(/[\s]*clipbottom: .*?[;]?/i),new RegExp(/[\s]*clipleft: .*?[;]?/i)],e=H(g,f,"");b.Hb(d,e)}};j.D=function(){return+new Date};j.Q=function(b,a){b.appendChild(a)};j.Fb=function(b,a,c){(c||a.parentNode).insertBefore(b,a)};j.pc=function(b,a){a=a||b.parentNode;a&&a.removeChild(b)};j.hd=function(a,b){n(a,function(a){j.pc(a,b)})};j.Lc=function(a){j.hd(j.xb(a,e),a)};j.id=function(a,b){var c=j.rc(a);b&1&&j.C(a,(j.l(c)-j.l(a))/2);b&2&&j.H(a,(j.p(c)-j.p(a))/2)};j.kd=function(b,a){return parseInt(b,a||10)};j.ld=p;j.ee=function(b,a){var c=g.body;while(a&&b!==a&&c!==a)try{a=a.parentNode}catch(d){return k}return b===a};function U(d,c,b){var a=d.cloneNode(!c);!b&&j.wd(a,"id");return a}j.fb=U;j.lb=function(d,f){var a=new Image;function b(e,d){j.nb(a,"load",b);j.nb(a,"abort",c);j.nb(a,"error",c);f&&f(a,d)}function c(a){b(a,e)}if(eb()&&l<11.6||!d)b(!d);else{j.c(a,"load",b);j.c(a,"abort",c);j.c(a,"error",c);a.src=d}};j.Od=function(d,a,e){var c=d.length+1;function b(b){c--;if(a&&b&&b.src==a.src)a=b;!c&&e&&e(a)}n(d,function(a){j.lb(a.src,b)});b()};j.G=w;j.ob=m("overflow");j.H=m("top",2);j.C=m("left",2);j.l=m("width",2);j.p=m("height",2);j.gc=m("marginLeft",2);j.Jb=m("marginTop",2);j.A=m("position");j.K=m("display");j.v=m("zIndex",1);j.fc=function(b,a,c){if(a!=i)Cb(b,a,c);else return Ab(b)};j.Hb=function(a,b){if(b!=i)a.style.cssText=b;else return a.style.cssText};j.Rd=function(b,a){if(a===i){a=w(b,"backgroundImage")||"";var c=/\burl\s*\(\s*["']?([^"'\r\n,]+)["']?\s*\)/gi.exec(a)||[];return c[1]}w(b,"backgroundImage",a?"url('"+a+"')":"")};var R={db:j.fc,j:j.H,k:j.C,qb:j.l,Ab:j.p,jb:j.A,Ne:j.K,ab:j.v};function x(f,l){var e=tb(),b=J(),d=rb(),g=K(f);function k(b,d,a){var e=b.T(u(-d/2,-a/2)),f=b.T(u(d/2,-a/2)),g=b.T(u(d/2,a/2)),h=b.T(u(-d/2,a/2));b.T(u(300,300));return u(c.min(e.x,f.x,g.x,h.x)+d/2,c.min(e.y,f.y,g.y,h.y)+a/2)}function a(d,a){a=a||{};var n=a.B||0,p=(a.F||0)%360,q=(a.N||0)%360,u=(a.R||0)%360,l=a.o,m=a.q,f=a.Oe;if(l==i)l=1;if(m==i)m=1;if(f==i)f=1;if(e){n=0;p=0;q=0;f=0}var c=new zb(a.P,a.W,n);c.F(p);c.N(q);c.Nd(u);c.Md(a.vb,a.zb);c.Ld(l,m,f);if(b){c.cb(a.n,a.m);d.style[g]=c.Kd()}else if(!Y||Y<9){var o="",h={x:0,y:0};if(a.E)h=k(c,a.E,a.U);j.Jb(d,h.y);j.gc(d,h.x);o=c.Jd();var s=d.style.filter,t=new RegExp(/[\s]*progid:DXImageTransform\.Microsoft\.Matrix\([^\)]*\)/g),r=H(s,[t],o);pb(d,r)}}x=function(e,c){c=c||{};var g=c.n,k=c.m,f;n(R,function(a,b){f=c[b];f!==i&&a(e,f)});j.sd(e,c.a);if(!b){g!=i&&j.C(e,(c.Ec||0)+g);k!=i&&j.H(e,(c.Fc||0)+k)}if(c.Id)if(d)nb(j.Db(h,M,e,c));else a(e,c)};j.eb=M;if(d)j.eb=x;if(e)j.eb=a;else if(!b)a=M;j.O=x;x(f,l)}j.eb=x;j.O=x;function zb(j,k,o){var d=this,b=[1,0,0,0,0,1,0,0,0,0,1,0,j||0,k||0,o||0,1],i=c.sin,g=c.cos,l=c.tan;function f(a){return a*c.PI/180}function n(a,b){return{x:a,y:b}}function m(c,e,l,m,o,r,t,u,w,z,A,C,E,b,f,k,a,g,i,n,p,q,s,v,x,y,B,D,F,d,h,j){return[c*a+e*p+l*x+m*F,c*g+e*q+l*y+m*d,c*i+e*s+l*B+m*h,c*n+e*v+l*D+m*j,o*a+r*p+t*x+u*F,o*g+r*q+t*y+u*d,o*i+r*s+t*B+u*h,o*n+r*v+t*D+u*j,w*a+z*p+A*x+C*F,w*g+z*q+A*y+C*d,w*i+z*s+A*B+C*h,w*n+z*v+A*D+C*j,E*a+b*p+f*x+k*F,E*g+b*q+f*y+k*d,E*i+b*s+f*B+k*h,E*n+b*v+f*D+k*j]}function e(c,a){return m.apply(h,(a||b).concat(c))}d.Ld=function(a,c,d){if(a!=1||c!=1||d!=1)b=e([a,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1])};d.cb=function(a,c,d){b[12]+=a||0;b[13]+=c||0;b[14]+=d||0};d.F=function(c){if(c){a=f(c);var d=g(a),h=i(a);b=e([1,0,0,0,0,d,h,0,0,-h,d,0,0,0,0,1])}};d.N=function(c){if(c){a=f(c);var d=g(a),h=i(a);b=e([d,0,-h,0,0,1,0,0,h,0,d,0,0,0,0,1])}};d.Nd=function(c){if(c){a=f(c);var d=g(a),h=i(a);b=e([d,h,0,0,-h,d,0,0,0,0,1,0,0,0,0,1])}};d.Md=function(a,c){if(a||c){j=f(a);k=f(c);b=e([1,l(k),0,0,l(j),1,0,0,0,0,1,0,0,0,0,1])}};d.T=function(c){var a=e(b,[1,0,0,0,0,1,0,0,0,0,1,0,c.x,c.y,0,1]);return n(a[12],a[13])};d.Kd=function(){return"matrix3d("+b.join(",")+")"};d.Jd=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+b[0]+", M12="+b[4]+", M21="+b[1]+", M22="+b[5]+", SizingMethod='auto expand')"}}new function(){var a=this;function b(d,g){for(var j=d[0].length,i=d.length,h=g[0].length,f=[],c=0;c<i;c++)for(var k=f[c]=[],b=0;b<h;b++){for(var e=0,a=0;a<j;a++)e+=d[c][a]*g[a][b];k[b]=e}return f}a.o=function(b,c){return a.Pc(b,c,0)};a.q=function(b,c){return a.Pc(b,0,c)};a.Pc=function(a,c,d){return b(a,[[c,0],[0,d]])};a.T=function(d,c){var a=b(d,[[c.x],[c.y]]);return u(a[0][0],a[1][0])}};var N={Ec:0,Fc:0,n:0,m:0,V:1,o:1,q:1,R:0,F:0,N:0,P:0,W:0,B:0,vb:0,zb:0};j.Fd=function(c,d){var a=c||{};if(c)if(b.Ic(c))a={I:a};else if(b.Ic(c.a))a.a={I:c.a};a.I=a.I||d;if(a.a)a.a.I=a.a.I||d;return a};j.Ed=function(l,m,x,q,z,A,n){var a=m;if(l){a={};for(var g in m){var B=A[g]||1,w=z[g]||[0,1],f=(x-w[0])/w[1];f=c.min(c.max(f,0),1);f=f*B;var u=c.floor(f);if(f!=u)f-=u;var j=q.I||d.Ub,k,C=l[g],o=m[g];if(b.Ae(o)){j=q[g]||j;var y=j(f);k=C+o*y}else{k=b.Eb({wb:{}},l[g]);var v=q[g]||{};b.f(o.wb||o,function(d,a){j=v[a]||v.I||j;var c=j(f),b=d*c;k.wb[a]=b;k[a]+=b})}a[g]=k}var t=b.f(m,function(b,a){return N[a]!=i});t&&b.f(N,function(c,b){if(a[b]==i&&l[b]!==i)a[b]=l[b]});if(t){if(a.V)a.o=a.q=a.V;a.E=n.E;a.U=n.U;a.Id=e}}if(m.a&&n.cb){var p=a.a.wb,s=(p.j||0)+(p.u||0),r=(p.k||0)+(p.s||0);a.k=(a.k||0)+r;a.j=(a.j||0)+s;a.a.k-=r;a.a.s-=r;a.a.j-=s;a.a.u-=s}if(a.a&&b.td()&&!a.a.j&&!a.a.k&&!a.a.m&&!a.a.n&&a.a.s==n.E&&a.a.u==n.U)a.a=h;return a}};function m(){var a=this,d=[];function i(a,b){d.push({cc:a,kc:b})}function h(a,c){b.f(d,function(b,e){b.cc==a&&b.kc===c&&d.splice(e,1)})}a.gb=a.addEventListener=i;a.removeEventListener=h;a.i=function(a){var c=[].slice.call(arguments,1);b.f(d,function(b){b.cc==a&&b.kc.apply(f,c)})}}var l=function(z,E,g,K,N,M){z=z||0;var a=this,q,o,p,u,B=0,H,I,G,C,y=0,j=0,m=0,F,l,i,d,n,D,w=[],x;function P(a){i+=a;d+=a;l+=a;j+=a;m+=a;y+=a}function t(p){var f=p;if(n)if(!D&&(f>=d||f<i)||D&&f>=n)f=((f-i)%n+n)%n+i;if(!F||u||j!=f){var h=c.min(f,d);h=c.max(h,i);if(!F||u||h!=m){if(M){var k=(h-l)/(E||1);if(g.Dd)k=1-k;var o=b.Ed(N,M,k,H,G,I,g);if(x)b.f(o,function(b,a){x[a]&&x[a](K,b)});else b.O(K,o)}a.Xb(m-l,h-l);var r=m,q=m=h;b.f(w,function(b,c){var a=f<=j?w[w.length-c-1]:b;a.M(m-y)});j=f;F=e;a.Bb(r,q)}}}function A(a,b,e){b&&a.Yb(d);if(!e){i=c.min(i,a.zc()+y);d=c.max(d,a.bc()+y)}w.push(a)}var r=f.requestAnimationFrame||f.webkitRequestAnimationFrame||f.mozRequestAnimationFrame||f.msRequestAnimationFrame;if(b.ce()&&b.Mc()<7)r=h;r=r||function(a){b.vc(a,g.Nc)};function J(){if(q){var d=b.D(),e=c.min(d-B,g.Ac),a=j+e*p;B=d;if(a*p>=o*p)a=o;t(a);if(!u&&a*p>=o*p)L(C);else r(J)}}function s(f,g,h){if(!q){q=e;u=h;C=g;f=c.max(f,i);f=c.min(f,d);o=f;p=o<j?-1:1;a.oc();B=b.D();r(J)}}function L(b){if(q){u=q=C=k;a.lc();b&&b()}}a.mc=function(a,b,c){s(a?j+a:d,b,c)};a.nc=s;a.Y=L;a.oe=function(a){s(a)};a.J=function(){return j};a.Kc=function(){return o};a.Z=function(){return m};a.M=t;a.cb=function(a){t(j+a)};a.Jc=function(){return q};a.Hd=function(a){n=a};a.Yb=P;a.Dc=function(a,b){A(a,0,b)};a.dc=function(a){A(a,1)};a.zc=function(){return i};a.bc=function(){return d};a.Bb=a.oc=a.lc=a.Xb=b.Gc;a.hc=b.D();g=b.Eb({Nc:16,Ac:50},g);n=g.ic;D=g.Vd;x=g.Ad;i=l=z;d=z+E;I=g.Bd||{};G=g.yd||{};H=b.Fd(g.mb)};new(function(){});var j=function(q,fc){var o=this;function Bc(){var a=this;l.call(a,-1e8,2e8);a.se=function(){var b=a.Z(),d=c.floor(b),f=t(d),e=b-c.floor(b);return{X:f,re:d,jb:e}};a.Bb=function(b,a){var d=c.floor(a);if(d!=a&&a>b)d++;Tb(d,e);o.i(j.qe,t(a),t(b),a,b)}}function Ac(){var a=this;l.call(a,0,0,{ic:r});b.f(A,function(b){D&1&&b.Hd(r);a.dc(b);b.Yb(kb/bc)})}function zc(){var a=this,b=Ub.S;l.call(a,-1,2,{mb:d.Ub,Ad:{jb:Zb},ic:r},b,{jb:1},{jb:-2});a.Pb=b}function mc(n,m){var b=this,d,f,g,i,c;l.call(b,-1e8,2e8,{Ac:100});b.oc=function(){O=e;R=h;o.i(j.pe,t(w.J()),w.J())};b.lc=function(){O=k;i=k;var a=w.se();o.i(j.me,t(w.J()),w.J());!a.jb&&Dc(a.re,s)};b.Bb=function(j,h){var b;if(i)b=c;else{b=f;if(g){var e=h/g;b=a.bd(e)*(f-d)+d}}w.M(b)};b.Cb=function(a,e,c,h){d=a;f=e;g=c;w.M(a);b.M(0);b.nc(c,h)};b.fe=function(a){i=e;c=a;b.mc(a,h,e)};b.de=function(a){c=a};w=new Bc;w.Dc(n);w.Dc(m)}function oc(){var c=this,a=Xb();b.v(a,0);b.G(a,"pointerEvents","none");c.S=a;c.tb=function(){b.L(a);b.Lc(a)}}function xc(n,f){var d=this,q,N,v,i,y=[],x,C,W,H,S,F,g,w,p;l.call(d,-u,u+1,{});function E(a){q&&q.cd();T(n,a,0);F=e;q=new J.ib(n,J,b.ld(b.g(n,"idle"))||lc,!I);q.M(0)}function Z(){q.hc<J.hc&&E()}function O(p,r,n){if(!H){H=e;if(i&&n){var g=n.width,c=n.height,m=g,l=c;if(g&&c&&a.hb){if(a.hb&3&&(!(a.hb&4)||g>L||c>K)){var h=k,q=L/K*c/g;if(a.hb&1)h=q>1;else if(a.hb&2)h=q<1;m=h?g*K/c:L;l=h?K:c*L/g}b.l(i,m);b.p(i,l);b.H(i,(K-l)/2);b.C(i,(L-m)/2)}b.A(i,"absolute");o.i(j.ae,f)}}b.L(r);p&&p(d)}function Y(b,c,e,g){if(g==R&&s==f&&I)if(!Cc){var a=t(b);B.Ce(a,f,c,d,e);c.xe();U.Yb(a-U.zc()-1);U.M(a);z.Cb(b,b,0)}}function bb(b){if(b==R&&s==f){if(!g){var a=h;if(B)if(B.X==f)a=B.ne();else B.tb();Z();g=new vc(n,f,a,q);g.Yc(p)}!g.Jc()&&g.Mb()}}function G(e,i,l){if(e==f){if(e!=i)A[i]&&A[i].fd();else!l&&g&&g.Be();p&&p.Bc();var m=R=b.D();d.lb(b.Db(h,bb,m))}else{var k=c.min(f,e),j=c.max(f,e),o=c.min(j-k,k+r-j),n=u+a.Yd-1;(!S||o<=n)&&d.lb()}}function db(){if(s==f&&g){g.Y();p&&p.Wd();p&&p.xd();g.ed()}}function eb(){s==f&&g&&g.Y()}function ab(a){!P&&o.i(j.vd,f,a)}function Q(){p=w.pInstance;g&&g.Yc(p)}d.lb=function(c,a){a=a||v;if(y.length&&!H){b.sb(a);if(!W){W=e;o.i(j.rd,f);b.f(y,function(a){if(!b.ub(a,"src")){a.src=b.g(a,"src2")||"";b.K(a,a["display-origin"])}})}b.Od(y,i,b.Db(h,O,c,a))}else O(c,a)};d.nd=function(){var j=f;if(a.Tb<0)j-=r;var e=j+a.Tb*tc;if(D&2)e=t(e);if(!(D&1)&&!ib)e=c.max(0,c.min(e,r-u));if(e!=f){if(B){var g=B.De(r);if(g){var k=R=b.D(),i=A[t(e)];return i.lb(b.Db(h,Y,e,i,g,k),v)}}cb(e)}else if(a.Ib){d.fd();G(f,f)}};d.Gb=function(){G(f,f,e)};d.fd=function(){p&&p.Wd();p&&p.xd();d.ad();g&&g.od();g=h;E()};d.xe=function(){b.L(n)};d.ad=function(){b.sb(n)};d.md=function(){p&&p.Bc()};function T(a,d,f,c){if(b.ub(a,"jssor-slider"))return;if(!F){if(a.tagName=="IMG"){y.push(a);if(!b.ub(a,"src")){S=e;a["display-origin"]=b.K(a);b.L(a)}}var g=b.Rd(a);if(g){var h=new Image;b.g(h,"src2",g);y.push(h)}if(f){c=a.style.pointerEvents||b.Lb(a);!c&&b.G(a,"pointerEvents",a.tagName=="A"?"all":"none");b.v(a,(b.v(a)||0)+1);b.Jb(a,b.Jb(a)||0);b.gc(a,b.gc(a)||0);b.eb(a,{B:0})}}var j=b.xb(a);b.f(j,function(g){var j=g.tagName,l=b.g(g,"u");if(l=="player"&&!w){w=g;if(w.pInstance)Q();else b.c(w,"dataavailable",Q)}if(l=="caption"){if(d){b.Hc(g,b.g(g,"to"));b.ke(g,b.g(g,"bf"));b.g(g,"3d")&&b.je(g,"preserve-3d")}else if(!b.gd()){var h=b.fb(g,k,e);b.Fb(h,g,a);b.pc(g,a);g=h;d=e}}else if(!F&&!f&&!i){if(j=="A"){if(b.g(g,"u")=="image")i=b.ze(g,"IMG");else i=b.z(g,"image",e);if(i){x=g;b.K(x,"block");b.O(x,V);C=b.fb(x,e);b.A(x,"relative");b.fc(C,0);b.G(C,"backgroundColor","#000")}}else if(j=="IMG"&&b.g(g,"u")=="image")i=g;if(i){i.border=0;b.O(i,V)}}T(g,d,f+1,c)})}d.Xb=function(c,b){var a=u-b;Zb(N,a)};d.X=f;m.call(d);b.ie(n,b.g(n,"p"));b.he(n,b.g(n,"po"));var M=b.z(n,"thumb",e);if(M){b.fb(M);b.L(M)}b.sb(n);v=b.fb(gb);b.v(v,1e3);b.c(n,"click",ab);E(e);d.we=i;d.dd=C;d.Pb=N=n;b.Q(N,v);o.gb(203,G);o.gb(28,eb);o.gb(24,db)}function vc(y,f,p,q){var a=this,m=0,u=0,g,h,d,c,i,t,r,n=A[f];l.call(a,0,0);function v(){b.Lc(N);cc&&i&&n.dd&&b.Q(N,n.dd);b.sb(N,!i&&n.we)}function w(){a.Mb()}function x(b){r=b;a.Y();a.Mb()}a.Mb=function(){var b=a.Z();if(!C&&!O&&!r&&s==f){if(!b){if(g&&!i){i=e;a.ed(e);o.i(j.pd,f,m,u,g,c)}v()}var k,p=j.Rc;if(b!=c)if(b==d)k=c;else if(b==h)k=d;else if(!b)k=h;else k=a.Kc();o.i(p,f,b,m,h,d,c);var l=I&&(!E||F);if(b==c)(d!=c&&!(E&12)||l)&&n.nd();else(l||b!=d)&&a.nc(k,w)}};a.Be=function(){d==c&&d==a.Z()&&a.M(h)};a.od=function(){B&&B.X==f&&B.tb();var b=a.Z();b<c&&o.i(j.Rc,f,-b-1,m,h,d,c)};a.ed=function(a){p&&b.ob(lb,a&&p.wc.Me?"":"hidden")};a.Xb=function(b,a){if(i&&a>=g){i=k;v();n.ad();B.tb();o.i(j.Ud,f,m,u,g,c)}o.i(j.Td,f,a,m,h,d,c)};a.Yc=function(a){if(a&&!t){t=a;a.gb($JssorPlayer$.ud,x)}};p&&a.dc(p);g=a.bc();a.dc(q);h=g+q.Vc;c=a.bc();d=I?g+q.Uc:c}function Kb(a,c,d){b.C(a,c);b.H(a,d)}function Zb(c,b){var a=x>0?x:fb,d=zb*b*(a&1),e=Ab*b*(a>>1&1);Kb(c,d,e)}function Pb(){qb=O;Ib=z.Kc();G=w.J()}function gc(){Pb();if(C||!F&&E&12){z.Y();o.i(j.Sd)}}function ec(f){if(!C&&(F||!(E&12))&&!z.Jc()){var d=w.J(),b=c.ceil(G);if(f&&c.abs(H)>=a.Sc){b=c.ceil(d);b+=jb}if(!(D&1))b=c.min(r-u,c.max(b,0));var e=c.abs(b-d);e=1-c.pow(1-e,5);if(!P&&qb)z.oe(Ib);else if(d==b){tb.md();tb.Gb()}else z.Cb(d,b,e*Vb)}}function Hb(a){!b.g(b.Rb(a),"nodrag")&&b.Ob(a)}function rc(a){Yb(a,1)}function Yb(a,c){a=b.tc(a);var i=b.Rb(a);if(!M&&!b.g(i,"nodrag")&&sc()&&(!c||a.touches.length==1)){C=e;yb=k;R=h;b.c(g,c?"touchmove":"mousemove",Bb);b.D();P=0;gc();if(!qb)x=0;if(c){var f=a.touches[0];ub=f.clientX;vb=f.clientY}else{var d=b.qc(a);ub=d.x;vb=d.y}H=0;hb=0;jb=0;o.i(j.Qd,t(G),G,a)}}function Bb(d){if(C){d=b.tc(d);var f;if(d.type!="mousemove"){var l=d.touches[0];f={x:l.clientX,y:l.clientY}}else f=b.qc(d);if(f){var j=f.x-ub,k=f.y-vb;if(c.floor(G)!=G)x=x||fb&M;if((j||k)&&!x){if(M==3)if(c.abs(k)>c.abs(j))x=2;else x=1;else x=M;if(ob&&x==1&&c.abs(k)-c.abs(j)>3)yb=e}if(x){var a=k,i=Ab;if(x==1){a=j;i=zb}if(!(D&1)){if(a>0){var g=i*s,h=a-g;if(h>0)a=g+c.sqrt(h)*5}if(a<0){var g=i*(r-u-s),h=-a-g;if(h>0)a=-g-c.sqrt(h)*5}}if(H-hb<-2)jb=0;else if(H-hb>2)jb=-1;hb=H;H=a;sb=G-H/i/(Y||1);if(H&&x&&!yb){b.Ob(d);if(!O)z.fe(sb);else z.de(sb)}}}}}function bb(){qc();if(C){C=k;b.D();b.nb(g,"mousemove",Bb);b.nb(g,"touchmove",Bb);P=H;z.Y();var a=w.J();o.i(j.Xd,t(a),a,t(G),G);E&12&&Pb();ec(e)}}function jc(c){if(P){b.be(c);var a=b.Rb(c);while(a&&v!==a){a.tagName=="A"&&b.Ob(c);try{a=a.parentNode}catch(d){break}}}}function Jb(a){A[s];s=t(a);tb=A[s];Tb(a);return s}function Dc(a,b){x=0;Jb(a);o.i(j.Pd,t(a),b)}function Tb(a,c){wb=a;b.f(S,function(b){b.ec(t(a),a,c)})}function sc(){var b=j.Wc||0,a=X;if(ob)a&1&&(a&=1);j.Wc|=a;return M=a&~b}function qc(){if(M){j.Wc&=~X;M=0}}function Xb(){var a=b.yb();b.O(a,V);b.A(a,"absolute");return a}function t(a){return(a%r+r)%r}function kc(b,d){if(d)if(!D){b=c.min(c.max(b+wb,0),r-u);d=k}else if(D&2){b=t(b+wb);d=k}cb(b,a.pb,d)}function xb(){b.f(S,function(a){a.jc(a.rb.Fe<=F)})}function hc(){if(!F){F=1;xb();if(!C){E&12&&ec();E&3&&A[s]&&A[s].Gb()}}}function Ec(){if(F){F=0;xb();C||!(E&12)||gc()}}function ic(){V={qb:L,Ab:K,j:0,k:0};b.f(T,function(a){b.O(a,V);b.A(a,"absolute");b.ob(a,"hidden");b.L(a)});b.O(gb,V)}function ab(b,a){cb(b,a,e)}function cb(g,f,l){if(Rb&&(!C&&(F||!(E&12))||a.Xc)){O=e;C=k;z.Y();if(f==i)f=Vb;var d=Cb.Z(),b=g;if(l){b=d+g;if(g>0)b=c.ceil(b);else b=c.floor(b)}if(D&2)b=t(b);if(!(D&1))b=c.max(0,c.min(b,r-u));var j=(b-d)%r;b=d+j;var h=d==b?0:f*c.abs(j);h=c.min(h,f*u*1.5);z.Cb(d,b,h||1)}}o.mc=function(){if(!I){I=e;A[s]&&A[s].Gb()}};function W(){return b.l(y||q)}function nb(){return b.p(y||q)}o.E=W;o.U=nb;function Eb(c,d){if(c==i)return b.l(q);if(!y){var a=b.yb(g);b.Lb(a,b.Lb(q));b.Hb(a,b.Hb(q));b.K(a,"block");b.A(a,"relative");b.H(a,0);b.C(a,0);b.ob(a,"visible");y=b.yb(g);b.A(y,"absolute");b.H(y,0);b.C(y,0);b.l(y,b.l(q));b.p(y,b.p(q));b.Hc(y,"0 0");b.Q(y,a);var h=b.xb(q);b.Q(q,y);b.G(q,"backgroundImage","");b.f(h,function(c){b.Q(b.g(c,"noscale")?q:a,c);b.g(c,"autocenter")&&Lb.push(c)})}Y=c/(d?b.p:b.l)(y);b.ge(y,Y);var f=d?Y*W():c,e=d?c:Y*nb();b.l(q,f);b.p(q,e);b.f(Lb,function(a){var c=b.kd(b.g(a,"autocenter"));b.id(a,c)})}o.Cd=Eb;m.call(o);o.S=q=b.Sb(q);var a=b.Eb({hb:0,Yd:1,Wb:1,Zb:0,ac:k,Ib:1,kb:e,Xc:e,Tb:1,Qc:3e3,Nb:1,pb:500,bd:d.jd,Sc:20,Tc:0,bb:1,xc:0,te:1,Qb:1,sc:1},fc);a.kb=a.kb&&b.zd();if(a.yc!=i)a.Qc=a.yc;if(a.le!=i)a.xc=a.le;var fb=a.Qb&3,tc=(a.Qb&4)/-4||1,mb=a.Ee,J=b.Eb({ib:p,kb:a.kb},a.Ge);J.Vb=J.Vb||J.Le;var Fb=a.Ke,Z=a.Ie,eb=a.He,Q=!a.te,y,v=b.z(q,"slides",Q),gb=b.z(q,"loading",Q)||b.yb(g),Nb=b.z(q,"navigator",Q),dc=b.z(q,"arrowleft",Q),ac=b.z(q,"arrowright",Q),Mb=b.z(q,"thumbnavigator",Q),pc=b.l(v),nc=b.p(v),V,T=[],uc=b.xb(v);b.f(uc,function(a){a.tagName=="DIV"&&!b.g(a,"u")&&T.push(a);b.v(a,(b.v(a)||0)+1)});var s=-1,wb,tb,r=T.length,L=a.Cc||pc,K=a.qd||nc,Wb=a.Tc,zb=L+Wb,Ab=K+Wb,bc=fb&1?zb:Ab,u=c.min(a.bb,r),lb,x,M,yb,S=[],Qb,Sb,Ob,cc,Cc,I,E=a.Nb,lc=a.Qc,Vb=a.pb,rb,ib,kb,Rb=u<r,D=Rb?a.Ib:0,X,P,F=1,O,C,R,ub=0,vb=0,H,hb,jb,Cb,w,U,z,Ub=new oc,Y,Lb=[];if(r){if(a.kb)Kb=function(a,c,d){b.eb(a,{P:c,W:d})};I=a.ac;o.rb=fc;ic();b.ub(q,"jssor-slider",e);b.v(v,b.v(v)||0);b.A(v,"absolute");lb=b.fb(v,e);b.Fb(lb,v);if(mb){cc=mb.Je;rb=mb.ib;ib=u==1&&r>1&&rb&&(!b.gd()||b.Mc()>=8)}kb=ib||u>=r||!(D&1)?0:a.xc;X=(u>1||kb?fb:-1)&a.sc;var Gb=v,A=[],B,N,Db=b.ve(),ob=Db.ye,G,qb,Ib,sb;Db.Zc&&b.G(Gb,Db.Zc,([h,"pan-y","pan-x","none"])[X]||"");U=new zc;if(ib)B=new rb(Ub,L,K,mb,ob);b.Q(lb,U.Pb);b.ob(v,"hidden");N=Xb();b.G(N,"backgroundColor","#000");b.fc(N,0);b.Fb(N,Gb.firstChild,Gb);for(var db=0;db<T.length;db++){var wc=T[db],yc=new xc(wc,db);A.push(yc)}b.L(gb);Cb=new Ac;z=new mc(Cb,U);b.c(v,"click",jc,e);b.c(q,"mouseout",b.Oc(hc,q));b.c(q,"mouseover",b.Oc(Ec,q));if(X){b.c(v,"mousedown",Yb);b.c(v,"touchstart",rc);b.c(v,"dragstart",Hb);b.c(v,"selectstart",Hb);b.c(g,"mouseup",bb);b.c(g,"touchend",bb);b.c(g,"touchcancel",bb);b.c(f,"blur",bb)}E&=ob?10:5;if(Nb&&Fb){Qb=new Fb.ib(Nb,Fb,W(),nb());S.push(Qb)}if(Z&&dc&&ac){Z.Ib=D;Z.bb=u;Sb=new Z.ib(dc,ac,Z,W(),nb());S.push(Sb)}if(Mb&&eb){eb.Zb=a.Zb;Ob=new eb.ib(Mb,eb);S.push(Ob)}b.f(S,function(a){a.Kb(r,A,gb);a.gb(n.Zd,kc)});b.G(q,"visibility","visible");Eb(W());xb();a.Wb&&b.c(g,"keydown",function(b){if(b.keyCode==37)ab(-a.Wb);else b.keyCode==39&&ab(a.Wb)});var pb=a.Zb;if(!(D&1))pb=c.max(0,c.min(pb,r-u));z.Cb(pb,pb,0)}};j.vd=21;j.Qd=22;j.Xd=23;j.pe=24;j.me=25;j.rd=26;j.ae=27;j.Sd=28;j.qe=202;j.Pd=203;j.pd=206;j.Ud=207;j.Td=208;j.Rc=209;var n={Zd:1};function p(e,d,c){var a=this;l.call(a,0,c);a.cd=b.Gc;a.Vc=0;a.Uc=c}jssor_1_slider_init=function(){var h={ac:e,yc:0,Tb:4,pb:2500,bd:d.Ub,Nb:4,Cc:140,bb:7},g=new j("jssor_1",h);function a(){var b=g.S.parentNode.clientWidth;if(b){b=c.min(b,809);g.Cd(b)}else f.setTimeout(a,30)}a();b.c(f,"load",a);b.c(f,"resize",a);b.c(f,"orientationchange",a)}})(window,document,Math,null,true,false)
</script>
<style>

</style>
<div id="container" style="position:relative;margin:0 auto;top:0px;left:0px;width:822px;height:120px;overflow:hidden;">
<div style="position:absolute;display:block;background:url('http://gimplearn.net/styles/prosilver/template/img/filmstrip.gif') no-repeat center center;top:0px;left:0px;width:100%;height:100%;"></div>

<div id="jssor_1" style="position:relative;margin:0 auto;top:18px;left:0px;width:980px;height:100px;overflow:hidden;visibility:hidden;">
<!-- Loading Screen -->
<div data-u="loading" style="position:absolute;top:0px;left:0px;background-color:rgba(0,0,0,0.7);">
<div style="filter: alpha(opacity=70); opacity: 0.7; position: absolute; display: block; top: 0px; left: 0px; width: 100%; height: 100%;"></div>
<div style="position:absolute;display:block;background:url('http://gimplearn.net/styles/prosilver/template/img/loading.gif') no-repeat center center;top:0px;left:0px;width:100%;height:100%;"></div>
</div>
<div data-u="slides" style="cursor:default;position:relative;top:0px;left:0px;width:980px;height:100px;overflow:hidden;">
<a data-u="any" href="http://www.jssor.com" style="display:none">Scrolling Logo Thumbnail Slider</a>
<?php } ?>

<?php
function str_replace_first($from, $to, $subject)
{
    $from = '/'.preg_quote($from, '/').'/';

    return preg_replace($from, $to, $subject, 1);
}
// now you can display the results returned
	while ($row=mysql_fetch_array($result)) {
	  //$filename = $row["physical_filename"];
		$postid = $row["post_msg_id"];
		$attachids = $row["attach_id"];
		$posttxt = $row["post_text"];
		if ($attachids != "") {
			$attachids = explode(",",$attachids);
			array_splice($attachids, 3); //only grab first 3
			foreach($attachids as $attachid){
				echo '<div><a title="30 Latest images
Click to go to post"  href="http://gimplearn.net/viewtopic.php?p='.$postid.'#p'.$postid.'"><img data-u="image" src="http://gimplearn.net/download/file.php?id='.$attachid.'"/></a></div>';
			}
		}else{
		  $count = 0;
		  while ((strpos($posttxt , "<IMG src=",0) > -1) and ($count < 3)){
			preg_match('%<img.*?src=["\'](.*?)["\'].*?>%i', $posttxt , $imgs);
			$img = $imgs[1];
			echo '<div><a title="30 Latest images
Click to go to post"  href="http://gimplearn.net/viewtopic.php?p='.$postid.'#p'.$postid.'"><img data-u="image" src="'.$img.'"/></a></div>';
		  // replace to done so we can find the next one.
			$posttxt=str_replace_first("<IMG src=","done",$posttxt);
			$count += 1;
			
		  }
	  }
  }
?>
<?php if ($numrows > 0) { ?>
</div>
</div>
</div>
<script type="text/javascript">jssor_1_slider_init();</script>
<!-- #endregion Jssor Slider End -->
<?php } ?>
0 x



aka Tin
Image gimplearn.net                                              

Post Reply

Last 20 Members Who Visited This Topic

  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments Only) •
1: Pat625
2: Pat625
3: dinasset
4: gnerd
5: gnerd
6: homer
7: RJKD

Who is online

Users browsing this forum: No registered users and 1 guest