collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 367
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Aeva Media Block  (Read 84799 times)

0 Members and 2 Guests are viewing this topic.

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Aeva Media Block
« Reply #40 on: February 22, 2010, 02:06:22 AM »

I have put together a neat little slide-show package that will display Aeva photos and/or SMF forum photos (image attachments) in a portal block.

CLICK HERE  to view the relevant thread. You might have to login/register to download files.

Specific settings for what you want displayed are done in the block itself and also the settings.php file of the package provided in that thread.

UD
« Last Edit: February 22, 2010, 05:35:08 AM by Underdog »

Offline gmoneyluv

  • Semi Newbie
  • *
  • Posts: 11
  • SMF Version:1.1.11 SP Version:2.3.1
  • SMF Version: 1.1.11
  • SP Version: 2.3.1
Re: Aeva Media Block
« Reply #41 on: February 22, 2010, 11:09:02 AM »
Hey Underdog!

Any way this can be tweaked for folks running SMF 1.1.11?

It won't load on my site... :(
SMF Version:    1.1.11
SP Version:    2.3.1

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Aeva Media Block
« Reply #42 on: February 22, 2010, 07:20:30 PM »
Hey Underdog!

Any way this can be tweaked for folks running SMF 1.1.11?

It won't load on my site... :(

That version will not work with SMF 1.1.11 ... I will have to add another function to read the db for the recent/random image attachments and update the install file. I will do it some time this week and when I finish I will post a reply in that thread and update the attached install package from the first post.

UD

Offline saosangmo

  • Semi Newbie
  • *
  • Posts: 8
    • crane
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Aeva Media Block
« Reply #43 on: February 23, 2010, 11:08:26 AM »
Thank for this hack, it works very well. But I want to display items vertically. How to?

-saosangmo

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Aeva Media Block
« Reply #44 on: February 23, 2010, 04:18:25 PM »
Thank for this hack, it works very well. But I want to display items vertically. How to?

-saosangmo

Look here: http://simpleportal.net/index.php?topic=4198.msg27750#msg27750

but change the 0 to a 1


Offline saosangmo

  • Semi Newbie
  • *
  • Posts: 8
    • crane
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Aeva Media Block
« Reply #45 on: February 23, 2010, 08:04:36 PM »
thank for your support. it works very well.
-saosangmo

Offline gmoneyluv

  • Semi Newbie
  • *
  • Posts: 11
  • SMF Version:1.1.11 SP Version:2.3.1
  • SMF Version: 1.1.11
  • SP Version: 2.3.1
Re: Aeva Media Block
« Reply #46 on: February 23, 2010, 09:40:05 PM »
thanks for all your work underdog. Looking forward to the 1.1.11 version! :) 
SMF Version:    1.1.11
SP Version:    2.3.1

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: Aeva Media Block
« Reply #47 on: February 26, 2010, 10:23:26 PM »
thanks for all your work underdog. Looking forward to the 1.1.11 version! :)

You're very welcome.

The thread has been updated with the new version.
I also added random display for forum photos.

UD
« Last Edit: February 26, 2010, 10:28:11 PM by Underdog »

Offline Stigmartyr

  • Jr. Member
  • **
  • Posts: 72
  • Gender: Male
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Aeva Media Block
« Reply #48 on: March 07, 2010, 10:55:39 AM »
Ok! Getting closer! Applied the solutions above and they worked but i'm getting a missing picture icon and when i click on the missing picture i get a 406 Not Acceptable error (see attachment).

Any ideas?

Here is web address to my site.
http://www.ontarioclimbing.com/forum/index.php?www
   

Is the gallery's folder writable?

Offline mrtrc266

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Male
    • Monsters Mansion
  • SMF Version: 2 RC3
  • SP Version: 2.3.1
Re: Aeva Media Block
« Reply #49 on: March 16, 2010, 03:34:14 PM »
For SMF Media Gallery there is a really neat block code to use for your portal. Anyone willing to port this to Aeva Media?

Original post here http://simpleportal.net/index.php?topic=1654.msg12017;topicseen#msg12017

Code: [Select]
    global $sourcedir, $context, $txt, $galurl, $scripturl, $settings;
    if(!file_exists($sourcedir . '/Subs-MGallery.php'))
    {
        echo $txt['sp-mgallery_error'];
        return false;
    }
$parameters[1] = 0;
    $limit = empty($parameters[0]) ? 1 : (int) $parameters[0];
    $type = empty($parameters[1]) ? 'm.id_media DESC' : 'RAND()';
    require_once($sourcedir . '/Subs-MGallery.php');
    loadMGal_Settings();
    loadLanguage('MGallery', sp_languageSelect('MGallery'));
    $items = getMediaItems(0, $limit, $type);
    echo '
    <hr />
<div style="text-align: center; line-height: 1.4em;">The Latest Gallery Submission</div>
<hr />
<table style="border: 0; margin: 0 auto;">';

    foreach ($items as $item)
      echo '
  <tr>
    <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 src="', $galurl, 'sa=media;id=', $item['id'], ';preview" 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>  </tr>';
    echo '
</table>';

$parameters[1] = 1;
    $limit = empty($parameters[0]) ? 5 : (int) $parameters[0];
    $type = empty($parameters[1]) ? 'm.id_media DESC' : 'RAND()';
    require_once($sourcedir . '/Subs-MGallery.php');
    loadMGal_Settings();
    loadLanguage('MGallery', sp_languageSelect('MGallery'));
    $items = getMediaItems(0, $limit, $type);
    echo '
    <hr />
<div style="text-align: center; line-height: 1.4em;">A selection of Random Images from the Gallery</div>
<hr />
<table style="border: 0; margin: 0 auto;">
  <tr style="width:150px; height:150px;">';
    foreach ($items as $item)
      echo '
    <td>
      <div class="smalltext" style="text-align: center; line-height: 1.4em; border: 1px #000000 solid; padding: 5px;width:125px;height:160px;">
      <a href="', $galurl, 'sa=item;id=', $item['id'], '">', $item['title'], '</a><br />
      <a href="', $galurl, 'sa=item;id=', $item['id'], '"><img 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>';
$parameters[1] = 1;


    $limit = empty($parameters[0]) ? 5 : (int) $parameters[0];

    $type = empty($parameters[1]) ? 'm.id_media DESC' : 'RAND()';



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

    loadMGal_Settings();

   

    loadLanguage('MGallery', sp_languageSelect('MGallery'));



    $items = getMediaItems(0, $limit, $type);



    echo '
<table style="border: 0; margin: 0 auto;">

  <tr style="width:150px; height:150px;">';



    foreach ($items as $item)

      echo '

    <td>

      <div class="smalltext" style="text-align: center; line-height: 1.4em; border: 1px #000000 solid; padding: 5px;width:125px;height:160px;">

      <a href="', $galurl, 'sa=item;id=', $item['id'], '">', $item['title'], '</a><br />

      <a href="', $galurl, 'sa=item;id=', $item['id'], '"><img 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>';
$parameters[1] = 1;


    $limit = empty($parameters[0]) ? 5 : (int) $parameters[0];

    $type = empty($parameters[1]) ? 'm.id_media DESC' : 'RAND()';



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

    loadMGal_Settings();

   

    loadLanguage('MGallery', sp_languageSelect('MGallery'));



    $items = getMediaItems(0, $limit, $type);



    echo '
<table style="border: 0; margin: 0 auto;">

  <tr>';



    foreach ($items as $item)

      echo '

    <td style="width:150; height:150;">

      <div class="smalltext" style="text-align: center; line-height: 1.4em; border: 1px #000000 solid; padding: 5px;width:125px;height:160px;">

      <a href="', $galurl, 'sa=item;id=', $item['id'], '">', $item['title'], '</a><br />

      <a href="', $galurl, 'sa=item;id=', $item['id'], '"><img 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>';

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Aeva Media Block
« Reply #50 on: March 18, 2010, 10:01:17 AM »
What does that block code supposed to do and look?
And slowly, you come to realize... It's all as it should be...

Offline mrtrc266

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Male
    • Monsters Mansion
  • SMF Version: 2 RC3
  • SP Version: 2.3.1
Re: Aeva Media Block
« Reply #51 on: March 19, 2010, 09:42:24 AM »
What does that block code supposed to do and look?

It show the latest image (large) on top and then 15 random images below
http://www.monsters-mansion.com/testsmf2/

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Aeva Media Block
« Reply #52 on: March 20, 2010, 01:06:50 PM »
Try this:

Code: [Select]
global $sourcedir;
require_once($sourcedir . '/Aeva-Subs.php');
echo '<h2>Latest Image</h2>';
echo preg_replace('~;thumb" width="\d+" height="\d+~', '" width="500', str_replace('"><tr>', '" cellspacing="8" style="width: 100%;"><tr>', aeva_listItems(aeva_getMediaItems(0, 1, 'm.id_media DESC'), false, '', 1)));
echo '<h2>Random Images</h2>';
echo aeva_listItems(aeva_getMediaItems(0, 12, 'RAND()'), false, '', 4);
And slowly, you come to realize... It's all as it should be...

Offline mrtrc266

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Male
    • Monsters Mansion
  • SMF Version: 2 RC3
  • SP Version: 2.3.1
Re: Aeva Media Block
« Reply #53 on: March 20, 2010, 01:32:14 PM »
PERFECT!!! Thank you very much!

http://monsters-mansion.com/index.php

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Aeva Media Block
« Reply #54 on: March 21, 2010, 04:06:28 AM »
You're welcome. ;)
And slowly, you come to realize... It's all as it should be...

Offline Renegd98

  • Semi Newbie
  • *
  • Posts: 49
  • SMF Version: 2 RC2
  • SP Version: 2.3.1
Re: Aeva Media Block
« Reply #55 on: March 21, 2010, 10:23:40 AM »
Nice block code...

Offline esem

  • Newbie
  • Posts: 4
  • SMF Version: 2 RC3
  • SP Version: 2.3.1
Re: Aeva Media Block
« Reply #56 on: March 21, 2010, 12:10:07 PM »
How to show the 3 latest image (small) in row, with title and autor name only ?
« Last Edit: March 21, 2010, 12:29:44 PM by esem »

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Aeva Media Block
« Reply #57 on: March 22, 2010, 12:10:34 PM »
This would do it:

Code: [Select]
global $sourcedir;
require_once($sourcedir . '/Aeva-Subs.php');
echo aeva_listItems(aeva_getMediaItems(0, 3, 'm.id_media'), false, '', 3);

Though, I don't have the time to make it hide the details other than title and author. You may want to ask that from the author of the mod.
And slowly, you come to realize... It's all as it should be...

Offline avenger

  • Semi Newbie
  • *
  • Posts: 15
    • ethical designs
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Aeva Media Block
« Reply #58 on: March 25, 2010, 11:16:16 AM »
thank you

Offline MultiformeIngegno

  • Full Member
  • ***
  • Posts: 127
  • Gender: Male
  • SMF Version: None
  • SP Version: None
Re: Aeva Media Block
« Reply #59 on: March 25, 2010, 12:26:09 PM »
This would do it:
It displays the first images, not the latest...