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: 447
  • Total: 447

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

JimKarvo

Hello mates,

Can anyone help me, how I can add that block?

Tnx,
JimKarvo

Gourgi

@JimKarvo
you have to put the code in a phpbox.

@Thurnok : Thanks for your masterpiece man :D and the latest updates including the categories i asked for.
Surely my favorite snippet , way too far from the second one !
Things like this make me stuck with TP
Thanks again  :up:

JimKarvo

Αφέλεια μου

Tnx Gourgi! But first I have to upload some photos :-P

JimKarvo

One question! How I can have up of 1 random photo in block?

wilsy

@Thurnock - Thank you  :)

Regards,

Wilsy.

Thurnok

@JimKarvo
Take a look inside the actual code.  You will find numerous configuration variables there that you can set as you desire.  I always recommend copying the code to your favorite text editor to actually "view" the code before putting it into the TP Block itself.  It's much easier to view it in your favorite editor than it is in the small "textarea" of the Admin Control Panel block manager.

If you look in the code, the area you are interested is all between the following sections:

/*
****************************************
****************************************
***    !! Admin Config Section !!    ***
****************************************
****************************************
*/


all the goodies for you to set are in here

/*
****************************************
****************************************
***  !! END Admin Config Section !!  ***
****************************************
****************************************
*/


Each variable is commented relatively well to tell you its purpose and options.  The one in particular you asked about is:
//   *****   LAYOUT OPTIONS   *****
// how many pictures do you want to show?

$gal_numpics = 1;

Simply change the number to the number of pictures you want displayed in your block.  You can also change how many columns you want your pictures displayed in via another variable in that section.  I'll let you try to find it now that I've explained it pretty well.

In fact, I recommend you play with all the various configuration variables so you can see what each does.   I suggest you open two browser windows (or Tabs) for your site pointing one to your admin control panel - in specific the TP Block Manager and your block, and the other the home page of your site (or wherever you are displaying the block).  Change a setting, save the block, then refresh the window that is displaying the block to see what it does.

wilsy

Hi Thurnock,

Quote@Wilsy - I think I can add that pretty easily.  No time tonight.. maybe later this week or weekend.

Did you manage to take a look?  :)

Regards,

Wilsy.

Thurnok

Didn't get a chance over the weekend, but did tonight.  Think you will pleasantly find what you are looking for in the first post.  ;)

Thurnok

Update 1.6
- Added abililty to display pics for a member who's profile you are viewing.

Code in first post.  Don't forget to read the Profile Note in first post.  All features work the same (random, most/least, newest/oldest, numpics, numcolumns, etc) for this new Profile feature, but added a link to display all pics for the member in the block at bottom.

Thurnok

For a demo of this new feature, go to my TP Blocks site (registration required to view member profiles), and view Maya's profile.

This website is proudly hosted on Crocweb Cloud Website Hosting.