News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF Media Gallery (SMG) - 2.0.5 is out! (December 2)

Started by SMGTeam, September 09, 2008, 03:14:05 PM

Previous topic - Next topic

L'AltroWeb

@Nao: i use the TinyPortal block from smf-media in my site but how i can exclude one specific gallery(ID) from this block?
PS: is possible to upload (more) images via ftp?

cryptoknight

I'm trying to get this to work.

I've got it installed, configured an album, set security on it, and uploaded an image to it.

But only admins can see the gallery link.  And I don't see a setting to enable the gallery so regular users can see it.  The only security config I can find is per gallery, and I have set the gallery to permit registered users in particular groups to see it.

casp3r

Go to the permissions section of admin, select regular members and you should see overall permissions for the gallery.
Aviation forum & gallery
www.niaviation.co.uk

Nao 尚

@dark> you can exclude a gallery by, err... I don't remember. I know it can be done, lol. Just browse around the hack blocks over at smf-media.com...

ftp: yes it's possible. No, not for now. It's a feature in SMG2. It's the first feature that was written specifically for SMG2, months ago. Been frustrating not being able to offer it to users, especially since it didn't require that many changes to the code, but that's Dragooon's choice. :P
I actually used it to import my Foxprog audio library to SMG format earlier this month.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

L'AltroWeb

#3524
Ok Nao thanks :)
-
Edit: i've found solution here: http://smf-media.com/community/index.php?topic=121.msg4335#msg4335
-
Then if i want disable album id 2 i can put:
   $items = getMediaItems(0, 5, 'RAND()', false, array(2));
or:
   $items = getMediaItems(0, 5, 'RAND()', true, array(1,3,4,5,6,7,8,9));
i'm right?
-
PS: this is my actual block (without table, centered, and with 3images separated by <hr />) :)
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, 3, 'RAND()');

  echo '
      <hr />';
foreach ($items as $item)
  echo '
      <div class="smalltext" style="text-align: center; line-height: 1.4em; border: 0; padding: 2px;">
      <a href="',$galurl,'sa=item;id=',$item['id'],'">',$item['title'],'</a><br />
      <div style="padding: 2px 0;">
      <a href="',$galurl,'sa=item;id=',$item['id'],'" title="',$item['title'],'">
      <img alt="',$item['title'],'" src="',$galurl,'sa=media;id=',$item['id'],';thumb" /></a>
      </div>
      ',$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><hr />
      ';

kolt

#3525
Hello, Is it possible having a random or last video in the portal?

I mean a plugin that can show it in the portal side bar.

Thanks in advance

Akyhne

For Tiny Protal there's a mod at their site or at smf-media.com. I would be surprised if that isn't also the case for Simple Portal.

kolt

Yes I see It, sorry for not been cleare, because I wanted to be sure that if existed.

I use mkportal, do you think if is it possible for that?

L'AltroWeb

#3528
Hi!
i've included highslide effect (wamp, local server) in block with all info like [smg *] tag:

all works fine except time function (see screenshot) any idea to fix? :)
---
Fixed: -> ',$item['time'],'
---
PS: this is full (beta) code:

global $sourcedir, $context, $txt, $galurl, $scripturl, $settings;

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

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

$items = getMediaItems(0, 3, 'RAND()');


  echo '
      <hr />';
foreach ($items as $item)
  echo '
      <div class="smalltext" style="text-align: center; line-height: 1.4em; border: 0; padding: 2px;">
      <a href="',$galurl,'sa=item;id=',$item['id'],'">',$item['title'],'</a><br />
      <div style="padding: 2px 0;">
      <a href="',$galurl,'sa=media;id=',$item['id'],'" title="',$item['title'],'" class="hs" onclick="return hs.expand(this);">
      <img alt="',$item['title'],'" src="',$galurl,'sa=media;id=',$item['id'],';thumb" class="smg_ext" border="0" /></a>
      </div>
      <img style="width: 10px; height: 10px;" alt="" src="' . $settings['images_smg'] . '/graph.gif" /> ',$txt['mgallery_views'],': ',$item['views'],'<br />
      <img style="width: 10px; height: 10px;" alt="" src="' . $settings['images_smg'] . '/comment.gif" /> ',$txt['mgallery_comments'],': ',$item['comments'],'<br />
      ',$txt['mgallery_posted_by'],' <a href="',$scripturl,'?action=profile;u=',$item['poster_id'],'">',$item['poster_name'],'</a><br />
      <img style="width: 10px; height: 10px;" alt="" src="' . $settings['images_smg'] . '/clock.gif" />
      ',$item['time'],'<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><hr />
      ';

-
Edit: now u can test directly in my site :)

PRaDiUS

Quote from: Nao 尚 on May 28, 2009, 05:00:17 AM
Quote from: PRaDiUS on May 27, 2009, 06:30:00 PM
Nao, thanks.
Which part of this is actually calling for the album?
I just wanna be sure that I put this @ symbol in the right place so that I don't mess it up.
Line 829... @$album
It simply means "don't tell me if there's an error."
It doesn't fix the error. It just ignores it.

Alright. Thanks bro. I'll do that for now.
Is there no way I can correct the problem at this time?

          [ RGXbox.com ]

littenburg

is there any way to embed picture from other sites, like you do with the video? because i have had several complaints form users not liking the fact they have to save the image to their computer, then upload it all over again...

mattchewone

Nao/Dragoon,

Are you able to help me with finding the right file i need to edit in order to add a duplicate of 'Direct Link' and add IMG tags in the box?

Thanks so much
Matt

Nao 尚

@Pradius> I couldn't know what your problem is without looking at your code...

@littenburg> This has been asked for several times already. I'll probably implement it sometimes in the future. It shouldn't be too hard to make. Just a small Aeva bypass at two places and I'm done. Please remind me next week if I haven't announced it's done. I'm currently busy on the Foxy! SMG mod and adding commissioned sites to Aeva.

@matt> MGallery.template.php
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

ianus

Quote from: kolt on May 28, 2009, 08:38:45 PM
Hello, Is it possible having a random or last video in the portal?
I mean a plugin that can show it in the portal side bar.

Quote from: Akyhne on May 28, 2009, 08:43:16 PM
For Tiny Protal there's a mod at their site or at smf-media.com. I would be surprised if that isn't also the case for Simple Portal.

You are right. For Simple Portal (2.2) there is a "already build in" block for the Gallery.
Admin -> SimplePortal -> Blocks -> Add Block and then choose "Gallery"

Nao 尚

@Pradius> I had another look at your board -- it's still showing the copyright footers in black over a black background. When are you planning to make them visible?

@ianus> SMF Gallery or SMF Media Gallery?
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

L'AltroWeb

@nao: Please can you answer to my precedent question? :-[
http://www.simplemachines.org/community/index.php?topic=260821.msg2082382#msg2082382
-
Quote from: Dark-Wolf on May 28, 2009, 10:19:00 AM
Then if i want disable album id 2 i can put:
   $items = getMediaItems(0, 5, 'RAND()', false, array(2));
or:
   $items = getMediaItems(0, 5, 'RAND()', true, array(1,3,4,5,6,7,8,9));
i'm right?...
I've try this:   $items = getMediaItems(0, 5, 'RAND()', false, array(2));but i receive error 500.
Works fine if i use    $items = getMediaItems(0, 5, 'RAND()', true, array(1,3,4,5,6,7,8,9));but, if is possible, i want disable one album and not enable all except one (otherwise is necessary to edit block code every time i make a new album) :(
--
PS: in your opinion is ok the code with highslide?

rgecy

I wanted to know if there is a way to show the number of new images posted since your last visit on the Gallery tab like SMF does for your Messages.   

For example:  Gallery(11)

Thanks,

RGecy

ianus

Quote from: Nao 尚 on May 29, 2009, 09:36:00 AM
@ianus> SMF Gallery or SMF Media Gallery?

I have SimplePortal and SMF Media Gallery installed.
Right thread imho  ;D

Don't know if SP grab pictures from SMF Gallery also or if the block-script is able to detect other Galleries in general.

PRaDiUS

Quote from: Nao 尚 on May 29, 2009, 02:45:19 AM
@Pradius> I couldn't know what your problem is without looking at your code...

Ok, here is mgallery.template and index.template.
If you need me to put up any of my source files for you to see then let me know.
I am pretty sure the root of the problem is in here somewhere thou.
Thanks for taking a look.

;D

          [ RGXbox.com ]

Özgür

Quote from: Dark-Wolf on May 29, 2009, 09:47:11 AM
@nao: Please can you answer to my precedent question? :-[
http://www.simplemachines.org/community/index.php?topic=260821.msg2082382#msg2082382
-
Quote from: Dark-Wolf on May 28, 2009, 10:19:00 AM
Then if i want disable album id 2 i can put:
   $items = getMediaItems(0, 5, 'RAND()', false, array(2));
or:
   $items = getMediaItems(0, 5, 'RAND()', true, array(1,3,4,5,6,7,8,9));
i'm right?...
I've try this:   $items = getMediaItems(0, 5, 'RAND()', false, array(2));but i receive error 500.
Works fine if i use    $items = getMediaItems(0, 5, 'RAND()', true, array(1,3,4,5,6,7,8,9));but, if is possible, i want disable one album and not enable all except one (otherwise is necessary to edit block code every time i make a new album) :(
--
PS: in your opinion is ok the code with highslide?
If you want to exclude cats you can use this
$excludecats = '35,12,30';
$items = getMediaItems(0, 5, 'RAND()', true, array(), 'm.album_id NOT IN (' . $excludecats . ')');

Or only one cat
$includecats = '35';
$items = getMediaItems(0, 5, 'RAND()', true, array(), 'm.album_id IN (' . $includecats . ')');

So Long

Advertisement: