Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43293
Total Topics: 7522
Most Online Today: 118
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 114
Total: 114

Author Topic: How to moddify Gallery main page?  (Read 6025 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: 16451
    • 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: 16451
    • 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
14326 Views
Last post April 26, 2009, 10:01:52 pm
by SMFHacks
2 Replies
4248 Views
Last post January 26, 2008, 11:35:04 am
by astring
7 Replies
7191 Views
Last post December 02, 2008, 10:13:42 pm
by SMFHacks
0 Replies
3974 Views
Last post May 06, 2012, 09:44:20 pm
by CWVRV
2 Replies
4453 Views
Last post September 20, 2014, 04:33:36 am
by Jonas1975

+- Recent Topics

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 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

Powered by EzPortal