Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4215
Latest: Proxitane
New This Month: 6
New This Week: 1
New Today: 1
Stats
Total Posts: 42796
Total Topics: 7456
Most Online Today: 34
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 47
Total: 47

Author Topic: Most recent images on main page not showing  (Read 3306 times)

0 Members and 1 Guest are viewing this topic.

Offline marcbkk

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Most recent images on main page not showing
« on: June 12, 2007, 08:16:45 pm »
I am currently running the Themis Theme by Bloc and I switched back to the default theme temporarily to test a plug-in that was not working right to see if it was theme related. The theme was the problem, but in the process I also realized 2 things about my Gallery Pro plug-in once I was running the default theme again:

1 - The most recent images on the main page are not showing up under the Themis theme. Is there an edit I can make to the theme to fix the problem?

2 - Recent Pictures and Recent Comments listed at the bottom of my main forum page where displayed in duplicate when I switched to the default theme. It is not a problem with Themis though so I am not worried about it, but it seems to be a problem with the SMF default theme. Just FYI...


Offline marcbkk

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Most recent images on main page not showing
« Reply #1 on: July 08, 2007, 02:08:43 am »
I figured out how to get the recent pictures box to show up in my custom theme. The following code needs to be added to the index.template.php file of your custom theme to get the recent picture thumbnail display from SMF Gallery Pro to work with a custom theme.

Code: [Select]
//SMF Gallery Recent Images on Index
//Load the language files
if(loadlanguage('Gallery') == false)
loadLanguage('Gallery','english');

//Check if the gallery url has been set if not use the default
if(empty($modSettings['gallery_url']))
{
$modSettings['gallery_url'] = $boardurl . '/gallery/';
}
echo '<table cellspacing="0" cellpadding="5" border="0" align="center" width="90%" class="tborder">
<tr class="titlebg">
<td align="center" colspan="4">',  $txt['gallery_main_recent'] ,'</td>
</tr>
';
$rowlevel = 0;
$maxrowlevel = 4;
foreach ($context['gallery_recent'] as $picture)
{
echo '<td align="center"><a href="' . $scripturl . '?action=gallery;sa=view;id=' . $picture['ID_PICTURE'] . '"><img src="' . $modSettings['gallery_url'] . $picture['thumbfilename']  . '" /></a><br />';
echo '<span class="smalltext">' . $txt['gallery_text_views'] . $picture['views'] . '<br />';
echo $txt['gallery_text_comments'] . $picture['commentlink'];
echo $txt['gallery_text_by'] . $picture['profilelink'];
echo '</span></td>';

if($rowlevel < ($maxrowlevel-1))
$rowlevel++;
else
{
echo '</tr>';
$rowlevel = 0;
}
}
if($rowlevel !=0)
{
echo '</tr>';
}
echo '</table>';
//End SMF Gallery Recent Images on Index

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
4264 Views
Last post November 08, 2007, 07:48:49 pm
by SMFHacks
4 Replies
6933 Views
Last post May 19, 2008, 09:35:20 pm
by Adalla
5 Replies
6929 Views
Last post June 24, 2009, 07:19:57 pm
by SMFHacks
0 Replies
2452 Views
Last post June 03, 2010, 03:04:50 pm
by trifox
15 Replies
19636 Views
Last post March 21, 2014, 08:00:30 am
by SMFHacks

+- Recent Topics

Using SMF's Built-in Search Algorithm by shuban
March 27, 2023, 09:15:10 am

Permissions query by davejo
March 26, 2023, 04:43:48 am

prettyurls - TroubleShooting.wiki by SMFHacks
March 25, 2023, 01:49:35 pm

Download Gallery Option by SMFHacks
March 23, 2023, 09:34:02 am

Lost attachments by pete
March 22, 2023, 10:24:17 am

Additional Permissions by mickjav
March 18, 2023, 05:21:23 am

[Mod]Discord Web Hooks by SMFHacks
March 17, 2023, 08:48:30 am

Site upgrade to 2.1 by SMFHacks
March 12, 2023, 08:51:19 am

Theme/CSS design wanted by mickjav
March 11, 2023, 12:10:11 pm

Category Images by Anmer
March 10, 2023, 06:20:04 am

Powered by EzPortal