TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 18, 2024, 09:47:44 PM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,189
  • Total Topics: 21,220
  • Online today: 112
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 40
  • Total: 40

[Discuss] SMF Gallery Block for SMF2

Started by freddy888, April 10, 2010, 03:55:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Freddy

#50
You can't do cropping with HTML.  The best you can do is set either the width or the height instead of both.

NeoX

OK Thank you Freddy....
I have found a script that crop images but work on link image:

/scripts/crop/resize.php?url=/gallery/thumb_138-280711154913.jpeg&size=100x100c50

It's possible to place in this code?

// display the picture thumbnail and link it to gallery full picture

echo    '           
<a href="'.$scripturl.'?action=gallery;sa=view;id='.$row['ID_PICTURE'].'">
<img src="'.$modSettings['gallery_url'].$row['thumbfilename'].'" /></a><br />'."\n";



Thank you  :)

Freddy

Well you haven't given me much to go on so I guess this :

echo    '           
<a href="'.$scripturl.'?action=gallery;sa=view;id='.$row['ID_PICTURE'].'">
<img src="'.$modSettings['gallery_url'].$row['thumbfilename'].'&size=100x100c50" /></a><br />'."\n";

NeoX

#53
Tahnk you!
Work perfectly....



a href="'.$scripturl.'?action=gallery;sa=view;id='.$row['ID_PICTURE'].'" target="_blank">

<img src="http://www.yoursite.com/scriptfolder/resize.php?url='.$modSettings['gallery_url']

.$row['thumbfilename'].'&size=80x80c0" /></a><br />'."\n";


Here the script:

newbielink:http://fabrizio.zellini.org/resizer/dist/ [nonactive]

O0

Freddy

No problem, looks great and thanks for the link, I think others will find it useful too  O0

NeoX

Hi tinyportal,
I have only a little question, can I allow an ID instead a CAT (Code: $gal_allowCats or $gal_disallowCats) so in a block I can see image from a user gallery?

Thank You!


MinatO

Tried the code in a php block, but i'm getting this msg:
Fatal error: Call to undefined function tp_query() in /home/cyberspo/public_html/Sources/Load.php(2203) : eval()'d code(114) : eval()'d code on line 173

And when I do it in an article to test, i get this:
Fatal error: Call to undefined function tp_query() in /home/cyberspo/public_html/Sources/TPSubs.php(1748) : eval()'d code on line 172

Any clue on what i'm doing wrong?

lurkalot

#57
Quote from: MinatO on February 15, 2012, 07:06:57 PM
Tried the code in a php block, but i'm getting this msg:
Fatal error: Call to undefined function tp_query() in /home/cyberspo/public_html/Sources/Load.php(2203) : eval()'d code(114) : eval()'d code on line 173

And when I do it in an article to test, i get this:
Fatal error: Call to undefined function tp_query() in /home/cyberspo/public_html/Sources/TPSubs.php(1748) : eval()'d code on line 172

Any clue on what i'm doing wrong?

Try this one, http://www.tinyportal.net/index.php?topic=32358.msg273522#msg273522

IchBin

Fixed your post Lurk, you had your reply inside the quote. :)

lurkalot