SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 25, 2012, 09:02:01 am

Login with username, password and session length
Members
Total Members: 10073
Latest: makablue
Stats
Total Posts: 28687
Total Topics: 4977
Online Today: 85
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 44
Total: 44
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Most recent images on main page not showing  (Read 1709 times)
marcbkk
Full Member
***
Offline Offline

Posts: 152


View Profile
« 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...

Logged
marcbkk
Full Member
***
Offline Offline

Posts: 152


View Profile
« 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:
//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
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[May 24, 2012, 08:02:50 am]

[May 24, 2012, 04:11:41 am]

[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 4.816 seconds with 19 queries.