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: 43261
Total Topics: 7519
Most Online Today: 297
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 1
Guests: 277
Total: 278

Author Topic: Most recent images on main page not showing  (Read 3479 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
5406 Views
Last post November 08, 2007, 07:48:49 pm
by SMFHacks
4 Replies
8216 Views
Last post May 19, 2008, 09:35:20 pm
by Adalla
5 Replies
7988 Views
Last post June 24, 2009, 07:19:57 pm
by SMFHacks
0 Replies
3400 Views
Last post June 03, 2010, 03:04:50 pm
by trifox
15 Replies
22010 Views
Last post March 21, 2014, 08:00:30 am
by SMFHacks

+- Recent Topics

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
Today at 08:27:36 am

No thumbnails on new uploads by Tonyvic
Today at 06:26:18 am

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

Powered by EzPortal