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

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

katers

IchBin my hero, thanks for the help.

Sorry to be such an idiot about this, but the category number is 34 and obviously I stil put it in the wrong place because it is not showing.

//   *****   SECURITY CONFIGURATION   *****
// do not allow the following category numbers to be displayed
// example: $gal_disallowCats = "34" - don't show categories 2, 4, or 7
$gal_disallowCats = "";
// select only from the following cats - leave empty for all - NOTE:($gal_disallowCats overrides)
// example: $gal_allowCats = "34" - show only categories 1, 3, and 4
$gal_allowCats = "";
// Require the user has allowedTo('smfgallery_view') permission to view random pics thumbnails in block?
$gal_viewPermission = 1;

Thurnok

Lines that start with a double forwardslash ( // ) are comment lines.  They are not active code and anything you change there will have no effect.  You changed a comment line, so it has no effect.

That said, you also were changing the wrong one.  The $gal_disallowCats is for you to specify categories you do NOT want to show.  In your case, that would be the wrong selection.  You said you only want to show category 34, so you should change the $gal_allowCats line.  Make sure you read the variables carefully as the two I just mentioned do the opposite things.

For your case, change the line:

$gal_allowCats = "";


to

$gal_allowCats = "34";


Be careful not to leave out the quotes surrounding the category, and also do not erase the semicolon at the end of the line or you will get errors.

mr tart

Is there a way to get it to display the number of comments beneath the thumbnail?

Thurnok

This was actually asked for a long time back, but I have been away for awhile.  I just updated it to provide the option to display number of comments with a link to the picture/comments.

Since this was a "quicky" I decided to just post it as is, however I have a "to-do" list of things for this block which I hope to take care of soon now.

mr tart


cabletool

Ive read all the posts and couldnt find the answer.

Im using Crips BlackBox theme. The random images will not show with that theme. Ive been using this mod for over a year with the default theme but want a fresh theme.

Whats involved in using this block in another theme or why wouldnt the theme call it?

tia!

G6Cad

Should not be any problem what so ever in any theme as the blocks follow the settings from the default theme.

You can look at it on my site, i have it on the frontpage topblock and in the forum you have the theme block to set diffrent themes to check it with.

www.familjegodis.se

What you can try to do though is to copy the tp-style.css from the default theme and paste it in your custom theme and see if it helps, but worth a try as thats the only thing i can think of that could change anything between the themes and the blocks.

Final60

Heya
Thanks for this excellent block code!

I was having trouble. Not sure it it was because of updating to SMF 2.0b4 or because it is a newer SMG Gallery version, but the images were in a different url for example:

Main image is in: http://www.dcpryzom.co.uk/forum/index.php?action=gallery;sa=view;pic=163
The thumbnail in block pointed to:  http://www.dcpryzom.co.uk/forum/index.php?action=gallery;sa=view;id=163

So in the block code I had to search for sa=view;id and change it to sa=view;pic

Hope that helps anyone :)

JPDeni

Where are the images that are broken?

Ken.

Quote from: Final60 on November 25, 2008, 11:27:08 PM
Heya
Thanks for this excellent block code!

I was having trouble. Not sure it it was because of updating to SMF 2.0b4 or because it is a newer SMG Gallery version, but the images were in a different url for example:

Main image is in: http://www.dcpryzom.co.uk/forum/index.php?action=gallery;sa=view;pic=163
The thumbnail in block pointed to:  http://www.dcpryzom.co.uk/forum/index.php?action=gallery;sa=view;id=163

So in the block code I had to search for sa=view;id and change it to sa=view;pic

Hope that helps anyone :)

If you've updated to SMF 2.0 then you will find that TinyPortal will not work with that version of SMF... it's the same for block codes I think. :)
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

This website is proudly hosted on Crocweb Cloud Website Hosting.