Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 201
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 202
Total: 202

Author Topic: Random Image in Block?  (Read 150335 times)

0 Members and 2 Guests are viewing this topic.

Offline Protocultura

  • Member
  • *
  • Posts: 7
    • View Profile
Re: Random Image in Block?
« Reply #75 on: November 20, 2006, 04:35:46 pm »
One last thing, this mod shows not aproved images, there is a way to block not admited images?
Cheers.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Random Image in Block?
« Reply #76 on: November 20, 2006, 04:45:44 pm »
Change
Code: [Select]
SELECT thumbfilename,ID_PICTURE,filename FROM

{$db_prefix}gallery_pic GROUP BY thumbfilename ORDER BY RAND() LIMIT 1"
To
Code: [Select]
SELECT thumbfilename,ID_PICTURE,filename FROM

{$db_prefix}gallery_pic Where approved = 1 GROUP BY thumbfilename ORDER BY RAND() LIMIT 1"
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline craftervillage

  • Member
  • *
  • Posts: 10
    • View Profile
Re: Random Image in Block?
« Reply #77 on: March 18, 2007, 10:04:50 pm »
thanks, works like a charm!
You can see the mod in my site www.c4dbrasil.com
Thanks SMFHacks a priceless piece of code!!!

Your site is very nice. I tried and tried to get the code to work on my board. No dice. I like the way your thumbnails are all the same size. Looks very professional. I don't understand a word on your site but the design is excellent!! Maybe soon I will figure out how to get the block code to work on mine. I wish it was in the mod package to make it easy. I think it is too hard for me to understand. I only know the html old school.  :( I am an php idiot. I bought the pro version in high hopes of a block code pre installed on it.  :'(
I have just started the board and have not any members yet and at this rate maybe I will give up. I have a design that I like called christmas2006_11. It's just right for my forum but the button would not show on it so I had to reinstall the whole thing over and I did not install the template a second time. 

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Random Image in Block?
« Reply #78 on: March 19, 2007, 06:50:28 am »
If you need help adding a button for the menu on a custom theme I can do that for you. Just attach your index.template.php of your custom theme.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline craftervillage

  • Member
  • *
  • Posts: 10
    • View Profile
Re: Random Image in Block?
« Reply #79 on: March 19, 2007, 08:48:36 am »
I think that's the right file. Let me know if it's not. Thank you for doing that. I can't wait to start up my board. I really like the gallery. The old gals will like it too. Thanks again for the help.
craftervillage.com/board/

Offline ~Alex

  • Member
  • *
  • Posts: 9
    • View Profile
Re: Random Image in Block?
« Reply #80 on: March 19, 2007, 08:07:55 pm »
Well, I've got the SMF Gallery Lite v1.7 or so and have tried to do as everyone's indicated, but I keep getting an SSI error, after copying the code, pasting it, then creating the php block.

Can someone be a bit more specific about which one is the correct code to use?

I'm on SMF 1.1.2 and TP 0.9.8.

Which code goes into SSI.php? Which command goes into the PHP we are suppose to create? And lastly, what I'm trying to do is create a random image block, am I even reading the correct thread?  ;D

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Random Image in Block?
« Reply #81 on: March 19, 2007, 09:25:32 pm »
I think that's the right file. Let me know if it's not. Thank you for doing that. I can't wait to start up my board. I really like the gallery. The old gals will like it too. Thanks again for the help.
craftervillage.com/board/


File attached with gallery menu
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline ~Alex

  • Member
  • *
  • Posts: 9
    • View Profile
Re: Random Image in Block?
« Reply #82 on: March 19, 2007, 11:48:28 pm »
SMFHacks...Taking that index template and replacing it with the one I have, changes my entire board to something unrecognizable...

Offline ~Alex

  • Member
  • *
  • Posts: 9
    • View Profile
Re: Random Image in Block?
« Reply #83 on: March 19, 2007, 11:49:46 pm »
Unless that response was not meant for me?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Random Image in Block?
« Reply #84 on: March 20, 2007, 06:56:55 am »
That was not meant for you.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline ~Alex

  • Member
  • *
  • Posts: 9
    • View Profile
Re: Random Image in Block?
« Reply #85 on: March 20, 2007, 07:53:59 pm »
That was not meant for you.

LoL. Well, can someone advise?

Offline ~Alex

  • Member
  • *
  • Posts: 9
    • View Profile
Re: Random Image in Block?
« Reply #86 on: March 21, 2007, 01:18:16 am »
any help is appreciated.

i'm on 1.1.2 w/ TP .98.

Offline craftervillage

  • Member
  • *
  • Posts: 10
    • View Profile
Re: Random Image in Block?
« Reply #87 on: March 21, 2007, 09:51:39 am »
I managed to get some code to work on my site for a random images.

   
global $scripturl,$db_prefix,$modSettings,$boardurl;

echo'<table cellspacing="0" cellpadding="1" border="0" align="center" width="90%"><tr>';
if(empty($modSettings['gallery_url']))
{
$modSettings['gallery_url'] = $boardurl . '/gallery/';
}
$request = db_query("SELECT thumbfilename, ID_CAT, ID_PICTURE FROM {$db_prefix}gallery_pic WHERE ID_CAT = '1' GROUP BY thumbfilename ORDER BY RAND() LIMIT 10", __FILE__, __LINE__);
   
$row = mysql_fetch_assoc($request);
while ($row = mysql_fetch_assoc($request))
echo' <center><td align="center" colspan="3"><a href="', $scripturl, '?action=gallery;sa=view;id=',
$row['ID_PICTURE'], '"><img src="', $modSettings['gallery_url'] .

$row['thumbfilename'] ,'" /></a></center>';
echo'</td></tr>';
echo'</table></br>';
mysql_free_result($request);

I have it on my boardindex.template just below the set of tabs. The only thing I don't like about the code is my picturres repeat themselves. Really I don't know how they look in someone elses browser and I don't know any php at all. I just played around until something worked. Well I think it worked. I would like to have the pictures in a matching table but I lack the skills to make one. I hope someone will visit my site and tell me if it is ok in their browser. I didn't use any ssi. ssi to me is something disabled people get?.! No clue. ;)
http://www.craftervillage.com/board/

Offline craftervillage

  • Member
  • *
  • Posts: 10
    • View Profile
Re: Random Image in Block?
« Reply #88 on: March 21, 2007, 02:41:52 pm »
I think that's the right file. Let me know if it's not. Thank you for doing that. I can't wait to start up my board. I really like the gallery. The old gals will like it too. Thanks again for the help.
craftervillage.com/board/


File attached with gallery menu

The code didn't work. I cannot see the button/link for the gallery. I really like it. I know it's installed because it works with the default template. Did I not do something right? I uploaded the file twice just to make sure it was the file you fixed. I even copied and pasted it to the index.template and it still did not work. I can link to it but I cannot find the link to it....http://craftervillage.com/board/index.php?action=gallery
« Last Edit: March 21, 2007, 02:47:50 pm by craftervillage »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Random Image in Block?
« Reply #89 on: March 21, 2007, 07:16:31 pm »
Hmm reattached the file.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
6066 Views
Last post June 18, 2010, 09:18:00 am
by dvera
2 Replies
9266 Views
Last post October 15, 2010, 04:03:02 pm
by Rafferty
1 Replies
5380 Views
Last post October 16, 2016, 12:12:51 pm
by exit
5 Replies
5328 Views
Last post July 12, 2017, 03:45:34 pm
by donk
8 Replies
6986 Views
Last post December 04, 2017, 09:41:20 pm
by Boomslanger

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal