xoops forums

script_fu

Friend of XOOPS
Posted on: 2008/2/1 23:07
script_fu
script_fu (Show more)
Friend of XOOPS
Posts: 1494
Since: 2002/12/27
#11

Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

I have verified that the .jpg format will work in news and can be turned into a .pdf

Now when you download a thumb from extgallery the format of the picture is hook-thumb.php.jpg and they work when you click on them.

So Mr. Zoullou is doing the code correct as a thumb. But somewhere the .jpg info its getting lost by TCPDF when ported into the .pdf

So does this now lead us away from Z's code and put it back on TCPDF? Or is the issue really in extgallery.

Any bets on this people? How can you tell for sure were the problem lays?

Will_H

Friend of XOOPS
Posted on: 2008/2/1 23:09
Will_H
Will_H (Show more)
Friend of XOOPS
Posts: 1786
Since: 2004/10/10
#12

Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

you missed my post.

The problem is extgal...

Should I even bother posting, as it seems you refuse to listen to me.

script_fu

Friend of XOOPS
Posted on: 2008/2/1 23:17
script_fu
script_fu (Show more)
Friend of XOOPS
Posts: 1494
Since: 2002/12/27
#13

Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

I am listening to you. Because of your posts we are getting closer to fixing the problem.

You are under the opinion it is in extgallery. Good I understand you position. You also said the issue can be solved in the image manager.

Would you be so kind as to post your fix?

Now I think Z's code is working like it should. When you right click the thumb and hit save its a .jpg

This leads me to think that the issue might not be in the extgallery module.

This is how issues get solved. By working together. You don't half to talk down to me or better yet treat me like a fool.

You really might not be correct about this... But you keep coming here and insisting that the problem is this or that without the code is helping know one.

Will_H

Friend of XOOPS
Posted on: 2008/2/1 23:25
Will_H
Will_H (Show more)
Friend of XOOPS
Posts: 1786
Since: 2004/10/10
#14

Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

Listen.

The makepdf is set to recognize images.

So lets try and trick it into thinking these are images.

original
// eXtGallery Hack
$patterns[] = "/[gallery]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\1" rel="lightbox"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\1" alt="" /></a>';

$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\3" rel="lightbox" title="\2" alt="\2"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\3" alt="\2" title="\2" /></a>';

$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '
<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\3" rel="lightbox[\2]"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\3" alt="" /></a>';

$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1 title=(['"
]?)([ a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\5" rel="lightbox[\2]" title="\4" alt="\4"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\5" title="\4" alt="\4" /></a>';

$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1 group=(['"]?)([a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\5" rel="lightbox[\4]" title="\2" alt="\2"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\5" title="\2" alt="\2" /></a>';
// End eXtGallery Hack


As .jpgs
// eXtGallery Hack
$patterns[] = "/[gallery]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\1.jpg" rel="lightbox"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\1" alt="" /></a>';

$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\3.jpg" rel="lightbox" title="\2" alt="\2"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\3" alt="\2" title="\2" /></a>';

$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '
<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\3.jpg" rel="lightbox[\2]"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\3" alt="" /></a>';

$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1 title=(['"
]?)([ a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\5.jpg" rel="lightbox[\2]" title="\4" alt="\4"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\5" title="\4" alt="\4" /></a>';

$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1 group=(['"]?)([a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\5.jpg" rel="lightbox[\4]" title="\2" alt="\2"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\5" title="\2" alt="\2" /></a>';
// End eXtGallery Hack


I went ahead and implemented this on your site. They have a .jpg extension at the very end... but thats only after its been terminated by the .php?id=64

Right now it reads like .php?id=64.jpg

Yeah, extgal hooks still work. Properties shows em with a .jpg extension at the end... but... .php?id=64 kills it.

Will_H

Friend of XOOPS
Posted on: 2008/2/1 23:28
Will_H
Will_H (Show more)
Friend of XOOPS
Posts: 1786
Since: 2004/10/10
#15

Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

Ok got it working

Fixed to make pdf

// eXtGallery Hack
$patterns[] = "/[gallery]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\1.jpg" rel="lightbox"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\1.jpg" alt="" /></a>';

$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\3.jpg" rel="lightbox" title="\2" alt="\2"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\3.jpg" alt="\2" title="\2" /></a>';

$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1]([0-9]*)[/gallery]/sU";
$replacements[] = '
<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\3.jpg" rel="lightbox[\2]"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\3.jpg" alt="" /></a>';

$patterns[] = "/[gallery group=(['"]?)([a-zA-Z0-9]*)\1 title=(['"
]?)([ a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\5.jpg" rel="lightbox[\2]" title="\4" alt="\4"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\5.jpg" title="\4" alt="\4" /></a>';

$patterns[] = "/[gallery title=(['"]?)([ a-zA-Z0-9]*)\1 group=(['"]?)([a-zA-Z0-9]*)\3]([0-9]*)[/gallery]/sU";
$replacements[] = '<a href="'.XOOPS_URL.'/modules/extgallery/hook-photo.php?id=\5.jpg" rel="lightbox[\4]" title="\2" alt="\2"><img src="'.XOOPS_URL.'/modules/extgallery/hook-thumb.php?id=\5.jpg" title="\2" alt="\2" /></a>';
// End eXtGallery Hack

script_fu

Friend of XOOPS
Posted on: 2008/2/2 0:15
script_fu
script_fu (Show more)
Friend of XOOPS
Posts: 1494
Since: 2002/12/27
#16

Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

Well that certainly fixed the problem. Thank you Will! I can only assume you patched both the frameworks and the class module.textsanitizer.php ??

For others who might need this. This hack shuts down any other picture format that you might want to use with lightbox. Only .jpg files will work with this hack.

It suits what I need to do and thus is the solution to my problem. Another big thank you goes out to Will for the fix.

-----

Now that the pdf on the fly is working I have another issue about the formatting of them.

I will start a new topic about this.

Will_H

Friend of XOOPS
Posted on: 2008/2/2 5:01
Will_H
Will_H (Show more)
Friend of XOOPS
Posts: 1786
Since: 2004/10/10
#17

Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

of course I did.

btw, who was right and who was wrong?

Looks like the problem was with ... gasp extgal...

qcorek

Just popping in
Posted on: 2008/2/5 21:12
qcorek
qcorek (Show more)
Just popping in
Posts: 68
Since: 2007/10/7
#18

Re: Lightbox, gallery tags, news 1.56 & Pdf problems with TCPDF error

what is hook hack and how to install light box for extGallery?