Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

February 05, 2023, 11:17:38 AM

Login with username, password and session length
Members
  • Total Members: 3856
  • Latest: Bixby
Stats
  • Total Posts: 193983
  • Total Topics: 21135
  • Online today: 45
  • Online ever: 3540
  • (September 02, 2022, 06:38:54 PM)
Users Online
Users: 5
Guests: 30
Total: 35

Author Topic: [Block] SMF Media Gallery Random Picture  (Read 28873 times)

0 Members and 1 Guest are viewing this topic.

juanporro

  • Guest
Re: [Block] SMF Media Gallery Random Picture
« Reply #30 on: March 06, 2009, 09:07:31 AM »
Now going back to that PM?................. should I send it?

juanporro

  • Guest
Re: [Block] SMF Media Gallery Random Picture
« Reply #31 on: March 06, 2009, 10:43:18 AM »
Also as Bec mentioned, is it possible to get the code to post three pics instead of one? If not it is ok with me I am very pleased with just being able to see one.

Petee

  • Guest
Re: [Block] SMF Media Gallery Random Picture
« Reply #32 on: March 06, 2009, 12:00:40 PM »
Here is a block they posted over at the smf-media site. 

2, 'rand()');  this part of the code says to pull 2 random pictures. Change it to suit your needs.

Code: [Select]
global $sourcedir, $context, $txt, $galurl, $scripturl, $settings;

require_once($sourcedir . '/Subs-MGallery.php');
loadMGal_Settings();

if (loadlanguage('MGallery') == false)
  loadLanguage('MGallery', 'english');

$items = getMediaItems(0, 2, 'rand()');

echo '
<center><table border="0">
  <tr>';

foreach ($items as $item)
  echo '
    <td>
      <div class="smalltext" style="text-align: center; line-height: 1.4em; border: 1px #000000 solid; padding: 5px;">
      <a href="',$galurl,'sa=item;id=',$item['id'],'">',$item['title'],'</a><br />
      <a href="',$galurl,'sa=item;id=',$item['id'],'"><img alt="" src="',$galurl,'sa=media;id=',$item['id'],';thumb" alt="" /></a><br />
      ',$txt['mgallery_views'],': ',$item['views'],'<br />
      ',$txt['mgallery_posted_by'],': <a href="',$scripturl,'?action=profile;u=',$item['poster_id'],'">',$item['poster_name'],'</a><br />
      ',$txt['mgallery_in_album'],': <a href="',$galurl,'sa=album;id=',$item['id_album'],'">',$item['album_name'],'</a>
      ',$item['is_new'] ? '<br /><img alt="" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" border="0" />' : '','
      </div>
    </td>';
echo '
  </tr>
</table></center>';

juanporro

  • Guest
Re: [Block] SMF Media Gallery Random Picture
« Reply #33 on: March 06, 2009, 12:46:50 PM »
Ok one more thing.

Do you guys know how to take away the outline from the thumbnail?

The first code had a clean picture and the one with multiple pictures puts a rather ugly outline to the thumbnail.

Thanks
« Last Edit: March 06, 2009, 01:02:18 PM by juanporro »

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: [Block] SMF Media Gallery Random Picture
« Reply #34 on: March 06, 2009, 01:07:05 PM »
Remove border: 1px #000000 solid;

NenaGb

  • Guest
Re: [Block] SMF Media Gallery Random Picture
« Reply #35 on: April 20, 2009, 10:54:38 PM »
do you have any idea how to display a gallery slideshow in a block code? i know you have to purchase the slideshow code for smf media gallery which I have done, but I was under the impression the slideshow when purchased gave you this effect only to find out i was mistaken and it does not do that at all. I would love it if there was a way to actually display the slideshow in a block.

Offline Lesmond

  • Do what you have to!
  • Administrator
  • *
  • Posts: 3175
    • Tiny Pix... Free Image Hosting and Sharing.
Re: [Block] SMF Media Gallery Random Picture
« Reply #36 on: April 21, 2009, 12:03:19 AM »
You would be best asking that over at http://smf-media.com

do you have any idea how to display a gallery slideshow in a block code? i know you have to purchase the slideshow code for smf media gallery which I have done, but I was under the impression the slideshow when purchased gave you this effect only to find out i was mistaken and it does not do that at all. I would love it if there was a way to actually display the slideshow in a block.
Please don't PM me for support without an invitation.


NenaGb

  • Guest
Re: [Block] SMF Media Gallery Random Picture
« Reply #37 on: April 21, 2009, 01:12:39 AM »
You would be best asking that over at http://smf-media.com

do you have any idea how to display a gallery slideshow in a block code? i know you have to purchase the slideshow code for smf media gallery which I have done, but I was under the impression the slideshow when purchased gave you this effect only to find out i was mistaken and it does not do that at all. I would love it if there was a way to actually display the slideshow in a block.

already did and was told he was not interested in looking into it any further at this time. i was a bit disappointed because naturally with a slideshow you would want to be able to feature it on a page or post or w/in a block but that is not an option they offer to work on at time time. :)

ehsizzup

  • Guest
Re: [Block] SMF Media Gallery Random Picture
« Reply #38 on: May 08, 2009, 08:28:38 PM »
nice job.  ive been looking for this for a while.

can this block be changed to show pictures from one album only?



Offline WillyP

  • Support Team
  • *
  • Posts: 769
    • Planet Descent
Re: [Block] SMF Media Gallery Random Picture
« Reply #39 on: May 24, 2009, 08:18:07 AM »
To do that I would try changing the url in the script to the url of the album you want...  ;) just a guess, I haven't tried that.

Nice block, just installed and it works great! See it here if you want a demo. (no, not the picture of the day block, scroll down... :coolsmiley: )
« Last Edit: May 24, 2009, 08:19:49 AM by WillyP »