Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 11833
Latest: playwyourlifenotme
New This Month: 1
New This Week: 1
New Today: 1
Stats
Total Posts: 42303
Total Topics: 7379
Most Online Today: 31
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 30
Total: 30

Author Topic: How to moddify Gallery main page?  (Read 4348 times)

0 Members and 1 Guest are viewing this topic.

Offline sturmkatze

  • Member
  • *
  • Posts: 21
    • View Profile
How to moddify Gallery main page?
« on: May 03, 2009, 02:32:19 pm »
I would like to add a bright red box to my gallery's main page that has a link to a page explaining how to size photos for my site. How/where would I do this? PHP is a pretty alien thing for me. :o

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16037
    • View Profile
Re: How to moddify Gallery main page?
« Reply #1 on: May 03, 2009, 03:58:11 pm »
You would start with the following file
themes/default/Gallery.template.php

The function that you would modify would be
function template_mainview()

In your case I would probably add the code before the following line
Code: [Select]
if ($showstatstop == true)
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 sturmkatze

  • Member
  • *
  • Posts: 21
    • View Profile
Re: How to moddify Gallery main page?
« Reply #2 on: May 03, 2009, 07:07:20 pm »
Alas, I messed it up somehow... I got this:

Template Parse Error!
There was a problem loading the /Themes/default/Gallery.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected '<' in .../Themes/default/Gallery.template.php on line 85

76:    
77:       if (isset($modSettings['gallery_index_showadmintop']))
78:          $showadminlinktop = $modSettings['gallery_index_showadmintop'];
79:    
80:       
81:       // See if they are allowed to add catagories Main Index only
82:       if ($g_manage == true && $showadminlinktop == true)
83:          showadminbar();
84:    // Pix resize how to

85:    <center><table style="text-align: left; margin-left: auto; margin-right: auto;" summary="" width="120" border="1" cellpadding="5" cellspacing="0">

86:     <tbody>
87:         <tr>
88:             <td style="text-align: center;" bgcolor="#ff3300"><a href="http://www.reenactor.net/forums/index.php?page=137"><span style="color: rgb(255, 255, 0);">How to Re-Size Photos for posting on this site.</span></a></td>
89:         </tr>

Offline sturmkatze

  • Member
  • *
  • Posts: 21
    • View Profile
Re: How to moddify Gallery main page?
« Reply #3 on: May 03, 2009, 07:09:35 pm »
Here is the file I tried to use (good thing I'm not so stupid as to NOT make a backup)  :P I have another site I have the free gallery on I'd like to add this kind of thing to also... is it the same?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16037
    • View Profile
Re: How to moddify Gallery main page?
« Reply #4 on: May 03, 2009, 10:18:41 pm »
Fixed file attached. For the lite it is in the same file. In the general area. You need to use an echo statement when displaying information such as
Code: [Select]
echo 'text goes here';
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 sturmkatze

  • Member
  • *
  • Posts: 21
    • View Profile
Re: How to moddify Gallery main page?
« Reply #5 on: May 03, 2009, 11:51:43 pm »
Thanks. Perfect on both!! ;D

 

Related Topics

  Subject / Started by Replies Last post
12 Replies
13426 Views
Last post April 26, 2009, 10:01:52 pm
by SMFHacks
2 Replies
2993 Views
Last post January 26, 2008, 11:35:04 am
by astring
7 Replies
5810 Views
Last post December 02, 2008, 10:13:42 pm
by SMFHacks
0 Replies
2618 Views
Last post May 06, 2012, 09:44:20 pm
by CWVRV
2 Replies
3118 Views
Last post September 20, 2014, 04:33:36 am
by Jonas1975

+- Recent Topics

Trying to access array offset on value of type null by SMFHacks
June 30, 2022, 03:58:54 pm

SMF forum by davejo
June 27, 2022, 01:16:25 am

Quick-moderation checkboxes by davejo
June 22, 2022, 09:27:24 am

Add option to Main Menu bar by Shades
June 21, 2022, 12:23:00 am

Logo and Category? by SMFHacks
June 12, 2022, 03:43:31 pm

prettyurls - TroubleShooting.wiki by GhostHunting
June 12, 2022, 02:52:57 pm

[Mod]Modification Update Version Checker by SMFHacks
June 06, 2022, 09:25:39 pm

Profile Gallery Link by SMFHacks
June 02, 2022, 05:17:45 pm

SMF Store 5.0 Beta Errors - Trying to access array offset on value of type null by Michael Vail
June 01, 2022, 12:48:48 pm

Upgrade Issues? by SMFHacks
May 30, 2022, 06:24:03 pm

Powered by EzPortal