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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 561
  • Total: 561

[Block] SMF Gallery Random Picture

Started by Thurnok, December 01, 2006, 09:32:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ken.

Glad you like it Rabain!
Let us see a link when you get it setup.  :up:
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

scubasjl

Works awesome, I was creating a script do to the same thing until I found the list of block code snippets. So glad I did. :)

cyrildarkcloud

Quote from: MinasC on October 01, 2007, 01:46:13 AM
i used this block for the first time and i noticed that it showed the username of the poster (the one used to login) instead of the real name (the one shown in posts and other members . i replaced this

// display the membername who posted pic?  need to get name based on ID_MEMBER
$gal_tmp = mysql_fetch_assoc(mysql_query("SELECT memberName FROM ".$db_prefix."members WHERE ID_MEMBER = ".$row['ID_MEMBER']));
echo ' by <a href="'.$scripturl.'?action=profile;u='.$row['ID_MEMBER'].'">'.$gal_tmp['memberName'].'</a>';


with this

// display the membername who posted pic?  need to get name based on ID_MEMBER
$gal_tmp = mysql_fetch_assoc(mysql_query("SELECT realName FROM ".$db_prefix."members WHERE ID_MEMBER = ".$row['ID_MEMBER']));
echo ' by <a href="'.$scripturl.'?action=profile;u='.$row['ID_MEMBER'].'">'.$gal_tmp['realName'].'</a>';


and it worked just fine ! i am not a coder , just experimenting , so i have to ask , is that ok ?

MinasC, thanks for posting this.  I was just sitting down to try and figure out how to do the same thing when I found your post.  It's been working fine for me on two sites.

MinasC


monotiz

Hi, I'm italian boy, sorry for my english.
I admin http://www.drz-italia.com.

I create php central block and I paste into SMF Gallery Random Picture code, but I can't view the latest pics.

Thanks.

yllas

I am loving this and have installed it on my forum. Many thanks for all your hard work  :)

I was just wondering if there is a way to turn off the click on thumbnail option (to see larger images) Please

Rus

I also have this and think its great.  My only request would be an option to see if comments had been added.

yllas

Quote from: yllas on October 22, 2007, 05:48:36 PM
I am loving this and have installed it on my forum. Many thanks for all your hard work  :)

I was just wondering if there is a way to turn off the click on thumbnail option (to see larger images) Please

I think i've found the right part to edit, // 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";

but am unsure what to do next ???  please advise  :-*

MinasC

if you just remove the linking part it should be ok !!! replace the code you posted with this one .

// display the picture thumbnail and link it to gallery full picture
echo ' <img src="'.$modSettings['gallery_url'].$row['thumbfilename'].'" /><br />'."\n";

yllas

MinasC you are a Star...many thanks for helping me  :up: it works like a dream

This website is proudly hosted on Crocweb Cloud Website Hosting.