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

Recent

Welcome to TinyPortal. Please login or sign up.

March 28, 2024, 08:19:08 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,104
  • Total Topics: 21,212
  • Online today: 151
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 142
  • Total: 143
  • tino

[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.

Dylert

Is it possible to add "Latest comments" to this block?

Freddy

There is a a setting :

// display # comments
$gal_dispNumComments = 0;


I assume this is what you require..

Dylert

Thanks a lot for the reply, Freddy! :) What you suggest is not actually what I need. I need a block that shows the latest commented pictures with the comments (not the latest pictures with comments).  I think it should be easy to add that feature to this mod, but unfortunately I don't have the skills to do it.


Freddy

I don't know if it's possible to be honest.  I'm not doing any coding at the moment and I don't have a test site set up.  I have been in hospital and it's all forms, doctor appointments and blood tests for me, so I can't really help this time. Maybe someone else has an idea.

adambean

Hi, is this still being supported? I have an older script (1.7.1) that is breaking on a few things so I came and found this. Sadly, it breaks:

Fatal error: Call to undefined function tp_query() in /Sources/Load.php(2156) : eval()'d code(127) : eval()'d code on line 173

Any suggestions?

Thanks!

bloc

That function is phased out and no longer used, at least not in TP for SMF 2.0.

lurkalot

Quote from: adambean on February 03, 2015, 12:27:47 PM
Hi, is this still being supported? I have an older script (1.7.1) that is breaking on a few things so I came and found this. Sadly, it breaks:

Fatal error: Call to undefined function tp_query() in /Sources/Load.php(2156) : eval()'d code(127) : eval()'d code on line 173

Any suggestions?

Thanks!

Quote from: bloc on February 03, 2015, 04:19:06 PM
That function is phased out and no longer used, at least not in TP for SMF 2.0.

Freddy updated it to work here, http://www.tinyportal.net/index.php?topic=32358.msg273522#msg273522

@ adambean, it's on your site now.  ;)


goten22

It's been quite some time but maybe someone will be able to help me.

Im looking for a way to put this code into my own divs. I'm looking for a way to display recent images from specific album with specific start item and creator name and image title.

I'm using Aeva Media but this gallery is no longer supported. Here is aeva code with my divs. It's based on foreach and is very easy to modify.


require_once($sourcedir . '/Aeva-Subs.php');   
$aeva_start = 1;                   // where item number to start at
$aeva_limit = 3;                  // maximum number of items to display
$aeva_sort = 'm.time_added DESC';  // sort see Aeva-Subs.php for values I use 'RAND()' or 'm.time_added DESC' DESC or ASC for sorting order
$aeva_all_albums = true;           // all albums .. true or false 
$aeva_albums = array(1);            // for a single album put eg: array(10) for an array of albums eg: array(3,5,7) for all albums eg:array()

$items = aeva_getMediaItems($aeva_start,$aeva_limit,$aeva_sort,$aeva_all_albums,$aeva_albums);


echo'<div style="width:20%; height:300px; text-align:center; float:left; overflow:hidden;">';

foreach ($items as $item) {
echo'
<a href="', $galurl, 'sa=item;id=', $item['id'], '#itembox">
<div id="wyr" style="margin: 0 0 2px; padding:10px; display: inline-block; text-align:center; background-image:url(', $galurl, 'sa=media;id=', $item['id'], '); background-repeat:no-repeat; background-color: #000; background-position: center; background-size: cover; width:100%; height:100px;">
<br>
', $item['title'], '
<br>
<i class="fa fa-eye"></i>: ', $item['views'], '<br />
<i class="fa fa-user"></i>: ', $item['desc'], '<br><br>

</div>
</a>';
};
echo'</div>';


Maybe is there a way to simplify smf gallery code, to foreach maybe? Or whatever so I could put it into my divs?

Ramzesito

hello,
does anybody support this mod now?

it was working until I updated SMF (from 2.0.13 to 2.0.14),
after that I've got error message instead of picture:
MySQL error:Access denied for user ''@'localhost' (using password: NO)

I`m using SMF Gallery Random Picture-ver.1.7.1 and SMF Gallery LITE 6.0